diff options
Diffstat (limited to 'include')
98 files changed, 724 insertions, 553 deletions
diff --git a/include/asm-alpha/a.out.h b/include/asm-alpha/a.out.h index d97daf42753d..e43cf61649a9 100644 --- a/include/asm-alpha/a.out.h +++ b/include/asm-alpha/a.out.h | |||
@@ -101,6 +101,8 @@ struct exec | |||
101 | #define STACK_TOP \ | 101 | #define STACK_TOP \ |
102 | (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL) | 102 | (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL) |
103 | 103 | ||
104 | #define STACK_TOP_MAX 0x00120000000UL | ||
105 | |||
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | #endif /* __A_OUT_GNU_H__ */ | 108 | #endif /* __A_OUT_GNU_H__ */ |
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index cf1021a97b2e..620c4d86cbf4 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -139,16 +139,6 @@ extern void halt(void) __attribute__((noreturn)); | |||
139 | struct task_struct; | 139 | struct task_struct; |
140 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); | 140 | extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); |
141 | 141 | ||
142 | /* | ||
143 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
144 | * it needs a way to flush as much of the CPU's caches as possible. | ||
145 | * | ||
146 | * TODO: fill this in! | ||
147 | */ | ||
148 | static inline void sched_cacheflush(void) | ||
149 | { | ||
150 | } | ||
151 | |||
152 | #define imb() \ | 142 | #define imb() \ |
153 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") | 143 | __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") |
154 | 144 | ||
diff --git a/include/asm-arm/a.out.h b/include/asm-arm/a.out.h index 3e5fe64c4394..d7165e86df25 100644 --- a/include/asm-arm/a.out.h +++ b/include/asm-arm/a.out.h | |||
@@ -30,6 +30,7 @@ struct exec | |||
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | #define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \ | 31 | #define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \ |
32 | TASK_SIZE : TASK_SIZE_26) | 32 | TASK_SIZE : TASK_SIZE_26) |
33 | #define STACK_TOP_MAX TASK_SIZE | ||
33 | #endif | 34 | #endif |
34 | 35 | ||
35 | #ifndef LIBRARY_START_TEXT | 36 | #ifndef LIBRARY_START_TEXT |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 6f8e6a69dc5f..94ea8c6dc1a4 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -254,16 +254,6 @@ do { \ | |||
254 | last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ | 254 | last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ |
255 | } while (0) | 255 | } while (0) |
256 | 256 | ||
257 | /* | ||
258 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
259 | * it needs a way to flush as much of the CPU's caches as possible. | ||
260 | * | ||
261 | * TODO: fill this in! | ||
262 | */ | ||
263 | static inline void sched_cacheflush(void) | ||
264 | { | ||
265 | } | ||
266 | |||
267 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) | 257 | #if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) |
268 | /* | 258 | /* |
269 | * On the StrongARM, "swp" is terminally broken since it bypasses the | 259 | * On the StrongARM, "swp" is terminally broken since it bypasses the |
diff --git a/include/asm-arm26/a.out.h b/include/asm-arm26/a.out.h index 9b2702c42c87..7167f54ae3fc 100644 --- a/include/asm-arm26/a.out.h +++ b/include/asm-arm26/a.out.h | |||
@@ -29,6 +29,7 @@ struct exec | |||
29 | 29 | ||
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | #define STACK_TOP TASK_SIZE | 31 | #define STACK_TOP TASK_SIZE |
32 | #define STACK_TOP_MAX STACK_TOP | ||
32 | #endif | 33 | #endif |
33 | 34 | ||
34 | #ifndef LIBRARY_START_TEXT | 35 | #ifndef LIBRARY_START_TEXT |
diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h index 4703593b3bb5..e09da5ff1f54 100644 --- a/include/asm-arm26/system.h +++ b/include/asm-arm26/system.h | |||
@@ -110,16 +110,6 @@ do { \ | |||
110 | } while (0) | 110 | } while (0) |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
114 | * it needs a way to flush as much of the CPU's caches as possible. | ||
115 | * | ||
116 | * TODO: fill this in! | ||
117 | */ | ||
118 | static inline void sched_cacheflush(void) | ||
119 | { | ||
120 | } | ||
121 | |||
122 | /* | ||
123 | * Save the current interrupt enable state & disable IRQs | 113 | * Save the current interrupt enable state & disable IRQs |
124 | */ | 114 | */ |
125 | #define local_irq_save(x) \ | 115 | #define local_irq_save(x) \ |
diff --git a/include/asm-avr32/a.out.h b/include/asm-avr32/a.out.h index 50bf6e31a143..9f398ab28ed0 100644 --- a/include/asm-avr32/a.out.h +++ b/include/asm-avr32/a.out.h | |||
@@ -20,6 +20,7 @@ struct exec | |||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #define STACK_TOP TASK_SIZE | 22 | #define STACK_TOP TASK_SIZE |
23 | #define STACK_TOP_MAX STACK_TOP | ||
23 | 24 | ||
24 | #endif | 25 | #endif |
25 | 26 | ||
diff --git a/include/asm-cris/a.out.h b/include/asm-cris/a.out.h index 770734ce54a6..919b34a084f8 100644 --- a/include/asm-cris/a.out.h +++ b/include/asm-cris/a.out.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | /* grabbed from the intel stuff */ | 9 | /* grabbed from the intel stuff */ |
10 | #define STACK_TOP TASK_SIZE | 10 | #define STACK_TOP TASK_SIZE |
11 | #define STACK_TOP_MAX STACK_TOP | ||
11 | 12 | ||
12 | 13 | ||
13 | struct exec | 14 | struct exec |
diff --git a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h index a025dd4514e7..aaf2a773d9d3 100644 --- a/include/asm-frv/mem-layout.h +++ b/include/asm-frv/mem-layout.h | |||
@@ -60,6 +60,7 @@ | |||
60 | */ | 60 | */ |
61 | #define BRK_BASE __UL(2 * 1024 * 1024 + PAGE_SIZE) | 61 | #define BRK_BASE __UL(2 * 1024 * 1024 + PAGE_SIZE) |
62 | #define STACK_TOP __UL(2 * 1024 * 1024) | 62 | #define STACK_TOP __UL(2 * 1024 * 1024) |
63 | #define STACK_TOP_MAX STACK_TOP | ||
63 | 64 | ||
64 | /* userspace process size */ | 65 | /* userspace process size */ |
65 | #ifdef CONFIG_MMU | 66 | #ifdef CONFIG_MMU |
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index d984a9041436..d85172e9ed45 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -14,6 +14,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
14 | #define DEFINE_PER_CPU(type, name) \ | 14 | #define DEFINE_PER_CPU(type, name) \ |
15 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name | 15 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name |
16 | 16 | ||
17 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
18 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
19 | __typeof__(type) per_cpu__##name \ | ||
20 | ____cacheline_aligned_in_smp | ||
21 | |||
17 | /* var is in discarded region: offset to particular copy we want */ | 22 | /* var is in discarded region: offset to particular copy we want */ |
18 | #define per_cpu(var, cpu) (*({ \ | 23 | #define per_cpu(var, cpu) (*({ \ |
19 | extern int simple_identifier_##var(void); \ | 24 | extern int simple_identifier_##var(void); \ |
@@ -34,6 +39,9 @@ do { \ | |||
34 | #define DEFINE_PER_CPU(type, name) \ | 39 | #define DEFINE_PER_CPU(type, name) \ |
35 | __typeof__(type) per_cpu__##name | 40 | __typeof__(type) per_cpu__##name |
36 | 41 | ||
42 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
43 | DEFINE_PER_CPU(type, name) | ||
44 | |||
37 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) | 45 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) |
38 | #define __get_cpu_var(var) per_cpu__##var | 46 | #define __get_cpu_var(var) per_cpu__##var |
39 | #define __raw_get_cpu_var(var) per_cpu__##var | 47 | #define __raw_get_cpu_var(var) per_cpu__##var |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 84155eb67f1d..0240e0506a07 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -224,7 +224,11 @@ | |||
224 | } | 224 | } |
225 | 225 | ||
226 | #define NOTES \ | 226 | #define NOTES \ |
227 | .notes : { *(.note.*) } :note | 227 | .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ |
228 | VMLINUX_SYMBOL(__start_notes) = .; \ | ||
229 | *(.note.*) \ | ||
230 | VMLINUX_SYMBOL(__stop_notes) = .; \ | ||
231 | } | ||
228 | 232 | ||
229 | #define INITCALLS \ | 233 | #define INITCALLS \ |
230 | *(.initcall0.init) \ | 234 | *(.initcall0.init) \ |
@@ -245,3 +249,11 @@ | |||
245 | *(.initcall7.init) \ | 249 | *(.initcall7.init) \ |
246 | *(.initcall7s.init) | 250 | *(.initcall7s.init) |
247 | 251 | ||
252 | #define PERCPU(align) \ | ||
253 | . = ALIGN(align); \ | ||
254 | __per_cpu_start = .; \ | ||
255 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ | ||
256 | *(.data.percpu) \ | ||
257 | *(.data.percpu.shared_aligned) \ | ||
258 | } \ | ||
259 | __per_cpu_end = .; | ||
diff --git a/include/asm-h8300/a.out.h b/include/asm-h8300/a.out.h index 3c70939f9f00..aa5d22778235 100644 --- a/include/asm-h8300/a.out.h +++ b/include/asm-h8300/a.out.h | |||
@@ -20,6 +20,7 @@ struct exec | |||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #define STACK_TOP TASK_SIZE | 22 | #define STACK_TOP TASK_SIZE |
23 | #define STACK_TOP_MAX STACK_TOP | ||
23 | 24 | ||
24 | #endif | 25 | #endif |
25 | 26 | ||
diff --git a/include/asm-i386/a.out.h b/include/asm-i386/a.out.h index ab17bb8e5465..851a60f8258c 100644 --- a/include/asm-i386/a.out.h +++ b/include/asm-i386/a.out.h | |||
@@ -20,6 +20,7 @@ struct exec | |||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #define STACK_TOP TASK_SIZE | 22 | #define STACK_TOP TASK_SIZE |
23 | #define STACK_TOP_MAX STACK_TOP | ||
23 | 24 | ||
24 | #endif | 25 | #endif |
25 | 26 | ||
diff --git a/include/asm-i386/cmpxchg.h b/include/asm-i386/cmpxchg.h index 7adcef0cd53b..64dcdf46117b 100644 --- a/include/asm-i386/cmpxchg.h +++ b/include/asm-i386/cmpxchg.h | |||
@@ -3,14 +3,16 @@ | |||
3 | 3 | ||
4 | #include <linux/bitops.h> /* for LOCK_PREFIX */ | 4 | #include <linux/bitops.h> /* for LOCK_PREFIX */ |
5 | 5 | ||
6 | /* | ||
7 | * Note: if you use set64_bit(), __cmpxchg64(), or their variants, you | ||
8 | * you need to test for the feature in boot_cpu_data. | ||
9 | */ | ||
10 | |||
6 | #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) | 11 | #define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) |
7 | 12 | ||
8 | struct __xchg_dummy { unsigned long a[100]; }; | 13 | struct __xchg_dummy { unsigned long a[100]; }; |
9 | #define __xg(x) ((struct __xchg_dummy *)(x)) | 14 | #define __xg(x) ((struct __xchg_dummy *)(x)) |
10 | 15 | ||
11 | |||
12 | #ifdef CONFIG_X86_CMPXCHG64 | ||
13 | |||
14 | /* | 16 | /* |
15 | * The semantics of XCHGCMP8B are a bit strange, this is why | 17 | * The semantics of XCHGCMP8B are a bit strange, this is why |
16 | * there is a loop and the loading of %%eax and %%edx has to | 18 | * there is a loop and the loading of %%eax and %%edx has to |
@@ -65,8 +67,6 @@ static inline void __set_64bit_var (unsigned long long *ptr, | |||
65 | __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ | 67 | __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ |
66 | __set_64bit(ptr, ll_low(value), ll_high(value)) ) | 68 | __set_64bit(ptr, ll_low(value), ll_high(value)) ) |
67 | 69 | ||
68 | #endif | ||
69 | |||
70 | /* | 70 | /* |
71 | * Note: no "lock" prefix even on SMP: xchg always implies lock anyway | 71 | * Note: no "lock" prefix even on SMP: xchg always implies lock anyway |
72 | * Note 2: xchg has side effect, so that attribute volatile is necessary, | 72 | * Note 2: xchg has side effect, so that attribute volatile is necessary, |
@@ -252,8 +252,6 @@ static inline unsigned long cmpxchg_386(volatile void *ptr, unsigned long old, | |||
252 | }) | 252 | }) |
253 | #endif | 253 | #endif |
254 | 254 | ||
255 | #ifdef CONFIG_X86_CMPXCHG64 | ||
256 | |||
257 | static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long long old, | 255 | static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long long old, |
258 | unsigned long long new) | 256 | unsigned long long new) |
259 | { | 257 | { |
@@ -289,5 +287,3 @@ static inline unsigned long long __cmpxchg64_local(volatile void *ptr, | |||
289 | ((__typeof__(*(ptr)))__cmpxchg64_local((ptr),(unsigned long long)(o),\ | 287 | ((__typeof__(*(ptr)))__cmpxchg64_local((ptr),(unsigned long long)(o),\ |
290 | (unsigned long long)(n))) | 288 | (unsigned long long)(n))) |
291 | #endif | 289 | #endif |
292 | |||
293 | #endif | ||
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index 8774d06689da..06f7303c30ca 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h | |||
@@ -42,7 +42,6 @@ typedef u8 kprobe_opcode_t; | |||
42 | ? (MAX_STACK_SIZE) \ | 42 | ? (MAX_STACK_SIZE) \ |
43 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | 43 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) |
44 | 44 | ||
45 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
46 | #define ARCH_SUPPORTS_KRETPROBES | 45 | #define ARCH_SUPPORTS_KRETPROBES |
47 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 46 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
48 | #define flush_insn_slot(p) do { } while (0) | 47 | #define flush_insn_slot(p) do { } while (0) |
diff --git a/include/asm-i386/percpu.h b/include/asm-i386/percpu.h index f54830b5d5ac..a7ebd436f3cc 100644 --- a/include/asm-i386/percpu.h +++ b/include/asm-i386/percpu.h | |||
@@ -54,6 +54,11 @@ extern unsigned long __per_cpu_offset[]; | |||
54 | #define DEFINE_PER_CPU(type, name) \ | 54 | #define DEFINE_PER_CPU(type, name) \ |
55 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name | 55 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name |
56 | 56 | ||
57 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
58 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
59 | __typeof__(type) per_cpu__##name \ | ||
60 | ____cacheline_aligned_in_smp | ||
61 | |||
57 | /* We can use this directly for local CPU (faster). */ | 62 | /* We can use this directly for local CPU (faster). */ |
58 | DECLARE_PER_CPU(unsigned long, this_cpu_off); | 63 | DECLARE_PER_CPU(unsigned long, this_cpu_off); |
59 | 64 | ||
diff --git a/include/asm-i386/required-features.h b/include/asm-i386/required-features.h index 65848a007050..618feb98f9f5 100644 --- a/include/asm-i386/required-features.h +++ b/include/asm-i386/required-features.h | |||
@@ -29,7 +29,7 @@ | |||
29 | # define NEED_CMOV 0 | 29 | # define NEED_CMOV 0 |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef CONFIG_X86_CMPXCHG64 | 32 | #ifdef CONFIG_X86_PAE |
33 | # define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31)) | 33 | # define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31)) |
34 | #else | 34 | #else |
35 | # define NEED_CX8 0 | 35 | # define NEED_CX8 0 |
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 94ed3686a5f3..609756c61676 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -310,15 +310,6 @@ void enable_hlt(void); | |||
310 | extern int es7000_plat; | 310 | extern int es7000_plat; |
311 | void cpu_idle_wait(void); | 311 | void cpu_idle_wait(void); |
312 | 312 | ||
313 | /* | ||
314 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
315 | * it needs a way to flush as much of the CPU's caches as possible: | ||
316 | */ | ||
317 | static inline void sched_cacheflush(void) | ||
318 | { | ||
319 | wbinvd(); | ||
320 | } | ||
321 | |||
322 | extern unsigned long arch_align_stack(unsigned long sp); | 313 | extern unsigned long arch_align_stack(unsigned long sp); |
323 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); | 314 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); |
324 | 315 | ||
diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h index 62c091ffcccc..a4d806610b7f 100644 --- a/include/asm-i386/tsc.h +++ b/include/asm-i386/tsc.h | |||
@@ -63,6 +63,7 @@ extern void tsc_init(void); | |||
63 | extern void mark_tsc_unstable(char *reason); | 63 | extern void mark_tsc_unstable(char *reason); |
64 | extern int unsynchronized_tsc(void); | 64 | extern int unsynchronized_tsc(void); |
65 | extern void init_tsc_clocksource(void); | 65 | extern void init_tsc_clocksource(void); |
66 | int check_tsc_unstable(void); | ||
66 | 67 | ||
67 | /* | 68 | /* |
68 | * Boot-time check whether the TSCs are synchronized across | 69 | * Boot-time check whether the TSCs are synchronized across |
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index 6382e52ec227..067d9dea68f9 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h | |||
@@ -82,8 +82,6 @@ struct kprobe_ctlblk { | |||
82 | struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ]; | 82 | struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ]; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
86 | |||
87 | #define ARCH_SUPPORTS_KRETPROBES | 85 | #define ARCH_SUPPORTS_KRETPROBES |
88 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 86 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
89 | 87 | ||
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h index fbe5cf3ab8dc..43a7aac414e0 100644 --- a/include/asm-ia64/percpu.h +++ b/include/asm-ia64/percpu.h | |||
@@ -29,6 +29,16 @@ | |||
29 | __attribute__((__section__(".data.percpu"))) \ | 29 | __attribute__((__section__(".data.percpu"))) \ |
30 | __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name | 30 | __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name |
31 | 31 | ||
32 | #ifdef CONFIG_SMP | ||
33 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
34 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
35 | __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name \ | ||
36 | ____cacheline_aligned_in_smp | ||
37 | #else | ||
38 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
39 | DEFINE_PER_CPU(type, name) | ||
40 | #endif | ||
41 | |||
32 | /* | 42 | /* |
33 | * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an | 43 | * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an |
34 | * external routine, to avoid include-hell. | 44 | * external routine, to avoid include-hell. |
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index db81ba406cef..6251c76437d2 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -295,9 +295,9 @@ struct thread_struct { | |||
295 | regs->ar_bspstore = current->thread.rbs_bot; \ | 295 | regs->ar_bspstore = current->thread.rbs_bot; \ |
296 | regs->ar_fpsr = FPSR_DEFAULT; \ | 296 | regs->ar_fpsr = FPSR_DEFAULT; \ |
297 | regs->loadrs = 0; \ | 297 | regs->loadrs = 0; \ |
298 | regs->r8 = current->mm->dumpable; /* set "don't zap registers" flag */ \ | 298 | regs->r8 = get_dumpable(current->mm); /* set "don't zap registers" flag */ \ |
299 | regs->r12 = new_sp - 16; /* allocate 16 byte scratch area */ \ | 299 | regs->r12 = new_sp - 16; /* allocate 16 byte scratch area */ \ |
300 | if (unlikely(!current->mm->dumpable)) { \ | 300 | if (unlikely(!get_dumpable(current->mm))) { \ |
301 | /* \ | 301 | /* \ |
302 | * Zap scratch regs to avoid leaking bits between processes with different \ | 302 | * Zap scratch regs to avoid leaking bits between processes with different \ |
303 | * uid/privileges. \ | 303 | * uid/privileges. \ |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 384fbf7f2a0f..91bb8e00066c 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -259,7 +259,6 @@ extern void ia64_load_extra (struct task_struct *task); | |||
259 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) | 259 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) |
260 | 260 | ||
261 | void cpu_idle_wait(void); | 261 | void cpu_idle_wait(void); |
262 | void sched_cacheflush(void); | ||
263 | 262 | ||
264 | #define arch_align_stack(x) (x) | 263 | #define arch_align_stack(x) (x) |
265 | 264 | ||
diff --git a/include/asm-ia64/ustack.h b/include/asm-ia64/ustack.h index a349467913ea..504167c35b8b 100644 --- a/include/asm-ia64/ustack.h +++ b/include/asm-ia64/ustack.h | |||
@@ -11,6 +11,7 @@ | |||
11 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ | 11 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ |
12 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) | 12 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) |
13 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) | 13 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) |
14 | #define STACK_TOP_MAX STACK_TOP | ||
14 | #endif | 15 | #endif |
15 | 16 | ||
16 | /* Make a default stack size of 2GiB */ | 17 | /* Make a default stack size of 2GiB */ |
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h index 9a4a5d20160a..6a1b5d42f328 100644 --- a/include/asm-m32r/a.out.h +++ b/include/asm-m32r/a.out.h | |||
@@ -20,6 +20,7 @@ struct exec | |||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #define STACK_TOP TASK_SIZE | 22 | #define STACK_TOP TASK_SIZE |
23 | #define STACK_TOP_MAX STACK_TOP | ||
23 | 24 | ||
24 | #endif | 25 | #endif |
25 | 26 | ||
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 8ee73d3f316d..2365de5c2955 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -54,16 +54,6 @@ | |||
54 | ); \ | 54 | ); \ |
55 | } while(0) | 55 | } while(0) |
56 | 56 | ||
57 | /* | ||
58 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
59 | * it needs a way to flush as much of the CPU's caches as possible. | ||
60 | * | ||
61 | * TODO: fill this in! | ||
62 | */ | ||
63 | static inline void sched_cacheflush(void) | ||
64 | { | ||
65 | } | ||
66 | |||
67 | /* Interrupt Control */ | 57 | /* Interrupt Control */ |
68 | #if !defined(CONFIG_CHIP_M32102) && !defined(CONFIG_CHIP_M32104) | 58 | #if !defined(CONFIG_CHIP_M32102) && !defined(CONFIG_CHIP_M32104) |
69 | #define local_irq_enable() \ | 59 | #define local_irq_enable() \ |
diff --git a/include/asm-m68k/a.out.h b/include/asm-m68k/a.out.h index eda1662773b8..6fc86a221a94 100644 --- a/include/asm-m68k/a.out.h +++ b/include/asm-m68k/a.out.h | |||
@@ -20,6 +20,7 @@ struct exec | |||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #define STACK_TOP TASK_SIZE | 22 | #define STACK_TOP TASK_SIZE |
23 | #define STACK_TOP_MAX STACK_TOP | ||
23 | 24 | ||
24 | #endif | 25 | #endif |
25 | 26 | ||
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h index 7b8f874f8429..9373c31ac87d 100644 --- a/include/asm-m68knommu/irq.h +++ b/include/asm-m68knommu/irq.h | |||
@@ -1,7 +1,5 @@ | |||
1 | #ifndef _M68K_IRQ_H_ | 1 | #ifndef _M68KNOMMU_IRQ_H_ |
2 | #define _M68K_IRQ_H_ | 2 | #define _M68KNOMMU_IRQ_H_ |
3 | |||
4 | #include <asm/ptrace.h> | ||
5 | 3 | ||
6 | #ifdef CONFIG_COLDFIRE | 4 | #ifdef CONFIG_COLDFIRE |
7 | /* | 5 | /* |
@@ -17,75 +15,12 @@ | |||
17 | /* | 15 | /* |
18 | * # of m68k interrupts | 16 | * # of m68k interrupts |
19 | */ | 17 | */ |
20 | #define SYS_IRQS 8 | 18 | #define SYS_IRQS 8 |
21 | #define NR_IRQS (24+SYS_IRQS) | 19 | #define NR_IRQS (24 + SYS_IRQS) |
22 | 20 | ||
23 | #endif /* CONFIG_COLDFIRE */ | 21 | #endif /* CONFIG_COLDFIRE */ |
24 | 22 | ||
25 | /* | ||
26 | * Interrupt source definitions | ||
27 | * General interrupt sources are the level 1-7. | ||
28 | * Adding an interrupt service routine for one of these sources | ||
29 | * results in the addition of that routine to a chain of routines. | ||
30 | * Each one is called in succession. Each individual interrupt | ||
31 | * service routine should determine if the device associated with | ||
32 | * that routine requires service. | ||
33 | */ | ||
34 | 23 | ||
35 | #define IRQ1 (1) /* level 1 interrupt */ | ||
36 | #define IRQ2 (2) /* level 2 interrupt */ | ||
37 | #define IRQ3 (3) /* level 3 interrupt */ | ||
38 | #define IRQ4 (4) /* level 4 interrupt */ | ||
39 | #define IRQ5 (5) /* level 5 interrupt */ | ||
40 | #define IRQ6 (6) /* level 6 interrupt */ | ||
41 | #define IRQ7 (7) /* level 7 interrupt (non-maskable) */ | ||
42 | |||
43 | /* | ||
44 | * Machine specific interrupt sources. | ||
45 | * | ||
46 | * Adding an interrupt service routine for a source with this bit | ||
47 | * set indicates a special machine specific interrupt source. | ||
48 | * The machine specific files define these sources. | ||
49 | * | ||
50 | * The IRQ_MACHSPEC bit is now gone - the only thing it did was to | ||
51 | * introduce unnecessary overhead. | ||
52 | * | ||
53 | * All interrupt handling is actually machine specific so it is better | ||
54 | * to use function pointers, as used by the Sparc port, and select the | ||
55 | * interrupt handling functions when initializing the kernel. This way | ||
56 | * we save some unnecessary overhead at run-time. | ||
57 | * 01/11/97 - Jes | ||
58 | */ | ||
59 | |||
60 | extern void (*mach_enable_irq)(unsigned int); | ||
61 | extern void (*mach_disable_irq)(unsigned int); | ||
62 | |||
63 | /* | ||
64 | * various flags for request_irq() - the Amiga now uses the standard | ||
65 | * mechanism like all other architectures - IRQF_DISABLED and | ||
66 | * IRQF_SHARED are your friends. | ||
67 | */ | ||
68 | #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ | ||
69 | #define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */ | ||
70 | #define IRQ_FLG_FAST (0x0004) | ||
71 | #define IRQ_FLG_SLOW (0x0008) | ||
72 | #define IRQ_FLG_STD (0x8000) /* internally used */ | ||
73 | |||
74 | #ifdef CONFIG_M68360 | ||
75 | |||
76 | #define CPM_INTERRUPT IRQ4 | ||
77 | |||
78 | /* see MC68360 User's Manual, p. 7-377 */ | ||
79 | #define CPM_VECTOR_BASE 0x04 /* 3 MSbits of CPM vector */ | ||
80 | |||
81 | #endif /* CONFIG_M68360 */ | ||
82 | |||
83 | /* | ||
84 | * Some drivers want these entry points | ||
85 | */ | ||
86 | #define enable_irq(x) do { } while (0) | ||
87 | #define disable_irq(x) do { } while (0) | ||
88 | #define disable_irq_nosync(x) disable_irq(x) | ||
89 | #define irq_canonicalize(irq) (irq) | 24 | #define irq_canonicalize(irq) (irq) |
90 | 25 | ||
91 | #endif /* _M68K_IRQ_H_ */ | 26 | #endif /* _M68KNOMMU_IRQ_H_ */ |
diff --git a/include/asm-m68knommu/irqnode.h b/include/asm-m68knommu/irqnode.h deleted file mode 100644 index 6132a9858b52..000000000000 --- a/include/asm-m68knommu/irqnode.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | #ifndef _M68K_IRQNODE_H_ | ||
2 | #define _M68K_IRQNODE_H_ | ||
3 | |||
4 | #include <linux/interrupt.h> | ||
5 | |||
6 | /* | ||
7 | * This structure is used to chain together the ISRs for a particular | ||
8 | * interrupt source (if it supports chaining). | ||
9 | */ | ||
10 | typedef struct irq_node { | ||
11 | irq_handler_t handler; | ||
12 | unsigned long flags; | ||
13 | void *dev_id; | ||
14 | const char *devname; | ||
15 | struct irq_node *next; | ||
16 | } irq_node_t; | ||
17 | |||
18 | /* | ||
19 | * This structure has only 4 elements for speed reasons | ||
20 | */ | ||
21 | struct irq_entry { | ||
22 | irq_handler_t handler; | ||
23 | unsigned long flags; | ||
24 | void *dev_id; | ||
25 | const char *devname; | ||
26 | }; | ||
27 | |||
28 | /* count of spurious interrupts */ | ||
29 | extern volatile unsigned int num_spurious; | ||
30 | |||
31 | /* | ||
32 | * This function returns a new irq_node_t | ||
33 | */ | ||
34 | extern irq_node_t *new_irq_node(void); | ||
35 | |||
36 | #endif /* _M68K_IRQNODE_H_ */ | ||
diff --git a/include/asm-m68knommu/m68360.h b/include/asm-m68knommu/m68360.h index dd11b070884b..eb7d39ef2855 100644 --- a/include/asm-m68knommu/m68360.h +++ b/include/asm-m68knommu/m68360.h | |||
@@ -3,3 +3,11 @@ | |||
3 | #include "m68360_quicc.h" | 3 | #include "m68360_quicc.h" |
4 | #include "m68360_enet.h" | 4 | #include "m68360_enet.h" |
5 | 5 | ||
6 | #ifdef CONFIG_M68360 | ||
7 | |||
8 | #define CPM_INTERRUPT 4 | ||
9 | |||
10 | /* see MC68360 User's Manual, p. 7-377 */ | ||
11 | #define CPM_VECTOR_BASE 0x04 /* 3 MSbits of CPM vector */ | ||
12 | |||
13 | #endif /* CONFIG_M68360 */ | ||
diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h index 9dfbbc24aa71..e1e6a1d2333a 100644 --- a/include/asm-m68knommu/pgtable.h +++ b/include/asm-m68knommu/pgtable.h | |||
@@ -49,7 +49,6 @@ static inline int pte_file(pte_t pte) { return 0; } | |||
49 | * These would be in other places but having them here reduces the diffs. | 49 | * These would be in other places but having them here reduces the diffs. |
50 | */ | 50 | */ |
51 | extern unsigned int kobjsize(const void *objp); | 51 | extern unsigned int kobjsize(const void *objp); |
52 | extern int is_in_rom(unsigned long); | ||
53 | 52 | ||
54 | /* | 53 | /* |
55 | * No page table caches to initialise. | 54 | * No page table caches to initialise. |
diff --git a/include/asm-m68knommu/traps.h b/include/asm-m68knommu/traps.h index f2a81317cc10..d0671e5f8e29 100644 --- a/include/asm-m68knommu/traps.h +++ b/include/asm-m68knommu/traps.h | |||
@@ -16,6 +16,10 @@ | |||
16 | typedef void (*e_vector)(void); | 16 | typedef void (*e_vector)(void); |
17 | 17 | ||
18 | extern e_vector vectors[]; | 18 | extern e_vector vectors[]; |
19 | extern void init_vectors(void); | ||
20 | extern void enable_vector(unsigned int irq); | ||
21 | extern void disable_vector(unsigned int irq); | ||
22 | extern void ack_vector(unsigned int irq); | ||
19 | 23 | ||
20 | #endif | 24 | #endif |
21 | 25 | ||
diff --git a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h index 62b29b10bc6d..9ed9169a8849 100644 --- a/include/asm-m68knommu/uaccess.h +++ b/include/asm-m68knommu/uaccess.h | |||
@@ -15,12 +15,15 @@ | |||
15 | 15 | ||
16 | #define access_ok(type,addr,size) _access_ok((unsigned long)(addr),(size)) | 16 | #define access_ok(type,addr,size) _access_ok((unsigned long)(addr),(size)) |
17 | 17 | ||
18 | /* | ||
19 | * It is not enough to just have access_ok check for a real RAM address. | ||
20 | * This would disallow the case of code/ro-data running XIP in flash/rom. | ||
21 | * Ideally we would check the possible flash ranges too, but that is | ||
22 | * currently not so easy. | ||
23 | */ | ||
18 | static inline int _access_ok(unsigned long addr, unsigned long size) | 24 | static inline int _access_ok(unsigned long addr, unsigned long size) |
19 | { | 25 | { |
20 | extern unsigned long memory_start, memory_end; | 26 | return 1; |
21 | |||
22 | return (((addr >= memory_start) && (addr+size < memory_end)) || | ||
23 | (is_in_rom(addr) && is_in_rom(addr+size))); | ||
24 | } | 27 | } |
25 | 28 | ||
26 | /* | 29 | /* |
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h index ef33c3f13484..1ad60ba186d0 100644 --- a/include/asm-mips/a.out.h +++ b/include/asm-mips/a.out.h | |||
@@ -40,6 +40,7 @@ struct exec | |||
40 | #ifdef CONFIG_64BIT | 40 | #ifdef CONFIG_64BIT |
41 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) | 41 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) |
42 | #endif | 42 | #endif |
43 | #define STACK_TOP_MAX TASK_SIZE | ||
43 | 44 | ||
44 | #endif | 45 | #endif |
45 | 46 | ||
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 46bdb3f566f9..76339165bc20 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -71,16 +71,6 @@ do { \ | |||
71 | write_c0_userlocal(task_thread_info(current)->tp_value);\ | 71 | write_c0_userlocal(task_thread_info(current)->tp_value);\ |
72 | } while(0) | 72 | } while(0) |
73 | 73 | ||
74 | /* | ||
75 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
76 | * it needs a way to flush as much of the CPU's caches as possible. | ||
77 | * | ||
78 | * TODO: fill this in! | ||
79 | */ | ||
80 | static inline void sched_cacheflush(void) | ||
81 | { | ||
82 | } | ||
83 | |||
84 | static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | 74 | static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) |
85 | { | 75 | { |
86 | __u32 retval; | 76 | __u32 retval; |
diff --git a/include/asm-parisc/a.out.h b/include/asm-parisc/a.out.h index 2a490cc9ec91..23e2c90943e5 100644 --- a/include/asm-parisc/a.out.h +++ b/include/asm-parisc/a.out.h | |||
@@ -23,6 +23,7 @@ struct exec | |||
23 | * prumpf */ | 23 | * prumpf */ |
24 | 24 | ||
25 | #define STACK_TOP TASK_SIZE | 25 | #define STACK_TOP TASK_SIZE |
26 | #define STACK_TOP_MAX DEFAULT_TASK_SIZE | ||
26 | 27 | ||
27 | #endif | 28 | #endif |
28 | 29 | ||
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 21fbfc5afd02..ee80c920b464 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h | |||
@@ -48,17 +48,6 @@ extern struct task_struct *_switch_to(struct task_struct *, struct task_struct * | |||
48 | (last) = _switch_to(prev, next); \ | 48 | (last) = _switch_to(prev, next); \ |
49 | } while(0) | 49 | } while(0) |
50 | 50 | ||
51 | /* | ||
52 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
53 | * it needs a way to flush as much of the CPU's caches as possible. | ||
54 | * | ||
55 | * TODO: fill this in! | ||
56 | */ | ||
57 | static inline void sched_cacheflush(void) | ||
58 | { | ||
59 | } | ||
60 | |||
61 | |||
62 | /* interrupt control */ | 51 | /* interrupt control */ |
63 | #define local_save_flags(x) __asm__ __volatile__("ssm 0, %0" : "=r" (x) : : "memory") | 52 | #define local_save_flags(x) __asm__ __volatile__("ssm 0, %0" : "=r" (x) : : "memory") |
64 | #define local_irq_disable() __asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory" ) | 53 | #define local_irq_disable() __asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory" ) |
diff --git a/include/asm-powerpc/a.out.h b/include/asm-powerpc/a.out.h index c7393a977364..5c5ea83f9349 100644 --- a/include/asm-powerpc/a.out.h +++ b/include/asm-powerpc/a.out.h | |||
@@ -26,9 +26,12 @@ struct exec | |||
26 | #define STACK_TOP (test_thread_flag(TIF_32BIT) ? \ | 26 | #define STACK_TOP (test_thread_flag(TIF_32BIT) ? \ |
27 | STACK_TOP_USER32 : STACK_TOP_USER64) | 27 | STACK_TOP_USER32 : STACK_TOP_USER64) |
28 | 28 | ||
29 | #define STACK_TOP_MAX STACK_TOP_USER64 | ||
30 | |||
29 | #else /* __powerpc64__ */ | 31 | #else /* __powerpc64__ */ |
30 | 32 | ||
31 | #define STACK_TOP TASK_SIZE | 33 | #define STACK_TOP TASK_SIZE |
34 | #define STACK_TOP_MAX STACK_TOP | ||
32 | 35 | ||
33 | #endif /* __powerpc64__ */ | 36 | #endif /* __powerpc64__ */ |
34 | #endif /* __KERNEL__ */ | 37 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 9537fda238b8..8b08b447d6f3 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
@@ -73,12 +73,10 @@ typedef unsigned int kprobe_opcode_t; | |||
73 | } \ | 73 | } \ |
74 | } | 74 | } |
75 | 75 | ||
76 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) | ||
77 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ | 76 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ |
78 | IS_TWI(instr) || IS_TDI(instr)) | 77 | IS_TWI(instr) || IS_TDI(instr)) |
79 | #else | 78 | #else |
80 | /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */ | 79 | /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */ |
81 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) | ||
82 | #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) | 80 | #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) |
83 | #endif | 81 | #endif |
84 | 82 | ||
diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h index 2f2e3024fa61..73dc8ba4010d 100644 --- a/include/asm-powerpc/percpu.h +++ b/include/asm-powerpc/percpu.h | |||
@@ -20,6 +20,11 @@ | |||
20 | #define DEFINE_PER_CPU(type, name) \ | 20 | #define DEFINE_PER_CPU(type, name) \ |
21 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name | 21 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name |
22 | 22 | ||
23 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
24 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
25 | __typeof__(type) per_cpu__##name \ | ||
26 | ____cacheline_aligned_in_smp | ||
27 | |||
23 | /* var is in discarded region: offset to particular copy we want */ | 28 | /* var is in discarded region: offset to particular copy we want */ |
24 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) | 29 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) |
25 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) | 30 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) |
@@ -40,6 +45,8 @@ extern void setup_per_cpu_areas(void); | |||
40 | 45 | ||
41 | #define DEFINE_PER_CPU(type, name) \ | 46 | #define DEFINE_PER_CPU(type, name) \ |
42 | __typeof__(type) per_cpu__##name | 47 | __typeof__(type) per_cpu__##name |
48 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
49 | DEFINE_PER_CPU(type, name) | ||
43 | 50 | ||
44 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) | 51 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) |
45 | #define __get_cpu_var(var) per_cpu__##var | 52 | #define __get_cpu_var(var) per_cpu__##var |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 32aa42b748be..41520b7a7b76 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
@@ -184,16 +184,6 @@ struct thread_struct; | |||
184 | extern struct task_struct *_switch(struct thread_struct *prev, | 184 | extern struct task_struct *_switch(struct thread_struct *prev, |
185 | struct thread_struct *next); | 185 | struct thread_struct *next); |
186 | 186 | ||
187 | /* | ||
188 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
189 | * it needs a way to flush as much of the CPU's caches as possible. | ||
190 | * | ||
191 | * TODO: fill this in! | ||
192 | */ | ||
193 | static inline void sched_cacheflush(void) | ||
194 | { | ||
195 | } | ||
196 | |||
197 | extern unsigned int rtas_data; | 187 | extern unsigned int rtas_data; |
198 | extern int mem_init_done; /* set on boot once kmalloc can be called */ | 188 | extern int mem_init_done; /* set on boot once kmalloc can be called */ |
199 | extern unsigned long memory_limit; | 189 | extern unsigned long memory_limit; |
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index d84a3cf4d033..f1311a8f310f 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
@@ -129,16 +129,6 @@ extern struct task_struct *__switch_to(struct task_struct *, | |||
129 | struct task_struct *); | 129 | struct task_struct *); |
130 | #define switch_to(prev, next, last) ((last) = __switch_to((prev), (next))) | 130 | #define switch_to(prev, next, last) ((last) = __switch_to((prev), (next))) |
131 | 131 | ||
132 | /* | ||
133 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
134 | * it needs a way to flush as much of the CPU's caches as possible. | ||
135 | * | ||
136 | * TODO: fill this in! | ||
137 | */ | ||
138 | static inline void sched_cacheflush(void) | ||
139 | { | ||
140 | } | ||
141 | |||
142 | struct thread_struct; | 132 | struct thread_struct; |
143 | extern struct task_struct *_switch(struct thread_struct *prev, | 133 | extern struct task_struct *_switch(struct thread_struct *prev, |
144 | struct thread_struct *next); | 134 | struct thread_struct *next); |
diff --git a/include/asm-s390/a.out.h b/include/asm-s390/a.out.h index 72adee6ef338..46158dcaf517 100644 --- a/include/asm-s390/a.out.h +++ b/include/asm-s390/a.out.h | |||
@@ -32,6 +32,7 @@ struct exec | |||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | 33 | ||
34 | #define STACK_TOP TASK_SIZE | 34 | #define STACK_TOP TASK_SIZE |
35 | #define STACK_TOP_MAX DEFAULT_TASK_SIZE | ||
35 | 36 | ||
36 | #endif | 37 | #endif |
37 | 38 | ||
diff --git a/include/asm-s390/kprobes.h b/include/asm-s390/kprobes.h index 830fe4c4eea6..340ba10446ea 100644 --- a/include/asm-s390/kprobes.h +++ b/include/asm-s390/kprobes.h | |||
@@ -46,8 +46,6 @@ typedef u16 kprobe_opcode_t; | |||
46 | ? (MAX_STACK_SIZE) \ | 46 | ? (MAX_STACK_SIZE) \ |
47 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | 47 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) |
48 | 48 | ||
49 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) | ||
50 | |||
51 | #define ARCH_SUPPORTS_KRETPROBES | 49 | #define ARCH_SUPPORTS_KRETPROBES |
52 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 50 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
53 | 51 | ||
diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h index 9ea7f1023e57..545857e64443 100644 --- a/include/asm-s390/percpu.h +++ b/include/asm-s390/percpu.h | |||
@@ -41,6 +41,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
41 | __attribute__((__section__(".data.percpu"))) \ | 41 | __attribute__((__section__(".data.percpu"))) \ |
42 | __typeof__(type) per_cpu__##name | 42 | __typeof__(type) per_cpu__##name |
43 | 43 | ||
44 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
45 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
46 | __typeof__(type) per_cpu__##name \ | ||
47 | ____cacheline_aligned_in_smp | ||
48 | |||
44 | #define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset) | 49 | #define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset) |
45 | #define __raw_get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset) | 50 | #define __raw_get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset) |
46 | #define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu]) | 51 | #define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu]) |
@@ -59,6 +64,8 @@ do { \ | |||
59 | 64 | ||
60 | #define DEFINE_PER_CPU(type, name) \ | 65 | #define DEFINE_PER_CPU(type, name) \ |
61 | __typeof__(type) per_cpu__##name | 66 | __typeof__(type) per_cpu__##name |
67 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
68 | DEFINE_PER_CPU(type, name) | ||
62 | 69 | ||
63 | #define __get_cpu_var(var) __reloc_hide(var,0) | 70 | #define __get_cpu_var(var) __reloc_hide(var,0) |
64 | #define __raw_get_cpu_var(var) __reloc_hide(var,0) | 71 | #define __raw_get_cpu_var(var) __reloc_hide(var,0) |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index bbe137c3ed69..64a3cd05cae1 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -97,16 +97,6 @@ static inline void restore_access_regs(unsigned int *acrs) | |||
97 | prev = __switch_to(prev,next); \ | 97 | prev = __switch_to(prev,next); \ |
98 | } while (0) | 98 | } while (0) |
99 | 99 | ||
100 | /* | ||
101 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
102 | * it needs a way to flush as much of the CPU's caches as possible. | ||
103 | * | ||
104 | * TODO: fill this in! | ||
105 | */ | ||
106 | static inline void sched_cacheflush(void) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 100 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
111 | extern void account_vtime(struct task_struct *); | 101 | extern void account_vtime(struct task_struct *); |
112 | extern void account_tick_vtime(struct task_struct *); | 102 | extern void account_tick_vtime(struct task_struct *); |
diff --git a/include/asm-sh/a.out.h b/include/asm-sh/a.out.h index 6e9fca9ee333..685d0f6125fa 100644 --- a/include/asm-sh/a.out.h +++ b/include/asm-sh/a.out.h | |||
@@ -20,6 +20,7 @@ struct exec | |||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #define STACK_TOP TASK_SIZE | 22 | #define STACK_TOP TASK_SIZE |
23 | #define STACK_TOP_MAX STACK_TOP | ||
23 | 24 | ||
24 | #endif | 25 | #endif |
25 | 26 | ||
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 7c75045ae22b..245042537205 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h | |||
@@ -64,16 +64,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
64 | last = __last; \ | 64 | last = __last; \ |
65 | } while (0) | 65 | } while (0) |
66 | 66 | ||
67 | /* | ||
68 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
69 | * it needs a way to flush as much of the CPU's caches as possible. | ||
70 | * | ||
71 | * TODO: fill this in! | ||
72 | */ | ||
73 | static inline void sched_cacheflush(void) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | #ifdef CONFIG_CPU_SH4A | 67 | #ifdef CONFIG_CPU_SH4A |
78 | #define __icbi() \ | 68 | #define __icbi() \ |
79 | { \ | 69 | { \ |
diff --git a/include/asm-sh64/a.out.h b/include/asm-sh64/a.out.h index e1995e86b663..237ee4e5b72a 100644 --- a/include/asm-sh64/a.out.h +++ b/include/asm-sh64/a.out.h | |||
@@ -31,6 +31,7 @@ struct exec | |||
31 | #ifdef __KERNEL__ | 31 | #ifdef __KERNEL__ |
32 | 32 | ||
33 | #define STACK_TOP TASK_SIZE | 33 | #define STACK_TOP TASK_SIZE |
34 | #define STACK_TOP_MAX STACK_TOP | ||
34 | 35 | ||
35 | #endif | 36 | #endif |
36 | 37 | ||
diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h index 9090060a23e6..917e04250696 100644 --- a/include/asm-sparc/a.out.h +++ b/include/asm-sparc/a.out.h | |||
@@ -92,6 +92,7 @@ struct relocation_info /* used when header.a_machtype == M_SPARC */ | |||
92 | #include <asm/page.h> | 92 | #include <asm/page.h> |
93 | 93 | ||
94 | #define STACK_TOP (PAGE_OFFSET - PAGE_SIZE) | 94 | #define STACK_TOP (PAGE_OFFSET - PAGE_SIZE) |
95 | #define STACK_TOP_MAX STACK_TOP | ||
95 | 96 | ||
96 | #endif /* __KERNEL__ */ | 97 | #endif /* __KERNEL__ */ |
97 | 98 | ||
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index 8b4e23b3bb38..d1a2572e3f55 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h | |||
@@ -165,16 +165,6 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr, | |||
165 | } while(0) | 165 | } while(0) |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
169 | * it needs a way to flush as much of the CPU's caches as possible. | ||
170 | * | ||
171 | * TODO: fill this in! | ||
172 | */ | ||
173 | static inline void sched_cacheflush(void) | ||
174 | { | ||
175 | } | ||
176 | |||
177 | /* | ||
178 | * Changing the IRQ level on the Sparc. | 168 | * Changing the IRQ level on the Sparc. |
179 | */ | 169 | */ |
180 | extern void local_irq_restore(unsigned long); | 170 | extern void local_irq_restore(unsigned long); |
diff --git a/include/asm-sparc64/a.out.h b/include/asm-sparc64/a.out.h index eb3b8e90b279..902e07f89a42 100644 --- a/include/asm-sparc64/a.out.h +++ b/include/asm-sparc64/a.out.h | |||
@@ -101,6 +101,8 @@ struct relocation_info /* used when header.a_machtype == M_SPARC */ | |||
101 | #define STACK_TOP (test_thread_flag(TIF_32BIT) ? \ | 101 | #define STACK_TOP (test_thread_flag(TIF_32BIT) ? \ |
102 | STACK_TOP32 : STACK_TOP64) | 102 | STACK_TOP32 : STACK_TOP64) |
103 | 103 | ||
104 | #define STACK_TOP_MAX STACK_TOP64 | ||
105 | |||
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | #endif /* !(__ASSEMBLY__) */ | 108 | #endif /* !(__ASSEMBLY__) */ |
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index a331b7b0dff2..7f6774dca5f4 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h | |||
@@ -10,7 +10,6 @@ typedef u32 kprobe_opcode_t; | |||
10 | #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ | 10 | #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ |
11 | #define MAX_INSN_SIZE 2 | 11 | #define MAX_INSN_SIZE 2 |
12 | 12 | ||
13 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
14 | #define arch_remove_kprobe(p) do {} while (0) | 13 | #define arch_remove_kprobe(p) do {} while (0) |
15 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 14 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
16 | 15 | ||
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h index 88db872ce2f8..caf8750792ff 100644 --- a/include/asm-sparc64/percpu.h +++ b/include/asm-sparc64/percpu.h | |||
@@ -18,6 +18,11 @@ extern unsigned long __per_cpu_shift; | |||
18 | #define DEFINE_PER_CPU(type, name) \ | 18 | #define DEFINE_PER_CPU(type, name) \ |
19 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name | 19 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name |
20 | 20 | ||
21 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
22 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
23 | __typeof__(type) per_cpu__##name \ | ||
24 | ____cacheline_aligned_in_smp | ||
25 | |||
21 | register unsigned long __local_per_cpu_offset asm("g5"); | 26 | register unsigned long __local_per_cpu_offset asm("g5"); |
22 | 27 | ||
23 | /* var is in discarded region: offset to particular copy we want */ | 28 | /* var is in discarded region: offset to particular copy we want */ |
@@ -38,6 +43,8 @@ do { \ | |||
38 | #define real_setup_per_cpu_areas() do { } while (0) | 43 | #define real_setup_per_cpu_areas() do { } while (0) |
39 | #define DEFINE_PER_CPU(type, name) \ | 44 | #define DEFINE_PER_CPU(type, name) \ |
40 | __typeof__(type) per_cpu__##name | 45 | __typeof__(type) per_cpu__##name |
46 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
47 | DEFINE_PER_CPU(type, name) | ||
41 | 48 | ||
42 | #define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) | 49 | #define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) |
43 | #define __get_cpu_var(var) per_cpu__##var | 50 | #define __get_cpu_var(var) per_cpu__##var |
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 8ba380ec6daa..409067408eec 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h | |||
@@ -204,16 +204,6 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \ | |||
204 | } \ | 204 | } \ |
205 | } while(0) | 205 | } while(0) |
206 | 206 | ||
207 | /* | ||
208 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
209 | * it needs a way to flush as much of the CPU's caches as possible. | ||
210 | * | ||
211 | * TODO: fill this in! | ||
212 | */ | ||
213 | static inline void sched_cacheflush(void) | ||
214 | { | ||
215 | } | ||
216 | |||
217 | static inline unsigned long xchg32(__volatile__ unsigned int *m, unsigned int val) | 207 | static inline unsigned long xchg32(__volatile__ unsigned int *m, unsigned int val) |
218 | { | 208 | { |
219 | unsigned long tmp1, tmp2; | 209 | unsigned long tmp1, tmp2; |
diff --git a/include/asm-um/a.out.h b/include/asm-um/a.out.h index 7016b893ac9d..78bc9eed26b2 100644 --- a/include/asm-um/a.out.h +++ b/include/asm-um/a.out.h | |||
@@ -17,4 +17,6 @@ extern int honeypot; | |||
17 | #define STACK_TOP \ | 17 | #define STACK_TOP \ |
18 | CHOOSE_MODE((honeypot ? host_task_size : task_size), task_size) | 18 | CHOOSE_MODE((honeypot ? host_task_size : task_size), task_size) |
19 | 19 | ||
20 | #define STACK_TOP_MAX STACK_TOP | ||
21 | |||
20 | #endif | 22 | #endif |
diff --git a/include/asm-x86_64/a.out.h b/include/asm-x86_64/a.out.h index 7255cde06538..e789300e41a5 100644 --- a/include/asm-x86_64/a.out.h +++ b/include/asm-x86_64/a.out.h | |||
@@ -21,7 +21,8 @@ struct exec | |||
21 | 21 | ||
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | #include <linux/thread_info.h> | 23 | #include <linux/thread_info.h> |
24 | #define STACK_TOP TASK_SIZE | 24 | #define STACK_TOP TASK_SIZE |
25 | #define STACK_TOP_MAX TASK_SIZE64 | ||
25 | #endif | 26 | #endif |
26 | 27 | ||
27 | #endif /* __A_OUT_GNU_H__ */ | 28 | #endif /* __A_OUT_GNU_H__ */ |
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h index cf5317898fb0..7db825403e01 100644 --- a/include/asm-x86_64/kprobes.h +++ b/include/asm-x86_64/kprobes.h | |||
@@ -41,7 +41,6 @@ typedef u8 kprobe_opcode_t; | |||
41 | ? (MAX_STACK_SIZE) \ | 41 | ? (MAX_STACK_SIZE) \ |
42 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | 42 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) |
43 | 43 | ||
44 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
45 | #define ARCH_SUPPORTS_KRETPROBES | 44 | #define ARCH_SUPPORTS_KRETPROBES |
46 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 45 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
47 | 46 | ||
diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h index c6fbb67eac90..5abd48270101 100644 --- a/include/asm-x86_64/percpu.h +++ b/include/asm-x86_64/percpu.h | |||
@@ -20,6 +20,11 @@ | |||
20 | #define DEFINE_PER_CPU(type, name) \ | 20 | #define DEFINE_PER_CPU(type, name) \ |
21 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name | 21 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name |
22 | 22 | ||
23 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
24 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
25 | __typeof__(type) per_cpu__##name \ | ||
26 | ____cacheline_internodealigned_in_smp | ||
27 | |||
23 | /* var is in discarded region: offset to particular copy we want */ | 28 | /* var is in discarded region: offset to particular copy we want */ |
24 | #define per_cpu(var, cpu) (*({ \ | 29 | #define per_cpu(var, cpu) (*({ \ |
25 | extern int simple_identifier_##var(void); \ | 30 | extern int simple_identifier_##var(void); \ |
@@ -46,6 +51,8 @@ extern void setup_per_cpu_areas(void); | |||
46 | 51 | ||
47 | #define DEFINE_PER_CPU(type, name) \ | 52 | #define DEFINE_PER_CPU(type, name) \ |
48 | __typeof__(type) per_cpu__##name | 53 | __typeof__(type) per_cpu__##name |
54 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
55 | DEFINE_PER_CPU(type, name) | ||
49 | 56 | ||
50 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) | 57 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) |
51 | #define __get_cpu_var(var) per_cpu__##var | 58 | #define __get_cpu_var(var) per_cpu__##var |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index ead9f9a56234..e4f246d62c46 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -111,15 +111,6 @@ static inline void write_cr4(unsigned long val) | |||
111 | #define wbinvd() \ | 111 | #define wbinvd() \ |
112 | __asm__ __volatile__ ("wbinvd": : :"memory"); | 112 | __asm__ __volatile__ ("wbinvd": : :"memory"); |
113 | 113 | ||
114 | /* | ||
115 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
116 | * it needs a way to flush as much of the CPU's caches as possible. | ||
117 | */ | ||
118 | static inline void sched_cacheflush(void) | ||
119 | { | ||
120 | wbinvd(); | ||
121 | } | ||
122 | |||
123 | #endif /* __KERNEL__ */ | 114 | #endif /* __KERNEL__ */ |
124 | 115 | ||
125 | #define nop() __asm__ __volatile__ ("nop") | 116 | #define nop() __asm__ __volatile__ ("nop") |
diff --git a/include/asm-xtensa/a.out.h b/include/asm-xtensa/a.out.h index ffc4dcfd6ac1..05a2f67c6768 100644 --- a/include/asm-xtensa/a.out.h +++ b/include/asm-xtensa/a.out.h | |||
@@ -17,6 +17,7 @@ | |||
17 | /* Note: the kernel needs the a.out definitions, even if only ELF is used. */ | 17 | /* Note: the kernel needs the a.out definitions, even if only ELF is used. */ |
18 | 18 | ||
19 | #define STACK_TOP TASK_SIZE | 19 | #define STACK_TOP TASK_SIZE |
20 | #define STACK_TOP_MAX STACK_TOP | ||
20 | 21 | ||
21 | struct exec | 22 | struct exec |
22 | { | 23 | { |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index fccd8b548d93..dc234c508a6f 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -122,7 +122,7 @@ extern struct acpi_mcfg_allocation *pci_mmcfg_config; | |||
122 | extern int pci_mmcfg_config_num; | 122 | extern int pci_mmcfg_config_num; |
123 | 123 | ||
124 | extern int sbf_port; | 124 | extern int sbf_port; |
125 | extern unsigned long acpi_video_flags; | 125 | extern unsigned long acpi_realmode_flags; |
126 | 126 | ||
127 | #else /* !CONFIG_ACPI */ | 127 | #else /* !CONFIG_ACPI */ |
128 | 128 | ||
diff --git a/include/linux/aio.h b/include/linux/aio.h index b903fc02bdb7..d10e608f232d 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -86,7 +86,7 @@ struct kioctx; | |||
86 | */ | 86 | */ |
87 | struct kiocb { | 87 | struct kiocb { |
88 | struct list_head ki_run_list; | 88 | struct list_head ki_run_list; |
89 | long ki_flags; | 89 | unsigned long ki_flags; |
90 | int ki_users; | 90 | int ki_users; |
91 | unsigned ki_key; /* id of this request */ | 91 | unsigned ki_key; /* id of this request */ |
92 | 92 | ||
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index e1a708337be3..91c8c07fe8b7 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -6,11 +6,13 @@ | |||
6 | struct pt_regs; | 6 | struct pt_regs; |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * MAX_ARG_PAGES defines the number of pages allocated for arguments | 9 | * These are the maximum length and maximum number of strings passed to the |
10 | * and envelope for the new program. 32 should suffice, this gives | 10 | * execve() system call. MAX_ARG_STRLEN is essentially random but serves to |
11 | * a maximum env+arg of 128kB w/4KB pages! | 11 | * prevent the kernel from being unduly impacted by misaddressed pointers. |
12 | * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer. | ||
12 | */ | 13 | */ |
13 | #define MAX_ARG_PAGES 32 | 14 | #define MAX_ARG_STRLEN (PAGE_SIZE * 32) |
15 | #define MAX_ARG_STRINGS 0x7FFFFFFF | ||
14 | 16 | ||
15 | /* sizeof(linux_binprm->buf) */ | 17 | /* sizeof(linux_binprm->buf) */ |
16 | #define BINPRM_BUF_SIZE 128 | 18 | #define BINPRM_BUF_SIZE 128 |
@@ -24,7 +26,12 @@ struct pt_regs; | |||
24 | */ | 26 | */ |
25 | struct linux_binprm{ | 27 | struct linux_binprm{ |
26 | char buf[BINPRM_BUF_SIZE]; | 28 | char buf[BINPRM_BUF_SIZE]; |
29 | #ifdef CONFIG_MMU | ||
30 | struct vm_area_struct *vma; | ||
31 | #else | ||
32 | # define MAX_ARG_PAGES 32 | ||
27 | struct page *page[MAX_ARG_PAGES]; | 33 | struct page *page[MAX_ARG_PAGES]; |
34 | #endif | ||
28 | struct mm_struct *mm; | 35 | struct mm_struct *mm; |
29 | unsigned long p; /* current top of mem */ | 36 | unsigned long p; /* current top of mem */ |
30 | int sh_bang; | 37 | int sh_bang; |
@@ -40,6 +47,7 @@ struct linux_binprm{ | |||
40 | unsigned interp_flags; | 47 | unsigned interp_flags; |
41 | unsigned interp_data; | 48 | unsigned interp_data; |
42 | unsigned long loader, exec; | 49 | unsigned long loader, exec; |
50 | unsigned long argv_len; | ||
43 | }; | 51 | }; |
44 | 52 | ||
45 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 | 53 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 |
@@ -68,7 +76,7 @@ extern int register_binfmt(struct linux_binfmt *); | |||
68 | extern int unregister_binfmt(struct linux_binfmt *); | 76 | extern int unregister_binfmt(struct linux_binfmt *); |
69 | 77 | ||
70 | extern int prepare_binprm(struct linux_binprm *); | 78 | extern int prepare_binprm(struct linux_binprm *); |
71 | extern void remove_arg_zero(struct linux_binprm *); | 79 | extern int __must_check remove_arg_zero(struct linux_binprm *); |
72 | extern int search_binary_handler(struct linux_binprm *,struct pt_regs *); | 80 | extern int search_binary_handler(struct linux_binprm *,struct pt_regs *); |
73 | extern int flush_old_exec(struct linux_binprm * bprm); | 81 | extern int flush_old_exec(struct linux_binprm * bprm); |
74 | 82 | ||
@@ -85,6 +93,7 @@ extern int suid_dumpable; | |||
85 | extern int setup_arg_pages(struct linux_binprm * bprm, | 93 | extern int setup_arg_pages(struct linux_binprm * bprm, |
86 | unsigned long stack_top, | 94 | unsigned long stack_top, |
87 | int executable_stack); | 95 | int executable_stack); |
96 | extern int bprm_mm_init(struct linux_binprm *bprm); | ||
88 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | 97 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); |
89 | extern void compute_creds(struct linux_binprm *binprm); | 98 | extern void compute_creds(struct linux_binprm *binprm); |
90 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); | 99 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5c6e12853a9b..35cadad84b14 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -209,6 +209,8 @@ int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, | |||
209 | int generic_cont_expand(struct inode *inode, loff_t size); | 209 | int generic_cont_expand(struct inode *inode, loff_t size); |
210 | int generic_cont_expand_simple(struct inode *inode, loff_t size); | 210 | int generic_cont_expand_simple(struct inode *inode, loff_t size); |
211 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 211 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
212 | int block_page_mkwrite(struct vm_area_struct *vma, struct page *page, | ||
213 | get_block_t get_block); | ||
212 | void block_sync_page(struct page *); | 214 | void block_sync_page(struct page *); |
213 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 215 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
214 | int generic_commit_write(struct file *, struct page *, unsigned, unsigned); | 216 | int generic_commit_write(struct file *, struct page *, unsigned, unsigned); |
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index e4ac016ad272..c4079b403e9e 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -43,9 +43,6 @@ int coda_revalidate_inode(struct dentry *); | |||
43 | int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 43 | int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
44 | int coda_setattr(struct dentry *, struct iattr *); | 44 | int coda_setattr(struct dentry *, struct iattr *); |
45 | 45 | ||
46 | /* global variables */ | ||
47 | extern int coda_fake_statfs; | ||
48 | |||
49 | /* this file: heloers */ | 46 | /* this file: heloers */ |
50 | static __inline__ struct CodaFid *coda_i2f(struct inode *); | 47 | static __inline__ struct CodaFid *coda_i2f(struct inode *); |
51 | static __inline__ char *coda_i2s(struct inode *); | 48 | static __inline__ char *coda_i2s(struct inode *); |
diff --git a/include/linux/coda_proc.h b/include/linux/coda_proc.h deleted file mode 100644 index 0dc1b0458e75..000000000000 --- a/include/linux/coda_proc.h +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /* | ||
2 | * coda_statis.h | ||
3 | * | ||
4 | * CODA operation statistics | ||
5 | * | ||
6 | * (c) March, 1998 | ||
7 | * by Michihiro Kuramochi, Zhenyu Xia and Zhanyong Wan | ||
8 | * zhanyong.wan@yale.edu | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef _CODA_PROC_H | ||
13 | #define _CODA_PROC_H | ||
14 | |||
15 | void coda_sysctl_init(void); | ||
16 | void coda_sysctl_clean(void); | ||
17 | |||
18 | #include <linux/sysctl.h> | ||
19 | #include <linux/coda_fs_i.h> | ||
20 | #include <linux/coda.h> | ||
21 | |||
22 | /* these four files are presented to show the result of the statistics: | ||
23 | * | ||
24 | * /proc/fs/coda/vfs_stats | ||
25 | * cache_inv_stats | ||
26 | * | ||
27 | * these four files are presented to reset the statistics to 0: | ||
28 | * | ||
29 | * /proc/sys/coda/vfs_stats | ||
30 | * cache_inv_stats | ||
31 | */ | ||
32 | |||
33 | /* VFS operation statistics */ | ||
34 | struct coda_vfs_stats | ||
35 | { | ||
36 | /* file operations */ | ||
37 | int open; | ||
38 | int flush; | ||
39 | int release; | ||
40 | int fsync; | ||
41 | |||
42 | /* dir operations */ | ||
43 | int readdir; | ||
44 | |||
45 | /* inode operations */ | ||
46 | int create; | ||
47 | int lookup; | ||
48 | int link; | ||
49 | int unlink; | ||
50 | int symlink; | ||
51 | int mkdir; | ||
52 | int rmdir; | ||
53 | int rename; | ||
54 | int permission; | ||
55 | |||
56 | /* symlink operatoins*/ | ||
57 | int follow_link; | ||
58 | int readlink; | ||
59 | }; | ||
60 | |||
61 | /* cache invalidation statistics */ | ||
62 | struct coda_cache_inv_stats | ||
63 | { | ||
64 | int flush; | ||
65 | int purge_user; | ||
66 | int zap_dir; | ||
67 | int zap_file; | ||
68 | int zap_vnode; | ||
69 | int purge_fid; | ||
70 | int replace; | ||
71 | }; | ||
72 | |||
73 | /* these global variables hold the actual statistics data */ | ||
74 | extern struct coda_vfs_stats coda_vfs_stat; | ||
75 | |||
76 | #endif /* _CODA_PROC_H */ | ||
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index b541bb3d1f4b..aa8f454b3b77 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h | |||
@@ -8,11 +8,6 @@ | |||
8 | 8 | ||
9 | struct kstatfs; | 9 | struct kstatfs; |
10 | 10 | ||
11 | struct coda_sb_info | ||
12 | { | ||
13 | struct venus_comm *sbi_vcomm; | ||
14 | }; | ||
15 | |||
16 | /* communication pending/processing queues */ | 11 | /* communication pending/processing queues */ |
17 | struct venus_comm { | 12 | struct venus_comm { |
18 | u_long vc_seq; | 13 | u_long vc_seq; |
@@ -24,9 +19,9 @@ struct venus_comm { | |||
24 | }; | 19 | }; |
25 | 20 | ||
26 | 21 | ||
27 | static inline struct coda_sb_info *coda_sbp(struct super_block *sb) | 22 | static inline struct venus_comm *coda_vcp(struct super_block *sb) |
28 | { | 23 | { |
29 | return ((struct coda_sb_info *)((sb)->s_fs_info)); | 24 | return (struct venus_comm *)((sb)->s_fs_info); |
30 | } | 25 | } |
31 | 26 | ||
32 | 27 | ||
@@ -74,8 +69,6 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs); | |||
74 | 69 | ||
75 | 70 | ||
76 | /* messages between coda filesystem in kernel and Venus */ | 71 | /* messages between coda filesystem in kernel and Venus */ |
77 | extern int coda_hard; | ||
78 | extern unsigned long coda_timeout; | ||
79 | struct upc_req { | 72 | struct upc_req { |
80 | struct list_head uc_chain; | 73 | struct list_head uc_chain; |
81 | caddr_t uc_data; | 74 | caddr_t uc_data; |
@@ -85,7 +78,6 @@ struct upc_req { | |||
85 | u_short uc_opcode; /* copied from data to save lookup */ | 78 | u_short uc_opcode; /* copied from data to save lookup */ |
86 | int uc_unique; | 79 | int uc_unique; |
87 | wait_queue_head_t uc_sleep; /* process' wait queue */ | 80 | wait_queue_head_t uc_sleep; /* process' wait queue */ |
88 | unsigned long uc_posttime; | ||
89 | }; | 81 | }; |
90 | 82 | ||
91 | #define REQ_ASYNC 0x1 | 83 | #define REQ_ASYNC 0x1 |
diff --git a/include/linux/edac.h b/include/linux/edac.h new file mode 100644 index 000000000000..eab451e69a91 --- /dev/null +++ b/include/linux/edac.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Generic EDAC defs | ||
3 | * | ||
4 | * Author: Dave Jiang <djiang@mvista.com> | ||
5 | * | ||
6 | * 2006-2007 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | * | ||
11 | */ | ||
12 | #ifndef _LINUX_EDAC_H_ | ||
13 | #define _LINUX_EDAC_H_ | ||
14 | |||
15 | #include <asm/atomic.h> | ||
16 | |||
17 | #define EDAC_OPSTATE_INVAL -1 | ||
18 | #define EDAC_OPSTATE_POLL 0 | ||
19 | #define EDAC_OPSTATE_NMI 1 | ||
20 | #define EDAC_OPSTATE_INT 2 | ||
21 | |||
22 | extern int edac_op_state; | ||
23 | extern int edac_err_assert; | ||
24 | extern atomic_t edac_handlers; | ||
25 | |||
26 | extern int edac_handler_set(void); | ||
27 | extern void edac_atomic_assert_error(void); | ||
28 | |||
29 | #endif | ||
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 2d38b1a74662..c8e02de737f6 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -25,7 +25,7 @@ static inline int freezing(struct task_struct *p) | |||
25 | /* | 25 | /* |
26 | * Request that a process be frozen | 26 | * Request that a process be frozen |
27 | */ | 27 | */ |
28 | static inline void freeze(struct task_struct *p) | 28 | static inline void set_freeze_flag(struct task_struct *p) |
29 | { | 29 | { |
30 | set_tsk_thread_flag(p, TIF_FREEZE); | 30 | set_tsk_thread_flag(p, TIF_FREEZE); |
31 | } | 31 | } |
@@ -33,7 +33,7 @@ static inline void freeze(struct task_struct *p) | |||
33 | /* | 33 | /* |
34 | * Sometimes we may need to cancel the previous 'freeze' request | 34 | * Sometimes we may need to cancel the previous 'freeze' request |
35 | */ | 35 | */ |
36 | static inline void do_not_freeze(struct task_struct *p) | 36 | static inline void clear_freeze_flag(struct task_struct *p) |
37 | { | 37 | { |
38 | clear_tsk_thread_flag(p, TIF_FREEZE); | 38 | clear_tsk_thread_flag(p, TIF_FREEZE); |
39 | } | 39 | } |
@@ -56,7 +56,7 @@ static inline int thaw_process(struct task_struct *p) | |||
56 | wake_up_process(p); | 56 | wake_up_process(p); |
57 | return 1; | 57 | return 1; |
58 | } | 58 | } |
59 | clear_tsk_thread_flag(p, TIF_FREEZE); | 59 | clear_freeze_flag(p); |
60 | task_unlock(p); | 60 | task_unlock(p); |
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
@@ -129,7 +129,8 @@ static inline void set_freezable(void) | |||
129 | #else | 129 | #else |
130 | static inline int frozen(struct task_struct *p) { return 0; } | 130 | static inline int frozen(struct task_struct *p) { return 0; } |
131 | static inline int freezing(struct task_struct *p) { return 0; } | 131 | static inline int freezing(struct task_struct *p) { return 0; } |
132 | static inline void freeze(struct task_struct *p) { BUG(); } | 132 | static inline void set_freeze_flag(struct task_struct *p) {} |
133 | static inline void clear_freeze_flag(struct task_struct *p) {} | ||
133 | static inline int thaw_process(struct task_struct *p) { return 1; } | 134 | static inline int thaw_process(struct task_struct *p) { return 1; } |
134 | 135 | ||
135 | static inline void refrigerator(void) {} | 136 | static inline void refrigerator(void) {} |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9562a59b3703..d33beadd9a43 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -697,20 +697,26 @@ struct fown_struct { | |||
697 | * Track a single file's readahead state | 697 | * Track a single file's readahead state |
698 | */ | 698 | */ |
699 | struct file_ra_state { | 699 | struct file_ra_state { |
700 | unsigned long start; /* Current window */ | 700 | pgoff_t start; /* where readahead started */ |
701 | unsigned long size; | 701 | unsigned long size; /* # of readahead pages */ |
702 | unsigned long flags; /* ra flags RA_FLAG_xxx*/ | 702 | unsigned long async_size; /* do asynchronous readahead when |
703 | unsigned long cache_hit; /* cache hit count*/ | 703 | there are only # of pages ahead */ |
704 | unsigned long prev_index; /* Cache last read() position */ | 704 | |
705 | unsigned long ahead_start; /* Ahead window */ | ||
706 | unsigned long ahead_size; | ||
707 | unsigned long ra_pages; /* Maximum readahead window */ | 705 | unsigned long ra_pages; /* Maximum readahead window */ |
708 | unsigned long mmap_hit; /* Cache hit stat for mmap accesses */ | 706 | unsigned long mmap_hit; /* Cache hit stat for mmap accesses */ |
709 | unsigned long mmap_miss; /* Cache miss stat for mmap accesses */ | 707 | unsigned long mmap_miss; /* Cache miss stat for mmap accesses */ |
708 | unsigned long prev_index; /* Cache last read() position */ | ||
710 | unsigned int prev_offset; /* Offset where last read() ended in a page */ | 709 | unsigned int prev_offset; /* Offset where last read() ended in a page */ |
711 | }; | 710 | }; |
712 | #define RA_FLAG_MISS 0x01 /* a cache miss occured against this file */ | 711 | |
713 | #define RA_FLAG_INCACHE 0x02 /* file is already in cache */ | 712 | /* |
713 | * Check if @index falls in the readahead windows. | ||
714 | */ | ||
715 | static inline int ra_has_index(struct file_ra_state *ra, pgoff_t index) | ||
716 | { | ||
717 | return (index >= ra->start && | ||
718 | index < ra->start + ra->size); | ||
719 | } | ||
714 | 720 | ||
715 | struct file { | 721 | struct file { |
716 | /* | 722 | /* |
@@ -1463,7 +1469,7 @@ extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | |||
1463 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1469 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
1464 | extern int register_chrdev(unsigned int, const char *, | 1470 | extern int register_chrdev(unsigned int, const char *, |
1465 | const struct file_operations *); | 1471 | const struct file_operations *); |
1466 | extern int unregister_chrdev(unsigned int, const char *); | 1472 | extern void unregister_chrdev(unsigned int, const char *); |
1467 | extern void unregister_chrdev_region(dev_t, unsigned); | 1473 | extern void unregister_chrdev_region(dev_t, unsigned); |
1468 | extern int chrdev_open(struct inode *, struct file *); | 1474 | extern int chrdev_open(struct inode *, struct file *); |
1469 | extern void chrdev_show(struct seq_file *,off_t); | 1475 | extern void chrdev_show(struct seq_file *,off_t); |
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index f7a93770e1be..7da02c93002b 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
@@ -39,6 +39,9 @@ enum { | |||
39 | CTRL_CMD_NEWOPS, | 39 | CTRL_CMD_NEWOPS, |
40 | CTRL_CMD_DELOPS, | 40 | CTRL_CMD_DELOPS, |
41 | CTRL_CMD_GETOPS, | 41 | CTRL_CMD_GETOPS, |
42 | CTRL_CMD_NEWMCAST_GRP, | ||
43 | CTRL_CMD_DELMCAST_GRP, | ||
44 | CTRL_CMD_GETMCAST_GRP, /* unused */ | ||
42 | __CTRL_CMD_MAX, | 45 | __CTRL_CMD_MAX, |
43 | }; | 46 | }; |
44 | 47 | ||
@@ -52,6 +55,7 @@ enum { | |||
52 | CTRL_ATTR_HDRSIZE, | 55 | CTRL_ATTR_HDRSIZE, |
53 | CTRL_ATTR_MAXATTR, | 56 | CTRL_ATTR_MAXATTR, |
54 | CTRL_ATTR_OPS, | 57 | CTRL_ATTR_OPS, |
58 | CTRL_ATTR_MCAST_GROUPS, | ||
55 | __CTRL_ATTR_MAX, | 59 | __CTRL_ATTR_MAX, |
56 | }; | 60 | }; |
57 | 61 | ||
@@ -66,4 +70,13 @@ enum { | |||
66 | 70 | ||
67 | #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1) | 71 | #define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1) |
68 | 72 | ||
73 | enum { | ||
74 | CTRL_ATTR_MCAST_GRP_UNSPEC, | ||
75 | CTRL_ATTR_MCAST_GRP_NAME, | ||
76 | CTRL_ATTR_MCAST_GRP_ID, | ||
77 | __CTRL_ATTR_MCAST_GRP_MAX, | ||
78 | }; | ||
79 | |||
80 | #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) | ||
81 | |||
69 | #endif /* __LINUX_GENERIC_NETLINK_H */ | 82 | #endif /* __LINUX_GENERIC_NETLINK_H */ |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 12c5e4e3135a..1fcb0033179e 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -103,21 +103,6 @@ __alloc_zeroed_user_highpage(gfp_t movableflags, | |||
103 | #endif | 103 | #endif |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * alloc_zeroed_user_highpage - Allocate a zeroed HIGHMEM page for a VMA | ||
107 | * @vma: The VMA the page is to be allocated for | ||
108 | * @vaddr: The virtual address the page will be inserted into | ||
109 | * | ||
110 | * This function will allocate a page for a VMA that the caller knows will | ||
111 | * not be able to move in the future using move_pages() or reclaim. If it | ||
112 | * is known that the page can move, use alloc_zeroed_user_highpage_movable | ||
113 | */ | ||
114 | static inline struct page * | ||
115 | alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr) | ||
116 | { | ||
117 | return __alloc_zeroed_user_highpage(0, vma, vaddr); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * alloc_zeroed_user_highpage_movable - Allocate a zeroed HIGHMEM page for a VMA that the caller knows can move | 106 | * alloc_zeroed_user_highpage_movable - Allocate a zeroed HIGHMEM page for a VMA that the caller knows can move |
122 | * @vma: The VMA the page is to be allocated for | 107 | * @vma: The VMA the page is to be allocated for |
123 | * @vaddr: The virtual address the page will be inserted into | 108 | * @vaddr: The virtual address the page will be inserted into |
diff --git a/include/linux/i2c-isa.h b/include/linux/i2c-isa.h deleted file mode 100644 index 67e3598c4cec..000000000000 --- a/include/linux/i2c-isa.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * i2c-isa.h - definitions for the i2c-isa pseudo-i2c-adapter interface | ||
3 | * | ||
4 | * Copyright (C) 2005 Jean Delvare <khali@linux-fr.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _LINUX_I2C_ISA_H | ||
22 | #define _LINUX_I2C_ISA_H | ||
23 | |||
24 | #include <linux/i2c.h> | ||
25 | |||
26 | extern int i2c_isa_add_driver(struct i2c_driver *driver); | ||
27 | extern int i2c_isa_del_driver(struct i2c_driver *driver); | ||
28 | |||
29 | /* Detect whether we are on the isa bus. This is only useful to hybrid | ||
30 | (i2c+isa) drivers. */ | ||
31 | #define i2c_is_isa_adapter(adapptr) \ | ||
32 | ((adapptr)->id == I2C_HW_ISA) | ||
33 | #define i2c_is_isa_client(clientptr) \ | ||
34 | i2c_is_isa_adapter((clientptr)->adapter) | ||
35 | |||
36 | #endif /* _LINUX_I2C_ISA_H */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 2eaba21b9b1a..0c37a737a2b2 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -368,7 +368,6 @@ struct i2c_client_address_data { | |||
368 | 368 | ||
369 | /* The numbers to use to set I2C bus address */ | 369 | /* The numbers to use to set I2C bus address */ |
370 | #define ANY_I2C_BUS 0xffff | 370 | #define ANY_I2C_BUS 0xffff |
371 | #define ANY_I2C_ISA_BUS 9191 | ||
372 | 371 | ||
373 | 372 | ||
374 | /* ----- functions exported by i2c.o */ | 373 | /* ----- functions exported by i2c.o */ |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 23adf6075ae4..51464d12a4e5 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -116,9 +116,12 @@ struct kprobe { | |||
116 | */ | 116 | */ |
117 | struct jprobe { | 117 | struct jprobe { |
118 | struct kprobe kp; | 118 | struct kprobe kp; |
119 | kprobe_opcode_t *entry; /* probe handling code to jump to */ | 119 | void *entry; /* probe handling code to jump to */ |
120 | }; | 120 | }; |
121 | 121 | ||
122 | /* For backward compatibility with old code using JPROBE_ENTRY() */ | ||
123 | #define JPROBE_ENTRY(handler) (handler) | ||
124 | |||
122 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); | 125 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); |
123 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 126 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); |
124 | 127 | ||
@@ -211,6 +214,7 @@ int longjmp_break_handler(struct kprobe *, struct pt_regs *); | |||
211 | int register_jprobe(struct jprobe *p); | 214 | int register_jprobe(struct jprobe *p); |
212 | void unregister_jprobe(struct jprobe *p); | 215 | void unregister_jprobe(struct jprobe *p); |
213 | void jprobe_return(void); | 216 | void jprobe_return(void); |
217 | unsigned long arch_deref_entry_point(void *); | ||
214 | 218 | ||
215 | int register_kretprobe(struct kretprobe *rp); | 219 | int register_kretprobe(struct kretprobe *rp); |
216 | void unregister_kretprobe(struct kretprobe *rp); | 220 | void unregister_kretprobe(struct kretprobe *rp); |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h new file mode 100644 index 000000000000..500aace21ca7 --- /dev/null +++ b/include/linux/lguest.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* Things the lguest guest needs to know. Note: like all lguest interfaces, | ||
2 | * this is subject to wild and random change between versions. */ | ||
3 | #ifndef _ASM_LGUEST_H | ||
4 | #define _ASM_LGUEST_H | ||
5 | |||
6 | #ifndef __ASSEMBLY__ | ||
7 | #include <asm/irq.h> | ||
8 | |||
9 | #define LHCALL_FLUSH_ASYNC 0 | ||
10 | #define LHCALL_LGUEST_INIT 1 | ||
11 | #define LHCALL_CRASH 2 | ||
12 | #define LHCALL_LOAD_GDT 3 | ||
13 | #define LHCALL_NEW_PGTABLE 4 | ||
14 | #define LHCALL_FLUSH_TLB 5 | ||
15 | #define LHCALL_LOAD_IDT_ENTRY 6 | ||
16 | #define LHCALL_SET_STACK 7 | ||
17 | #define LHCALL_TS 8 | ||
18 | #define LHCALL_SET_CLOCKEVENT 9 | ||
19 | #define LHCALL_HALT 10 | ||
20 | #define LHCALL_GET_WALLCLOCK 11 | ||
21 | #define LHCALL_BIND_DMA 12 | ||
22 | #define LHCALL_SEND_DMA 13 | ||
23 | #define LHCALL_SET_PTE 14 | ||
24 | #define LHCALL_SET_PMD 15 | ||
25 | #define LHCALL_LOAD_TLS 16 | ||
26 | |||
27 | #define LG_CLOCK_MIN_DELTA 100UL | ||
28 | #define LG_CLOCK_MAX_DELTA ULONG_MAX | ||
29 | |||
30 | #define LGUEST_TRAP_ENTRY 0x1F | ||
31 | |||
32 | static inline unsigned long | ||
33 | hcall(unsigned long call, | ||
34 | unsigned long arg1, unsigned long arg2, unsigned long arg3) | ||
35 | { | ||
36 | asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY) | ||
37 | : "=a"(call) | ||
38 | : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3) | ||
39 | : "memory"); | ||
40 | return call; | ||
41 | } | ||
42 | |||
43 | void async_hcall(unsigned long call, | ||
44 | unsigned long arg1, unsigned long arg2, unsigned long arg3); | ||
45 | |||
46 | /* Can't use our min() macro here: needs to be a constant */ | ||
47 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) | ||
48 | |||
49 | #define LHCALL_RING_SIZE 64 | ||
50 | struct hcall_ring | ||
51 | { | ||
52 | u32 eax, edx, ebx, ecx; | ||
53 | }; | ||
54 | |||
55 | /* All the good stuff happens here: guest registers it with LGUEST_INIT */ | ||
56 | struct lguest_data | ||
57 | { | ||
58 | /* Fields which change during running: */ | ||
59 | /* 512 == enabled (same as eflags) */ | ||
60 | unsigned int irq_enabled; | ||
61 | /* Interrupts blocked by guest. */ | ||
62 | DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); | ||
63 | |||
64 | /* Virtual address of page fault. */ | ||
65 | unsigned long cr2; | ||
66 | |||
67 | /* Async hypercall ring. 0xFF == done, 0 == pending. */ | ||
68 | u8 hcall_status[LHCALL_RING_SIZE]; | ||
69 | struct hcall_ring hcalls[LHCALL_RING_SIZE]; | ||
70 | |||
71 | /* Fields initialized by the hypervisor at boot: */ | ||
72 | /* Memory not to try to access */ | ||
73 | unsigned long reserve_mem; | ||
74 | /* ID of this guest (used by network driver to set ethernet address) */ | ||
75 | u16 guestid; | ||
76 | /* KHz for the TSC clock. */ | ||
77 | u32 tsc_khz; | ||
78 | |||
79 | /* Fields initialized by the guest at boot: */ | ||
80 | /* Instruction range to suppress interrupts even if enabled */ | ||
81 | unsigned long noirq_start, noirq_end; | ||
82 | }; | ||
83 | extern struct lguest_data lguest_data; | ||
84 | #endif /* __ASSEMBLY__ */ | ||
85 | #endif /* _ASM_LGUEST_H */ | ||
diff --git a/include/linux/lguest_bus.h b/include/linux/lguest_bus.h new file mode 100644 index 000000000000..c9b4e05fee49 --- /dev/null +++ b/include/linux/lguest_bus.h | |||
@@ -0,0 +1,48 @@ | |||
1 | #ifndef _ASM_LGUEST_DEVICE_H | ||
2 | #define _ASM_LGUEST_DEVICE_H | ||
3 | /* Everything you need to know about lguest devices. */ | ||
4 | #include <linux/device.h> | ||
5 | #include <linux/lguest.h> | ||
6 | #include <linux/lguest_launcher.h> | ||
7 | |||
8 | struct lguest_device { | ||
9 | /* Unique busid, and index into lguest_page->devices[] */ | ||
10 | unsigned int index; | ||
11 | |||
12 | struct device dev; | ||
13 | |||
14 | /* Driver can hang data off here. */ | ||
15 | void *private; | ||
16 | }; | ||
17 | |||
18 | /* By convention, each device can use irq index+1 if it wants to. */ | ||
19 | static inline int lgdev_irq(const struct lguest_device *dev) | ||
20 | { | ||
21 | return dev->index + 1; | ||
22 | } | ||
23 | |||
24 | /* dma args must not be vmalloced! */ | ||
25 | void lguest_send_dma(unsigned long key, struct lguest_dma *dma); | ||
26 | int lguest_bind_dma(unsigned long key, struct lguest_dma *dmas, | ||
27 | unsigned int num, u8 irq); | ||
28 | void lguest_unbind_dma(unsigned long key, struct lguest_dma *dmas); | ||
29 | |||
30 | /* Map the virtual device space */ | ||
31 | void *lguest_map(unsigned long phys_addr, unsigned long pages); | ||
32 | void lguest_unmap(void *); | ||
33 | |||
34 | struct lguest_driver { | ||
35 | const char *name; | ||
36 | struct module *owner; | ||
37 | u16 device_type; | ||
38 | int (*probe)(struct lguest_device *dev); | ||
39 | void (*remove)(struct lguest_device *dev); | ||
40 | |||
41 | struct device_driver drv; | ||
42 | }; | ||
43 | |||
44 | extern int register_lguest_driver(struct lguest_driver *drv); | ||
45 | extern void unregister_lguest_driver(struct lguest_driver *drv); | ||
46 | |||
47 | extern struct lguest_device_desc *lguest_devices; /* Just past max_pfn */ | ||
48 | #endif /* _ASM_LGUEST_DEVICE_H */ | ||
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h new file mode 100644 index 000000000000..0ba414a40c80 --- /dev/null +++ b/include/linux/lguest_launcher.h | |||
@@ -0,0 +1,73 @@ | |||
1 | #ifndef _ASM_LGUEST_USER | ||
2 | #define _ASM_LGUEST_USER | ||
3 | /* Everything the "lguest" userspace program needs to know. */ | ||
4 | /* They can register up to 32 arrays of lguest_dma. */ | ||
5 | #define LGUEST_MAX_DMA 32 | ||
6 | /* At most we can dma 16 lguest_dma in one op. */ | ||
7 | #define LGUEST_MAX_DMA_SECTIONS 16 | ||
8 | |||
9 | /* How many devices? Assume each one wants up to two dma arrays per device. */ | ||
10 | #define LGUEST_MAX_DEVICES (LGUEST_MAX_DMA/2) | ||
11 | |||
12 | struct lguest_dma | ||
13 | { | ||
14 | /* 0 if free to be used, filled by hypervisor. */ | ||
15 | u32 used_len; | ||
16 | unsigned long addr[LGUEST_MAX_DMA_SECTIONS]; | ||
17 | u16 len[LGUEST_MAX_DMA_SECTIONS]; | ||
18 | }; | ||
19 | |||
20 | struct lguest_block_page | ||
21 | { | ||
22 | /* 0 is a read, 1 is a write. */ | ||
23 | int type; | ||
24 | u32 sector; /* Offset in device = sector * 512. */ | ||
25 | u32 bytes; /* Length expected to be read/written in bytes */ | ||
26 | /* 0 = pending, 1 = done, 2 = done, error */ | ||
27 | int result; | ||
28 | u32 num_sectors; /* Disk length = num_sectors * 512 */ | ||
29 | }; | ||
30 | |||
31 | /* There is a shared page of these. */ | ||
32 | struct lguest_net | ||
33 | { | ||
34 | /* Simply the mac address (with multicast bit meaning promisc). */ | ||
35 | unsigned char mac[6]; | ||
36 | }; | ||
37 | |||
38 | /* Where the Host expects the Guest to SEND_DMA console output to. */ | ||
39 | #define LGUEST_CONSOLE_DMA_KEY 0 | ||
40 | |||
41 | /* We have a page of these descriptors in the lguest_device page. */ | ||
42 | struct lguest_device_desc { | ||
43 | u16 type; | ||
44 | #define LGUEST_DEVICE_T_CONSOLE 1 | ||
45 | #define LGUEST_DEVICE_T_NET 2 | ||
46 | #define LGUEST_DEVICE_T_BLOCK 3 | ||
47 | |||
48 | u16 features; | ||
49 | #define LGUEST_NET_F_NOCSUM 0x4000 /* Don't bother checksumming */ | ||
50 | #define LGUEST_DEVICE_F_RANDOMNESS 0x8000 /* IRQ is fairly random */ | ||
51 | |||
52 | u16 status; | ||
53 | /* 256 and above are device specific. */ | ||
54 | #define LGUEST_DEVICE_S_ACKNOWLEDGE 1 /* We have seen device. */ | ||
55 | #define LGUEST_DEVICE_S_DRIVER 2 /* We have found a driver */ | ||
56 | #define LGUEST_DEVICE_S_DRIVER_OK 4 /* Driver says OK! */ | ||
57 | #define LGUEST_DEVICE_S_REMOVED 8 /* Device has gone away. */ | ||
58 | #define LGUEST_DEVICE_S_REMOVED_ACK 16 /* Driver has been told. */ | ||
59 | #define LGUEST_DEVICE_S_FAILED 128 /* Something actually failed */ | ||
60 | |||
61 | u16 num_pages; | ||
62 | u32 pfn; | ||
63 | }; | ||
64 | |||
65 | /* Write command first word is a request. */ | ||
66 | enum lguest_req | ||
67 | { | ||
68 | LHREQ_INITIALIZE, /* + pfnlimit, pgdir, start, pageoffset */ | ||
69 | LHREQ_GETDMA, /* + addr (returns &lguest_dma, irq in ->used_len) */ | ||
70 | LHREQ_IRQ, /* + irq */ | ||
71 | LHREQ_BREAK, /* + on/off flag (on blocks until someone does off) */ | ||
72 | }; | ||
73 | #endif /* _ASM_LGUEST_USER */ | ||
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 14c937d345cb..0e843bf65877 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -1,7 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Runtime locking correctness validator | 2 | * Runtime locking correctness validator |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | 4 | * Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
5 | * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com> | ||
5 | * | 6 | * |
6 | * see Documentation/lockdep-design.txt for more details. | 7 | * see Documentation/lockdep-design.txt for more details. |
7 | */ | 8 | */ |
@@ -9,6 +10,7 @@ | |||
9 | #define __LINUX_LOCKDEP_H | 10 | #define __LINUX_LOCKDEP_H |
10 | 11 | ||
11 | struct task_struct; | 12 | struct task_struct; |
13 | struct lockdep_map; | ||
12 | 14 | ||
13 | #ifdef CONFIG_LOCKDEP | 15 | #ifdef CONFIG_LOCKDEP |
14 | 16 | ||
@@ -114,8 +116,44 @@ struct lock_class { | |||
114 | 116 | ||
115 | const char *name; | 117 | const char *name; |
116 | int name_version; | 118 | int name_version; |
119 | |||
120 | #ifdef CONFIG_LOCK_STAT | ||
121 | unsigned long contention_point[4]; | ||
122 | #endif | ||
123 | }; | ||
124 | |||
125 | #ifdef CONFIG_LOCK_STAT | ||
126 | struct lock_time { | ||
127 | s64 min; | ||
128 | s64 max; | ||
129 | s64 total; | ||
130 | unsigned long nr; | ||
131 | }; | ||
132 | |||
133 | enum bounce_type { | ||
134 | bounce_acquired_write, | ||
135 | bounce_acquired_read, | ||
136 | bounce_contended_write, | ||
137 | bounce_contended_read, | ||
138 | nr_bounce_types, | ||
139 | |||
140 | bounce_acquired = bounce_acquired_write, | ||
141 | bounce_contended = bounce_contended_write, | ||
117 | }; | 142 | }; |
118 | 143 | ||
144 | struct lock_class_stats { | ||
145 | unsigned long contention_point[4]; | ||
146 | struct lock_time read_waittime; | ||
147 | struct lock_time write_waittime; | ||
148 | struct lock_time read_holdtime; | ||
149 | struct lock_time write_holdtime; | ||
150 | unsigned long bounces[nr_bounce_types]; | ||
151 | }; | ||
152 | |||
153 | struct lock_class_stats lock_stats(struct lock_class *class); | ||
154 | void clear_lock_stats(struct lock_class *class); | ||
155 | #endif | ||
156 | |||
119 | /* | 157 | /* |
120 | * Map the lock object (the lock instance) to the lock-class object. | 158 | * Map the lock object (the lock instance) to the lock-class object. |
121 | * This is embedded into specific lock instances: | 159 | * This is embedded into specific lock instances: |
@@ -124,6 +162,9 @@ struct lockdep_map { | |||
124 | struct lock_class_key *key; | 162 | struct lock_class_key *key; |
125 | struct lock_class *class_cache; | 163 | struct lock_class *class_cache; |
126 | const char *name; | 164 | const char *name; |
165 | #ifdef CONFIG_LOCK_STAT | ||
166 | int cpu; | ||
167 | #endif | ||
127 | }; | 168 | }; |
128 | 169 | ||
129 | /* | 170 | /* |
@@ -165,6 +206,10 @@ struct held_lock { | |||
165 | unsigned long acquire_ip; | 206 | unsigned long acquire_ip; |
166 | struct lockdep_map *instance; | 207 | struct lockdep_map *instance; |
167 | 208 | ||
209 | #ifdef CONFIG_LOCK_STAT | ||
210 | u64 waittime_stamp; | ||
211 | u64 holdtime_stamp; | ||
212 | #endif | ||
168 | /* | 213 | /* |
169 | * The lock-stack is unified in that the lock chains of interrupt | 214 | * The lock-stack is unified in that the lock chains of interrupt |
170 | * contexts nest ontop of process context chains, but we 'separate' | 215 | * contexts nest ontop of process context chains, but we 'separate' |
@@ -281,6 +326,30 @@ struct lock_class_key { }; | |||
281 | 326 | ||
282 | #endif /* !LOCKDEP */ | 327 | #endif /* !LOCKDEP */ |
283 | 328 | ||
329 | #ifdef CONFIG_LOCK_STAT | ||
330 | |||
331 | extern void lock_contended(struct lockdep_map *lock, unsigned long ip); | ||
332 | extern void lock_acquired(struct lockdep_map *lock); | ||
333 | |||
334 | #define LOCK_CONTENDED(_lock, try, lock) \ | ||
335 | do { \ | ||
336 | if (!try(_lock)) { \ | ||
337 | lock_contended(&(_lock)->dep_map, _RET_IP_); \ | ||
338 | lock(_lock); \ | ||
339 | } \ | ||
340 | lock_acquired(&(_lock)->dep_map); \ | ||
341 | } while (0) | ||
342 | |||
343 | #else /* CONFIG_LOCK_STAT */ | ||
344 | |||
345 | #define lock_contended(lockdep_map, ip) do {} while (0) | ||
346 | #define lock_acquired(lockdep_map) do {} while (0) | ||
347 | |||
348 | #define LOCK_CONTENDED(_lock, try, lock) \ | ||
349 | lock(_lock) | ||
350 | |||
351 | #endif /* CONFIG_LOCK_STAT */ | ||
352 | |||
284 | #if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS) | 353 | #if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS) |
285 | extern void early_init_irq_lock_class(void); | 354 | extern void early_init_irq_lock_class(void); |
286 | #else | 355 | #else |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a5c451816fdc..c456c3a1c28e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -168,6 +168,8 @@ extern unsigned int kobjsize(const void *objp); | |||
168 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ | 168 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ |
169 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ | 169 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ |
170 | 170 | ||
171 | #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ | ||
172 | |||
171 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ | 173 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ |
172 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS | 174 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS |
173 | #endif | 175 | #endif |
@@ -190,6 +192,30 @@ extern unsigned int kobjsize(const void *objp); | |||
190 | */ | 192 | */ |
191 | extern pgprot_t protection_map[16]; | 193 | extern pgprot_t protection_map[16]; |
192 | 194 | ||
195 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ | ||
196 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ | ||
197 | |||
198 | |||
199 | /* | ||
200 | * vm_fault is filled by the the pagefault handler and passed to the vma's | ||
201 | * ->fault function. The vma's ->fault is responsible for returning a bitmask | ||
202 | * of VM_FAULT_xxx flags that give details about how the fault was handled. | ||
203 | * | ||
204 | * pgoff should be used in favour of virtual_address, if possible. If pgoff | ||
205 | * is used, one may set VM_CAN_NONLINEAR in the vma->vm_flags to get nonlinear | ||
206 | * mapping support. | ||
207 | */ | ||
208 | struct vm_fault { | ||
209 | unsigned int flags; /* FAULT_FLAG_xxx flags */ | ||
210 | pgoff_t pgoff; /* Logical page offset based on vma */ | ||
211 | void __user *virtual_address; /* Faulting virtual address */ | ||
212 | |||
213 | struct page *page; /* ->fault handlers should return a | ||
214 | * page here, unless VM_FAULT_NOPAGE | ||
215 | * is set (which is also implied by | ||
216 | * VM_FAULT_ERROR). | ||
217 | */ | ||
218 | }; | ||
193 | 219 | ||
194 | /* | 220 | /* |
195 | * These are the virtual MM functions - opening of an area, closing and | 221 | * These are the virtual MM functions - opening of an area, closing and |
@@ -199,9 +225,11 @@ extern pgprot_t protection_map[16]; | |||
199 | struct vm_operations_struct { | 225 | struct vm_operations_struct { |
200 | void (*open)(struct vm_area_struct * area); | 226 | void (*open)(struct vm_area_struct * area); |
201 | void (*close)(struct vm_area_struct * area); | 227 | void (*close)(struct vm_area_struct * area); |
202 | struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type); | 228 | int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); |
203 | unsigned long (*nopfn)(struct vm_area_struct * area, unsigned long address); | 229 | struct page *(*nopage)(struct vm_area_struct *area, |
204 | int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); | 230 | unsigned long address, int *type); |
231 | unsigned long (*nopfn)(struct vm_area_struct *area, | ||
232 | unsigned long address); | ||
205 | 233 | ||
206 | /* notification that a previously read-only page is about to become | 234 | /* notification that a previously read-only page is about to become |
207 | * writable, if an error is returned it will cause a SIGBUS */ | 235 | * writable, if an error is returned it will cause a SIGBUS */ |
@@ -655,7 +683,6 @@ static inline int page_mapped(struct page *page) | |||
655 | */ | 683 | */ |
656 | #define NOPAGE_SIGBUS (NULL) | 684 | #define NOPAGE_SIGBUS (NULL) |
657 | #define NOPAGE_OOM ((struct page *) (-1)) | 685 | #define NOPAGE_OOM ((struct page *) (-1)) |
658 | #define NOPAGE_REFAULT ((struct page *) (-2)) /* Return to userspace, rerun */ | ||
659 | 686 | ||
660 | /* | 687 | /* |
661 | * Error return values for the *_nopfn functions | 688 | * Error return values for the *_nopfn functions |
@@ -669,16 +696,18 @@ static inline int page_mapped(struct page *page) | |||
669 | * Used to decide whether a process gets delivered SIGBUS or | 696 | * Used to decide whether a process gets delivered SIGBUS or |
670 | * just gets major/minor fault counters bumped up. | 697 | * just gets major/minor fault counters bumped up. |
671 | */ | 698 | */ |
672 | #define VM_FAULT_OOM 0x00 | 699 | |
673 | #define VM_FAULT_SIGBUS 0x01 | 700 | #define VM_FAULT_MINOR 0 /* For backwards compat. Remove me quickly. */ |
674 | #define VM_FAULT_MINOR 0x02 | 701 | |
675 | #define VM_FAULT_MAJOR 0x03 | 702 | #define VM_FAULT_OOM 0x0001 |
676 | 703 | #define VM_FAULT_SIGBUS 0x0002 | |
677 | /* | 704 | #define VM_FAULT_MAJOR 0x0004 |
678 | * Special case for get_user_pages. | 705 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
679 | * Must be in a distinct bit from the above VM_FAULT_ flags. | 706 | |
680 | */ | 707 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
681 | #define VM_FAULT_WRITE 0x10 | 708 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
709 | |||
710 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) | ||
682 | 711 | ||
683 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) | 712 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) |
684 | 713 | ||
@@ -762,20 +791,10 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, | |||
762 | 791 | ||
763 | extern int vmtruncate(struct inode * inode, loff_t offset); | 792 | extern int vmtruncate(struct inode * inode, loff_t offset); |
764 | extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); | 793 | extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); |
765 | extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot); | ||
766 | extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot); | ||
767 | 794 | ||
768 | #ifdef CONFIG_MMU | 795 | #ifdef CONFIG_MMU |
769 | extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, | 796 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
770 | unsigned long address, int write_access); | 797 | unsigned long address, int write_access); |
771 | |||
772 | static inline int handle_mm_fault(struct mm_struct *mm, | ||
773 | struct vm_area_struct *vma, unsigned long address, | ||
774 | int write_access) | ||
775 | { | ||
776 | return __handle_mm_fault(mm, vma, address, write_access) & | ||
777 | (~VM_FAULT_WRITE); | ||
778 | } | ||
779 | #else | 798 | #else |
780 | static inline int handle_mm_fault(struct mm_struct *mm, | 799 | static inline int handle_mm_fault(struct mm_struct *mm, |
781 | struct vm_area_struct *vma, unsigned long address, | 800 | struct vm_area_struct *vma, unsigned long address, |
@@ -789,7 +808,6 @@ static inline int handle_mm_fault(struct mm_struct *mm, | |||
789 | 808 | ||
790 | extern int make_pages_present(unsigned long addr, unsigned long end); | 809 | extern int make_pages_present(unsigned long addr, unsigned long end); |
791 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 810 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
792 | void install_arg_page(struct vm_area_struct *, struct page *, unsigned long); | ||
793 | 811 | ||
794 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, | 812 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, |
795 | int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); | 813 | int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); |
@@ -806,9 +824,15 @@ int FASTCALL(set_page_dirty(struct page *page)); | |||
806 | int set_page_dirty_lock(struct page *page); | 824 | int set_page_dirty_lock(struct page *page); |
807 | int clear_page_dirty_for_io(struct page *page); | 825 | int clear_page_dirty_for_io(struct page *page); |
808 | 826 | ||
827 | extern unsigned long move_page_tables(struct vm_area_struct *vma, | ||
828 | unsigned long old_addr, struct vm_area_struct *new_vma, | ||
829 | unsigned long new_addr, unsigned long len); | ||
809 | extern unsigned long do_mremap(unsigned long addr, | 830 | extern unsigned long do_mremap(unsigned long addr, |
810 | unsigned long old_len, unsigned long new_len, | 831 | unsigned long old_len, unsigned long new_len, |
811 | unsigned long flags, unsigned long new_addr); | 832 | unsigned long flags, unsigned long new_addr); |
833 | extern int mprotect_fixup(struct vm_area_struct *vma, | ||
834 | struct vm_area_struct **pprev, unsigned long start, | ||
835 | unsigned long end, unsigned long newflags); | ||
812 | 836 | ||
813 | /* | 837 | /* |
814 | * A callback you can register to apply pressure to ageable caches. | 838 | * A callback you can register to apply pressure to ageable caches. |
@@ -1104,9 +1128,7 @@ extern void truncate_inode_pages_range(struct address_space *, | |||
1104 | loff_t lstart, loff_t lend); | 1128 | loff_t lstart, loff_t lend); |
1105 | 1129 | ||
1106 | /* generic vm_area_ops exported for stackable file systems */ | 1130 | /* generic vm_area_ops exported for stackable file systems */ |
1107 | extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *); | 1131 | extern int filemap_fault(struct vm_area_struct *, struct vm_fault *); |
1108 | extern int filemap_populate(struct vm_area_struct *, unsigned long, | ||
1109 | unsigned long, pgprot_t, unsigned long, int); | ||
1110 | 1132 | ||
1111 | /* mm/page-writeback.c */ | 1133 | /* mm/page-writeback.c */ |
1112 | int write_one_page(struct page *page, int wait); | 1134 | int write_one_page(struct page *page, int wait); |
@@ -1121,13 +1143,20 @@ int do_page_cache_readahead(struct address_space *mapping, struct file *filp, | |||
1121 | pgoff_t offset, unsigned long nr_to_read); | 1143 | pgoff_t offset, unsigned long nr_to_read); |
1122 | int force_page_cache_readahead(struct address_space *mapping, struct file *filp, | 1144 | int force_page_cache_readahead(struct address_space *mapping, struct file *filp, |
1123 | pgoff_t offset, unsigned long nr_to_read); | 1145 | pgoff_t offset, unsigned long nr_to_read); |
1124 | unsigned long page_cache_readahead(struct address_space *mapping, | 1146 | |
1125 | struct file_ra_state *ra, | 1147 | void page_cache_sync_readahead(struct address_space *mapping, |
1126 | struct file *filp, | 1148 | struct file_ra_state *ra, |
1127 | pgoff_t offset, | 1149 | struct file *filp, |
1128 | unsigned long size); | 1150 | pgoff_t offset, |
1129 | void handle_ra_miss(struct address_space *mapping, | 1151 | unsigned long size); |
1130 | struct file_ra_state *ra, pgoff_t offset); | 1152 | |
1153 | void page_cache_async_readahead(struct address_space *mapping, | ||
1154 | struct file_ra_state *ra, | ||
1155 | struct file *filp, | ||
1156 | struct page *pg, | ||
1157 | pgoff_t offset, | ||
1158 | unsigned long size); | ||
1159 | |||
1131 | unsigned long max_sane_readahead(unsigned long nr); | 1160 | unsigned long max_sane_readahead(unsigned long nr); |
1132 | 1161 | ||
1133 | /* Do stack extension */ | 1162 | /* Do stack extension */ |
@@ -1135,6 +1164,8 @@ extern int expand_stack(struct vm_area_struct *vma, unsigned long address); | |||
1135 | #ifdef CONFIG_IA64 | 1164 | #ifdef CONFIG_IA64 |
1136 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); | 1165 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); |
1137 | #endif | 1166 | #endif |
1167 | extern int expand_stack_downwards(struct vm_area_struct *vma, | ||
1168 | unsigned long address); | ||
1138 | 1169 | ||
1139 | /* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ | 1170 | /* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ |
1140 | extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); | 1171 | extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); |
diff --git a/include/linux/namei.h b/include/linux/namei.h index b7dd24917f0d..6c38efbd810f 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -69,8 +69,8 @@ extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struc | |||
69 | #define user_path_walk_link(name,nd) \ | 69 | #define user_path_walk_link(name,nd) \ |
70 | __user_walk_fd(AT_FDCWD, name, 0, nd) | 70 | __user_walk_fd(AT_FDCWD, name, 0, nd) |
71 | extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); | 71 | extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *)); |
72 | extern int FASTCALL(path_walk(const char *, struct nameidata *)); | 72 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
73 | extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); | 73 | const char *, unsigned int, struct nameidata *); |
74 | extern void path_release(struct nameidata *); | 74 | extern void path_release(struct nameidata *); |
75 | extern void path_release_on_umount(struct nameidata *); | 75 | extern void path_release_on_umount(struct nameidata *); |
76 | 76 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 2e23353c28a5..83d8239f0cce 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -161,6 +161,8 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, | |||
161 | void (*input)(struct sock *sk, int len), | 161 | void (*input)(struct sock *sk, int len), |
162 | struct mutex *cb_mutex, | 162 | struct mutex *cb_mutex, |
163 | struct module *module); | 163 | struct module *module); |
164 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); | ||
165 | extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group); | ||
164 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); | 166 | extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); |
165 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); | 167 | extern int netlink_has_listeners(struct sock *sk, unsigned int group); |
166 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 168 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c098ae194f79..9ba4aec37c50 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -407,8 +407,8 @@ extern void nfs_release_automount_timer(void); | |||
407 | /* | 407 | /* |
408 | * linux/fs/nfs/unlink.c | 408 | * linux/fs/nfs/unlink.c |
409 | */ | 409 | */ |
410 | extern int nfs_async_unlink(struct dentry *); | 410 | extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry); |
411 | extern void nfs_complete_unlink(struct dentry *); | 411 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); |
412 | 412 | ||
413 | /* | 413 | /* |
414 | * linux/fs/nfs/write.c | 414 | * linux/fs/nfs/write.c |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 38d77681cf27..cf74a4db84a5 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -278,6 +278,21 @@ struct nfs_writeres { | |||
278 | }; | 278 | }; |
279 | 279 | ||
280 | /* | 280 | /* |
281 | * Common arguments to the unlink call | ||
282 | */ | ||
283 | struct nfs_removeargs { | ||
284 | const struct nfs_fh *fh; | ||
285 | struct qstr name; | ||
286 | const u32 * bitmask; | ||
287 | }; | ||
288 | |||
289 | struct nfs_removeres { | ||
290 | const struct nfs_server *server; | ||
291 | struct nfs4_change_info cinfo; | ||
292 | struct nfs_fattr dir_attr; | ||
293 | }; | ||
294 | |||
295 | /* | ||
281 | * Argument struct for decode_entry function | 296 | * Argument struct for decode_entry function |
282 | */ | 297 | */ |
283 | struct nfs_entry { | 298 | struct nfs_entry { |
@@ -631,18 +646,6 @@ struct nfs4_readlink { | |||
631 | struct page ** pages; /* zero-copy data */ | 646 | struct page ** pages; /* zero-copy data */ |
632 | }; | 647 | }; |
633 | 648 | ||
634 | struct nfs4_remove_arg { | ||
635 | const struct nfs_fh * fh; | ||
636 | const struct qstr * name; | ||
637 | const u32 * bitmask; | ||
638 | }; | ||
639 | |||
640 | struct nfs4_remove_res { | ||
641 | const struct nfs_server * server; | ||
642 | struct nfs4_change_info cinfo; | ||
643 | struct nfs_fattr * dir_attr; | ||
644 | }; | ||
645 | |||
646 | struct nfs4_rename_arg { | 649 | struct nfs4_rename_arg { |
647 | const struct nfs_fh * old_dir; | 650 | const struct nfs_fh * old_dir; |
648 | const struct nfs_fh * new_dir; | 651 | const struct nfs_fh * new_dir; |
@@ -788,9 +791,8 @@ struct nfs_rpc_ops { | |||
788 | int (*create) (struct inode *, struct dentry *, | 791 | int (*create) (struct inode *, struct dentry *, |
789 | struct iattr *, int, struct nameidata *); | 792 | struct iattr *, int, struct nameidata *); |
790 | int (*remove) (struct inode *, struct qstr *); | 793 | int (*remove) (struct inode *, struct qstr *); |
791 | int (*unlink_setup) (struct rpc_message *, | 794 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); |
792 | struct dentry *, struct qstr *); | 795 | int (*unlink_done) (struct rpc_task *, struct inode *); |
793 | int (*unlink_done) (struct dentry *, struct rpc_task *); | ||
794 | int (*rename) (struct inode *, struct qstr *, | 796 | int (*rename) (struct inode *, struct qstr *, |
795 | struct inode *, struct qstr *); | 797 | struct inode *, struct qstr *); |
796 | int (*link) (struct inode *, struct inode *, struct qstr *); | 798 | int (*link) (struct inode *, struct inode *, struct qstr *); |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 78feb7beff75..5cd192469096 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -116,18 +116,7 @@ struct svc_expkey { | |||
116 | #define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE) | 116 | #define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE) |
117 | #define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES) | 117 | #define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES) |
118 | 118 | ||
119 | static inline int EX_RDONLY(struct svc_export *exp, struct svc_rqst *rqstp) | 119 | int nfsexp_flags(struct svc_rqst *rqstp, struct svc_export *exp); |
120 | { | ||
121 | struct exp_flavor_info *f; | ||
122 | struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors; | ||
123 | |||
124 | for (f = exp->ex_flavors; f < end; f++) { | ||
125 | if (f->pseudoflavor == rqstp->rq_flavor) | ||
126 | return f->flags & NFSEXP_READONLY; | ||
127 | } | ||
128 | return exp->ex_flags & NFSEXP_READONLY; | ||
129 | } | ||
130 | |||
131 | __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp); | 120 | __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp); |
132 | 121 | ||
133 | /* | 122 | /* |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 576f2bb34cc8..be3f2bb6fcf3 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -212,5 +212,11 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, | |||
212 | #define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN) | 212 | #define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN) |
213 | #define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN) | 213 | #define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN) |
214 | 214 | ||
215 | /* Hibernation and suspend events */ | ||
216 | #define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ | ||
217 | #define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ | ||
218 | #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ | ||
219 | #define PM_POST_SUSPEND 0x0004 /* Suspend finished */ | ||
220 | |||
215 | #endif /* __KERNEL__ */ | 221 | #endif /* __KERNEL__ */ |
216 | #endif /* _LINUX_NOTIFIER_H */ | 222 | #endif /* _LINUX_NOTIFIER_H */ |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 731cd2ac3227..209d3a47f50f 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -90,6 +90,9 @@ | |||
90 | #define PG_reclaim 17 /* To be reclaimed asap */ | 90 | #define PG_reclaim 17 /* To be reclaimed asap */ |
91 | #define PG_buddy 19 /* Page is free, on buddy lists */ | 91 | #define PG_buddy 19 /* Page is free, on buddy lists */ |
92 | 92 | ||
93 | /* PG_readahead is only used for file reads; PG_reclaim is only for writes */ | ||
94 | #define PG_readahead PG_reclaim /* Reminder to do async read-ahead */ | ||
95 | |||
93 | /* PG_owner_priv_1 users should have descriptive aliases */ | 96 | /* PG_owner_priv_1 users should have descriptive aliases */ |
94 | #define PG_checked PG_owner_priv_1 /* Used by some filesystems */ | 97 | #define PG_checked PG_owner_priv_1 /* Used by some filesystems */ |
95 | #define PG_pinned PG_owner_priv_1 /* Xen pinned pagetable */ | 98 | #define PG_pinned PG_owner_priv_1 /* Xen pinned pagetable */ |
@@ -186,37 +189,15 @@ static inline void SetPageUptodate(struct page *page) | |||
186 | #define __SetPagePrivate(page) __set_bit(PG_private, &(page)->flags) | 189 | #define __SetPagePrivate(page) __set_bit(PG_private, &(page)->flags) |
187 | #define __ClearPagePrivate(page) __clear_bit(PG_private, &(page)->flags) | 190 | #define __ClearPagePrivate(page) __clear_bit(PG_private, &(page)->flags) |
188 | 191 | ||
192 | /* | ||
193 | * Only test-and-set exist for PG_writeback. The unconditional operators are | ||
194 | * risky: they bypass page accounting. | ||
195 | */ | ||
189 | #define PageWriteback(page) test_bit(PG_writeback, &(page)->flags) | 196 | #define PageWriteback(page) test_bit(PG_writeback, &(page)->flags) |
190 | #define SetPageWriteback(page) \ | 197 | #define TestSetPageWriteback(page) test_and_set_bit(PG_writeback, \ |
191 | do { \ | 198 | &(page)->flags) |
192 | if (!test_and_set_bit(PG_writeback, \ | 199 | #define TestClearPageWriteback(page) test_and_clear_bit(PG_writeback, \ |
193 | &(page)->flags)) \ | 200 | &(page)->flags) |
194 | inc_zone_page_state(page, NR_WRITEBACK); \ | ||
195 | } while (0) | ||
196 | #define TestSetPageWriteback(page) \ | ||
197 | ({ \ | ||
198 | int ret; \ | ||
199 | ret = test_and_set_bit(PG_writeback, \ | ||
200 | &(page)->flags); \ | ||
201 | if (!ret) \ | ||
202 | inc_zone_page_state(page, NR_WRITEBACK); \ | ||
203 | ret; \ | ||
204 | }) | ||
205 | #define ClearPageWriteback(page) \ | ||
206 | do { \ | ||
207 | if (test_and_clear_bit(PG_writeback, \ | ||
208 | &(page)->flags)) \ | ||
209 | dec_zone_page_state(page, NR_WRITEBACK); \ | ||
210 | } while (0) | ||
211 | #define TestClearPageWriteback(page) \ | ||
212 | ({ \ | ||
213 | int ret; \ | ||
214 | ret = test_and_clear_bit(PG_writeback, \ | ||
215 | &(page)->flags); \ | ||
216 | if (ret) \ | ||
217 | dec_zone_page_state(page, NR_WRITEBACK); \ | ||
218 | ret; \ | ||
219 | }) | ||
220 | 201 | ||
221 | #define PageBuddy(page) test_bit(PG_buddy, &(page)->flags) | 202 | #define PageBuddy(page) test_bit(PG_buddy, &(page)->flags) |
222 | #define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags) | 203 | #define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags) |
@@ -226,6 +207,10 @@ static inline void SetPageUptodate(struct page *page) | |||
226 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) | 207 | #define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags) |
227 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) | 208 | #define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags) |
228 | 209 | ||
210 | #define PageReadahead(page) test_bit(PG_readahead, &(page)->flags) | ||
211 | #define SetPageReadahead(page) set_bit(PG_readahead, &(page)->flags) | ||
212 | #define ClearPageReadahead(page) clear_bit(PG_readahead, &(page)->flags) | ||
213 | |||
229 | #define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags) | 214 | #define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags) |
230 | #define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags) | 215 | #define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags) |
231 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) | 216 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 2c7add169539..b15c6498fe67 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -495,6 +495,8 @@ | |||
495 | 495 | ||
496 | #define PCI_VENDOR_ID_AMD 0x1022 | 496 | #define PCI_VENDOR_ID_AMD 0x1022 |
497 | #define PCI_DEVICE_ID_AMD_K8_NB 0x1100 | 497 | #define PCI_DEVICE_ID_AMD_K8_NB 0x1100 |
498 | #define PCI_DEVICE_ID_AMD_K8_NB_ADDRMAP 0x1101 | ||
499 | #define PCI_DEVICE_ID_AMD_K8_NB_MEMCTL 0x1102 | ||
498 | #define PCI_DEVICE_ID_AMD_K8_NB_MISC 0x1103 | 500 | #define PCI_DEVICE_ID_AMD_K8_NB_MISC 0x1103 |
499 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 501 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
500 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 502 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
@@ -2209,6 +2211,7 @@ | |||
2209 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 | 2211 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 |
2210 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 | 2212 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 |
2211 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 | 2213 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 |
2214 | #define PCI_DEVICE_ID_INTEL_3000_HB 0x2778 | ||
2212 | #define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0 | 2215 | #define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0 |
2213 | #define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2 | 2216 | #define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2 |
2214 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 | 2217 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 2735b7cadd20..ad3cc2eb0d34 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -101,6 +101,7 @@ struct pm_dev | |||
101 | */ | 101 | */ |
102 | extern void (*pm_idle)(void); | 102 | extern void (*pm_idle)(void); |
103 | extern void (*pm_power_off)(void); | 103 | extern void (*pm_power_off)(void); |
104 | extern void (*pm_power_off_prepare)(void); | ||
104 | 105 | ||
105 | typedef int __bitwise suspend_state_t; | 106 | typedef int __bitwise suspend_state_t; |
106 | 107 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 731edaca8ffd..33b9b4841ee7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -345,6 +345,27 @@ typedef unsigned long mm_counter_t; | |||
345 | (mm)->hiwater_vm = (mm)->total_vm; \ | 345 | (mm)->hiwater_vm = (mm)->total_vm; \ |
346 | } while (0) | 346 | } while (0) |
347 | 347 | ||
348 | extern void set_dumpable(struct mm_struct *mm, int value); | ||
349 | extern int get_dumpable(struct mm_struct *mm); | ||
350 | |||
351 | /* mm flags */ | ||
352 | /* dumpable bits */ | ||
353 | #define MMF_DUMPABLE 0 /* core dump is permitted */ | ||
354 | #define MMF_DUMP_SECURELY 1 /* core file is readable only by root */ | ||
355 | #define MMF_DUMPABLE_BITS 2 | ||
356 | |||
357 | /* coredump filter bits */ | ||
358 | #define MMF_DUMP_ANON_PRIVATE 2 | ||
359 | #define MMF_DUMP_ANON_SHARED 3 | ||
360 | #define MMF_DUMP_MAPPED_PRIVATE 4 | ||
361 | #define MMF_DUMP_MAPPED_SHARED 5 | ||
362 | #define MMF_DUMP_FILTER_SHIFT MMF_DUMPABLE_BITS | ||
363 | #define MMF_DUMP_FILTER_BITS 4 | ||
364 | #define MMF_DUMP_FILTER_MASK \ | ||
365 | (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT) | ||
366 | #define MMF_DUMP_FILTER_DEFAULT \ | ||
367 | ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED)) | ||
368 | |||
348 | struct mm_struct { | 369 | struct mm_struct { |
349 | struct vm_area_struct * mmap; /* list of VMAs */ | 370 | struct vm_area_struct * mmap; /* list of VMAs */ |
350 | struct rb_root mm_rb; | 371 | struct rb_root mm_rb; |
@@ -402,7 +423,7 @@ struct mm_struct { | |||
402 | unsigned int token_priority; | 423 | unsigned int token_priority; |
403 | unsigned int last_interval; | 424 | unsigned int last_interval; |
404 | 425 | ||
405 | unsigned char dumpable:2; | 426 | unsigned long flags; /* Must use atomic bitops to access the bits */ |
406 | 427 | ||
407 | /* coredumping support */ | 428 | /* coredumping support */ |
408 | int core_waiters; | 429 | int core_waiters; |
@@ -1327,6 +1348,13 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1327 | #endif | 1348 | #endif |
1328 | 1349 | ||
1329 | extern unsigned long long sched_clock(void); | 1350 | extern unsigned long long sched_clock(void); |
1351 | |||
1352 | /* | ||
1353 | * For kernel-internal use: high-speed (but slightly incorrect) per-cpu | ||
1354 | * clock constructed from sched_clock(): | ||
1355 | */ | ||
1356 | extern unsigned long long cpu_clock(int cpu); | ||
1357 | |||
1330 | extern unsigned long long | 1358 | extern unsigned long long |
1331 | task_sched_runtime(struct task_struct *task); | 1359 | task_sched_runtime(struct task_struct *task); |
1332 | 1360 | ||
diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h index 210549ba4ef4..f6a3a951b79e 100644 --- a/include/linux/spinlock_types.h +++ b/include/linux/spinlock_types.h | |||
@@ -9,14 +9,14 @@ | |||
9 | * Released under the General Public License (GPL). | 9 | * Released under the General Public License (GPL). |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/lockdep.h> | ||
13 | |||
14 | #if defined(CONFIG_SMP) | 12 | #if defined(CONFIG_SMP) |
15 | # include <asm/spinlock_types.h> | 13 | # include <asm/spinlock_types.h> |
16 | #else | 14 | #else |
17 | # include <linux/spinlock_types_up.h> | 15 | # include <linux/spinlock_types_up.h> |
18 | #endif | 16 | #endif |
19 | 17 | ||
18 | #include <linux/lockdep.h> | ||
19 | |||
20 | typedef struct { | 20 | typedef struct { |
21 | raw_spinlock_t raw_lock; | 21 | raw_spinlock_t raw_lock; |
22 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) | 22 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) |
diff --git a/include/linux/spinlock_types_up.h b/include/linux/spinlock_types_up.h index 27644af20b7c..04135b0e198e 100644 --- a/include/linux/spinlock_types_up.h +++ b/include/linux/spinlock_types_up.h | |||
@@ -12,14 +12,10 @@ | |||
12 | * Released under the General Public License (GPL). | 12 | * Released under the General Public License (GPL). |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #if defined(CONFIG_DEBUG_SPINLOCK) || \ | 15 | #ifdef CONFIG_DEBUG_SPINLOCK |
16 | defined(CONFIG_DEBUG_LOCK_ALLOC) | ||
17 | 16 | ||
18 | typedef struct { | 17 | typedef struct { |
19 | volatile unsigned int slock; | 18 | volatile unsigned int slock; |
20 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
21 | struct lockdep_map dep_map; | ||
22 | #endif | ||
23 | } raw_spinlock_t; | 19 | } raw_spinlock_t; |
24 | 20 | ||
25 | #define __RAW_SPIN_LOCK_UNLOCKED { 1 } | 21 | #define __RAW_SPIN_LOCK_UNLOCKED { 1 } |
@@ -34,9 +30,6 @@ typedef struct { } raw_spinlock_t; | |||
34 | 30 | ||
35 | typedef struct { | 31 | typedef struct { |
36 | /* no debug version on UP */ | 32 | /* no debug version on UP */ |
37 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
38 | struct lockdep_map dep_map; | ||
39 | #endif | ||
40 | } raw_rwlock_t; | 33 | } raw_rwlock_t; |
41 | 34 | ||
42 | #define __RAW_RW_LOCK_UNLOCKED { } | 35 | #define __RAW_RW_LOCK_UNLOCKED { } |
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h index 1d2b084c0185..e7fa657d0c49 100644 --- a/include/linux/stacktrace.h +++ b/include/linux/stacktrace.h | |||
@@ -13,7 +13,7 @@ extern void save_stack_trace(struct stack_trace *trace); | |||
13 | extern void print_stack_trace(struct stack_trace *trace, int spaces); | 13 | extern void print_stack_trace(struct stack_trace *trace, int spaces); |
14 | #else | 14 | #else |
15 | # define save_stack_trace(trace) do { } while (0) | 15 | # define save_stack_trace(trace) do { } while (0) |
16 | # define print_stack_trace(trace) do { } while (0) | 16 | # define print_stack_trace(trace, spaces) do { } while (0) |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #endif | 19 | #endif |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 9e340fa23c06..c6b53d181bfa 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/uio.h> | 12 | #include <linux/uio.h> |
13 | #include <asm/byteorder.h> | 13 | #include <asm/byteorder.h> |
14 | #include <linux/scatterlist.h> | 14 | #include <linux/scatterlist.h> |
15 | #include <linux/smp_lock.h> | ||
15 | 16 | ||
16 | /* | 17 | /* |
17 | * Buffer adjustment | 18 | * Buffer adjustment |
@@ -36,6 +37,21 @@ struct xdr_netobj { | |||
36 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); | 37 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); |
37 | 38 | ||
38 | /* | 39 | /* |
40 | * We're still requiring the BKL in the xdr code until it's been | ||
41 | * more carefully audited, at which point this wrapper will become | ||
42 | * unnecessary. | ||
43 | */ | ||
44 | static inline int rpc_call_xdrproc(kxdrproc_t xdrproc, void *rqstp, __be32 *data, void *obj) | ||
45 | { | ||
46 | int ret; | ||
47 | |||
48 | lock_kernel(); | ||
49 | ret = xdrproc(rqstp, data, obj); | ||
50 | unlock_kernel(); | ||
51 | return ret; | ||
52 | } | ||
53 | |||
54 | /* | ||
39 | * Basic structure for transmission/reception of a client XDR message. | 55 | * Basic structure for transmission/reception of a client XDR message. |
40 | * Features a header (for a linear buffer containing RPC headers | 56 | * Features a header (for a linear buffer containing RPC headers |
41 | * and the data payload for short messages), and then an array of | 57 | * and the data payload for short messages), and then an array of |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 9c7cb6430666..e8e6da394c92 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -43,14 +43,19 @@ static inline void pm_restore_console(void) {} | |||
43 | * @prepare: prepare system for hibernation | 43 | * @prepare: prepare system for hibernation |
44 | * @enter: shut down system after state has been saved to disk | 44 | * @enter: shut down system after state has been saved to disk |
45 | * @finish: finish/clean up after state has been reloaded | 45 | * @finish: finish/clean up after state has been reloaded |
46 | * @pre_restore: prepare system for the restoration from a hibernation image | ||
47 | * @restore_cleanup: clean up after a failing image restoration | ||
46 | */ | 48 | */ |
47 | struct hibernation_ops { | 49 | struct hibernation_ops { |
48 | int (*prepare)(void); | 50 | int (*prepare)(void); |
49 | int (*enter)(void); | 51 | int (*enter)(void); |
50 | void (*finish)(void); | 52 | void (*finish)(void); |
53 | int (*pre_restore)(void); | ||
54 | void (*restore_cleanup)(void); | ||
51 | }; | 55 | }; |
52 | 56 | ||
53 | #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) | 57 | #ifdef CONFIG_PM |
58 | #ifdef CONFIG_SOFTWARE_SUSPEND | ||
54 | /* kernel/power/snapshot.c */ | 59 | /* kernel/power/snapshot.c */ |
55 | extern void __register_nosave_region(unsigned long b, unsigned long e, int km); | 60 | extern void __register_nosave_region(unsigned long b, unsigned long e, int km); |
56 | static inline void register_nosave_region(unsigned long b, unsigned long e) | 61 | static inline void register_nosave_region(unsigned long b, unsigned long e) |
@@ -68,16 +73,14 @@ extern unsigned long get_safe_page(gfp_t gfp_mask); | |||
68 | 73 | ||
69 | extern void hibernation_set_ops(struct hibernation_ops *ops); | 74 | extern void hibernation_set_ops(struct hibernation_ops *ops); |
70 | extern int hibernate(void); | 75 | extern int hibernate(void); |
71 | #else | 76 | #else /* CONFIG_SOFTWARE_SUSPEND */ |
72 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} | ||
73 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} | ||
74 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 77 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
75 | static inline void swsusp_set_page_free(struct page *p) {} | 78 | static inline void swsusp_set_page_free(struct page *p) {} |
76 | static inline void swsusp_unset_page_free(struct page *p) {} | 79 | static inline void swsusp_unset_page_free(struct page *p) {} |
77 | 80 | ||
78 | static inline void hibernation_set_ops(struct hibernation_ops *ops) {} | 81 | static inline void hibernation_set_ops(struct hibernation_ops *ops) {} |
79 | static inline int hibernate(void) { return -ENOSYS; } | 82 | static inline int hibernate(void) { return -ENOSYS; } |
80 | #endif /* defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) */ | 83 | #endif /* CONFIG_SOFTWARE_SUSPEND */ |
81 | 84 | ||
82 | void save_processor_state(void); | 85 | void save_processor_state(void); |
83 | void restore_processor_state(void); | 86 | void restore_processor_state(void); |
@@ -85,4 +88,43 @@ struct saved_context; | |||
85 | void __save_processor_state(struct saved_context *ctxt); | 88 | void __save_processor_state(struct saved_context *ctxt); |
86 | void __restore_processor_state(struct saved_context *ctxt); | 89 | void __restore_processor_state(struct saved_context *ctxt); |
87 | 90 | ||
91 | /* kernel/power/main.c */ | ||
92 | extern struct blocking_notifier_head pm_chain_head; | ||
93 | |||
94 | static inline int register_pm_notifier(struct notifier_block *nb) | ||
95 | { | ||
96 | return blocking_notifier_chain_register(&pm_chain_head, nb); | ||
97 | } | ||
98 | |||
99 | static inline int unregister_pm_notifier(struct notifier_block *nb) | ||
100 | { | ||
101 | return blocking_notifier_chain_unregister(&pm_chain_head, nb); | ||
102 | } | ||
103 | |||
104 | #define pm_notifier(fn, pri) { \ | ||
105 | static struct notifier_block fn##_nb = \ | ||
106 | { .notifier_call = fn, .priority = pri }; \ | ||
107 | register_pm_notifier(&fn##_nb); \ | ||
108 | } | ||
109 | #else /* CONFIG_PM */ | ||
110 | |||
111 | static inline int register_pm_notifier(struct notifier_block *nb) | ||
112 | { | ||
113 | return 0; | ||
114 | } | ||
115 | |||
116 | static inline int unregister_pm_notifier(struct notifier_block *nb) | ||
117 | { | ||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | ||
122 | #endif /* CONFIG_PM */ | ||
123 | |||
124 | #if !defined CONFIG_SOFTWARE_SUSPEND || !defined(CONFIG_PM) | ||
125 | static inline void register_nosave_region(unsigned long b, unsigned long e) | ||
126 | { | ||
127 | } | ||
128 | #endif | ||
129 | |||
88 | #endif /* _LINUX_SWSUSP_H */ | 130 | #endif /* _LINUX_SWSUSP_H */ |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index bb320573bb9e..1101b0ce878f 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -49,7 +49,7 @@ static inline struct user_namespace *copy_user_ns(int flags, | |||
49 | if (flags & CLONE_NEWUSER) | 49 | if (flags & CLONE_NEWUSER) |
50 | return ERR_PTR(-EINVAL); | 50 | return ERR_PTR(-EINVAL); |
51 | 51 | ||
52 | return NULL; | 52 | return old_ns; |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline void put_user_ns(struct user_namespace *ns) | 55 | static inline void put_user_ns(struct user_namespace *ns) |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index b6eaca122db8..decdda546829 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -5,6 +5,22 @@ | |||
5 | #include <net/netlink.h> | 5 | #include <net/netlink.h> |
6 | 6 | ||
7 | /** | 7 | /** |
8 | * struct genl_multicast_group - generic netlink multicast group | ||
9 | * @name: name of the multicast group, names are per-family | ||
10 | * @id: multicast group ID, assigned by the core, to use with | ||
11 | * genlmsg_multicast(). | ||
12 | * @list: list entry for linking | ||
13 | * @family: pointer to family, need not be set before registering | ||
14 | */ | ||
15 | struct genl_multicast_group | ||
16 | { | ||
17 | struct genl_family *family; /* private */ | ||
18 | struct list_head list; /* private */ | ||
19 | char name[GENL_NAMSIZ]; | ||
20 | u32 id; | ||
21 | }; | ||
22 | |||
23 | /** | ||
8 | * struct genl_family - generic netlink family | 24 | * struct genl_family - generic netlink family |
9 | * @id: protocol family idenfitier | 25 | * @id: protocol family idenfitier |
10 | * @hdrsize: length of user specific header in bytes | 26 | * @hdrsize: length of user specific header in bytes |
@@ -14,6 +30,7 @@ | |||
14 | * @attrbuf: buffer to store parsed attributes | 30 | * @attrbuf: buffer to store parsed attributes |
15 | * @ops_list: list of all assigned operations | 31 | * @ops_list: list of all assigned operations |
16 | * @family_list: family list | 32 | * @family_list: family list |
33 | * @mcast_groups: multicast groups list | ||
17 | */ | 34 | */ |
18 | struct genl_family | 35 | struct genl_family |
19 | { | 36 | { |
@@ -25,6 +42,7 @@ struct genl_family | |||
25 | struct nlattr ** attrbuf; /* private */ | 42 | struct nlattr ** attrbuf; /* private */ |
26 | struct list_head ops_list; /* private */ | 43 | struct list_head ops_list; /* private */ |
27 | struct list_head family_list; /* private */ | 44 | struct list_head family_list; /* private */ |
45 | struct list_head mcast_groups; /* private */ | ||
28 | }; | 46 | }; |
29 | 47 | ||
30 | /** | 48 | /** |
@@ -73,6 +91,10 @@ extern int genl_register_family(struct genl_family *family); | |||
73 | extern int genl_unregister_family(struct genl_family *family); | 91 | extern int genl_unregister_family(struct genl_family *family); |
74 | extern int genl_register_ops(struct genl_family *, struct genl_ops *ops); | 92 | extern int genl_register_ops(struct genl_family *, struct genl_ops *ops); |
75 | extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops); | 93 | extern int genl_unregister_ops(struct genl_family *, struct genl_ops *ops); |
94 | extern int genl_register_mc_group(struct genl_family *family, | ||
95 | struct genl_multicast_group *grp); | ||
96 | extern void genl_unregister_mc_group(struct genl_family *family, | ||
97 | struct genl_multicast_group *grp); | ||
76 | 98 | ||
77 | extern struct sock *genl_sock; | 99 | extern struct sock *genl_sock; |
78 | 100 | ||