diff options
Diffstat (limited to 'include')
42 files changed, 765 insertions, 121 deletions
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h index dba70c62a16c..457c34b6eb09 100644 --- a/include/asm-alpha/core_t2.h +++ b/include/asm-alpha/core_t2.h | |||
@@ -435,7 +435,7 @@ static inline void t2_outl(u32 b, unsigned long addr) | |||
435 | set_hae(msb); \ | 435 | set_hae(msb); \ |
436 | } | 436 | } |
437 | 437 | ||
438 | static spinlock_t t2_hae_lock = SPIN_LOCK_UNLOCKED; | 438 | static DEFINE_SPINLOCK(t2_hae_lock); |
439 | 439 | ||
440 | __EXTERN_INLINE u8 t2_readb(const volatile void __iomem *xaddr) | 440 | __EXTERN_INLINE u8 t2_readb(const volatile void __iomem *xaddr) |
441 | { | 441 | { |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 845cb67ad8ea..8ceab7bcd8b4 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -51,4 +51,10 @@ | |||
51 | __ret; \ | 51 | __ret; \ |
52 | }) | 52 | }) |
53 | 53 | ||
54 | #ifdef CONFIG_SMP | ||
55 | # define WARN_ON_SMP(x) WARN_ON(x) | ||
56 | #else | ||
57 | # define WARN_ON_SMP(x) do { } while (0) | ||
58 | #endif | ||
59 | |||
54 | #endif | 60 | #endif |
diff --git a/include/asm-i386/cpu.h b/include/asm-i386/cpu.h index e7252c216ca8..b1bc7b1b64b0 100644 --- a/include/asm-i386/cpu.h +++ b/include/asm-i386/cpu.h | |||
@@ -7,8 +7,6 @@ | |||
7 | #include <linux/nodemask.h> | 7 | #include <linux/nodemask.h> |
8 | #include <linux/percpu.h> | 8 | #include <linux/percpu.h> |
9 | 9 | ||
10 | #include <asm/node.h> | ||
11 | |||
12 | struct i386_cpu { | 10 | struct i386_cpu { |
13 | struct cpu cpu; | 11 | struct cpu cpu; |
14 | }; | 12 | }; |
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 4153d80e4d2b..1eac92cb5b16 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
11 | #include <asm/system.h> /* for savesegment */ | 11 | #include <asm/system.h> /* for savesegment */ |
12 | #include <asm/auxvec.h> | 12 | #include <asm/auxvec.h> |
13 | #include <asm/desc.h> | ||
13 | 14 | ||
14 | #include <linux/utsname.h> | 15 | #include <linux/utsname.h> |
15 | 16 | ||
@@ -129,15 +130,41 @@ extern int dump_task_extended_fpu (struct task_struct *, struct user_fxsr_struct | |||
129 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) | 130 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) |
130 | #define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs) | 131 | #define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs) |
131 | 132 | ||
132 | #define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL)) | 133 | #define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) |
133 | #define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE) | 134 | #define VDSO_BASE ((unsigned long)current->mm->context.vdso) |
134 | #define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall) | 135 | |
136 | #ifdef CONFIG_COMPAT_VDSO | ||
137 | # define VDSO_COMPAT_BASE VDSO_HIGH_BASE | ||
138 | # define VDSO_PRELINK VDSO_HIGH_BASE | ||
139 | #else | ||
140 | # define VDSO_COMPAT_BASE VDSO_BASE | ||
141 | # define VDSO_PRELINK 0 | ||
142 | #endif | ||
143 | |||
144 | #define VDSO_COMPAT_SYM(x) \ | ||
145 | (VDSO_COMPAT_BASE + (unsigned long)(x) - VDSO_PRELINK) | ||
146 | |||
147 | #define VDSO_SYM(x) \ | ||
148 | (VDSO_BASE + (unsigned long)(x) - VDSO_PRELINK) | ||
149 | |||
150 | #define VDSO_HIGH_EHDR ((const struct elfhdr *) VDSO_HIGH_BASE) | ||
151 | #define VDSO_EHDR ((const struct elfhdr *) VDSO_COMPAT_BASE) | ||
152 | |||
135 | extern void __kernel_vsyscall; | 153 | extern void __kernel_vsyscall; |
136 | 154 | ||
155 | #define VDSO_ENTRY VDSO_SYM(&__kernel_vsyscall) | ||
156 | |||
157 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES | ||
158 | struct linux_binprm; | ||
159 | extern int arch_setup_additional_pages(struct linux_binprm *bprm, | ||
160 | int executable_stack); | ||
161 | |||
162 | extern unsigned int vdso_enabled; | ||
163 | |||
137 | #define ARCH_DLINFO \ | 164 | #define ARCH_DLINFO \ |
138 | do { \ | 165 | do if (vdso_enabled) { \ |
139 | NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \ | 166 | NEW_AUX_ENT(AT_SYSINFO, VDSO_ENTRY); \ |
140 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \ | 167 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_COMPAT_BASE); \ |
141 | } while (0) | 168 | } while (0) |
142 | 169 | ||
143 | /* | 170 | /* |
@@ -148,15 +175,15 @@ do { \ | |||
148 | * Dumping its extra ELF program headers includes all the other information | 175 | * Dumping its extra ELF program headers includes all the other information |
149 | * a debugger needs to easily find how the vsyscall DSO was being used. | 176 | * a debugger needs to easily find how the vsyscall DSO was being used. |
150 | */ | 177 | */ |
151 | #define ELF_CORE_EXTRA_PHDRS (VSYSCALL_EHDR->e_phnum) | 178 | #define ELF_CORE_EXTRA_PHDRS (VDSO_HIGH_EHDR->e_phnum) |
152 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | 179 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ |
153 | do { \ | 180 | do { \ |
154 | const struct elf_phdr *const vsyscall_phdrs = \ | 181 | const struct elf_phdr *const vsyscall_phdrs = \ |
155 | (const struct elf_phdr *) (VSYSCALL_BASE \ | 182 | (const struct elf_phdr *) (VDSO_HIGH_BASE \ |
156 | + VSYSCALL_EHDR->e_phoff); \ | 183 | + VDSO_HIGH_EHDR->e_phoff); \ |
157 | int i; \ | 184 | int i; \ |
158 | Elf32_Off ofs = 0; \ | 185 | Elf32_Off ofs = 0; \ |
159 | for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ | 186 | for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++i) { \ |
160 | struct elf_phdr phdr = vsyscall_phdrs[i]; \ | 187 | struct elf_phdr phdr = vsyscall_phdrs[i]; \ |
161 | if (phdr.p_type == PT_LOAD) { \ | 188 | if (phdr.p_type == PT_LOAD) { \ |
162 | BUG_ON(ofs != 0); \ | 189 | BUG_ON(ofs != 0); \ |
@@ -174,10 +201,10 @@ do { \ | |||
174 | #define ELF_CORE_WRITE_EXTRA_DATA \ | 201 | #define ELF_CORE_WRITE_EXTRA_DATA \ |
175 | do { \ | 202 | do { \ |
176 | const struct elf_phdr *const vsyscall_phdrs = \ | 203 | const struct elf_phdr *const vsyscall_phdrs = \ |
177 | (const struct elf_phdr *) (VSYSCALL_BASE \ | 204 | (const struct elf_phdr *) (VDSO_HIGH_BASE \ |
178 | + VSYSCALL_EHDR->e_phoff); \ | 205 | + VDSO_HIGH_EHDR->e_phoff); \ |
179 | int i; \ | 206 | int i; \ |
180 | for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ | 207 | for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++i) { \ |
181 | if (vsyscall_phdrs[i].p_type == PT_LOAD) \ | 208 | if (vsyscall_phdrs[i].p_type == PT_LOAD) \ |
182 | DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \ | 209 | DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \ |
183 | PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ | 210 | PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ |
diff --git a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h index f7e068f4d2f9..a48cc3f7ccc6 100644 --- a/include/asm-i386/fixmap.h +++ b/include/asm-i386/fixmap.h | |||
@@ -51,7 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | enum fixed_addresses { | 52 | enum fixed_addresses { |
53 | FIX_HOLE, | 53 | FIX_HOLE, |
54 | FIX_VSYSCALL, | 54 | FIX_VDSO, |
55 | #ifdef CONFIG_X86_LOCAL_APIC | 55 | #ifdef CONFIG_X86_LOCAL_APIC |
56 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | 56 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ |
57 | #endif | 57 | #endif |
@@ -115,14 +115,6 @@ extern void __set_fixmap (enum fixed_addresses idx, | |||
115 | #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) | 115 | #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) |
116 | #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) | 116 | #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) |
117 | 117 | ||
118 | /* | ||
119 | * This is the range that is readable by user mode, and things | ||
120 | * acting like user mode such as get_user_pages. | ||
121 | */ | ||
122 | #define FIXADDR_USER_START (__fix_to_virt(FIX_VSYSCALL)) | ||
123 | #define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) | ||
124 | |||
125 | |||
126 | extern void __this_fixmap_does_not_exist(void); | 118 | extern void __this_fixmap_does_not_exist(void); |
127 | 119 | ||
128 | /* | 120 | /* |
diff --git a/include/asm-i386/mmu.h b/include/asm-i386/mmu.h index f431a0b86d4c..8358dd3df7aa 100644 --- a/include/asm-i386/mmu.h +++ b/include/asm-i386/mmu.h | |||
@@ -12,6 +12,7 @@ typedef struct { | |||
12 | int size; | 12 | int size; |
13 | struct semaphore sem; | 13 | struct semaphore sem; |
14 | void *ldt; | 14 | void *ldt; |
15 | void *vdso; | ||
15 | } mm_context_t; | 16 | } mm_context_t; |
16 | 17 | ||
17 | #endif | 18 | #endif |
diff --git a/include/asm-i386/node.h b/include/asm-i386/node.h deleted file mode 100644 index e13c6ffa72ae..000000000000 --- a/include/asm-i386/node.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef _ASM_I386_NODE_H_ | ||
2 | #define _ASM_I386_NODE_H_ | ||
3 | |||
4 | #include <linux/device.h> | ||
5 | #include <linux/mmzone.h> | ||
6 | #include <linux/node.h> | ||
7 | #include <linux/topology.h> | ||
8 | #include <linux/nodemask.h> | ||
9 | |||
10 | struct i386_node { | ||
11 | struct node node; | ||
12 | }; | ||
13 | extern struct i386_node node_devices[MAX_NUMNODES]; | ||
14 | |||
15 | static inline int arch_register_node(int num){ | ||
16 | int p_node; | ||
17 | struct node *parent = NULL; | ||
18 | |||
19 | if (!node_online(num)) | ||
20 | return 0; | ||
21 | p_node = parent_node(num); | ||
22 | |||
23 | if (p_node != num) | ||
24 | parent = &node_devices[p_node].node; | ||
25 | |||
26 | return register_node(&node_devices[num].node, num, parent); | ||
27 | } | ||
28 | |||
29 | #endif /* _ASM_I386_NODE_H_ */ | ||
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index e3a552fa5538..f5bf544c729a 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -96,6 +96,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
96 | 96 | ||
97 | #ifndef __ASSEMBLY__ | 97 | #ifndef __ASSEMBLY__ |
98 | 98 | ||
99 | struct vm_area_struct; | ||
100 | |||
99 | /* | 101 | /* |
100 | * This much address space is reserved for vmalloc() and iomap() | 102 | * This much address space is reserved for vmalloc() and iomap() |
101 | * as well as fixmap mappings. | 103 | * as well as fixmap mappings. |
@@ -139,6 +141,7 @@ extern int page_is_ram(unsigned long pagenr); | |||
139 | #include <asm-generic/memory_model.h> | 141 | #include <asm-generic/memory_model.h> |
140 | #include <asm-generic/page.h> | 142 | #include <asm-generic/page.h> |
141 | 143 | ||
144 | #define __HAVE_ARCH_GATE_AREA 1 | ||
142 | #endif /* __KERNEL__ */ | 145 | #endif /* __KERNEL__ */ |
143 | 146 | ||
144 | #endif /* _I386_PAGE_H */ | 147 | #endif /* _I386_PAGE_H */ |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 55ea992da329..b32346d62e10 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -71,8 +71,12 @@ struct cpuinfo_x86 { | |||
71 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ | 71 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ |
72 | #endif | 72 | #endif |
73 | unsigned char x86_max_cores; /* cpuid returned max cores value */ | 73 | unsigned char x86_max_cores; /* cpuid returned max cores value */ |
74 | unsigned char booted_cores; /* number of cores as seen by OS */ | ||
75 | unsigned char apicid; | 74 | unsigned char apicid; |
75 | #ifdef CONFIG_SMP | ||
76 | unsigned char booted_cores; /* number of cores as seen by OS */ | ||
77 | __u8 phys_proc_id; /* Physical processor id. */ | ||
78 | __u8 cpu_core_id; /* Core id */ | ||
79 | #endif | ||
76 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); | 80 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); |
77 | 81 | ||
78 | #define X86_VENDOR_INTEL 0 | 82 | #define X86_VENDOR_INTEL 0 |
@@ -104,8 +108,6 @@ extern struct cpuinfo_x86 cpu_data[]; | |||
104 | #define current_cpu_data boot_cpu_data | 108 | #define current_cpu_data boot_cpu_data |
105 | #endif | 109 | #endif |
106 | 110 | ||
107 | extern int phys_proc_id[NR_CPUS]; | ||
108 | extern int cpu_core_id[NR_CPUS]; | ||
109 | extern int cpu_llc_id[NR_CPUS]; | 111 | extern int cpu_llc_id[NR_CPUS]; |
110 | extern char ignore_fpu_irq; | 112 | extern char ignore_fpu_irq; |
111 | 113 | ||
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index fdbc7f422ea5..2833fa2c0dd0 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -37,6 +37,7 @@ struct thread_info { | |||
37 | 0-0xBFFFFFFF for user-thead | 37 | 0-0xBFFFFFFF for user-thead |
38 | 0-0xFFFFFFFF for kernel-thread | 38 | 0-0xFFFFFFFF for kernel-thread |
39 | */ | 39 | */ |
40 | void *sysenter_return; | ||
40 | struct restart_block restart_block; | 41 | struct restart_block restart_block; |
41 | 42 | ||
42 | unsigned long previous_esp; /* ESP of the previous stack in case | 43 | unsigned long previous_esp; /* ESP of the previous stack in case |
@@ -83,17 +84,15 @@ struct thread_info { | |||
83 | #define init_stack (init_thread_union.stack) | 84 | #define init_stack (init_thread_union.stack) |
84 | 85 | ||
85 | 86 | ||
87 | /* how to get the current stack pointer from C */ | ||
88 | register unsigned long current_stack_pointer asm("esp") __attribute_used__; | ||
89 | |||
86 | /* how to get the thread information struct from C */ | 90 | /* how to get the thread information struct from C */ |
87 | static inline struct thread_info *current_thread_info(void) | 91 | static inline struct thread_info *current_thread_info(void) |
88 | { | 92 | { |
89 | struct thread_info *ti; | 93 | return (struct thread_info *)(current_stack_pointer & ~(THREAD_SIZE - 1)); |
90 | __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1))); | ||
91 | return ti; | ||
92 | } | 94 | } |
93 | 95 | ||
94 | /* how to get the current stack pointer from C */ | ||
95 | register unsigned long current_stack_pointer asm("esp") __attribute_used__; | ||
96 | |||
97 | /* thread information allocation */ | 96 | /* thread information allocation */ |
98 | #ifdef CONFIG_DEBUG_STACK_USAGE | 97 | #ifdef CONFIG_DEBUG_STACK_USAGE |
99 | #define alloc_thread_info(tsk) \ | 98 | #define alloc_thread_info(tsk) \ |
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index b94e5eeef917..6adbd9b1ae88 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -28,10 +28,8 @@ | |||
28 | #define _ASM_I386_TOPOLOGY_H | 28 | #define _ASM_I386_TOPOLOGY_H |
29 | 29 | ||
30 | #ifdef CONFIG_X86_HT | 30 | #ifdef CONFIG_X86_HT |
31 | #define topology_physical_package_id(cpu) \ | 31 | #define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id) |
32 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | 32 | #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) |
33 | #define topology_core_id(cpu) \ | ||
34 | (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) | ||
35 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 33 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
36 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | 34 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) |
37 | #endif | 35 | #endif |
@@ -114,4 +112,9 @@ extern unsigned long node_remap_size[]; | |||
114 | 112 | ||
115 | extern cpumask_t cpu_coregroup_map(int cpu); | 113 | extern cpumask_t cpu_coregroup_map(int cpu); |
116 | 114 | ||
115 | #ifdef CONFIG_SMP | ||
116 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | ||
117 | #define smt_capable() (smp_num_siblings > 1) | ||
118 | #endif | ||
119 | |||
117 | #endif /* _ASM_I386_TOPOLOGY_H */ | 120 | #endif /* _ASM_I386_TOPOLOGY_H */ |
diff --git a/include/asm-i386/unwind.h b/include/asm-i386/unwind.h index d480f2e38215..69f0f1df6722 100644 --- a/include/asm-i386/unwind.h +++ b/include/asm-i386/unwind.h | |||
@@ -78,8 +78,8 @@ static inline int arch_unw_user_mode(const struct unwind_frame_info *info) | |||
78 | return user_mode_vm(&info->regs); | 78 | return user_mode_vm(&info->regs); |
79 | #else | 79 | #else |
80 | return info->regs.eip < PAGE_OFFSET | 80 | return info->regs.eip < PAGE_OFFSET |
81 | || (info->regs.eip >= __fix_to_virt(FIX_VSYSCALL) | 81 | || (info->regs.eip >= __fix_to_virt(FIX_VDSO) |
82 | && info->regs.eip < __fix_to_virt(FIX_VSYSCALL) + PAGE_SIZE) | 82 | && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) |
83 | || info->regs.esp < PAGE_OFFSET; | 83 | || info->regs.esp < PAGE_OFFSET; |
84 | #endif | 84 | #endif |
85 | } | 85 | } |
diff --git a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h index a140310bf84d..2fb337b0e9b7 100644 --- a/include/asm-ia64/nodedata.h +++ b/include/asm-ia64/nodedata.h | |||
@@ -46,6 +46,18 @@ struct ia64_node_data { | |||
46 | */ | 46 | */ |
47 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) | 47 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) |
48 | 48 | ||
49 | /* | ||
50 | * LOCAL_DATA_ADDR - This is to calculate the address of other node's | ||
51 | * "local_node_data" at hot-plug phase. The local_node_data | ||
52 | * is pointed by per_cpu_page. Kernel usually use it for | ||
53 | * just executing cpu. However, when new node is hot-added, | ||
54 | * the addresses of local data for other nodes are necessary | ||
55 | * to update all of them. | ||
56 | */ | ||
57 | #define LOCAL_DATA_ADDR(pgdat) \ | ||
58 | ((struct ia64_node_data *)((u64)(pgdat) + \ | ||
59 | L1_CACHE_ALIGN(sizeof(struct pglist_data)))) | ||
60 | |||
49 | #endif /* CONFIG_NUMA */ | 61 | #endif /* CONFIG_NUMA */ |
50 | 62 | ||
51 | #endif /* _ASM_IA64_NODEDATA_H */ | 63 | #endif /* _ASM_IA64_NODEDATA_H */ |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 616b5ed2aa72..937c21257523 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -112,6 +112,7 @@ void build_cpu_to_node_map(void); | |||
112 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | 112 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) |
113 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 113 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
114 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | 114 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) |
115 | #define smt_capable() (smp_num_siblings > 1) | ||
115 | #endif | 116 | #endif |
116 | 117 | ||
117 | #include <asm-generic/topology.h> | 118 | #include <asm-generic/topology.h> |
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 92f3e5507d22..bbc3844b086f 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -93,5 +93,10 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, | |||
93 | 93 | ||
94 | #endif /* CONFIG_NUMA */ | 94 | #endif /* CONFIG_NUMA */ |
95 | 95 | ||
96 | #ifdef CONFIG_SMP | ||
97 | #include <asm/cputable.h> | ||
98 | #define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) | ||
99 | #endif | ||
100 | |||
96 | #endif /* __KERNEL__ */ | 101 | #endif /* __KERNEL__ */ |
97 | #endif /* _ASM_POWERPC_TOPOLOGY_H */ | 102 | #endif /* _ASM_POWERPC_TOPOLOGY_H */ |
diff --git a/include/asm-sparc64/topology.h b/include/asm-sparc64/topology.h index 0e234e201bd6..98a6c613589d 100644 --- a/include/asm-sparc64/topology.h +++ b/include/asm-sparc64/topology.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef _ASM_SPARC64_TOPOLOGY_H | 1 | #ifndef _ASM_SPARC64_TOPOLOGY_H |
2 | #define _ASM_SPARC64_TOPOLOGY_H | 2 | #define _ASM_SPARC64_TOPOLOGY_H |
3 | 3 | ||
4 | #include <asm/spitfire.h> | ||
5 | #define smt_capable() (tlb_type == hypervisor) | ||
6 | |||
4 | #include <asm-generic/topology.h> | 7 | #include <asm-generic/topology.h> |
5 | 8 | ||
6 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ | 9 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ |
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 1b2ac55d3204..931877462788 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
@@ -124,7 +124,7 @@ asmlinkage void IRQ_NAME(nr); \ | |||
124 | __asm__( \ | 124 | __asm__( \ |
125 | "\n.p2align\n" \ | 125 | "\n.p2align\n" \ |
126 | "IRQ" #nr "_interrupt:\n\t" \ | 126 | "IRQ" #nr "_interrupt:\n\t" \ |
127 | "push $" #nr "-256 ; " \ | 127 | "push $~(" #nr ") ; " \ |
128 | "jmp common_interrupt"); | 128 | "jmp common_interrupt"); |
129 | 129 | ||
130 | #if defined(CONFIG_X86_IO_APIC) | 130 | #if defined(CONFIG_X86_IO_APIC) |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index c4e46e7fa7ba..6e7a2e976b04 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -59,6 +59,8 @@ extern int __node_distance(int, int); | |||
59 | #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) | 59 | #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) |
60 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 60 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
61 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | 61 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) |
62 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | ||
63 | #define smt_capable() (smp_num_siblings > 1) | ||
62 | #endif | 64 | #endif |
63 | 65 | ||
64 | #include <asm-generic/topology.h> | 66 | #include <asm-generic/topology.h> |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 90d6df1551ed..88b5dfd8ee12 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -528,12 +528,18 @@ static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; } | |||
528 | 528 | ||
529 | #ifdef CONFIG_ACPI_NUMA | 529 | #ifdef CONFIG_ACPI_NUMA |
530 | int acpi_get_pxm(acpi_handle handle); | 530 | int acpi_get_pxm(acpi_handle handle); |
531 | int acpi_get_node(acpi_handle *handle); | ||
531 | #else | 532 | #else |
532 | static inline int acpi_get_pxm(acpi_handle handle) | 533 | static inline int acpi_get_pxm(acpi_handle handle) |
533 | { | 534 | { |
534 | return 0; | 535 | return 0; |
535 | } | 536 | } |
537 | static inline int acpi_get_node(acpi_handle *handle) | ||
538 | { | ||
539 | return 0; | ||
540 | } | ||
536 | #endif | 541 | #endif |
542 | extern int acpi_paddr_to_node(u64 start_addr, u64 size); | ||
537 | 543 | ||
538 | extern int pnpacpi_disabled; | 544 | extern int pnpacpi_disabled; |
539 | 545 | ||
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index fb7e9b7ccbe3..737e407d0cd1 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -149,7 +149,6 @@ void create_empty_buffers(struct page *, unsigned long, | |||
149 | unsigned long b_state); | 149 | unsigned long b_state); |
150 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); | 150 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); |
151 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); | 151 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); |
152 | void end_buffer_async_write(struct buffer_head *bh, int uptodate); | ||
153 | 152 | ||
154 | /* Things to do with buffers at mapping->private_list */ | 153 | /* Things to do with buffers at mapping->private_list */ |
155 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); | 154 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); |
@@ -214,6 +213,7 @@ int nobh_truncate_page(struct address_space *, loff_t); | |||
214 | int nobh_writepage(struct page *page, get_block_t *get_block, | 213 | int nobh_writepage(struct page *page, get_block_t *get_block, |
215 | struct writeback_control *wbc); | 214 | struct writeback_control *wbc); |
216 | 215 | ||
216 | void buffer_init(void); | ||
217 | 217 | ||
218 | /* | 218 | /* |
219 | * inline definitions | 219 | * inline definitions |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 08d50c53aab4..a3caf6866bae 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -31,17 +31,23 @@ struct cpu { | |||
31 | struct sys_device sysdev; | 31 | struct sys_device sysdev; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | extern int register_cpu(struct cpu *, int, struct node *); | 34 | extern int register_cpu(struct cpu *cpu, int num); |
35 | extern struct sys_device *get_cpu_sysdev(unsigned cpu); | 35 | extern struct sys_device *get_cpu_sysdev(unsigned cpu); |
36 | #ifdef CONFIG_HOTPLUG_CPU | 36 | #ifdef CONFIG_HOTPLUG_CPU |
37 | extern void unregister_cpu(struct cpu *, struct node *); | 37 | extern void unregister_cpu(struct cpu *cpu); |
38 | #endif | 38 | #endif |
39 | struct notifier_block; | 39 | struct notifier_block; |
40 | 40 | ||
41 | #ifdef CONFIG_SMP | 41 | #ifdef CONFIG_SMP |
42 | /* Need to know about CPUs going up/down? */ | 42 | /* Need to know about CPUs going up/down? */ |
43 | extern int register_cpu_notifier(struct notifier_block *nb); | 43 | extern int register_cpu_notifier(struct notifier_block *nb); |
44 | #ifdef CONFIG_HOTPLUG_CPU | ||
44 | extern void unregister_cpu_notifier(struct notifier_block *nb); | 45 | extern void unregister_cpu_notifier(struct notifier_block *nb); |
46 | #else | ||
47 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | ||
48 | { | ||
49 | } | ||
50 | #endif | ||
45 | extern int current_in_cpu_hotplug(void); | 51 | extern int current_in_cpu_hotplug(void); |
46 | 52 | ||
47 | int cpu_up(unsigned int cpu); | 53 | int cpu_up(unsigned int cpu); |
@@ -73,6 +79,8 @@ extern int lock_cpu_hotplug_interruptible(void); | |||
73 | { .notifier_call = fn, .priority = pri }; \ | 79 | { .notifier_call = fn, .priority = pri }; \ |
74 | register_cpu_notifier(&fn##_nb); \ | 80 | register_cpu_notifier(&fn##_nb); \ |
75 | } | 81 | } |
82 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) | ||
83 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | ||
76 | int cpu_down(unsigned int cpu); | 84 | int cpu_down(unsigned int cpu); |
77 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | 85 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
78 | #else | 86 | #else |
@@ -80,6 +88,8 @@ int cpu_down(unsigned int cpu); | |||
80 | #define unlock_cpu_hotplug() do { } while (0) | 88 | #define unlock_cpu_hotplug() do { } while (0) |
81 | #define lock_cpu_hotplug_interruptible() 0 | 89 | #define lock_cpu_hotplug_interruptible() 0 |
82 | #define hotcpu_notifier(fn, pri) | 90 | #define hotcpu_notifier(fn, pri) |
91 | #define register_hotcpu_notifier(nb) | ||
92 | #define unregister_hotcpu_notifier(nb) | ||
83 | 93 | ||
84 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ | 94 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ |
85 | static inline int cpu_is_offline(int cpu) { return 0; } | 95 | static inline int cpu_is_offline(int cpu) { return 0; } |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 78b236ca04f8..272010a6078a 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #ifndef DMAENGINE_H | 21 | #ifndef DMAENGINE_H |
22 | #define DMAENGINE_H | 22 | #define DMAENGINE_H |
23 | #include <linux/config.h> | 23 | |
24 | #ifdef CONFIG_DMA_ENGINE | 24 | #ifdef CONFIG_DMA_ENGINE |
25 | 25 | ||
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 966a5b3da439..34c3a215f2cd 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -12,6 +12,9 @@ | |||
12 | #define FUTEX_REQUEUE 3 | 12 | #define FUTEX_REQUEUE 3 |
13 | #define FUTEX_CMP_REQUEUE 4 | 13 | #define FUTEX_CMP_REQUEUE 4 |
14 | #define FUTEX_WAKE_OP 5 | 14 | #define FUTEX_WAKE_OP 5 |
15 | #define FUTEX_LOCK_PI 6 | ||
16 | #define FUTEX_UNLOCK_PI 7 | ||
17 | #define FUTEX_TRYLOCK_PI 8 | ||
15 | 18 | ||
16 | /* | 19 | /* |
17 | * Support for robust futexes: the kernel cleans up held futexes at | 20 | * Support for robust futexes: the kernel cleans up held futexes at |
@@ -90,18 +93,21 @@ struct robust_list_head { | |||
90 | */ | 93 | */ |
91 | #define ROBUST_LIST_LIMIT 2048 | 94 | #define ROBUST_LIST_LIMIT 2048 |
92 | 95 | ||
93 | long do_futex(unsigned long uaddr, int op, int val, | 96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, |
94 | unsigned long timeout, unsigned long uaddr2, int val2, | 97 | u32 __user *uaddr2, u32 val2, u32 val3); |
95 | int val3); | ||
96 | 98 | ||
97 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); | 99 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); |
98 | 100 | ||
99 | #ifdef CONFIG_FUTEX | 101 | #ifdef CONFIG_FUTEX |
100 | extern void exit_robust_list(struct task_struct *curr); | 102 | extern void exit_robust_list(struct task_struct *curr); |
103 | extern void exit_pi_state_list(struct task_struct *curr); | ||
101 | #else | 104 | #else |
102 | static inline void exit_robust_list(struct task_struct *curr) | 105 | static inline void exit_robust_list(struct task_struct *curr) |
103 | { | 106 | { |
104 | } | 107 | } |
108 | static inline void exit_pi_state_list(struct task_struct *curr) | ||
109 | { | ||
110 | } | ||
105 | #endif | 111 | #endif |
106 | 112 | ||
107 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ | 113 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index e127ef7e8da8..3a256957fb56 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -87,6 +87,7 @@ extern struct group_info init_groups; | |||
87 | .lock_depth = -1, \ | 87 | .lock_depth = -1, \ |
88 | .prio = MAX_PRIO-20, \ | 88 | .prio = MAX_PRIO-20, \ |
89 | .static_prio = MAX_PRIO-20, \ | 89 | .static_prio = MAX_PRIO-20, \ |
90 | .normal_prio = MAX_PRIO-20, \ | ||
90 | .policy = SCHED_NORMAL, \ | 91 | .policy = SCHED_NORMAL, \ |
91 | .cpus_allowed = CPU_MASK_ALL, \ | 92 | .cpus_allowed = CPU_MASK_ALL, \ |
92 | .mm = NULL, \ | 93 | .mm = NULL, \ |
@@ -122,6 +123,8 @@ extern struct group_info init_groups; | |||
122 | .journal_info = NULL, \ | 123 | .journal_info = NULL, \ |
123 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ | 124 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ |
124 | .fs_excl = ATOMIC_INIT(0), \ | 125 | .fs_excl = ATOMIC_INIT(0), \ |
126 | .pi_lock = SPIN_LOCK_UNLOCKED, \ | ||
127 | INIT_RT_MUTEXES(tsk) \ | ||
125 | } | 128 | } |
126 | 129 | ||
127 | 130 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index cd6bd001ba4e..edfc733b1575 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -105,6 +105,9 @@ extern int allocate_resource(struct resource *root, struct resource *new, | |||
105 | int adjust_resource(struct resource *res, unsigned long start, | 105 | int adjust_resource(struct resource *res, unsigned long start, |
106 | unsigned long size); | 106 | unsigned long size); |
107 | 107 | ||
108 | /* get registered SYSTEM_RAM resources in specified area */ | ||
109 | extern int find_next_system_ram(struct resource *res); | ||
110 | |||
108 | /* Convenience shorthand with allocation */ | 111 | /* Convenience shorthand with allocation */ |
109 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) | 112 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) |
110 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) | 113 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 5653b2f23b6a..d09fbeabf1dc 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -210,11 +210,7 @@ struct kernel_ipmi_msg | |||
210 | #include <linux/list.h> | 210 | #include <linux/list.h> |
211 | #include <linux/module.h> | 211 | #include <linux/module.h> |
212 | #include <linux/device.h> | 212 | #include <linux/device.h> |
213 | |||
214 | #ifdef CONFIG_PROC_FS | ||
215 | #include <linux/proc_fs.h> | 213 | #include <linux/proc_fs.h> |
216 | extern struct proc_dir_entry *proc_ipmi_root; | ||
217 | #endif /* CONFIG_PROC_FS */ | ||
218 | 214 | ||
219 | /* Opaque type for a IPMI message user. One of these is needed to | 215 | /* Opaque type for a IPMI message user. One of these is needed to |
220 | send and receive messages. */ | 216 | send and receive messages. */ |
diff --git a/include/linux/list.h b/include/linux/list.h index 37ca31b21bb7..6b74adf5297f 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -4,18 +4,11 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
7 | #include <linux/poison.h> | ||
7 | #include <linux/prefetch.h> | 8 | #include <linux/prefetch.h> |
8 | #include <asm/system.h> | 9 | #include <asm/system.h> |
9 | 10 | ||
10 | /* | 11 | /* |
11 | * These are non-NULL pointers that will result in page faults | ||
12 | * under normal circumstances, used to verify that nobody uses | ||
13 | * non-initialized list entries. | ||
14 | */ | ||
15 | #define LIST_POISON1 ((void *) 0x00100100) | ||
16 | #define LIST_POISON2 ((void *) 0x00200200) | ||
17 | |||
18 | /* | ||
19 | * Simple doubly linked list implementation. | 12 | * Simple doubly linked list implementation. |
20 | * | 13 | * |
21 | * Some of the internal functions ("__xxx") are useful when | 14 | * Some of the internal functions ("__xxx") are useful when |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 911206386171..218501cfaeb9 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -63,6 +63,76 @@ extern int online_pages(unsigned long, unsigned long); | |||
63 | /* reasonably generic interface to expand the physical pages in a zone */ | 63 | /* reasonably generic interface to expand the physical pages in a zone */ |
64 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, | 64 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, |
65 | unsigned long nr_pages); | 65 | unsigned long nr_pages); |
66 | |||
67 | #ifdef CONFIG_NUMA | ||
68 | extern int memory_add_physaddr_to_nid(u64 start); | ||
69 | #else | ||
70 | static inline int memory_add_physaddr_to_nid(u64 start) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | #endif | ||
75 | |||
76 | #ifdef CONFIG_HAVE_ARCH_NODEDATA_EXTENSION | ||
77 | /* | ||
78 | * For supporting node-hotadd, we have to allocate a new pgdat. | ||
79 | * | ||
80 | * If an arch has generic style NODE_DATA(), | ||
81 | * node_data[nid] = kzalloc() works well. But it depends on the architecture. | ||
82 | * | ||
83 | * In general, generic_alloc_nodedata() is used. | ||
84 | * Now, arch_free_nodedata() is just defined for error path of node_hot_add. | ||
85 | * | ||
86 | */ | ||
87 | extern pg_data_t *arch_alloc_nodedata(int nid); | ||
88 | extern void arch_free_nodedata(pg_data_t *pgdat); | ||
89 | extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat); | ||
90 | |||
91 | #else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ | ||
92 | |||
93 | #define arch_alloc_nodedata(nid) generic_alloc_nodedata(nid) | ||
94 | #define arch_free_nodedata(pgdat) generic_free_nodedata(pgdat) | ||
95 | |||
96 | #ifdef CONFIG_NUMA | ||
97 | /* | ||
98 | * If ARCH_HAS_NODEDATA_EXTENSION=n, this func is used to allocate pgdat. | ||
99 | * XXX: kmalloc_node() can't work well to get new node's memory at this time. | ||
100 | * Because, pgdat for the new node is not allocated/initialized yet itself. | ||
101 | * To use new node's memory, more consideration will be necessary. | ||
102 | */ | ||
103 | #define generic_alloc_nodedata(nid) \ | ||
104 | ({ \ | ||
105 | kzalloc(sizeof(pg_data_t), GFP_KERNEL); \ | ||
106 | }) | ||
107 | /* | ||
108 | * This definition is just for error path in node hotadd. | ||
109 | * For node hotremove, we have to replace this. | ||
110 | */ | ||
111 | #define generic_free_nodedata(pgdat) kfree(pgdat) | ||
112 | |||
113 | extern pg_data_t *node_data[]; | ||
114 | static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) | ||
115 | { | ||
116 | node_data[nid] = pgdat; | ||
117 | } | ||
118 | |||
119 | #else /* !CONFIG_NUMA */ | ||
120 | |||
121 | /* never called */ | ||
122 | static inline pg_data_t *generic_alloc_nodedata(int nid) | ||
123 | { | ||
124 | BUG(); | ||
125 | return NULL; | ||
126 | } | ||
127 | static inline void generic_free_nodedata(pg_data_t *pgdat) | ||
128 | { | ||
129 | } | ||
130 | static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) | ||
131 | { | ||
132 | } | ||
133 | #endif /* CONFIG_NUMA */ | ||
134 | #endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ | ||
135 | |||
66 | #else /* ! CONFIG_MEMORY_HOTPLUG */ | 136 | #else /* ! CONFIG_MEMORY_HOTPLUG */ |
67 | /* | 137 | /* |
68 | * Stub functions for when hotplug is off | 138 | * Stub functions for when hotplug is off |
@@ -99,7 +169,8 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | |||
99 | return -ENOSYS; | 169 | return -ENOSYS; |
100 | } | 170 | } |
101 | 171 | ||
102 | extern int add_memory(u64 start, u64 size); | 172 | extern int add_memory(int nid, u64 start, u64 size); |
173 | extern int arch_add_memory(int nid, u64 start, u64 size); | ||
103 | extern int remove_memory(u64 start, u64 size); | 174 | extern int remove_memory(u64 start, u64 size); |
104 | 175 | ||
105 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ | 176 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a929ea197e48..c41a1299b8cf 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1030,13 +1030,20 @@ static inline void vm_stat_account(struct mm_struct *mm, | |||
1030 | } | 1030 | } |
1031 | #endif /* CONFIG_PROC_FS */ | 1031 | #endif /* CONFIG_PROC_FS */ |
1032 | 1032 | ||
1033 | static inline void | ||
1034 | debug_check_no_locks_freed(const void *from, unsigned long len) | ||
1035 | { | ||
1036 | mutex_debug_check_no_locks_freed(from, len); | ||
1037 | rt_mutex_debug_check_no_locks_freed(from, len); | ||
1038 | } | ||
1039 | |||
1033 | #ifndef CONFIG_DEBUG_PAGEALLOC | 1040 | #ifndef CONFIG_DEBUG_PAGEALLOC |
1034 | static inline void | 1041 | static inline void |
1035 | kernel_map_pages(struct page *page, int numpages, int enable) | 1042 | kernel_map_pages(struct page *page, int numpages, int enable) |
1036 | { | 1043 | { |
1037 | if (!PageHighMem(page) && !enable) | 1044 | if (!PageHighMem(page) && !enable) |
1038 | mutex_debug_check_no_locks_freed(page_address(page), | 1045 | debug_check_no_locks_freed(page_address(page), |
1039 | numpages * PAGE_SIZE); | 1046 | numpages * PAGE_SIZE); |
1040 | } | 1047 | } |
1041 | #endif | 1048 | #endif |
1042 | 1049 | ||
@@ -1065,5 +1072,7 @@ void drop_slab(void); | |||
1065 | extern int randomize_va_space; | 1072 | extern int randomize_va_space; |
1066 | #endif | 1073 | #endif |
1067 | 1074 | ||
1075 | const char *arch_vma_name(struct vm_area_struct *vma); | ||
1076 | |||
1068 | #endif /* __KERNEL__ */ | 1077 | #endif /* __KERNEL__ */ |
1069 | #endif /* _LINUX_MM_H */ | 1078 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/node.h b/include/linux/node.h index 254dc3de650b..81dcec84cd8f 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -26,8 +26,25 @@ struct node { | |||
26 | struct sys_device sysdev; | 26 | struct sys_device sysdev; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | extern struct node node_devices[]; | ||
30 | |||
29 | extern int register_node(struct node *, int, struct node *); | 31 | extern int register_node(struct node *, int, struct node *); |
30 | extern void unregister_node(struct node *node); | 32 | extern void unregister_node(struct node *node); |
33 | extern int register_one_node(int nid); | ||
34 | extern void unregister_one_node(int nid); | ||
35 | #ifdef CONFIG_NUMA | ||
36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | ||
37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | ||
38 | #else | ||
39 | static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
47 | #endif | ||
31 | 48 | ||
32 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 49 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
33 | 50 | ||
diff --git a/include/linux/nsc_gpio.h b/include/linux/nsc_gpio.h new file mode 100644 index 000000000000..135742cfada5 --- /dev/null +++ b/include/linux/nsc_gpio.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /** | ||
2 | nsc_gpio.c | ||
3 | |||
4 | National Semiconductor GPIO common access methods. | ||
5 | |||
6 | struct nsc_gpio_ops abstracts the low-level access | ||
7 | operations for the GPIO units on 2 NSC chip families; the GEODE | ||
8 | integrated CPU, and the PC-8736[03456] integrated PC-peripheral | ||
9 | chips. | ||
10 | |||
11 | The GPIO units on these chips have the same pin architecture, but | ||
12 | the access methods differ. Thus, scx200_gpio and pc8736x_gpio | ||
13 | implement their own versions of these routines; and use the common | ||
14 | file-operations routines implemented in nsc_gpio module. | ||
15 | |||
16 | Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com> | ||
17 | |||
18 | NB: this work was tested on the Geode SC-1100 and PC-87366 chips. | ||
19 | NSC sold the GEODE line to AMD, and the PC-8736x line to Winbond. | ||
20 | */ | ||
21 | |||
22 | struct nsc_gpio_ops { | ||
23 | struct module* owner; | ||
24 | u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits); | ||
25 | void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); | ||
26 | int (*gpio_get) (unsigned iminor); | ||
27 | void (*gpio_set) (unsigned iminor, int state); | ||
28 | void (*gpio_set_high)(unsigned iminor); | ||
29 | void (*gpio_set_low) (unsigned iminor); | ||
30 | void (*gpio_change) (unsigned iminor); | ||
31 | int (*gpio_current) (unsigned iminor); | ||
32 | struct device* dev; /* for dev_dbg() support, set in init */ | ||
33 | }; | ||
34 | |||
35 | extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, | ||
36 | size_t len, loff_t *ppos); | ||
37 | |||
38 | extern ssize_t nsc_gpio_read(struct file *file, char __user *buf, | ||
39 | size_t len, loff_t *ppos); | ||
40 | |||
41 | extern void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index); | ||
42 | |||
diff --git a/include/linux/plist.h b/include/linux/plist.h new file mode 100644 index 000000000000..3404faef542c --- /dev/null +++ b/include/linux/plist.h | |||
@@ -0,0 +1,247 @@ | |||
1 | /* | ||
2 | * Descending-priority-sorted double-linked list | ||
3 | * | ||
4 | * (C) 2002-2003 Intel Corp | ||
5 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>. | ||
6 | * | ||
7 | * 2001-2005 (c) MontaVista Software, Inc. | ||
8 | * Daniel Walker <dwalker@mvista.com> | ||
9 | * | ||
10 | * (C) 2005 Thomas Gleixner <tglx@linutronix.de> | ||
11 | * | ||
12 | * Simplifications of the original code by | ||
13 | * Oleg Nesterov <oleg@tv-sign.ru> | ||
14 | * | ||
15 | * Licensed under the FSF's GNU Public License v2 or later. | ||
16 | * | ||
17 | * Based on simple lists (include/linux/list.h). | ||
18 | * | ||
19 | * This is a priority-sorted list of nodes; each node has a | ||
20 | * priority from INT_MIN (highest) to INT_MAX (lowest). | ||
21 | * | ||
22 | * Addition is O(K), removal is O(1), change of priority of a node is | ||
23 | * O(K) and K is the number of RT priority levels used in the system. | ||
24 | * (1 <= K <= 99) | ||
25 | * | ||
26 | * This list is really a list of lists: | ||
27 | * | ||
28 | * - The tier 1 list is the prio_list, different priority nodes. | ||
29 | * | ||
30 | * - The tier 2 list is the node_list, serialized nodes. | ||
31 | * | ||
32 | * Simple ASCII art explanation: | ||
33 | * | ||
34 | * |HEAD | | ||
35 | * | | | ||
36 | * |prio_list.prev|<------------------------------------| | ||
37 | * |prio_list.next|<->|pl|<->|pl|<--------------->|pl|<-| | ||
38 | * |10 | |10| |21| |21| |21| |40| (prio) | ||
39 | * | | | | | | | | | | | | | ||
40 | * | | | | | | | | | | | | | ||
41 | * |node_list.next|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-| | ||
42 | * |node_list.prev|<------------------------------------| | ||
43 | * | ||
44 | * The nodes on the prio_list list are sorted by priority to simplify | ||
45 | * the insertion of new nodes. There are no nodes with duplicate | ||
46 | * priorites on the list. | ||
47 | * | ||
48 | * The nodes on the node_list is ordered by priority and can contain | ||
49 | * entries which have the same priority. Those entries are ordered | ||
50 | * FIFO | ||
51 | * | ||
52 | * Addition means: look for the prio_list node in the prio_list | ||
53 | * for the priority of the node and insert it before the node_list | ||
54 | * entry of the next prio_list node. If it is the first node of | ||
55 | * that priority, add it to the prio_list in the right position and | ||
56 | * insert it into the serialized node_list list | ||
57 | * | ||
58 | * Removal means remove it from the node_list and remove it from | ||
59 | * the prio_list if the node_list list_head is non empty. In case | ||
60 | * of removal from the prio_list it must be checked whether other | ||
61 | * entries of the same priority are on the list or not. If there | ||
62 | * is another entry of the same priority then this entry has to | ||
63 | * replace the removed entry on the prio_list. If the entry which | ||
64 | * is removed is the only entry of this priority then a simple | ||
65 | * remove from both list is sufficient. | ||
66 | * | ||
67 | * INT_MIN is the highest priority, 0 is the medium highest, INT_MAX | ||
68 | * is lowest priority. | ||
69 | * | ||
70 | * No locking is done, up to the caller. | ||
71 | * | ||
72 | */ | ||
73 | #ifndef _LINUX_PLIST_H_ | ||
74 | #define _LINUX_PLIST_H_ | ||
75 | |||
76 | #include <linux/list.h> | ||
77 | #include <linux/spinlock_types.h> | ||
78 | |||
79 | struct plist_head { | ||
80 | struct list_head prio_list; | ||
81 | struct list_head node_list; | ||
82 | #ifdef CONFIG_DEBUG_PI_LIST | ||
83 | spinlock_t *lock; | ||
84 | #endif | ||
85 | }; | ||
86 | |||
87 | struct plist_node { | ||
88 | int prio; | ||
89 | struct plist_head plist; | ||
90 | }; | ||
91 | |||
92 | #ifdef CONFIG_DEBUG_PI_LIST | ||
93 | # define PLIST_HEAD_LOCK_INIT(_lock) .lock = _lock | ||
94 | #else | ||
95 | # define PLIST_HEAD_LOCK_INIT(_lock) | ||
96 | #endif | ||
97 | |||
98 | /** | ||
99 | * #PLIST_HEAD_INIT - static struct plist_head initializer | ||
100 | * | ||
101 | * @head: struct plist_head variable name | ||
102 | */ | ||
103 | #define PLIST_HEAD_INIT(head, _lock) \ | ||
104 | { \ | ||
105 | .prio_list = LIST_HEAD_INIT((head).prio_list), \ | ||
106 | .node_list = LIST_HEAD_INIT((head).node_list), \ | ||
107 | PLIST_HEAD_LOCK_INIT(&(_lock)) \ | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * #PLIST_NODE_INIT - static struct plist_node initializer | ||
112 | * | ||
113 | * @node: struct plist_node variable name | ||
114 | * @__prio: initial node priority | ||
115 | */ | ||
116 | #define PLIST_NODE_INIT(node, __prio) \ | ||
117 | { \ | ||
118 | .prio = (__prio), \ | ||
119 | .plist = PLIST_HEAD_INIT((node).plist, NULL), \ | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * plist_head_init - dynamic struct plist_head initializer | ||
124 | * | ||
125 | * @head: &struct plist_head pointer | ||
126 | */ | ||
127 | static inline void | ||
128 | plist_head_init(struct plist_head *head, spinlock_t *lock) | ||
129 | { | ||
130 | INIT_LIST_HEAD(&head->prio_list); | ||
131 | INIT_LIST_HEAD(&head->node_list); | ||
132 | #ifdef CONFIG_DEBUG_PI_LIST | ||
133 | head->lock = lock; | ||
134 | #endif | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * plist_node_init - Dynamic struct plist_node initializer | ||
139 | * | ||
140 | * @node: &struct plist_node pointer | ||
141 | * @prio: initial node priority | ||
142 | */ | ||
143 | static inline void plist_node_init(struct plist_node *node, int prio) | ||
144 | { | ||
145 | node->prio = prio; | ||
146 | plist_head_init(&node->plist, NULL); | ||
147 | } | ||
148 | |||
149 | extern void plist_add(struct plist_node *node, struct plist_head *head); | ||
150 | extern void plist_del(struct plist_node *node, struct plist_head *head); | ||
151 | |||
152 | /** | ||
153 | * plist_for_each - iterate over the plist | ||
154 | * | ||
155 | * @pos1: the type * to use as a loop counter. | ||
156 | * @head: the head for your list. | ||
157 | */ | ||
158 | #define plist_for_each(pos, head) \ | ||
159 | list_for_each_entry(pos, &(head)->node_list, plist.node_list) | ||
160 | |||
161 | /** | ||
162 | * plist_for_each_entry_safe - iterate over a plist of given type safe | ||
163 | * against removal of list entry | ||
164 | * | ||
165 | * @pos1: the type * to use as a loop counter. | ||
166 | * @n1: another type * to use as temporary storage | ||
167 | * @head: the head for your list. | ||
168 | */ | ||
169 | #define plist_for_each_safe(pos, n, head) \ | ||
170 | list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) | ||
171 | |||
172 | /** | ||
173 | * plist_for_each_entry - iterate over list of given type | ||
174 | * | ||
175 | * @pos: the type * to use as a loop counter. | ||
176 | * @head: the head for your list. | ||
177 | * @member: the name of the list_struct within the struct. | ||
178 | */ | ||
179 | #define plist_for_each_entry(pos, head, mem) \ | ||
180 | list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) | ||
181 | |||
182 | /** | ||
183 | * plist_for_each_entry_safe - iterate over list of given type safe against | ||
184 | * removal of list entry | ||
185 | * | ||
186 | * @pos: the type * to use as a loop counter. | ||
187 | * @n: another type * to use as temporary storage | ||
188 | * @head: the head for your list. | ||
189 | * @m: the name of the list_struct within the struct. | ||
190 | */ | ||
191 | #define plist_for_each_entry_safe(pos, n, head, m) \ | ||
192 | list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) | ||
193 | |||
194 | /** | ||
195 | * plist_head_empty - return !0 if a plist_head is empty | ||
196 | * | ||
197 | * @head: &struct plist_head pointer | ||
198 | */ | ||
199 | static inline int plist_head_empty(const struct plist_head *head) | ||
200 | { | ||
201 | return list_empty(&head->node_list); | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * plist_node_empty - return !0 if plist_node is not on a list | ||
206 | * | ||
207 | * @node: &struct plist_node pointer | ||
208 | */ | ||
209 | static inline int plist_node_empty(const struct plist_node *node) | ||
210 | { | ||
211 | return plist_head_empty(&node->plist); | ||
212 | } | ||
213 | |||
214 | /* All functions below assume the plist_head is not empty. */ | ||
215 | |||
216 | /** | ||
217 | * plist_first_entry - get the struct for the first entry | ||
218 | * | ||
219 | * @ptr: the &struct plist_head pointer. | ||
220 | * @type: the type of the struct this is embedded in. | ||
221 | * @member: the name of the list_struct within the struct. | ||
222 | */ | ||
223 | #ifdef CONFIG_DEBUG_PI_LIST | ||
224 | # define plist_first_entry(head, type, member) \ | ||
225 | ({ \ | ||
226 | WARN_ON(plist_head_empty(head)); \ | ||
227 | container_of(plist_first(head), type, member); \ | ||
228 | }) | ||
229 | #else | ||
230 | # define plist_first_entry(head, type, member) \ | ||
231 | container_of(plist_first(head), type, member) | ||
232 | #endif | ||
233 | |||
234 | /** | ||
235 | * plist_first - return the first node (and thus, highest priority) | ||
236 | * | ||
237 | * @head: the &struct plist_head pointer | ||
238 | * | ||
239 | * Assumes the plist is _not_ empty. | ||
240 | */ | ||
241 | static inline struct plist_node* plist_first(const struct plist_head *head) | ||
242 | { | ||
243 | return list_entry(head->node_list.next, | ||
244 | struct plist_node, plist.node_list); | ||
245 | } | ||
246 | |||
247 | #endif | ||
diff --git a/include/linux/poison.h b/include/linux/poison.h new file mode 100644 index 000000000000..a5347c02432e --- /dev/null +++ b/include/linux/poison.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef _LINUX_POISON_H | ||
2 | #define _LINUX_POISON_H | ||
3 | |||
4 | /********** include/linux/list.h **********/ | ||
5 | /* | ||
6 | * These are non-NULL pointers that will result in page faults | ||
7 | * under normal circumstances, used to verify that nobody uses | ||
8 | * non-initialized list entries. | ||
9 | */ | ||
10 | #define LIST_POISON1 ((void *) 0x00100100) | ||
11 | #define LIST_POISON2 ((void *) 0x00200200) | ||
12 | |||
13 | /********** mm/slab.c **********/ | ||
14 | /* | ||
15 | * Magic nums for obj red zoning. | ||
16 | * Placed in the first word before and the first word after an obj. | ||
17 | */ | ||
18 | #define RED_INACTIVE 0x5A2CF071UL /* when obj is inactive */ | ||
19 | #define RED_ACTIVE 0x170FC2A5UL /* when obj is active */ | ||
20 | |||
21 | /* ...and for poisoning */ | ||
22 | #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ | ||
23 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ | ||
24 | #define POISON_END 0xa5 /* end-byte of poisoning */ | ||
25 | |||
26 | /********** arch/$ARCH/mm/init.c **********/ | ||
27 | #define POISON_FREE_INITMEM 0xcc | ||
28 | |||
29 | /********** arch/x86_64/mm/init.c **********/ | ||
30 | #define POISON_FREE_INITDATA 0xba | ||
31 | |||
32 | /********** arch/ia64/hp/common/sba_iommu.c **********/ | ||
33 | /* | ||
34 | * arch/ia64/hp/common/sba_iommu.c uses a 16-byte poison string with a | ||
35 | * value of "SBAIOMMU POISON\0" for spill-over poisoning. | ||
36 | */ | ||
37 | |||
38 | /********** fs/jbd/journal.c **********/ | ||
39 | #define JBD_POISON_FREE 0x5b | ||
40 | |||
41 | /********** drivers/base/dmapool.c **********/ | ||
42 | #define POOL_POISON_FREED 0xa7 /* !inuse */ | ||
43 | #define POOL_POISON_ALLOCATED 0xa9 /* !initted */ | ||
44 | |||
45 | /********** drivers/atm/ **********/ | ||
46 | #define ATM_POISON_FREE 0x12 | ||
47 | |||
48 | /********** kernel/mutexes **********/ | ||
49 | #define MUTEX_DEBUG_INIT 0x11 | ||
50 | #define MUTEX_DEBUG_FREE 0x22 | ||
51 | |||
52 | /********** security/ **********/ | ||
53 | #define KEY_DESTROY 0xbd | ||
54 | |||
55 | /********** sound/oss/ **********/ | ||
56 | #define OSS_POISON_FREE 0xAB | ||
57 | |||
58 | #endif | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 6312758393b6..48dfe00070c7 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -258,6 +258,7 @@ extern void rcu_init(void); | |||
258 | extern void rcu_check_callbacks(int cpu, int user); | 258 | extern void rcu_check_callbacks(int cpu, int user); |
259 | extern void rcu_restart_cpu(int cpu); | 259 | extern void rcu_restart_cpu(int cpu); |
260 | extern long rcu_batches_completed(void); | 260 | extern long rcu_batches_completed(void); |
261 | extern long rcu_batches_completed_bh(void); | ||
261 | 262 | ||
262 | /* Exported interfaces */ | 263 | /* Exported interfaces */ |
263 | extern void FASTCALL(call_rcu(struct rcu_head *head, | 264 | extern void FASTCALL(call_rcu(struct rcu_head *head, |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h new file mode 100644 index 000000000000..fa4a3b82ba70 --- /dev/null +++ b/include/linux/rtmutex.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * RT Mutexes: blocking mutual exclusion locks with PI support | ||
3 | * | ||
4 | * started by Ingo Molnar and Thomas Gleixner: | ||
5 | * | ||
6 | * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | ||
7 | * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com> | ||
8 | * | ||
9 | * This file contains the public data structure and API definitions. | ||
10 | */ | ||
11 | |||
12 | #ifndef __LINUX_RT_MUTEX_H | ||
13 | #define __LINUX_RT_MUTEX_H | ||
14 | |||
15 | #include <linux/linkage.h> | ||
16 | #include <linux/plist.h> | ||
17 | #include <linux/spinlock_types.h> | ||
18 | |||
19 | /* | ||
20 | * The rt_mutex structure | ||
21 | * | ||
22 | * @wait_lock: spinlock to protect the structure | ||
23 | * @wait_list: pilist head to enqueue waiters in priority order | ||
24 | * @owner: the mutex owner | ||
25 | */ | ||
26 | struct rt_mutex { | ||
27 | spinlock_t wait_lock; | ||
28 | struct plist_head wait_list; | ||
29 | struct task_struct *owner; | ||
30 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
31 | int save_state; | ||
32 | struct list_head held_list_entry; | ||
33 | unsigned long acquire_ip; | ||
34 | const char *name, *file; | ||
35 | int line; | ||
36 | void *magic; | ||
37 | #endif | ||
38 | }; | ||
39 | |||
40 | struct rt_mutex_waiter; | ||
41 | struct hrtimer_sleeper; | ||
42 | |||
43 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
44 | extern int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
45 | unsigned long len); | ||
46 | extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); | ||
47 | #else | ||
48 | static inline int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
49 | unsigned long len) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | # define rt_mutex_debug_check_no_locks_held(task) do { } while (0) | ||
54 | #endif | ||
55 | |||
56 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
57 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ | ||
58 | , .name = #mutexname, .file = __FILE__, .line = __LINE__ | ||
59 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) | ||
60 | extern void rt_mutex_debug_task_free(struct task_struct *tsk); | ||
61 | #else | ||
62 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) | ||
63 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL) | ||
64 | # define rt_mutex_debug_task_free(t) do { } while (0) | ||
65 | #endif | ||
66 | |||
67 | #define __RT_MUTEX_INITIALIZER(mutexname) \ | ||
68 | { .wait_lock = SPIN_LOCK_UNLOCKED \ | ||
69 | , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list, mutexname.wait_lock) \ | ||
70 | , .owner = NULL \ | ||
71 | __DEBUG_RT_MUTEX_INITIALIZER(mutexname)} | ||
72 | |||
73 | #define DEFINE_RT_MUTEX(mutexname) \ | ||
74 | struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) | ||
75 | |||
76 | /*** | ||
77 | * rt_mutex_is_locked - is the mutex locked | ||
78 | * @lock: the mutex to be queried | ||
79 | * | ||
80 | * Returns 1 if the mutex is locked, 0 if unlocked. | ||
81 | */ | ||
82 | static inline int rt_mutex_is_locked(struct rt_mutex *lock) | ||
83 | { | ||
84 | return lock->owner != NULL; | ||
85 | } | ||
86 | |||
87 | extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); | ||
88 | extern void rt_mutex_destroy(struct rt_mutex *lock); | ||
89 | |||
90 | extern void rt_mutex_lock(struct rt_mutex *lock); | ||
91 | extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, | ||
92 | int detect_deadlock); | ||
93 | extern int rt_mutex_timed_lock(struct rt_mutex *lock, | ||
94 | struct hrtimer_sleeper *timeout, | ||
95 | int detect_deadlock); | ||
96 | |||
97 | extern int rt_mutex_trylock(struct rt_mutex *lock); | ||
98 | |||
99 | extern void rt_mutex_unlock(struct rt_mutex *lock); | ||
100 | |||
101 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
102 | # define INIT_RT_MUTEX_DEBUG(tsk) \ | ||
103 | .held_list_head = LIST_HEAD_INIT(tsk.held_list_head), \ | ||
104 | .held_list_lock = SPIN_LOCK_UNLOCKED | ||
105 | #else | ||
106 | # define INIT_RT_MUTEX_DEBUG(tsk) | ||
107 | #endif | ||
108 | |||
109 | #ifdef CONFIG_RT_MUTEXES | ||
110 | # define INIT_RT_MUTEXES(tsk) \ | ||
111 | .pi_waiters = PLIST_HEAD_INIT(tsk.pi_waiters, tsk.pi_lock), \ | ||
112 | INIT_RT_MUTEX_DEBUG(tsk) | ||
113 | #else | ||
114 | # define INIT_RT_MUTEXES(tsk) | ||
115 | #endif | ||
116 | |||
117 | #endif | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 122a25c1b997..821f0481ebe1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -73,6 +73,7 @@ struct sched_param { | |||
73 | #include <linux/seccomp.h> | 73 | #include <linux/seccomp.h> |
74 | #include <linux/rcupdate.h> | 74 | #include <linux/rcupdate.h> |
75 | #include <linux/futex.h> | 75 | #include <linux/futex.h> |
76 | #include <linux/rtmutex.h> | ||
76 | 77 | ||
77 | #include <linux/time.h> | 78 | #include <linux/time.h> |
78 | #include <linux/param.h> | 79 | #include <linux/param.h> |
@@ -83,6 +84,7 @@ struct sched_param { | |||
83 | #include <asm/processor.h> | 84 | #include <asm/processor.h> |
84 | 85 | ||
85 | struct exec_domain; | 86 | struct exec_domain; |
87 | struct futex_pi_state; | ||
86 | 88 | ||
87 | /* | 89 | /* |
88 | * List of flags we want to share for kernel threads, | 90 | * List of flags we want to share for kernel threads, |
@@ -123,6 +125,7 @@ extern unsigned long nr_running(void); | |||
123 | extern unsigned long nr_uninterruptible(void); | 125 | extern unsigned long nr_uninterruptible(void); |
124 | extern unsigned long nr_active(void); | 126 | extern unsigned long nr_active(void); |
125 | extern unsigned long nr_iowait(void); | 127 | extern unsigned long nr_iowait(void); |
128 | extern unsigned long weighted_cpuload(const int cpu); | ||
126 | 129 | ||
127 | 130 | ||
128 | /* | 131 | /* |
@@ -494,8 +497,11 @@ struct signal_struct { | |||
494 | 497 | ||
495 | #define MAX_PRIO (MAX_RT_PRIO + 40) | 498 | #define MAX_PRIO (MAX_RT_PRIO + 40) |
496 | 499 | ||
497 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) | 500 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) |
501 | #define rt_task(p) rt_prio((p)->prio) | ||
498 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | 502 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) |
503 | #define has_rt_policy(p) \ | ||
504 | unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH) | ||
499 | 505 | ||
500 | /* | 506 | /* |
501 | * Some day this will be a full-fledged user tracking system.. | 507 | * Some day this will be a full-fledged user tracking system.. |
@@ -558,9 +564,9 @@ enum idle_type | |||
558 | /* | 564 | /* |
559 | * sched-domains (multiprocessor balancing) declarations: | 565 | * sched-domains (multiprocessor balancing) declarations: |
560 | */ | 566 | */ |
561 | #ifdef CONFIG_SMP | ||
562 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ | 567 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ |
563 | 568 | ||
569 | #ifdef CONFIG_SMP | ||
564 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 570 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
565 | #define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ | 571 | #define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ |
566 | #define SD_BALANCE_EXEC 4 /* Balance on exec */ | 572 | #define SD_BALANCE_EXEC 4 /* Balance on exec */ |
@@ -569,6 +575,11 @@ enum idle_type | |||
569 | #define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ | 575 | #define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ |
570 | #define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ | 576 | #define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ |
571 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ | 577 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ |
578 | #define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ | ||
579 | |||
580 | #define BALANCE_FOR_POWER ((sched_mc_power_savings || sched_smt_power_savings) \ | ||
581 | ? SD_POWERSAVINGS_BALANCE : 0) | ||
582 | |||
572 | 583 | ||
573 | struct sched_group { | 584 | struct sched_group { |
574 | struct sched_group *next; /* Must be a circular list */ | 585 | struct sched_group *next; /* Must be a circular list */ |
@@ -638,7 +649,7 @@ struct sched_domain { | |||
638 | #endif | 649 | #endif |
639 | }; | 650 | }; |
640 | 651 | ||
641 | extern void partition_sched_domains(cpumask_t *partition1, | 652 | extern int partition_sched_domains(cpumask_t *partition1, |
642 | cpumask_t *partition2); | 653 | cpumask_t *partition2); |
643 | 654 | ||
644 | /* | 655 | /* |
@@ -713,10 +724,13 @@ struct task_struct { | |||
713 | 724 | ||
714 | int lock_depth; /* BKL lock depth */ | 725 | int lock_depth; /* BKL lock depth */ |
715 | 726 | ||
716 | #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) | 727 | #ifdef CONFIG_SMP |
728 | #ifdef __ARCH_WANT_UNLOCKED_CTXSW | ||
717 | int oncpu; | 729 | int oncpu; |
718 | #endif | 730 | #endif |
719 | int prio, static_prio; | 731 | #endif |
732 | int load_weight; /* for niceness load balancing purposes */ | ||
733 | int prio, static_prio, normal_prio; | ||
720 | struct list_head run_list; | 734 | struct list_head run_list; |
721 | prio_array_t *array; | 735 | prio_array_t *array; |
722 | 736 | ||
@@ -843,6 +857,20 @@ struct task_struct { | |||
843 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ | 857 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ |
844 | spinlock_t alloc_lock; | 858 | spinlock_t alloc_lock; |
845 | 859 | ||
860 | /* Protection of the PI data structures: */ | ||
861 | spinlock_t pi_lock; | ||
862 | |||
863 | #ifdef CONFIG_RT_MUTEXES | ||
864 | /* PI waiters blocked on a rt_mutex held by this task */ | ||
865 | struct plist_head pi_waiters; | ||
866 | /* Deadlock detection and priority inheritance handling */ | ||
867 | struct rt_mutex_waiter *pi_blocked_on; | ||
868 | # ifdef CONFIG_DEBUG_RT_MUTEXES | ||
869 | spinlock_t held_list_lock; | ||
870 | struct list_head held_list_head; | ||
871 | # endif | ||
872 | #endif | ||
873 | |||
846 | #ifdef CONFIG_DEBUG_MUTEXES | 874 | #ifdef CONFIG_DEBUG_MUTEXES |
847 | /* mutex deadlock detection */ | 875 | /* mutex deadlock detection */ |
848 | struct mutex_waiter *blocked_on; | 876 | struct mutex_waiter *blocked_on; |
@@ -888,6 +916,8 @@ struct task_struct { | |||
888 | #ifdef CONFIG_COMPAT | 916 | #ifdef CONFIG_COMPAT |
889 | struct compat_robust_list_head __user *compat_robust_list; | 917 | struct compat_robust_list_head __user *compat_robust_list; |
890 | #endif | 918 | #endif |
919 | struct list_head pi_state_list; | ||
920 | struct futex_pi_state *pi_state_cache; | ||
891 | 921 | ||
892 | atomic_t fs_excl; /* holding fs exclusive resources */ | 922 | atomic_t fs_excl; /* holding fs exclusive resources */ |
893 | struct rcu_head rcu; | 923 | struct rcu_head rcu; |
@@ -955,6 +985,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
955 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 985 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
956 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 986 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
957 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 987 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
988 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | ||
958 | 989 | ||
959 | /* | 990 | /* |
960 | * Only the _current_ task can read/write to tsk->flags, but other | 991 | * Only the _current_ task can read/write to tsk->flags, but other |
@@ -1009,6 +1040,19 @@ static inline void idle_task_exit(void) {} | |||
1009 | #endif | 1040 | #endif |
1010 | 1041 | ||
1011 | extern void sched_idle_next(void); | 1042 | extern void sched_idle_next(void); |
1043 | |||
1044 | #ifdef CONFIG_RT_MUTEXES | ||
1045 | extern int rt_mutex_getprio(task_t *p); | ||
1046 | extern void rt_mutex_setprio(task_t *p, int prio); | ||
1047 | extern void rt_mutex_adjust_pi(task_t *p); | ||
1048 | #else | ||
1049 | static inline int rt_mutex_getprio(task_t *p) | ||
1050 | { | ||
1051 | return p->normal_prio; | ||
1052 | } | ||
1053 | # define rt_mutex_adjust_pi(p) do { } while (0) | ||
1054 | #endif | ||
1055 | |||
1012 | extern void set_user_nice(task_t *p, long nice); | 1056 | extern void set_user_nice(task_t *p, long nice); |
1013 | extern int task_prio(const task_t *p); | 1057 | extern int task_prio(const task_t *p); |
1014 | extern int task_nice(const task_t *p); | 1058 | extern int task_nice(const task_t *p); |
@@ -1408,6 +1452,11 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) | |||
1408 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); | 1452 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); |
1409 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); | 1453 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); |
1410 | 1454 | ||
1455 | #include <linux/sysdev.h> | ||
1456 | extern int sched_mc_power_savings, sched_smt_power_savings; | ||
1457 | extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings; | ||
1458 | extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | ||
1459 | |||
1411 | extern void normalize_rt_tasks(void); | 1460 | extern void normalize_rt_tasks(void); |
1412 | 1461 | ||
1413 | #ifdef CONFIG_PM | 1462 | #ifdef CONFIG_PM |
diff --git a/include/linux/scx200.h b/include/linux/scx200.h index a22f9e173ad2..693c0557e70b 100644 --- a/include/linux/scx200.h +++ b/include/linux/scx200.h | |||
@@ -49,10 +49,3 @@ extern unsigned scx200_cb_base; | |||
49 | #define SCx200_REV 0x3d /* Revision Register */ | 49 | #define SCx200_REV 0x3d /* Revision Register */ |
50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ | 50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ |
51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ | 51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ |
52 | |||
53 | /* | ||
54 | Local variables: | ||
55 | compile-command: "make -C ../.. bzImage modules" | ||
56 | c-basic-offset: 8 | ||
57 | End: | ||
58 | */ | ||
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 30cdd648ba79..90dd069cc145 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <linux/spinlock.h> | 1 | #include <linux/spinlock.h> |
2 | 2 | ||
3 | u32 scx200_gpio_configure(int index, u32 set, u32 clear); | 3 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
4 | 4 | ||
5 | extern unsigned scx200_gpio_base; | 5 | extern unsigned scx200_gpio_base; |
6 | extern long scx200_gpio_shadow[2]; | 6 | extern long scx200_gpio_shadow[2]; |
@@ -17,7 +17,7 @@ extern long scx200_gpio_shadow[2]; | |||
17 | 17 | ||
18 | /* returns the value of the GPIO pin */ | 18 | /* returns the value of the GPIO pin */ |
19 | 19 | ||
20 | static inline int scx200_gpio_get(int index) { | 20 | static inline int scx200_gpio_get(unsigned index) { |
21 | __SCx200_GPIO_BANK; | 21 | __SCx200_GPIO_BANK; |
22 | __SCx200_GPIO_IOADDR + 0x04; | 22 | __SCx200_GPIO_IOADDR + 0x04; |
23 | __SCx200_GPIO_INDEX; | 23 | __SCx200_GPIO_INDEX; |
@@ -29,7 +29,7 @@ static inline int scx200_gpio_get(int index) { | |||
29 | driven if the GPIO is configured as an output, it might not be the | 29 | driven if the GPIO is configured as an output, it might not be the |
30 | state of the GPIO right now if the GPIO is configured as an input) */ | 30 | state of the GPIO right now if the GPIO is configured as an input) */ |
31 | 31 | ||
32 | static inline int scx200_gpio_current(int index) { | 32 | static inline int scx200_gpio_current(unsigned index) { |
33 | __SCx200_GPIO_BANK; | 33 | __SCx200_GPIO_BANK; |
34 | __SCx200_GPIO_INDEX; | 34 | __SCx200_GPIO_INDEX; |
35 | 35 | ||
@@ -38,7 +38,7 @@ static inline int scx200_gpio_current(int index) { | |||
38 | 38 | ||
39 | /* drive the GPIO signal high */ | 39 | /* drive the GPIO signal high */ |
40 | 40 | ||
41 | static inline void scx200_gpio_set_high(int index) { | 41 | static inline void scx200_gpio_set_high(unsigned index) { |
42 | __SCx200_GPIO_BANK; | 42 | __SCx200_GPIO_BANK; |
43 | __SCx200_GPIO_IOADDR; | 43 | __SCx200_GPIO_IOADDR; |
44 | __SCx200_GPIO_SHADOW; | 44 | __SCx200_GPIO_SHADOW; |
@@ -49,7 +49,7 @@ static inline void scx200_gpio_set_high(int index) { | |||
49 | 49 | ||
50 | /* drive the GPIO signal low */ | 50 | /* drive the GPIO signal low */ |
51 | 51 | ||
52 | static inline void scx200_gpio_set_low(int index) { | 52 | static inline void scx200_gpio_set_low(unsigned index) { |
53 | __SCx200_GPIO_BANK; | 53 | __SCx200_GPIO_BANK; |
54 | __SCx200_GPIO_IOADDR; | 54 | __SCx200_GPIO_IOADDR; |
55 | __SCx200_GPIO_SHADOW; | 55 | __SCx200_GPIO_SHADOW; |
@@ -60,7 +60,7 @@ static inline void scx200_gpio_set_low(int index) { | |||
60 | 60 | ||
61 | /* drive the GPIO signal to state */ | 61 | /* drive the GPIO signal to state */ |
62 | 62 | ||
63 | static inline void scx200_gpio_set(int index, int state) { | 63 | static inline void scx200_gpio_set(unsigned index, int state) { |
64 | __SCx200_GPIO_BANK; | 64 | __SCx200_GPIO_BANK; |
65 | __SCx200_GPIO_IOADDR; | 65 | __SCx200_GPIO_IOADDR; |
66 | __SCx200_GPIO_SHADOW; | 66 | __SCx200_GPIO_SHADOW; |
@@ -73,7 +73,7 @@ static inline void scx200_gpio_set(int index, int state) { | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* toggle the GPIO signal */ | 75 | /* toggle the GPIO signal */ |
76 | static inline void scx200_gpio_change(int index) { | 76 | static inline void scx200_gpio_change(unsigned index) { |
77 | __SCx200_GPIO_BANK; | 77 | __SCx200_GPIO_BANK; |
78 | __SCx200_GPIO_IOADDR; | 78 | __SCx200_GPIO_IOADDR; |
79 | __SCx200_GPIO_SHADOW; | 79 | __SCx200_GPIO_SHADOW; |
@@ -87,10 +87,3 @@ static inline void scx200_gpio_change(int index) { | |||
87 | #undef __SCx200_GPIO_SHADOW | 87 | #undef __SCx200_GPIO_SHADOW |
88 | #undef __SCx200_GPIO_INDEX | 88 | #undef __SCx200_GPIO_INDEX |
89 | #undef __SCx200_GPIO_OUT | 89 | #undef __SCx200_GPIO_OUT |
90 | |||
91 | /* | ||
92 | Local variables: | ||
93 | compile-command: "make -C ../.. bzImage modules" | ||
94 | c-basic-offset: 8 | ||
95 | End: | ||
96 | */ | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index dc3f3aa0c83e..c41e2d6d1acc 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -199,6 +199,8 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | |||
199 | } | 199 | } |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | extern int kswapd_run(int nid); | ||
203 | |||
202 | #ifdef CONFIG_MMU | 204 | #ifdef CONFIG_MMU |
203 | /* linux/mm/shmem.c */ | 205 | /* linux/mm/shmem.c */ |
204 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 206 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 33785b79d548..008f04c56737 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -174,9 +174,9 @@ asmlinkage long sys_waitid(int which, pid_t pid, | |||
174 | int options, struct rusage __user *ru); | 174 | int options, struct rusage __user *ru); |
175 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); | 175 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); |
176 | asmlinkage long sys_set_tid_address(int __user *tidptr); | 176 | asmlinkage long sys_set_tid_address(int __user *tidptr); |
177 | asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, | 177 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, |
178 | struct timespec __user *utime, u32 __user *uaddr2, | 178 | struct timespec __user *utime, u32 __user *uaddr2, |
179 | int val3); | 179 | u32 val3); |
180 | 180 | ||
181 | asmlinkage long sys_init_module(void __user *umod, unsigned long len, | 181 | asmlinkage long sys_init_module(void __user *umod, unsigned long len, |
182 | const char __user *uargs); | 182 | const char __user *uargs); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 349ef908a222..46e4d8f2771f 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -149,6 +149,7 @@ enum | |||
149 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ | 149 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ |
150 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ | 150 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ |
151 | KERN_COMPAT_LOG=73, /* int: print compat layer messages */ | 151 | KERN_COMPAT_LOG=73, /* int: print compat layer messages */ |
152 | KERN_MAX_LOCK_DEPTH=74, | ||
152 | }; | 153 | }; |
153 | 154 | ||
154 | 155 | ||
@@ -189,6 +190,7 @@ enum | |||
189 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ | 190 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ |
190 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ | 191 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ |
191 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ | 192 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ |
193 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ | ||
192 | }; | 194 | }; |
193 | 195 | ||
194 | 196 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index a305ae2e44b6..ec1eca85290a 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -134,7 +134,8 @@ | |||
134 | .flags = SD_LOAD_BALANCE \ | 134 | .flags = SD_LOAD_BALANCE \ |
135 | | SD_BALANCE_NEWIDLE \ | 135 | | SD_BALANCE_NEWIDLE \ |
136 | | SD_BALANCE_EXEC \ | 136 | | SD_BALANCE_EXEC \ |
137 | | SD_WAKE_AFFINE, \ | 137 | | SD_WAKE_AFFINE \ |
138 | | BALANCE_FOR_POWER, \ | ||
138 | .last_balance = jiffies, \ | 139 | .last_balance = jiffies, \ |
139 | .balance_interval = 1, \ | 140 | .balance_interval = 1, \ |
140 | .nr_balance_failed = 0, \ | 141 | .nr_balance_failed = 0, \ |