summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-09-21 03:55:14 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-09-21 03:55:14 -0700
commitaad00662730e31461c6fffe493aef04a87d97d49 (patch)
treee990baf40baf7e4635b07ac99f0142ff0fb45d9f /include
parent9715e1df131ec4028e03d6f55fb22d935ee8b972 (diff)
parent13cfaf50971b1e8f81d3b704e7ec62ce5ad42e1a (diff)
Merge bk://linux-pnp.bkbits.net/pnp-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/signal.h2
-rw-r--r--include/asm-arm/arch-iop3xx/iop321-irqs.h1
-rw-r--r--include/asm-arm/arch-iop3xx/irqs.h2
-rw-r--r--include/asm-arm/arch-pxa/hardware.h1
-rw-r--r--include/asm-arm/arch-pxa/ide.h1
-rw-r--r--include/asm-arm/arch-pxa/idp.h1
-rw-r--r--include/asm-arm/arch-pxa/irqs.h2
-rw-r--r--include/asm-arm/arch-pxa/keyboard.h1
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h1
-rw-r--r--include/asm-arm/arch-sa1100/serial.h2
-rw-r--r--include/asm-arm/arch-sa1100/trizeps.h2
-rw-r--r--include/asm-arm/cacheflush.h1
-rw-r--r--include/asm-arm/mmu.h2
-rw-r--r--include/asm-arm/pgtable.h1
-rw-r--r--include/asm-arm/signal.h2
-rw-r--r--include/asm-arm26/signal.h2
-rw-r--r--include/asm-cris/signal.h2
-rw-r--r--include/asm-generic/cpumask_arith.h7
-rw-r--r--include/asm-generic/cpumask_array.h8
-rw-r--r--include/asm-h8300/signal.h2
-rw-r--r--include/asm-i386/genapic.h2
-rw-r--r--include/asm-i386/mach-bigsmp/mach_apic.h2
-rw-r--r--include/asm-i386/mach-default/mach_apic.h2
-rw-r--r--include/asm-i386/mach-generic/mach_apic.h1
-rw-r--r--include/asm-i386/mach-numaq/mach_apic.h2
-rw-r--r--include/asm-i386/mach-summit/mach_apic.h34
-rw-r--r--include/asm-i386/mach-visws/mach_apic.h2
-rw-r--r--include/asm-i386/mmzone.h20
-rw-r--r--include/asm-i386/numaq.h3
-rw-r--r--include/asm-i386/signal.h2
-rw-r--r--include/asm-i386/srat.h3
-rw-r--r--include/asm-i386/uaccess.h2
-rw-r--r--include/asm-ia64/signal.h2
-rw-r--r--include/asm-m68k/signal.h2
-rw-r--r--include/asm-m68knommu/signal.h2
-rw-r--r--include/asm-mips/signal.h2
-rw-r--r--include/asm-parisc/signal.h2
-rw-r--r--include/asm-ppc/signal.h2
-rw-r--r--include/asm-ppc/time.h8
-rw-r--r--include/asm-ppc64/signal.h2
-rw-r--r--include/asm-s390/signal.h2
-rw-r--r--include/asm-sh/signal.h2
-rw-r--r--include/asm-sparc/signal.h2
-rw-r--r--include/asm-sparc64/signal.h2
-rw-r--r--include/asm-v850/signal.h2
-rw-r--r--include/asm-x86_64/signal.h2
-rw-r--r--include/linux/bio.h1
-rw-r--r--include/linux/compiler-gcc+.h14
-rw-r--r--include/linux/compiler-gcc.h17
-rw-r--r--include/linux/compiler-gcc2.h23
-rw-r--r--include/linux/compiler-gcc3.h22
-rw-r--r--include/linux/compiler-intel.h24
-rw-r--r--include/linux/compiler.h72
-rw-r--r--include/linux/console.h1
-rw-r--r--include/linux/devfs_fs_kernel.h1
-rw-r--r--include/linux/elevator.h1
-rw-r--r--include/linux/ftape.h2
-rw-r--r--include/linux/kernel.h4
-rw-r--r--include/linux/miscdevice.h2
-rw-r--r--include/linux/nls.h3
-rw-r--r--include/linux/random.h1
-rw-r--r--include/linux/sched.h19
-rw-r--r--include/linux/swap.h1
-rw-r--r--include/linux/tty.h1
-rw-r--r--include/linux/writeback.h1
65 files changed, 265 insertions, 97 deletions
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h
index 27282f335de4..e24248f01340 100644
--- a/include/asm-alpha/signal.h
+++ b/include/asm-alpha/signal.h
@@ -71,7 +71,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-arm/arch-iop3xx/iop321-irqs.h b/include/asm-arm/arch-iop3xx/iop321-irqs.h
index 6e757b819105..9d5518da56fc 100644
--- a/include/asm-arm/arch-iop3xx/iop321-irqs.h
+++ b/include/asm-arm/arch-iop3xx/iop321-irqs.h
@@ -10,6 +10,7 @@
*
*/
+#include <linux/config.h>
/*
* IOP80321 chipset interrupts
diff --git a/include/asm-arm/arch-iop3xx/irqs.h b/include/asm-arm/arch-iop3xx/irqs.h
index 7468fab71d94..1df33024c8ea 100644
--- a/include/asm-arm/arch-iop3xx/irqs.h
+++ b/include/asm-arm/arch-iop3xx/irqs.h
@@ -10,6 +10,8 @@
*
*/
+#include <linux/config.h>
+
/*
* Whic iop3xx implementation is this?
*/
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h
index 9faf4e77b305..638bd35d7964 100644
--- a/include/asm-arm/arch-pxa/hardware.h
+++ b/include/asm-arm/arch-pxa/hardware.h
@@ -13,7 +13,6 @@
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
-#include <linux/config.h>
#include <asm/mach-types.h>
diff --git a/include/asm-arm/arch-pxa/ide.h b/include/asm-arm/arch-pxa/ide.h
index 926797e14a06..71a2e11b0206 100644
--- a/include/asm-arm/arch-pxa/ide.h
+++ b/include/asm-arm/arch-pxa/ide.h
@@ -14,7 +14,6 @@
*
*/
-#include <linux/config.h>
#include <asm/irq.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
diff --git a/include/asm-arm/arch-pxa/idp.h b/include/asm-arm/arch-pxa/idp.h
index 63932060242e..e496ed7f496a 100644
--- a/include/asm-arm/arch-pxa/idp.h
+++ b/include/asm-arm/arch-pxa/idp.h
@@ -12,6 +12,7 @@
*
*/
+#include <linux/config.h>
/*
* Note: this file must be safe to include in assembly files
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
index 6d452434eabc..ba16af5ee41a 100644
--- a/include/asm-arm/arch-pxa/irqs.h
+++ b/include/asm-arm/arch-pxa/irqs.h
@@ -10,6 +10,8 @@
* published by the Free Software Foundation.
*/
+#include <linux/config.h>
+
#define PXA_IRQ_SKIP 7 /* The first 7 IRQs are not yet used */
#define PXA_IRQ(x) ((x) - PXA_IRQ_SKIP)
diff --git a/include/asm-arm/arch-pxa/keyboard.h b/include/asm-arm/arch-pxa/keyboard.h
index 8cd10f1aa231..7bec3179b189 100644
--- a/include/asm-arm/arch-pxa/keyboard.h
+++ b/include/asm-arm/arch-pxa/keyboard.h
@@ -7,7 +7,6 @@
#ifndef _PXA_KEYBOARD_H
#define _PXA_KEYBOARD_H
-#include <linux/config.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index 1823479b1057..15b8ddd50065 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -10,6 +10,7 @@
* published by the Free Software Foundation.
*/
+#include <linux/config.h>
// FIXME hack so that SA-1111.h will work [cb]
diff --git a/include/asm-arm/arch-sa1100/serial.h b/include/asm-arm/arch-sa1100/serial.h
index 74ebcd5c669c..a6a2267a2dfa 100644
--- a/include/asm-arm/arch-sa1100/serial.h
+++ b/include/asm-arm/arch-sa1100/serial.h
@@ -7,6 +7,8 @@
* This is included by serial.c -- serial_sa1100.c makes no use of it.
*/
+#include <linux/config.h>
+
/* Standard COM flags */
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
diff --git a/include/asm-arm/arch-sa1100/trizeps.h b/include/asm-arm/arch-sa1100/trizeps.h
index b9cc02bac5d9..1802947011be 100644
--- a/include/asm-arm/arch-sa1100/trizeps.h
+++ b/include/asm-arm/arch-sa1100/trizeps.h
@@ -13,6 +13,8 @@
#ifndef _ASM_ARCH_TRIZEPS_H_
#define _ASM_ARCH_TRIZEPS_H_
+#include <linux/config.h>
+
#ifdef CONFIG_TRIZEPS_MFTB2
#include "mftb2.h"
#endif
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index 30a47cba4d4b..cff6d6f05913 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -10,6 +10,7 @@
#ifndef _ASMARM_CACHEFLUSH_H
#define _ASMARM_CACHEFLUSH_H
+#include <linux/config.h>
#include <linux/sched.h>
#include <linux/mm.h>
diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h
index c33797d6cc7b..a457cb71984f 100644
--- a/include/asm-arm/mmu.h
+++ b/include/asm-arm/mmu.h
@@ -1,8 +1,6 @@
#ifndef __ARM_MMU_H
#define __ARM_MMU_H
-#include <linux/config.h>
-
typedef struct {
#if __LINUX_ARM_ARCH__ >= 6
unsigned int id;
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index 5b23a0a59778..9a09fb19258b 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -10,7 +10,6 @@
#ifndef _ASMARM_PGTABLE_H
#define _ASMARM_PGTABLE_H
-#include <linux/config.h>
#include <asm/memory.h>
#include <asm/proc-fns.h>
#include <asm/arch/vmalloc.h>
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h
index eb59aa539b9c..6d623e24c0fb 100644
--- a/include/asm-arm/signal.h
+++ b/include/asm-arm/signal.h
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
#define SIGSWI 32
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h
index e166988dbd5c..6f62e51a2e5a 100644
--- a/include/asm-arm26/signal.h
+++ b/include/asm-arm26/signal.h
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
#define SIGSWI 32
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h
index 1335bf27d8e2..3f187ec4800a 100644
--- a/include/asm-cris/signal.h
+++ b/include/asm-cris/signal.h
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-generic/cpumask_arith.h b/include/asm-generic/cpumask_arith.h
index bd8712d38fee..c19a0a6e45f0 100644
--- a/include/asm-generic/cpumask_arith.h
+++ b/include/asm-generic/cpumask_arith.h
@@ -27,7 +27,12 @@
#define cpus_shift_right(dst, src, n) do { dst = (src) >> (n); } while (0)
#define cpus_shift_left(dst, src, n) do { dst = (src) << (n); } while (0)
-#define any_online_cpu(map) ({ (map) ? first_cpu(map) : NR_CPUS; })
+#define any_online_cpu(map) \
+({ \
+ cpumask_t __tmp__; \
+ cpus_and(__tmp__, map, cpu_online_map); \
+ __tmp__ ? first_cpu(__tmp__) : NR_CPUS; \
+})
#define CPU_MASK_ALL (~((cpumask_t)0) >> (8*sizeof(cpumask_t) - NR_CPUS))
#define CPU_MASK_NONE ((cpumask_t)0)
diff --git a/include/asm-generic/cpumask_array.h b/include/asm-generic/cpumask_array.h
index 991a04bf7062..60c955d823b7 100644
--- a/include/asm-generic/cpumask_array.h
+++ b/include/asm-generic/cpumask_array.h
@@ -36,7 +36,13 @@
cpu_set(cpu, __cpu_mask); \
__cpu_mask; \
})
-#define any_online_cpu(map) find_first_bit((map).mask, NR_CPUS)
+#define any_online_cpu(map) \
+({ \
+ cpumask_t __tmp__; \
+ cpus_and(__tmp__, map, cpu_online_map); \
+ find_first_bit(__tmp__.mask, NR_CPUS); \
+})
+
/*
* um, these need to be usable as static initializers
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h
index 460d8a6f69f4..6612725c2297 100644
--- a/include/asm-h8300/signal.h
+++ b/include/asm-h8300/signal.h
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-i386/genapic.h b/include/asm-i386/genapic.h
index cd4b708133c3..76465ccbbdf8 100644
--- a/include/asm-i386/genapic.h
+++ b/include/asm-i386/genapic.h
@@ -30,6 +30,7 @@ struct genapic {
unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
unsigned long (*check_apicid_present)(int apicid);
int no_balance_irq;
+ int no_ioapic_check;
void (*init_apic_ldr)(void);
physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
@@ -77,6 +78,7 @@ struct genapic {
.int_dest_mode = INT_DEST_MODE, \
.apic_broadcast_id = APIC_BROADCAST_ID, \
.no_balance_irq = NO_BALANCE_IRQ, \
+ .no_ioapic_check = NO_IOAPIC_CHECK, \
APICFUNC(apic_id_registered), \
APICFUNC(target_cpus), \
APICFUNC(check_apicid_used), \
diff --git a/include/asm-i386/mach-bigsmp/mach_apic.h b/include/asm-i386/mach-bigsmp/mach_apic.h
index dab6aa34c6fa..0e9855144660 100644
--- a/include/asm-i386/mach-bigsmp/mach_apic.h
+++ b/include/asm-i386/mach-bigsmp/mach_apic.h
@@ -14,6 +14,8 @@
#define NO_BALANCE_IRQ (1)
#define esr_disable (1)
+#define NO_IOAPIC_CHECK (0)
+
static inline int apic_id_registered(void)
{
return (1);
diff --git a/include/asm-i386/mach-default/mach_apic.h b/include/asm-i386/mach-default/mach_apic.h
index a96477cf10a0..8875f34285bd 100644
--- a/include/asm-i386/mach-default/mach_apic.h
+++ b/include/asm-i386/mach-default/mach_apic.h
@@ -18,6 +18,8 @@ static inline cpumask_t target_cpus(void)
#define NO_BALANCE_IRQ (0)
#define esr_disable (0)
+#define NO_IOAPIC_CHECK (0)
+
#define INT_DELIVERY_MODE dest_LowestPrio
#define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */
diff --git a/include/asm-i386/mach-generic/mach_apic.h b/include/asm-i386/mach-generic/mach_apic.h
index 71b4849614bc..21f0e75f1b25 100644
--- a/include/asm-i386/mach-generic/mach_apic.h
+++ b/include/asm-i386/mach-generic/mach_apic.h
@@ -5,6 +5,7 @@
#define esr_disable (genapic->esr_disable)
#define NO_BALANCE_IRQ (genapic->no_balance_irq)
+#define NO_IOAPIC_CHECK (genapic->no_ioapic_check)
#define APIC_BROADCAST_ID (genapic->apic_broadcast_id)
#define INT_DELIVERY_MODE (genapic->int_delivery_mode)
#define INT_DEST_MODE (genapic->int_dest_mode)
diff --git a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h
index 98b4e5921aa8..814ee9aa2521 100644
--- a/include/asm-i386/mach-numaq/mach_apic.h
+++ b/include/asm-i386/mach-numaq/mach_apic.h
@@ -17,6 +17,8 @@ static inline cpumask_t target_cpus(void)
#define NO_BALANCE_IRQ (1)
#define esr_disable (1)
+#define NO_IOAPIC_CHECK (0)
+
#define INT_DELIVERY_MODE dest_LowestPrio
#define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */
diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h
index 73a4a1077e85..a10b4591737e 100644
--- a/include/asm-i386/mach-summit/mach_apic.h
+++ b/include/asm-i386/mach-summit/mach_apic.h
@@ -7,14 +7,13 @@
#define esr_disable (1)
#define NO_BALANCE_IRQ (0)
-#define XAPIC_DEST_CPUS_MASK 0x0Fu
-#define XAPIC_DEST_CLUSTER_MASK 0xF0u
+#define NO_IOAPIC_CHECK (1) /* Don't check I/O APIC ID for xAPIC */
-static inline unsigned long xapic_phys_to_log_apicid(int phys_apic)
-{
- return ( (1ul << ((phys_apic) & 0x3)) |
- ((phys_apic) & XAPIC_DEST_CLUSTER_MASK) );
-}
+/* In clustered mode, the high nibble of APIC ID is a cluster number.
+ * The low nibble is a 4-bit bitmap. */
+#define XAPIC_DEST_CPUS_SHIFT 4
+#define XAPIC_DEST_CPUS_MASK ((1u << XAPIC_DEST_CPUS_SHIFT) - 1)
+#define XAPIC_DEST_CLUSTER_MASK (XAPIC_DEST_CPUS_MASK << XAPIC_DEST_CPUS_SHIFT)
#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
@@ -40,15 +39,29 @@ static inline unsigned long check_apicid_present(int bit)
return 1;
}
-#define apicid_cluster(apicid) (apicid & 0xF0)
+#define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK)
extern u8 bios_cpu_apicid[];
+extern u8 cpu_2_logical_apicid[];
static inline void init_apic_ldr(void)
{
unsigned long val, id;
-
- id = xapic_phys_to_log_apicid(hard_smp_processor_id());
+ int i, count;
+ u8 lid;
+ u8 my_id = (u8)hard_smp_processor_id();
+ u8 my_cluster = (u8)apicid_cluster(my_id);
+
+ /* Create logical APIC IDs by counting CPUs already in cluster. */
+ for (count = 0, i = NR_CPUS; --i >= 0; ) {
+ lid = cpu_2_logical_apicid[i];
+ if (lid != BAD_APICID && apicid_cluster(lid) == my_cluster)
+ ++count;
+ }
+ /* We only have a 4 wide bitmap in cluster mode. If a deranged
+ * BIOS puts 5 CPUs in one APIC cluster, we're hosed. */
+ BUG_ON(count >= XAPIC_DEST_CPUS_SHIFT);
+ id = my_cluster | (1UL << count);
apic_write_around(APIC_DFR, APIC_DFR_VALUE);
val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
val |= SET_APIC_LOGICAL_ID(id);
@@ -77,7 +90,6 @@ static inline int apicid_to_node(int logical_apicid)
}
/* Mapping from cpu number to logical apicid */
-extern u8 cpu_2_logical_apicid[];
static inline int cpu_to_logical_apicid(int cpu)
{
if (cpu >= NR_CPUS)
diff --git a/include/asm-i386/mach-visws/mach_apic.h b/include/asm-i386/mach-visws/mach_apic.h
index ab40e5c0f3e5..9a0208496458 100644
--- a/include/asm-i386/mach-visws/mach_apic.h
+++ b/include/asm-i386/mach-visws/mach_apic.h
@@ -8,6 +8,8 @@
#define no_balance_irq (0)
#define esr_disable (0)
+#define NO_IOAPIC_CHECK (0)
+
#define INT_DELIVERY_MODE dest_LowestPrio
#define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */
diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h
index cdae0e44df92..8587d7e3a2ae 100644
--- a/include/asm-i386/mmzone.h
+++ b/include/asm-i386/mmzone.h
@@ -122,11 +122,29 @@ static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn)
#elif CONFIG_ACPI_SRAT
#include <asm/srat.h>
#elif CONFIG_X86_PC
-#define get_memcfg_numa get_memcfg_numa_flat
#define get_zholes_size(n) (0)
#else
#define pfn_to_nid(pfn) (0)
#endif /* CONFIG_X86_NUMAQ */
+extern int get_memcfg_numa_flat(void );
+/*
+ * This allows any one NUMA architecture to be compiled
+ * for, and still fall back to the flat function if it
+ * fails.
+ */
+static inline void get_memcfg_numa(void)
+{
+#ifdef CONFIG_X86_NUMAQ
+ if (get_memcfg_numaq())
+ return;
+#elif CONFIG_ACPI_SRAT
+ if (get_memcfg_from_srat())
+ return;
+#endif
+
+ get_memcfg_numa_flat();
+}
+
#endif /* CONFIG_DISCONTIGMEM */
#endif /* _ASM_MMZONE_H_ */
diff --git a/include/asm-i386/numaq.h b/include/asm-i386/numaq.h
index de52624c6e0b..13eb04501378 100644
--- a/include/asm-i386/numaq.h
+++ b/include/asm-i386/numaq.h
@@ -29,8 +29,7 @@
#ifdef CONFIG_X86_NUMAQ
#define MAX_NUMNODES 16
-extern void get_memcfg_numaq(void);
-#define get_memcfg_numa() get_memcfg_numaq()
+extern int get_memcfg_numaq(void);
/*
* SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 80b7d5fdef9b..e3397cd6f77b 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -70,7 +70,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-i386/srat.h b/include/asm-i386/srat.h
index b71cca0553c3..13563f45870e 100644
--- a/include/asm-i386/srat.h
+++ b/include/asm-i386/srat.h
@@ -32,8 +32,7 @@
#endif
#define MAX_NUMNODES 8
-extern void get_memcfg_from_srat(void);
+extern int get_memcfg_from_srat(void);
extern unsigned long *get_zholes_size(int);
-#define get_memcfg_numa() get_memcfg_from_srat()
#endif /* _ASM_SRAT_H_ */
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
index d3eabf5b95c7..8042de63aa55 100644
--- a/include/asm-i386/uaccess.h
+++ b/include/asm-i386/uaccess.h
@@ -80,7 +80,7 @@ extern struct movsl_mask {
* checks that the pointer is in the user space range - after calling
* this function, memory access functions may still return -EFAULT.
*/
-#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
+#define access_ok(type,addr,size) (likely(__range_ok(addr,size) == 0))
/**
* verify_area: - Obsolete, use access_ok()
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h
index f98d3bb65a92..5744b56571ba 100644
--- a/include/asm-ia64/signal.h
+++ b/include/asm-ia64/signal.h
@@ -50,7 +50,7 @@
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h
index dfb43563e1cc..8d9c02cafc01 100644
--- a/include/asm-m68k/signal.h
+++ b/include/asm-m68k/signal.h
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h
index 4b4f4b4058f1..486cbb0dc088 100644
--- a/include/asm-m68knommu/signal.h
+++ b/include/asm-m68knommu/signal.h
@@ -68,7 +68,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h
index 40d73cc2a1e0..994987db61be 100644
--- a/include/asm-mips/signal.h
+++ b/include/asm-mips/signal.h
@@ -59,7 +59,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h
index 5ab02aef6dea..cd4beefef333 100644
--- a/include/asm-parisc/signal.h
+++ b/include/asm-parisc/signal.h
@@ -42,7 +42,7 @@
/* These should not be considered constants from userland. */
#define SIGRTMIN 37
-#define SIGRTMAX (_NSIG-1) /* it's 44 under HP/UX */
+#define SIGRTMAX _NSIG /* it's 44 under HP/UX */
/*
* SA_FLAGS values:
diff --git a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h
index f692baff3a44..b0528fcbe985 100644
--- a/include/asm-ppc/signal.h
+++ b/include/asm-ppc/signal.h
@@ -61,7 +61,7 @@ typedef struct {
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h
index ff2939bcbcf9..67188ec06a7a 100644
--- a/include/asm-ppc/time.h
+++ b/include/asm-ppc/time.h
@@ -97,6 +97,13 @@ extern __inline__ unsigned long get_rtcl(void) {
return rtcl;
}
+extern __inline__ unsigned long get_rtcu(void)
+{
+ unsigned long rtcu;
+ asm volatile("mfrtcu %0" : "=r" (rtcu));
+ return rtcu;
+}
+
extern __inline__ unsigned get_native_tbl(void) {
if (__USE_RTC())
return get_rtcl();
@@ -140,6 +147,7 @@ extern __inline__ unsigned binary_tbl(void) {
#endif
/* Use mulhwu to scale processor timebase to timeval */
+/* Specifically, this computes (x * y) / 2^32. -- paulus */
#define mulhwu(x,y) \
({unsigned z; asm ("mulhwu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;})
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h
index 97ed18c9bb60..d0baf44cc89a 100644
--- a/include/asm-ppc64/signal.h
+++ b/include/asm-ppc64/signal.h
@@ -57,7 +57,7 @@ typedef struct {
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h
index fe2263b3ee0d..f273cdcd1cf6 100644
--- a/include/asm-s390/signal.h
+++ b/include/asm-s390/signal.h
@@ -78,7 +78,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h
index 2f8118eb0cb5..51a5f0691ee5 100644
--- a/include/asm-sh/signal.h
+++ b/include/asm-sh/signal.h
@@ -57,7 +57,7 @@ typedef struct {
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h
index 4e455b7add4a..6813baae27c6 100644
--- a/include/asm-sparc/signal.h
+++ b/include/asm-sparc/signal.h
@@ -89,7 +89,7 @@
#define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW)
#define SIGRTMIN 32
-#define SIGRTMAX (__NEW_NSIG - 1)
+#define SIGRTMAX __NEW_NSIG
#if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__)
#define _NSIG __NEW_NSIG
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index 63ac2e389367..f2101925bb74 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -89,7 +89,7 @@
#define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW)
#define SIGRTMIN 32
-#define SIGRTMAX (__NEW_NSIG - 1)
+#define SIGRTMAX __NEW_NSIG
#if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__)
#define _NSIG __NEW_NSIG
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h
index c33b1db71749..407db875899c 100644
--- a/include/asm-v850/signal.h
+++ b/include/asm-v850/signal.h
@@ -71,7 +71,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h
index bd1f350f1ba6..21c4bf716666 100644
--- a/include/asm-x86_64/signal.h
+++ b/include/asm-x86_64/signal.h
@@ -77,7 +77,7 @@ typedef unsigned long sigset_t;
/* These should not be considered constants from userland. */
#define SIGRTMIN 32
-#define SIGRTMAX (_NSIG-1)
+#define SIGRTMAX _NSIG
/*
* SA_FLAGS values:
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 6ad6d20d3778..0ac6a27ea0db 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -20,7 +20,6 @@
#ifndef __LINUX_BIO_H
#define __LINUX_BIO_H
-#include <linux/kdev_t.h>
#include <linux/highmem.h>
#include <linux/mempool.h>
diff --git a/include/linux/compiler-gcc+.h b/include/linux/compiler-gcc+.h
new file mode 100644
index 000000000000..f6ae9e76b825
--- /dev/null
+++ b/include/linux/compiler-gcc+.h
@@ -0,0 +1,14 @@
+/* Never include this file directly. Include <linux/compiler.h> instead. */
+
+/*
+ * These definitions are for Ueber-GCC: always newer than the latest
+ * version and hence sporting everything plus a kitchen-sink.
+ */
+#include <linux/compiler-gcc.h>
+
+#define inline __inline__ __attribute__((always_inline))
+#define __inline__ __inline__ __attribute__((always_inline))
+#define __inline __inline__ __attribute__((always_inline))
+#define __deprecated __attribute__((deprecated))
+#define __attribute_used__ __attribute__((__used__))
+#define __attribute_pure__ __attribute__((pure))
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
new file mode 100644
index 000000000000..152734055403
--- /dev/null
+++ b/include/linux/compiler-gcc.h
@@ -0,0 +1,17 @@
+/* Never include this file directly. Include <linux/compiler.h> instead. */
+
+/*
+ * Common definitions for all gcc versions go here.
+ */
+
+
+/* Optimization barrier */
+/* The "volatile" is due to gcc bugs */
+#define barrier() __asm__ __volatile__("": : :"memory")
+
+/* This macro obfuscates arithmetic on a variable address so that gcc
+ shouldn't recognize the original var, and make assumptions about it */
+#define RELOC_HIDE(ptr, off) \
+ ({ unsigned long __ptr; \
+ __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \
+ (typeof(ptr)) (__ptr + (off)); })
diff --git a/include/linux/compiler-gcc2.h b/include/linux/compiler-gcc2.h
new file mode 100644
index 000000000000..6f4f9d526abe
--- /dev/null
+++ b/include/linux/compiler-gcc2.h
@@ -0,0 +1,23 @@
+/* Never include this file directly. Include <linux/compiler.h> instead. */
+
+/* These definitions are for GCC v2.x. */
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+ a mechanism by which the user can annotate likely branch directions and
+ expect the blocks to be reordered appropriately. Define __builtin_expect
+ to nothing for earlier compilers. */
+#include <linux/compiler-gcc.h>
+
+#if __GNUC_MINOR__ < 96
+# define __builtin_expect(x, expected_value) (x)
+#endif
+
+#define __attribute_used__ __attribute__((__unused__))
+
+/*
+ * The attribute `pure' is not implemented in GCC versions earlier
+ * than 2.96.
+ */
+#if __GNUC_MINOR__ >= 96
+# define __attribute_pure__ __attribute__((pure))
+#endif
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h
new file mode 100644
index 000000000000..4eac3db89fda
--- /dev/null
+++ b/include/linux/compiler-gcc3.h
@@ -0,0 +1,22 @@
+/* Never include this file directly. Include <linux/compiler.h> instead. */
+
+/* These definitions are for GCC v3.x. */
+#include <linux/compiler-gcc.h>
+
+#if __GNUC_MINOR__ >= 1
+# define inline __inline__ __attribute__((always_inline))
+# define __inline__ __inline__ __attribute__((always_inline))
+# define __inline __inline__ __attribute__((always_inline))
+#endif
+
+#if __GNUC_MINOR__ > 0
+# define __deprecated __attribute__((deprecated))
+#endif
+
+#if __GNUC_MINOR__ >= 3
+# define __attribute_used__ __attribute__((__used__))
+#else
+# define __attribute_used__ __attribute__((__unused__))
+#endif
+
+#define __attribute_pure__ __attribute__((pure))
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h
new file mode 100644
index 000000000000..1d1c3ceaff4e
--- /dev/null
+++ b/include/linux/compiler-intel.h
@@ -0,0 +1,24 @@
+/* Never include this file directly. Include <linux/compiler.h> instead. */
+
+#ifdef __ECC
+
+/* Some compiler specific definitions are overwritten here
+ * for Intel ECC compiler
+ */
+
+#include <asm/intrinsics.h>
+
+/* Intel ECC compiler doesn't support gcc specific asm stmts.
+ * It uses intrinsics to do the equivalent things.
+ */
+#undef barrier
+#undef RELOC_HIDE
+
+#define barrier() __memory_barrier()
+
+#define RELOC_HIDE(ptr, off) \
+ ({ unsigned long __ptr; \
+ __ptr = (unsigned long) (ptr); \
+ (typeof(ptr)) (__ptr + (off)); })
+
+#endif
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 356428f649fc..528641f69043 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -2,28 +2,36 @@
#define __LINUX_COMPILER_H
#ifdef __CHECKER__
- #define __user __attribute__((noderef, address_space(1)))
- #define __kernel /* default address space */
+# define __user __attribute__((noderef, address_space(1)))
+# define __kernel /* default address space */
#else
- #define __user
- #define __kernel
+# define __user
+# define __kernel
#endif
-#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
-#define inline __inline__ __attribute__((always_inline))
-#define __inline__ __inline__ __attribute__((always_inline))
-#define __inline __inline__ __attribute__((always_inline))
+#if __GNUC__ > 3
+# include <linux/compiler-gcc+.h> /* catch-all for GCC 4, 5, etc. */
+#elif __GNUC__ == 3
+# include <linux/compiler-gcc3.h>
+#elif __GNUC__ == 2
+# include <linux/compiler-gcc2.h>
+#else
+# error Sorry, your compiler is too old/not recognized.
#endif
-/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
- a mechanism by which the user can annotate likely branch directions and
- expect the blocks to be reordered appropriately. Define __builtin_expect
- to nothing for earlier compilers. */
-
-#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
-#define __builtin_expect(x, expected_value) (x)
+/* Intel compiler defines __GNUC__. So we will overwrite implementations
+ * coming from above header files here
+ */
+#ifdef __INTEL_COMPILER
+# include <linux/compiler-intel.h>
#endif
+/*
+ * Generic compiler-dependent macros required for kernel
+ * build go below this comment. Actual compiler/compiler version
+ * specific implementations come from the above header files
+ */
+
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
@@ -33,10 +41,8 @@
* Usage is:
* int __deprecated foo(void)
*/
-#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
-#define __deprecated __attribute__((deprecated))
-#else
-#define __deprecated
+#ifndef __deprecated
+# define __deprecated /* unimplemented */
#endif
/*
@@ -50,10 +56,8 @@
* In prior versions of gcc, such functions and data would be emitted, but
* would be warned about except with attribute((unused)).
*/
-#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || __GNUC__ > 3
-#define __attribute_used__ __attribute__((__used__))
-#else
-#define __attribute_used__ __attribute__((__unused__))
+#ifndef __attribute_used__
+# define __attribute_used__ /* unimplemented */
#endif
/*
@@ -65,19 +69,21 @@
* elimination and loop optimization just as an arithmetic operator
* would be.
* [...]
- * The attribute `pure' is not implemented in GCC versions earlier
- * than 2.96.
*/
-#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || __GNUC__ > 2
-#define __attribute_pure__ __attribute__((pure))
-#else
-#define __attribute_pure__ /* unimplemented */
+#ifndef __attribute_pure__
+# define __attribute_pure__ /* unimplemented */
+#endif
+
+/* Optimization barrier */
+#ifndef barrier
+# define barrier() __memory_barrier()
#endif
-/* This macro obfuscates arithmetic on a variable address so that gcc
- shouldn't recognize the original var, and make assumptions about it */
-#define RELOC_HIDE(ptr, off) \
+#ifndef RELOC_HIDE
+# define RELOC_HIDE(ptr, off) \
({ unsigned long __ptr; \
- __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \
+ __ptr = (unsigned long) (ptr); \
(typeof(ptr)) (__ptr + (off)); })
+#endif
+
#endif /* __LINUX_COMPILER_H */
diff --git a/include/linux/console.h b/include/linux/console.h
index 414ebe159d67..cdff9de7ee71 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -15,7 +15,6 @@
#define _LINUX_CONSOLE_H_ 1
#include <linux/types.h>
-#include <linux/kdev_t.h>
#include <linux/spinlock.h>
struct vc_data;
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h
index f12addd1daeb..16c78f54f427 100644
--- a/include/linux/devfs_fs_kernel.h
+++ b/include/linux/devfs_fs_kernel.h
@@ -4,7 +4,6 @@
#include <linux/fs.h>
#include <linux/config.h>
#include <linux/spinlock.h>
-#include <linux/kdev_t.h>
#include <linux/types.h>
#include <asm/semaphore.h>
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index e43d670c1371..cbd038b665e8 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -15,7 +15,6 @@ typedef int (elevator_queue_empty_fn) (request_queue_t *);
typedef void (elevator_remove_req_fn) (request_queue_t *, struct request *);
typedef void (elevator_requeue_req_fn) (request_queue_t *, struct request *);
typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *);
-typedef struct list_head *(elevator_get_sort_head_fn) (request_queue_t *, struct request *);
typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
typedef int (elevator_may_queue_fn) (request_queue_t *, int);
diff --git a/include/linux/ftape.h b/include/linux/ftape.h
index 99b3535a4e20..e21d4b442843 100644
--- a/include/linux/ftape.h
+++ b/include/linux/ftape.h
@@ -199,8 +199,6 @@ typedef union {
#define ABS(a) ((a) < 0 ? -(a) : (a))
#define NR_ITEMS(x) (int)(sizeof(x)/ sizeof(*x))
-extern int ftape_init(void);
-
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index b2d17ea0dac0..6403c9ef2210 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -15,10 +15,6 @@
#include <asm/byteorder.h>
#include <asm/bug.h>
-/* Optimization barrier */
-/* The "volatile" is due to gcc bugs */
-#define barrier() __asm__ __volatile__("": : :"memory")
-
#define INT_MAX ((int)(~0U>>1))
#define INT_MIN (-INT_MAX - 1)
#define UINT_MAX (~0U)
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index d3af91351521..6b7f9c1fa5cd 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -36,8 +36,6 @@
#define TUN_MINOR 200
-extern int misc_init(void);
-
struct miscdevice
{
int minor;
diff --git a/include/linux/nls.h b/include/linux/nls.h
index 2ab6466f8043..1c657d4f0cf3 100644
--- a/include/linux/nls.h
+++ b/include/linux/nls.h
@@ -8,6 +8,7 @@ typedef __u16 wchar_t;
struct nls_table {
char *charset;
+ char *alias;
int (*uni2char) (wchar_t uni, unsigned char *out, int boundlen);
int (*char2uni) (const unsigned char *rawstring, int boundlen,
wchar_t *uni);
@@ -32,5 +33,7 @@ extern int utf8_mbstowcs(wchar_t *, const __u8 *, int);
extern int utf8_wctomb(__u8 *, wchar_t, int);
extern int utf8_wcstombs(__u8 *, const wchar_t *, int);
+#define MODULE_ALIAS_NLS(name) MODULE_ALIAS("nls_" __stringify(name))
+
#endif /* _LINUX_NLS_H */
diff --git a/include/linux/random.h b/include/linux/random.h
index ca0e460941a5..9ccb52fa0a01 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -42,7 +42,6 @@ struct rand_pool_info {
#ifdef __KERNEL__
-extern void rand_initialize(void);
extern void rand_initialize_irq(int irq);
extern void batch_entropy_store(u32 a, u32 b, int num);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3c6e3129144d..1618ae7f42d4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -281,7 +281,9 @@ struct signal_struct {
#define MAX_RT_PRIO MAX_USER_RT_PRIO
#define MAX_PRIO (MAX_RT_PRIO + 40)
-
+
+#define rt_task(p) ((p)->prio < MAX_RT_PRIO)
+
/*
* Some day this will be a full-fledged user tracking system..
*/
@@ -340,7 +342,9 @@ struct task_struct {
prio_array_t *array;
unsigned long sleep_avg;
- unsigned long last_run;
+ long interactive_credit;
+ unsigned long long timestamp;
+ int activated;
unsigned long policy;
cpumask_t cpus_allowed;
@@ -360,7 +364,7 @@ struct task_struct {
unsigned long personality;
int did_exec:1;
pid_t pid;
- pid_t pgrp;
+ pid_t __pgrp; /* Accessed via process_group() */
pid_t tty_old_pgrp;
pid_t session;
pid_t tgid;
@@ -375,7 +379,7 @@ struct task_struct {
struct task_struct *parent; /* parent process */
struct list_head children; /* list of my children */
struct list_head sibling; /* linkage in my parent's children list */
- struct task_struct *group_leader;
+ struct task_struct *group_leader; /* threadgroup leader */
/* PID/PID hash table linkage. */
struct pid_link pids[PIDTYPE_MAX];
@@ -461,6 +465,11 @@ struct task_struct {
siginfo_t *last_siginfo; /* For ptrace use. */
};
+static inline pid_t process_group(struct task_struct *tsk)
+{
+ return tsk->group_leader->__pgrp;
+}
+
extern void __put_task_struct(struct task_struct *tsk);
#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
#define put_task_struct(tsk) \
@@ -499,6 +508,8 @@ static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask)
}
#endif
+extern unsigned long long sched_clock(void);
+
#ifdef CONFIG_NUMA
extern void sched_balance_exec(void);
extern void node_nr_running_init(void);
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 147e5bf40cbf..1f3517e965f3 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -3,7 +3,6 @@
#include <linux/config.h>
#include <linux/spinlock.h>
-#include <linux/kdev_t.h>
#include <linux/linkage.h>
#include <linux/mmzone.h>
#include <linux/list.h>
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 205e27af55a2..c575197f00b3 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -351,7 +351,6 @@ extern void console_init(void);
extern int lp_init(void);
extern int pty_init(void);
-extern void tty_init(void);
extern int mxser_init(void);
extern int moxa_init(void);
extern int ip2_init(void);
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 373e58fee2d4..1424811e1eab 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -84,7 +84,6 @@ int dirty_writeback_centisecs_handler(struct ctl_table *, int, struct file *,
void __user *, size_t *);
void page_writeback_init(void);
-void balance_dirty_pages(struct address_space *mapping);
void balance_dirty_pages_ratelimited(struct address_space *mapping);
int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0);
int do_writepages(struct address_space *mapping, struct writeback_control *wbc);