diff options
36 files changed, 203 insertions, 105 deletions
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 881e6dd03aea..27809357da58 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -5,6 +5,8 @@ | |||
5 | *.css | 5 | *.css |
6 | *.dvi | 6 | *.dvi |
7 | *.eps | 7 | *.eps |
8 | *.fw.gen.S | ||
9 | *.fw | ||
8 | *.gif | 10 | *.gif |
9 | *.grep | 11 | *.grep |
10 | *.grp | 12 | *.grp |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index 8a2a53b33616..bb959fbab2dc 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
@@ -580,13 +580,15 @@ int atari_keyb_init(void) | |||
580 | do { | 580 | do { |
581 | /* reset IKBD ACIA */ | 581 | /* reset IKBD ACIA */ |
582 | acia.key_ctrl = ACIA_RESET | | 582 | acia.key_ctrl = ACIA_RESET | |
583 | (atari_switches & ATARI_SWITCH_IKBD) ? ACIA_RHTID : 0; | 583 | ((atari_switches & ATARI_SWITCH_IKBD) ? |
584 | ACIA_RHTID : 0); | ||
584 | (void)acia.key_ctrl; | 585 | (void)acia.key_ctrl; |
585 | (void)acia.key_data; | 586 | (void)acia.key_data; |
586 | 587 | ||
587 | /* reset MIDI ACIA */ | 588 | /* reset MIDI ACIA */ |
588 | acia.mid_ctrl = ACIA_RESET | | 589 | acia.mid_ctrl = ACIA_RESET | |
589 | (atari_switches & ATARI_SWITCH_MIDI) ? ACIA_RHTID : 0; | 590 | ((atari_switches & ATARI_SWITCH_MIDI) ? |
591 | ACIA_RHTID : 0); | ||
590 | (void)acia.mid_ctrl; | 592 | (void)acia.mid_ctrl; |
591 | (void)acia.mid_data; | 593 | (void)acia.mid_data; |
592 | 594 | ||
@@ -599,7 +601,8 @@ int atari_keyb_init(void) | |||
599 | ACIA_RHTID : ACIA_RLTID); | 601 | ACIA_RHTID : ACIA_RLTID); |
600 | 602 | ||
601 | acia.mid_ctrl = ACIA_DIV16 | ACIA_D8N1S | | 603 | acia.mid_ctrl = ACIA_DIV16 | ACIA_D8N1S | |
602 | (atari_switches & ATARI_SWITCH_MIDI) ? ACIA_RHTID : 0; | 604 | ((atari_switches & ATARI_SWITCH_MIDI) ? |
605 | ACIA_RHTID : 0); | ||
603 | 606 | ||
604 | /* make sure the interrupt line is up */ | 607 | /* make sure the interrupt line is up */ |
605 | } while ((mfp.par_dt_reg & 0x10) == 0); | 608 | } while ((mfp.par_dt_reg & 0x10) == 0); |
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 69ff671498e5..12c04c5e558b 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c | |||
@@ -104,7 +104,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | |||
104 | buf->count -= reclen; | 104 | buf->count -= reclen; |
105 | return 0; | 105 | return 0; |
106 | Efault: | 106 | Efault: |
107 | buffer->error = -EFAULT; | 107 | buf->error = -EFAULT; |
108 | return -EFAULT; | 108 | return -EFAULT; |
109 | } | 109 | } |
110 | 110 | ||
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 7201752cf934..a8180e546a48 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -50,27 +50,24 @@ struct seq_file; | |||
50 | void smp_bogo(struct seq_file *); | 50 | void smp_bogo(struct seq_file *); |
51 | void smp_info(struct seq_file *); | 51 | void smp_info(struct seq_file *); |
52 | 52 | ||
53 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) | 53 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, cpumask_t, unsigned long, unsigned long, unsigned long, unsigned long) |
54 | BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void) | 54 | BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void) |
55 | BTFIXUPDEF_BLACKBOX(hard_smp_processor_id) | 55 | BTFIXUPDEF_BLACKBOX(hard_smp_processor_id) |
56 | BTFIXUPDEF_BLACKBOX(load_current) | 56 | BTFIXUPDEF_BLACKBOX(load_current) |
57 | 57 | ||
58 | #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5) | 58 | #define smp_cross_call(func,mask,arg1,arg2,arg3,arg4) BTFIXUP_CALL(smp_cross_call)(func,mask,arg1,arg2,arg3,arg4) |
59 | 59 | ||
60 | static inline void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); } | 60 | static inline void xc0(smpfunc_t func) { smp_cross_call(func, cpu_online_map, 0, 0, 0, 0); } |
61 | static inline void xc1(smpfunc_t func, unsigned long arg1) | 61 | static inline void xc1(smpfunc_t func, unsigned long arg1) |
62 | { smp_cross_call(func, arg1, 0, 0, 0, 0); } | 62 | { smp_cross_call(func, cpu_online_map, arg1, 0, 0, 0); } |
63 | static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) | 63 | static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) |
64 | { smp_cross_call(func, arg1, arg2, 0, 0, 0); } | 64 | { smp_cross_call(func, cpu_online_map, arg1, arg2, 0, 0); } |
65 | static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 65 | static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
66 | unsigned long arg3) | 66 | unsigned long arg3) |
67 | { smp_cross_call(func, arg1, arg2, arg3, 0, 0); } | 67 | { smp_cross_call(func, cpu_online_map, arg1, arg2, arg3, 0); } |
68 | static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 68 | static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
69 | unsigned long arg3, unsigned long arg4) | 69 | unsigned long arg3, unsigned long arg4) |
70 | { smp_cross_call(func, arg1, arg2, arg3, arg4, 0); } | 70 | { smp_cross_call(func, cpu_online_map, arg1, arg2, arg3, arg4); } |
71 | static inline void xc5(smpfunc_t func, unsigned long arg1, unsigned long arg2, | ||
72 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | ||
73 | { smp_cross_call(func, arg1, arg2, arg3, arg4, arg5); } | ||
74 | 71 | ||
75 | static inline int smp_call_function(void (*func)(void *info), void *info, int wait) | 72 | static inline int smp_call_function(void (*func)(void *info), void *info, int wait) |
76 | { | 73 | { |
@@ -78,6 +75,14 @@ static inline int smp_call_function(void (*func)(void *info), void *info, int wa | |||
78 | return 0; | 75 | return 0; |
79 | } | 76 | } |
80 | 77 | ||
78 | static inline int smp_call_function_single(int cpuid, void (*func) (void *info), | ||
79 | void *info, int wait) | ||
80 | { | ||
81 | smp_cross_call((smpfunc_t)func, cpumask_of_cpu(cpuid), | ||
82 | (unsigned long) info, 0, 0, 0); | ||
83 | return 0; | ||
84 | } | ||
85 | |||
81 | static inline int cpu_logical_map(int cpu) | 86 | static inline int cpu_logical_map(int cpu) |
82 | { | 87 | { |
83 | return cpu; | 88 | return cpu; |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index cc4c235c4f59..c481d45f97b7 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -70,7 +70,7 @@ struct of_bus { | |||
70 | int *addrc, int *sizec); | 70 | int *addrc, int *sizec); |
71 | int (*map)(u32 *addr, const u32 *range, | 71 | int (*map)(u32 *addr, const u32 *range, |
72 | int na, int ns, int pna); | 72 | int na, int ns, int pna); |
73 | unsigned int (*get_flags)(const u32 *addr); | 73 | unsigned long (*get_flags)(const u32 *addr, unsigned long); |
74 | }; | 74 | }; |
75 | 75 | ||
76 | /* | 76 | /* |
@@ -130,8 +130,10 @@ static int of_bus_default_map(u32 *addr, const u32 *range, | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | static unsigned int of_bus_default_get_flags(const u32 *addr) | 133 | static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long flags) |
134 | { | 134 | { |
135 | if (flags) | ||
136 | return flags; | ||
135 | return IORESOURCE_MEM; | 137 | return IORESOURCE_MEM; |
136 | } | 138 | } |
137 | 139 | ||
@@ -194,17 +196,21 @@ static int of_bus_pci_map(u32 *addr, const u32 *range, | |||
194 | return 0; | 196 | return 0; |
195 | } | 197 | } |
196 | 198 | ||
197 | static unsigned int of_bus_pci_get_flags(const u32 *addr) | 199 | static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags) |
198 | { | 200 | { |
199 | unsigned int flags = 0; | ||
200 | u32 w = addr[0]; | 201 | u32 w = addr[0]; |
201 | 202 | ||
203 | /* For PCI, we override whatever child busses may have used. */ | ||
204 | flags = 0; | ||
202 | switch((w >> 24) & 0x03) { | 205 | switch((w >> 24) & 0x03) { |
203 | case 0x01: | 206 | case 0x01: |
204 | flags |= IORESOURCE_IO; | 207 | flags |= IORESOURCE_IO; |
208 | break; | ||
209 | |||
205 | case 0x02: /* 32 bits */ | 210 | case 0x02: /* 32 bits */ |
206 | case 0x03: /* 64 bits */ | 211 | case 0x03: /* 64 bits */ |
207 | flags |= IORESOURCE_MEM; | 212 | flags |= IORESOURCE_MEM; |
213 | break; | ||
208 | } | 214 | } |
209 | if (w & 0x40000000) | 215 | if (w & 0x40000000) |
210 | flags |= IORESOURCE_PREFETCH; | 216 | flags |= IORESOURCE_PREFETCH; |
@@ -362,10 +368,11 @@ static void __init build_device_resources(struct of_device *op, | |||
362 | int pna, pns; | 368 | int pna, pns; |
363 | 369 | ||
364 | size = of_read_addr(reg + na, ns); | 370 | size = of_read_addr(reg + na, ns); |
365 | flags = bus->get_flags(reg); | ||
366 | 371 | ||
367 | memcpy(addr, reg, na * 4); | 372 | memcpy(addr, reg, na * 4); |
368 | 373 | ||
374 | flags = bus->get_flags(reg, 0); | ||
375 | |||
369 | /* If the immediate parent has no ranges property to apply, | 376 | /* If the immediate parent has no ranges property to apply, |
370 | * just use a 1<->1 mapping. | 377 | * just use a 1<->1 mapping. |
371 | */ | 378 | */ |
@@ -393,6 +400,8 @@ static void __init build_device_resources(struct of_device *op, | |||
393 | dna, dns, pna)) | 400 | dna, dns, pna)) |
394 | break; | 401 | break; |
395 | 402 | ||
403 | flags = pbus->get_flags(addr, flags); | ||
404 | |||
396 | dna = pna; | 405 | dna = pna; |
397 | dns = pns; | 406 | dns = pns; |
398 | dbus = pbus; | 407 | dbus = pbus; |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index dfde77ff0848..69596402a500 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -262,8 +262,9 @@ static struct smp_funcall { | |||
262 | static DEFINE_SPINLOCK(cross_call_lock); | 262 | static DEFINE_SPINLOCK(cross_call_lock); |
263 | 263 | ||
264 | /* Cross calls must be serialized, at least currently. */ | 264 | /* Cross calls must be serialized, at least currently. */ |
265 | void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 265 | static void smp4d_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1, |
266 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | 266 | unsigned long arg2, unsigned long arg3, |
267 | unsigned long arg4) | ||
267 | { | 268 | { |
268 | if(smp_processors_ready) { | 269 | if(smp_processors_ready) { |
269 | register int high = smp_highest_cpu; | 270 | register int high = smp_highest_cpu; |
@@ -278,7 +279,7 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
278 | register unsigned long a2 asm("i2") = arg2; | 279 | register unsigned long a2 asm("i2") = arg2; |
279 | register unsigned long a3 asm("i3") = arg3; | 280 | register unsigned long a3 asm("i3") = arg3; |
280 | register unsigned long a4 asm("i4") = arg4; | 281 | register unsigned long a4 asm("i4") = arg4; |
281 | register unsigned long a5 asm("i5") = arg5; | 282 | register unsigned long a5 asm("i5") = 0; |
282 | 283 | ||
283 | __asm__ __volatile__( | 284 | __asm__ __volatile__( |
284 | "std %0, [%6]\n\t" | 285 | "std %0, [%6]\n\t" |
@@ -290,11 +291,10 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
290 | 291 | ||
291 | /* Init receive/complete mapping, plus fire the IPI's off. */ | 292 | /* Init receive/complete mapping, plus fire the IPI's off. */ |
292 | { | 293 | { |
293 | cpumask_t mask; | ||
294 | register int i; | 294 | register int i; |
295 | 295 | ||
296 | mask = cpumask_of_cpu(hard_smp4d_processor_id()); | 296 | cpu_clear(smp_processor_id(), mask); |
297 | cpus_andnot(mask, cpu_online_map, mask); | 297 | cpus_and(mask, cpu_online_map, mask); |
298 | for(i = 0; i <= high; i++) { | 298 | for(i = 0; i <= high; i++) { |
299 | if (cpu_isset(i, mask)) { | 299 | if (cpu_isset(i, mask)) { |
300 | ccall_info.processors_in[i] = 0; | 300 | ccall_info.processors_in[i] = 0; |
@@ -309,12 +309,16 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
309 | 309 | ||
310 | i = 0; | 310 | i = 0; |
311 | do { | 311 | do { |
312 | if (!cpu_isset(i, mask)) | ||
313 | continue; | ||
312 | while(!ccall_info.processors_in[i]) | 314 | while(!ccall_info.processors_in[i]) |
313 | barrier(); | 315 | barrier(); |
314 | } while(++i <= high); | 316 | } while(++i <= high); |
315 | 317 | ||
316 | i = 0; | 318 | i = 0; |
317 | do { | 319 | do { |
320 | if (!cpu_isset(i, mask)) | ||
321 | continue; | ||
318 | while(!ccall_info.processors_out[i]) | 322 | while(!ccall_info.processors_out[i]) |
319 | barrier(); | 323 | barrier(); |
320 | } while(++i <= high); | 324 | } while(++i <= high); |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 406ac1abc83a..a14a76ac7f36 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -244,9 +244,9 @@ static struct smp_funcall { | |||
244 | static DEFINE_SPINLOCK(cross_call_lock); | 244 | static DEFINE_SPINLOCK(cross_call_lock); |
245 | 245 | ||
246 | /* Cross calls must be serialized, at least currently. */ | 246 | /* Cross calls must be serialized, at least currently. */ |
247 | static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | 247 | static void smp4m_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1, |
248 | unsigned long arg2, unsigned long arg3, | 248 | unsigned long arg2, unsigned long arg3, |
249 | unsigned long arg4, unsigned long arg5) | 249 | unsigned long arg4) |
250 | { | 250 | { |
251 | register int ncpus = SUN4M_NCPUS; | 251 | register int ncpus = SUN4M_NCPUS; |
252 | unsigned long flags; | 252 | unsigned long flags; |
@@ -259,14 +259,14 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | |||
259 | ccall_info.arg2 = arg2; | 259 | ccall_info.arg2 = arg2; |
260 | ccall_info.arg3 = arg3; | 260 | ccall_info.arg3 = arg3; |
261 | ccall_info.arg4 = arg4; | 261 | ccall_info.arg4 = arg4; |
262 | ccall_info.arg5 = arg5; | 262 | ccall_info.arg5 = 0; |
263 | 263 | ||
264 | /* Init receive/complete mapping, plus fire the IPI's off. */ | 264 | /* Init receive/complete mapping, plus fire the IPI's off. */ |
265 | { | 265 | { |
266 | cpumask_t mask = cpu_online_map; | ||
267 | register int i; | 266 | register int i; |
268 | 267 | ||
269 | cpu_clear(smp_processor_id(), mask); | 268 | cpu_clear(smp_processor_id(), mask); |
269 | cpus_and(mask, cpu_online_map, mask); | ||
270 | for(i = 0; i < ncpus; i++) { | 270 | for(i = 0; i < ncpus; i++) { |
271 | if (cpu_isset(i, mask)) { | 271 | if (cpu_isset(i, mask)) { |
272 | ccall_info.processors_in[i] = 0; | 272 | ccall_info.processors_in[i] = 0; |
@@ -284,12 +284,16 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | |||
284 | 284 | ||
285 | i = 0; | 285 | i = 0; |
286 | do { | 286 | do { |
287 | if (!cpu_isset(i, mask)) | ||
288 | continue; | ||
287 | while(!ccall_info.processors_in[i]) | 289 | while(!ccall_info.processors_in[i]) |
288 | barrier(); | 290 | barrier(); |
289 | } while(++i < ncpus); | 291 | } while(++i < ncpus); |
290 | 292 | ||
291 | i = 0; | 293 | i = 0; |
292 | do { | 294 | do { |
295 | if (!cpu_isset(i, mask)) | ||
296 | continue; | ||
293 | while(!ccall_info.processors_out[i]) | 297 | while(!ccall_info.processors_out[i]) |
294 | barrier(); | 298 | barrier(); |
295 | } while(++i < ncpus); | 299 | } while(++i < ncpus); |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index f8b50cbf4bf7..f845f150f565 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -96,7 +96,7 @@ struct of_bus { | |||
96 | int *addrc, int *sizec); | 96 | int *addrc, int *sizec); |
97 | int (*map)(u32 *addr, const u32 *range, | 97 | int (*map)(u32 *addr, const u32 *range, |
98 | int na, int ns, int pna); | 98 | int na, int ns, int pna); |
99 | unsigned int (*get_flags)(const u32 *addr); | 99 | unsigned long (*get_flags)(const u32 *addr, unsigned long); |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* | 102 | /* |
@@ -156,8 +156,10 @@ static int of_bus_default_map(u32 *addr, const u32 *range, | |||
156 | return 0; | 156 | return 0; |
157 | } | 157 | } |
158 | 158 | ||
159 | static unsigned int of_bus_default_get_flags(const u32 *addr) | 159 | static unsigned long of_bus_default_get_flags(const u32 *addr, unsigned long flags) |
160 | { | 160 | { |
161 | if (flags) | ||
162 | return flags; | ||
161 | return IORESOURCE_MEM; | 163 | return IORESOURCE_MEM; |
162 | } | 164 | } |
163 | 165 | ||
@@ -249,17 +251,21 @@ static int of_bus_pci_map(u32 *addr, const u32 *range, | |||
249 | return 0; | 251 | return 0; |
250 | } | 252 | } |
251 | 253 | ||
252 | static unsigned int of_bus_pci_get_flags(const u32 *addr) | 254 | static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags) |
253 | { | 255 | { |
254 | unsigned int flags = 0; | ||
255 | u32 w = addr[0]; | 256 | u32 w = addr[0]; |
256 | 257 | ||
258 | /* For PCI, we override whatever child busses may have used. */ | ||
259 | flags = 0; | ||
257 | switch((w >> 24) & 0x03) { | 260 | switch((w >> 24) & 0x03) { |
258 | case 0x01: | 261 | case 0x01: |
259 | flags |= IORESOURCE_IO; | 262 | flags |= IORESOURCE_IO; |
263 | break; | ||
264 | |||
260 | case 0x02: /* 32 bits */ | 265 | case 0x02: /* 32 bits */ |
261 | case 0x03: /* 64 bits */ | 266 | case 0x03: /* 64 bits */ |
262 | flags |= IORESOURCE_MEM; | 267 | flags |= IORESOURCE_MEM; |
268 | break; | ||
263 | } | 269 | } |
264 | if (w & 0x40000000) | 270 | if (w & 0x40000000) |
265 | flags |= IORESOURCE_PREFETCH; | 271 | flags |= IORESOURCE_PREFETCH; |
@@ -478,10 +484,10 @@ static void __init build_device_resources(struct of_device *op, | |||
478 | int pna, pns; | 484 | int pna, pns; |
479 | 485 | ||
480 | size = of_read_addr(reg + na, ns); | 486 | size = of_read_addr(reg + na, ns); |
481 | flags = bus->get_flags(reg); | ||
482 | |||
483 | memcpy(addr, reg, na * 4); | 487 | memcpy(addr, reg, na * 4); |
484 | 488 | ||
489 | flags = bus->get_flags(addr, 0); | ||
490 | |||
485 | if (use_1to1_mapping(pp)) { | 491 | if (use_1to1_mapping(pp)) { |
486 | result = of_read_addr(addr, na); | 492 | result = of_read_addr(addr, na); |
487 | goto build_res; | 493 | goto build_res; |
@@ -506,6 +512,8 @@ static void __init build_device_resources(struct of_device *op, | |||
506 | dna, dns, pna)) | 512 | dna, dns, pna)) |
507 | break; | 513 | break; |
508 | 514 | ||
515 | flags = pbus->get_flags(addr, flags); | ||
516 | |||
509 | dna = pna; | 517 | dna = pna; |
510 | dns = pns; | 518 | dns = pns; |
511 | dbus = pbus; | 519 | dbus = pbus; |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index b4aeb0f696dc..a41df7bef035 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -1843,7 +1843,7 @@ static int pavail_rescan_ents __initdata; | |||
1843 | * memory list again, and make sure it provides at least as much | 1843 | * memory list again, and make sure it provides at least as much |
1844 | * memory as 'pavail' does. | 1844 | * memory as 'pavail' does. |
1845 | */ | 1845 | */ |
1846 | static void setup_valid_addr_bitmap_from_pavail(void) | 1846 | static void __init setup_valid_addr_bitmap_from_pavail(void) |
1847 | { | 1847 | { |
1848 | int i; | 1848 | int i; |
1849 | 1849 | ||
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 5807d1bc73f7..8791fc55e715 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -128,8 +128,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
128 | pr = pci_find_parent_resource(dev, r); | 128 | pr = pci_find_parent_resource(dev, r); |
129 | if (!r->start || !pr || | 129 | if (!r->start || !pr || |
130 | request_resource(pr, r) < 0) { | 130 | request_resource(pr, r) < 0) { |
131 | dev_err(&dev->dev, "BAR %d: can't " | 131 | dev_err(&dev->dev, "BAR %d: can't allocate resource\n", idx); |
132 | "allocate resource\n", idx); | ||
133 | /* | 132 | /* |
134 | * Something is wrong with the region. | 133 | * Something is wrong with the region. |
135 | * Invalidate the resource to prevent | 134 | * Invalidate the resource to prevent |
@@ -164,15 +163,13 @@ static void __init pcibios_allocate_resources(int pass) | |||
164 | else | 163 | else |
165 | disabled = !(command & PCI_COMMAND_MEMORY); | 164 | disabled = !(command & PCI_COMMAND_MEMORY); |
166 | if (pass == disabled) { | 165 | if (pass == disabled) { |
167 | dev_dbg(&dev->dev, "resource %#08llx-%#08llx " | 166 | dev_dbg(&dev->dev, "resource %#08llx-%#08llx (f=%lx, d=%d, p=%d)\n", |
168 | "(f=%lx, d=%d, p=%d)\n", | ||
169 | (unsigned long long) r->start, | 167 | (unsigned long long) r->start, |
170 | (unsigned long long) r->end, | 168 | (unsigned long long) r->end, |
171 | r->flags, disabled, pass); | 169 | r->flags, disabled, pass); |
172 | pr = pci_find_parent_resource(dev, r); | 170 | pr = pci_find_parent_resource(dev, r); |
173 | if (!pr || request_resource(pr, r) < 0) { | 171 | if (!pr || request_resource(pr, r) < 0) { |
174 | dev_err(&dev->dev, "BAR %d: can't " | 172 | dev_err(&dev->dev, "BAR %d: can't allocate resource\n", idx); |
175 | "allocate resource\n", idx); | ||
176 | /* We'll assign a new address later */ | 173 | /* We'll assign a new address later */ |
177 | r->end -= r->start; | 174 | r->end -= r->start; |
178 | r->start = 0; | 175 | r->start = 0; |
diff --git a/block/cmd-filter.c b/block/cmd-filter.c index 1d4026206ac2..228b6447e89f 100644 --- a/block/cmd-filter.c +++ b/block/cmd-filter.c | |||
@@ -223,6 +223,7 @@ int blk_register_filter(struct gendisk *disk) | |||
223 | 223 | ||
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
226 | EXPORT_SYMBOL(blk_register_filter); | ||
226 | 227 | ||
227 | void blk_unregister_filter(struct gendisk *disk) | 228 | void blk_unregister_filter(struct gendisk *disk) |
228 | { | 229 | { |
@@ -231,4 +232,4 @@ void blk_unregister_filter(struct gendisk *disk) | |||
231 | kobject_put(&filter->kobj); | 232 | kobject_put(&filter->kobj); |
232 | kobject_put(disk->holder_dir->parent); | 233 | kobject_put(disk->holder_dir->parent); |
233 | } | 234 | } |
234 | 235 | EXPORT_SYMBOL(blk_unregister_filter); | |
diff --git a/block/genhd.c b/block/genhd.c index 656c2c7abf99..e0ce23ac2ece 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -190,7 +190,6 @@ void add_disk(struct gendisk *disk) | |||
190 | disk->minors, NULL, exact_match, exact_lock, disk); | 190 | disk->minors, NULL, exact_match, exact_lock, disk); |
191 | register_disk(disk); | 191 | register_disk(disk); |
192 | blk_register_queue(disk); | 192 | blk_register_queue(disk); |
193 | blk_register_filter(disk); | ||
194 | 193 | ||
195 | bdi = &disk->queue->backing_dev_info; | 194 | bdi = &disk->queue->backing_dev_info; |
196 | bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor)); | 195 | bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor)); |
@@ -203,7 +202,6 @@ EXPORT_SYMBOL(del_gendisk); /* in partitions/check.c */ | |||
203 | 202 | ||
204 | void unlink_gendisk(struct gendisk *disk) | 203 | void unlink_gendisk(struct gendisk *disk) |
205 | { | 204 | { |
206 | blk_unregister_filter(disk); | ||
207 | sysfs_remove_link(&disk->dev.kobj, "bdi"); | 205 | sysfs_remove_link(&disk->dev.kobj, "bdi"); |
208 | bdi_unregister(&disk->queue->backing_dev_info); | 206 | bdi_unregister(&disk->queue->backing_dev_info); |
209 | blk_unregister_queue(disk); | 207 | blk_unregister_queue(disk); |
@@ -309,7 +307,7 @@ static void *part_start(struct seq_file *part, loff_t *pos) | |||
309 | loff_t k = *pos; | 307 | loff_t k = *pos; |
310 | 308 | ||
311 | if (!k) | 309 | if (!k) |
312 | seq_puts(part, "major minor #blocks name\n\n"); | 310 | part->private = (void *)1LU; /* tell show to print header */ |
313 | 311 | ||
314 | mutex_lock(&block_class_lock); | 312 | mutex_lock(&block_class_lock); |
315 | dev = class_find_device(&block_class, NULL, &k, find_start); | 313 | dev = class_find_device(&block_class, NULL, &k, find_start); |
@@ -351,6 +349,17 @@ static int show_partition(struct seq_file *part, void *v) | |||
351 | int n; | 349 | int n; |
352 | char buf[BDEVNAME_SIZE]; | 350 | char buf[BDEVNAME_SIZE]; |
353 | 351 | ||
352 | /* | ||
353 | * Print header if start told us to do. This is to preserve | ||
354 | * the original behavior of not printing header if no | ||
355 | * partition exists. This hackery will be removed later with | ||
356 | * class iteration clean up. | ||
357 | */ | ||
358 | if (part->private) { | ||
359 | seq_puts(part, "major minor #blocks name\n\n"); | ||
360 | part->private = NULL; | ||
361 | } | ||
362 | |||
354 | /* Don't show non-partitionable removeable devices or empty devices */ | 363 | /* Don't show non-partitionable removeable devices or empty devices */ |
355 | if (!get_capacity(sgp) || | 364 | if (!get_capacity(sgp) || |
356 | (sgp->minors == 1 && (sgp->flags & GENHD_FL_REMOVABLE))) | 365 | (sgp->minors == 1 && (sgp->flags & GENHD_FL_REMOVABLE))) |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index d3f0a62efcc1..ee68ac54c0d4 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -138,7 +138,7 @@ static struct dmi_system_id __cpuinitdata processor_idle_dmi_table[] = { | |||
138 | { | 138 | { |
139 | set_no_mwait, "Extensa 5220", { | 139 | set_no_mwait, "Extensa 5220", { |
140 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), | 140 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), |
141 | DMI_MATCH(DMI_SYS_VENDOR, "ACER"), | 141 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
142 | DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), | 142 | DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), |
143 | DMI_MATCH(DMI_BOARD_NAME, "Columbia") }, NULL}, | 143 | DMI_MATCH(DMI_BOARD_NAME, "Columbia") }, NULL}, |
144 | {}, | 144 | {}, |
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 3331f88dcfb6..248ab4a7d39f 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c | |||
@@ -223,7 +223,7 @@ static int radeon_do_wait_for_fifo(drm_radeon_private_t * dev_priv, int entries) | |||
223 | return 0; | 223 | return 0; |
224 | DRM_UDELAY(1); | 224 | DRM_UDELAY(1); |
225 | } | 225 | } |
226 | DRM_INFO("wait for fifo failed status : 0x%08X 0x%08X\n", | 226 | DRM_DEBUG("wait for fifo failed status : 0x%08X 0x%08X\n", |
227 | RADEON_READ(RADEON_RBBM_STATUS), | 227 | RADEON_READ(RADEON_RBBM_STATUS), |
228 | RADEON_READ(R300_VAP_CNTL_STATUS)); | 228 | RADEON_READ(R300_VAP_CNTL_STATUS)); |
229 | 229 | ||
@@ -252,7 +252,7 @@ static int radeon_do_wait_for_idle(drm_radeon_private_t * dev_priv) | |||
252 | } | 252 | } |
253 | DRM_UDELAY(1); | 253 | DRM_UDELAY(1); |
254 | } | 254 | } |
255 | DRM_INFO("wait idle failed status : 0x%08X 0x%08X\n", | 255 | DRM_DEBUG("wait idle failed status : 0x%08X 0x%08X\n", |
256 | RADEON_READ(RADEON_RBBM_STATUS), | 256 | RADEON_READ(RADEON_RBBM_STATUS), |
257 | RADEON_READ(R300_VAP_CNTL_STATUS)); | 257 | RADEON_READ(R300_VAP_CNTL_STATUS)); |
258 | 258 | ||
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 49a8c589e346..f1489999cf91 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1933,6 +1933,7 @@ static void ide_cd_remove(ide_drive_t *drive) | |||
1933 | 1933 | ||
1934 | ide_proc_unregister_driver(drive, info->driver); | 1934 | ide_proc_unregister_driver(drive, info->driver); |
1935 | 1935 | ||
1936 | blk_unregister_filter(info->disk); | ||
1936 | del_gendisk(info->disk); | 1937 | del_gendisk(info->disk); |
1937 | 1938 | ||
1938 | ide_cd_put(info); | 1939 | ide_cd_put(info); |
@@ -2158,6 +2159,7 @@ static int ide_cd_probe(ide_drive_t *drive) | |||
2158 | g->fops = &idecd_ops; | 2159 | g->fops = &idecd_ops; |
2159 | g->flags |= GENHD_FL_REMOVABLE; | 2160 | g->flags |= GENHD_FL_REMOVABLE; |
2160 | add_disk(g); | 2161 | add_disk(g); |
2162 | blk_register_filter(g); | ||
2161 | return 0; | 2163 | return 0; |
2162 | 2164 | ||
2163 | out_free_cd: | 2165 | out_free_cd: |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 7e65bad522cb..ac89a5deaca2 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -238,15 +238,47 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde | |||
238 | 238 | ||
239 | } | 239 | } |
240 | 240 | ||
241 | static mdk_rdev_t *next_active_rdev(mdk_rdev_t *rdev, mddev_t *mddev) | ||
242 | { | ||
243 | /* Iterate the disks of an mddev, using rcu to protect access to the | ||
244 | * linked list, and raising the refcount of devices we return to ensure | ||
245 | * they don't disappear while in use. | ||
246 | * As devices are only added or removed when raid_disk is < 0 and | ||
247 | * nr_pending is 0 and In_sync is clear, the entries we return will | ||
248 | * still be in the same position on the list when we re-enter | ||
249 | * list_for_each_continue_rcu. | ||
250 | */ | ||
251 | struct list_head *pos; | ||
252 | rcu_read_lock(); | ||
253 | if (rdev == NULL) | ||
254 | /* start at the beginning */ | ||
255 | pos = &mddev->disks; | ||
256 | else { | ||
257 | /* release the previous rdev and start from there. */ | ||
258 | rdev_dec_pending(rdev, mddev); | ||
259 | pos = &rdev->same_set; | ||
260 | } | ||
261 | list_for_each_continue_rcu(pos, &mddev->disks) { | ||
262 | rdev = list_entry(pos, mdk_rdev_t, same_set); | ||
263 | if (rdev->raid_disk >= 0 && | ||
264 | test_bit(In_sync, &rdev->flags) && | ||
265 | !test_bit(Faulty, &rdev->flags)) { | ||
266 | /* this is a usable devices */ | ||
267 | atomic_inc(&rdev->nr_pending); | ||
268 | rcu_read_unlock(); | ||
269 | return rdev; | ||
270 | } | ||
271 | } | ||
272 | rcu_read_unlock(); | ||
273 | return NULL; | ||
274 | } | ||
275 | |||
241 | static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) | 276 | static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) |
242 | { | 277 | { |
243 | mdk_rdev_t *rdev; | 278 | mdk_rdev_t *rdev = NULL; |
244 | mddev_t *mddev = bitmap->mddev; | 279 | mddev_t *mddev = bitmap->mddev; |
245 | 280 | ||
246 | rcu_read_lock(); | 281 | while ((rdev = next_active_rdev(rdev, mddev)) != NULL) { |
247 | rdev_for_each_rcu(rdev, mddev) | ||
248 | if (test_bit(In_sync, &rdev->flags) | ||
249 | && !test_bit(Faulty, &rdev->flags)) { | ||
250 | int size = PAGE_SIZE; | 282 | int size = PAGE_SIZE; |
251 | if (page->index == bitmap->file_pages-1) | 283 | if (page->index == bitmap->file_pages-1) |
252 | size = roundup(bitmap->last_page_size, | 284 | size = roundup(bitmap->last_page_size, |
@@ -281,8 +313,7 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) | |||
281 | + page->index * (PAGE_SIZE/512), | 313 | + page->index * (PAGE_SIZE/512), |
282 | size, | 314 | size, |
283 | page); | 315 | page); |
284 | } | 316 | } |
285 | rcu_read_unlock(); | ||
286 | 317 | ||
287 | if (wait) | 318 | if (wait) |
288 | md_super_wait(mddev); | 319 | md_super_wait(mddev); |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 8cfadc5bd2ba..4790c83d78d0 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3841,8 +3841,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open) | |||
3841 | 3841 | ||
3842 | del_timer_sync(&mddev->safemode_timer); | 3842 | del_timer_sync(&mddev->safemode_timer); |
3843 | 3843 | ||
3844 | invalidate_partition(disk, 0); | ||
3845 | |||
3846 | switch(mode) { | 3844 | switch(mode) { |
3847 | case 1: /* readonly */ | 3845 | case 1: /* readonly */ |
3848 | err = -ENXIO; | 3846 | err = -ENXIO; |
diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c index 48f4b92a8f8b..79faedf58521 100644 --- a/drivers/media/video/dabusb.c +++ b/drivers/media/video/dabusb.c | |||
@@ -403,6 +403,7 @@ static int dabusb_fpga_download (pdabusb_t s, const char *fname) | |||
403 | ret = request_firmware(&fw, "dabusb/bitstream.bin", &s->usbdev->dev); | 403 | ret = request_firmware(&fw, "dabusb/bitstream.bin", &s->usbdev->dev); |
404 | if (ret) { | 404 | if (ret) { |
405 | err("Failed to load \"dabusb/bitstream.bin\": %d\n", ret); | 405 | err("Failed to load \"dabusb/bitstream.bin\": %d\n", ret); |
406 | kfree(b); | ||
406 | return ret; | 407 | return ret; |
407 | } | 408 | } |
408 | 409 | ||
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index d2f331876e4c..e00d424e6575 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -410,16 +410,20 @@ static int mtd_ioctl(struct inode *inode, struct file *file, | |||
410 | 410 | ||
411 | case MEMGETREGIONINFO: | 411 | case MEMGETREGIONINFO: |
412 | { | 412 | { |
413 | struct region_info_user ur; | 413 | uint32_t ur_idx; |
414 | struct mtd_erase_region_info *kr; | ||
415 | struct region_info_user *ur = (struct region_info_user *) argp; | ||
414 | 416 | ||
415 | if (copy_from_user(&ur, argp, sizeof(struct region_info_user))) | 417 | if (get_user(ur_idx, &(ur->regionindex))) |
416 | return -EFAULT; | 418 | return -EFAULT; |
417 | 419 | ||
418 | if (ur.regionindex >= mtd->numeraseregions) | 420 | kr = &(mtd->eraseregions[ur_idx]); |
419 | return -EINVAL; | 421 | |
420 | if (copy_to_user(argp, &(mtd->eraseregions[ur.regionindex]), | 422 | if (put_user(kr->offset, &(ur->offset)) |
421 | sizeof(struct mtd_erase_region_info))) | 423 | || put_user(kr->erasesize, &(ur->erasesize)) |
424 | || put_user(kr->numblocks, &(ur->numblocks))) | ||
422 | return -EFAULT; | 425 | return -EFAULT; |
426 | |||
423 | break; | 427 | break; |
424 | } | 428 | } |
425 | 429 | ||
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e5e7d7856454..2a2bc89aba83 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1875,6 +1875,7 @@ static int sd_probe(struct device *dev) | |||
1875 | 1875 | ||
1876 | dev_set_drvdata(dev, sdkp); | 1876 | dev_set_drvdata(dev, sdkp); |
1877 | add_disk(gd); | 1877 | add_disk(gd); |
1878 | blk_register_filter(gd); | ||
1878 | sd_dif_config_host(sdkp); | 1879 | sd_dif_config_host(sdkp); |
1879 | 1880 | ||
1880 | sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", | 1881 | sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", |
@@ -1908,6 +1909,7 @@ static int sd_remove(struct device *dev) | |||
1908 | struct scsi_disk *sdkp = dev_get_drvdata(dev); | 1909 | struct scsi_disk *sdkp = dev_get_drvdata(dev); |
1909 | 1910 | ||
1910 | device_del(&sdkp->dev); | 1911 | device_del(&sdkp->dev); |
1912 | blk_unregister_filter(sdkp->disk); | ||
1911 | del_gendisk(sdkp->disk); | 1913 | del_gendisk(sdkp->disk); |
1912 | sd_shutdown(dev); | 1914 | sd_shutdown(dev); |
1913 | 1915 | ||
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 27f5bfd1def3..3292965bfd84 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -656,6 +656,7 @@ static int sr_probe(struct device *dev) | |||
656 | dev_set_drvdata(dev, cd); | 656 | dev_set_drvdata(dev, cd); |
657 | disk->flags |= GENHD_FL_REMOVABLE; | 657 | disk->flags |= GENHD_FL_REMOVABLE; |
658 | add_disk(disk); | 658 | add_disk(disk); |
659 | blk_register_filter(disk); | ||
659 | 660 | ||
660 | sdev_printk(KERN_DEBUG, sdev, | 661 | sdev_printk(KERN_DEBUG, sdev, |
661 | "Attached scsi CD-ROM %s\n", cd->cdi.name); | 662 | "Attached scsi CD-ROM %s\n", cd->cdi.name); |
@@ -894,6 +895,7 @@ static int sr_remove(struct device *dev) | |||
894 | { | 895 | { |
895 | struct scsi_cd *cd = dev_get_drvdata(dev); | 896 | struct scsi_cd *cd = dev_get_drvdata(dev); |
896 | 897 | ||
898 | blk_unregister_filter(cd->disk); | ||
897 | del_gendisk(cd->disk); | 899 | del_gendisk(cd->disk); |
898 | 900 | ||
899 | mutex_lock(&sr_ref_mutex); | 901 | mutex_lock(&sr_ref_mutex); |
diff --git a/firmware/Makefile b/firmware/Makefile index 9fe86041f86e..da75a6fbc6ba 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -146,15 +146,27 @@ $(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/% | |||
146 | $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) | 146 | $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) |
147 | $(call cmd,ihex) | 147 | $(call cmd,ihex) |
148 | 148 | ||
149 | # Don't depend on ihex2fw if we're installing and it already exists. | ||
150 | # Putting it after | in the dependencies doesn't seem sufficient when | ||
151 | # we're installing after a cross-compile, because ihex2fw has dependencies | ||
152 | # on stuff like /usr/lib/gcc/ppc64-redhat-linux/4.3.0/include/stddef.h and | ||
153 | # thus wants to be rebuilt. Which it can't be, if the prebuilt kernel tree | ||
154 | # is exported read-only for someone to run 'make install'. | ||
155 | ifeq ($(INSTALL):$(wildcard $(obj)/ihex2fw),install:$(obj)/ihex2fw) | ||
156 | ihex2fw_dep := | ||
157 | else | ||
158 | ihex2fw_dep := $(obj)/ihex2fw | ||
159 | endif | ||
160 | |||
149 | # .HEX is also Intel HEX, but where the offset and length in each record | 161 | # .HEX is also Intel HEX, but where the offset and length in each record |
150 | # is actually meaningful, because the firmware has to be loaded in a certain | 162 | # is actually meaningful, because the firmware has to be loaded in a certain |
151 | # order rather than as a single binary blob. Thus, we convert them into our | 163 | # order rather than as a single binary blob. Thus, we convert them into our |
152 | # more compact binary representation of ihex records (<linux/ihex.h>) | 164 | # more compact binary representation of ihex records (<linux/ihex.h>) |
153 | $(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) | 165 | $(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) |
154 | $(call cmd,ihex2fw) | 166 | $(call cmd,ihex2fw) |
155 | 167 | ||
156 | # .H16 is our own modified form of Intel HEX, with 16-bit length for records. | 168 | # .H16 is our own modified form of Intel HEX, with 16-bit length for records. |
157 | $(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) | 169 | $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) |
158 | $(call cmd,h16tofw) | 170 | $(call cmd,h16tofw) |
159 | 171 | ||
160 | $(firmware-dirs): | 172 | $(firmware-dirs): |
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index f9e4ad97a79e..06e521a945c3 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -9,7 +9,10 @@ files (e.g. "cp -a") to Windows servers. For mkdir and create honor setgid bit | |||
9 | on parent directory when server supports Unix Extensions but not POSIX | 9 | on parent directory when server supports Unix Extensions but not POSIX |
10 | create. Update cifs.upcall version to handle new Kerberos sec flags | 10 | create. Update cifs.upcall version to handle new Kerberos sec flags |
11 | (this requires update of cifs.upcall program from Samba). Fix memory leak | 11 | (this requires update of cifs.upcall program from Samba). Fix memory leak |
12 | on dns_upcall (resolving DFS referralls). | 12 | on dns_upcall (resolving DFS referralls). Fix plain text password |
13 | authentication (requires setting SecurityFlags to 0x30030 to enable | ||
14 | lanman and plain text though). Fix writes to be at correct offset when | ||
15 | file is open with O_APPEND and file is on a directio (forcediretio) mount. | ||
13 | 16 | ||
14 | Version 1.53 | 17 | Version 1.53 |
15 | ------------ | 18 | ------------ |
diff --git a/fs/cifs/README b/fs/cifs/README index 68b5c1169d9d..bd2343d4c6a6 100644 --- a/fs/cifs/README +++ b/fs/cifs/README | |||
@@ -542,10 +542,20 @@ SecurityFlags Flags which control security negotiation and | |||
542 | hashing mechanisms (as "must use") on the other hand | 542 | hashing mechanisms (as "must use") on the other hand |
543 | does not make much sense. Default flags are | 543 | does not make much sense. Default flags are |
544 | 0x07007 | 544 | 0x07007 |
545 | (NTLM, NTLMv2 and packet signing allowed). Maximum | 545 | (NTLM, NTLMv2 and packet signing allowed). The maximum |
546 | allowable flags if you want to allow mounts to servers | 546 | allowable flags if you want to allow mounts to servers |
547 | using weaker password hashes is 0x37037 (lanman, | 547 | using weaker password hashes is 0x37037 (lanman, |
548 | plaintext, ntlm, ntlmv2, signing allowed): | 548 | plaintext, ntlm, ntlmv2, signing allowed). Some |
549 | SecurityFlags require the corresponding menuconfig | ||
550 | options to be enabled (lanman and plaintext require | ||
551 | CONFIG_CIFS_WEAK_PW_HASH for example). Enabling | ||
552 | plaintext authentication currently requires also | ||
553 | enabling lanman authentication in the security flags | ||
554 | because the cifs module only supports sending | ||
555 | laintext passwords using the older lanman dialect | ||
556 | form of the session setup SMB. (e.g. for authentication | ||
557 | using plain text passwords, set the SecurityFlags | ||
558 | to 0x30030): | ||
549 | 559 | ||
550 | may use packet signing 0x00001 | 560 | may use packet signing 0x00001 |
551 | must use packet signing 0x01001 | 561 | must use packet signing 0x01001 |
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 83fd40dc1ef0..bd5f13d38450 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
@@ -294,6 +294,7 @@ void calc_lanman_hash(struct cifsSesInfo *ses, char *lnm_session_key) | |||
294 | 294 | ||
295 | if ((ses->server->secMode & SECMODE_PW_ENCRYPT) == 0) | 295 | if ((ses->server->secMode & SECMODE_PW_ENCRYPT) == 0) |
296 | if (extended_security & CIFSSEC_MAY_PLNTXT) { | 296 | if (extended_security & CIFSSEC_MAY_PLNTXT) { |
297 | memset(lnm_session_key, 0, CIFS_SESS_KEY_SIZE); | ||
297 | memcpy(lnm_session_key, password_with_pad, | 298 | memcpy(lnm_session_key, password_with_pad, |
298 | CIFS_ENCPWD_SIZE); | 299 | CIFS_ENCPWD_SIZE); |
299 | return; | 300 | return; |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ff14d14903a0..cbefe1f1f9fe 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -833,6 +833,10 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, | |||
833 | return -EBADF; | 833 | return -EBADF; |
834 | open_file = (struct cifsFileInfo *) file->private_data; | 834 | open_file = (struct cifsFileInfo *) file->private_data; |
835 | 835 | ||
836 | rc = generic_write_checks(file, poffset, &write_size, 0); | ||
837 | if (rc) | ||
838 | return rc; | ||
839 | |||
836 | xid = GetXid(); | 840 | xid = GetXid(); |
837 | 841 | ||
838 | if (*poffset > file->f_path.dentry->d_inode->i_size) | 842 | if (*poffset > file->f_path.dentry->d_inode->i_size) |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index b537fad3bf50..252fdc0567f1 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -409,6 +409,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
409 | #ifdef CONFIG_CIFS_WEAK_PW_HASH | 409 | #ifdef CONFIG_CIFS_WEAK_PW_HASH |
410 | char lnm_session_key[CIFS_SESS_KEY_SIZE]; | 410 | char lnm_session_key[CIFS_SESS_KEY_SIZE]; |
411 | 411 | ||
412 | pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE; | ||
413 | |||
412 | /* no capabilities flags in old lanman negotiation */ | 414 | /* no capabilities flags in old lanman negotiation */ |
413 | 415 | ||
414 | pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE); | 416 | pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE); |
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index b6ed38380ab8..54b8b4140c8f 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c | |||
@@ -443,7 +443,7 @@ init_state(struct posix_acl_state *state, int cnt) | |||
443 | * enough space for either: | 443 | * enough space for either: |
444 | */ | 444 | */ |
445 | alloc = sizeof(struct posix_ace_state_array) | 445 | alloc = sizeof(struct posix_ace_state_array) |
446 | + cnt*sizeof(struct posix_ace_state); | 446 | + cnt*sizeof(struct posix_user_ace_state); |
447 | state->users = kzalloc(alloc, GFP_KERNEL); | 447 | state->users = kzalloc(alloc, GFP_KERNEL); |
448 | if (!state->users) | 448 | if (!state->users) |
449 | return -ENOMEM; | 449 | return -ENOMEM; |
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 2e51adac65de..e5b51ffafc6c 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -867,11 +867,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, | |||
867 | int slack_bytes; | 867 | int slack_bytes; |
868 | __be32 status; | 868 | __be32 status; |
869 | 869 | ||
870 | status = nfserr_resource; | ||
871 | cstate = cstate_alloc(); | ||
872 | if (cstate == NULL) | ||
873 | goto out; | ||
874 | |||
875 | resp->xbuf = &rqstp->rq_res; | 870 | resp->xbuf = &rqstp->rq_res; |
876 | resp->p = rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len; | 871 | resp->p = rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len; |
877 | resp->tagp = resp->p; | 872 | resp->tagp = resp->p; |
@@ -890,6 +885,11 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, | |||
890 | if (args->minorversion > NFSD_SUPPORTED_MINOR_VERSION) | 885 | if (args->minorversion > NFSD_SUPPORTED_MINOR_VERSION) |
891 | goto out; | 886 | goto out; |
892 | 887 | ||
888 | status = nfserr_resource; | ||
889 | cstate = cstate_alloc(); | ||
890 | if (cstate == NULL) | ||
891 | goto out; | ||
892 | |||
893 | status = nfs_ok; | 893 | status = nfs_ok; |
894 | while (!status && resp->opcnt < args->opcnt) { | 894 | while (!status && resp->opcnt < args->opcnt) { |
895 | op = &args->ops[resp->opcnt++]; | 895 | op = &args->ops[resp->opcnt++]; |
@@ -957,9 +957,9 @@ encode_op: | |||
957 | nfsd4_increment_op_stats(op->opnum); | 957 | nfsd4_increment_op_stats(op->opnum); |
958 | } | 958 | } |
959 | 959 | ||
960 | cstate_free(cstate); | ||
960 | out: | 961 | out: |
961 | nfsd4_release_compoundargs(args); | 962 | nfsd4_release_compoundargs(args); |
962 | cstate_free(cstate); | ||
963 | dprintk("nfsv4 compound returned %d\n", ntohl(status)); | 963 | dprintk("nfsv4 compound returned %d\n", ntohl(status)); |
964 | return status; | 964 | return status; |
965 | } | 965 | } |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index ef2e3a20bf3b..dc05b54bd3a3 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
@@ -143,7 +143,6 @@ struct svcxprt_rdma { | |||
143 | unsigned long sc_flags; | 143 | unsigned long sc_flags; |
144 | struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */ | 144 | struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */ |
145 | struct list_head sc_read_complete_q; | 145 | struct list_head sc_read_complete_q; |
146 | spinlock_t sc_read_complete_lock; | ||
147 | struct work_struct sc_work; | 146 | struct work_struct sc_work; |
148 | }; | 147 | }; |
149 | /* sc_flags */ | 148 | /* sc_flags */ |
diff --git a/kernel/resource.c b/kernel/resource.c index cf0a178c7513..03d796c1b2e9 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -438,7 +438,7 @@ int insert_resource(struct resource *parent, struct resource *new) | |||
438 | 438 | ||
439 | /** | 439 | /** |
440 | * insert_resource_expand_to_fit - Insert a resource into the resource tree | 440 | * insert_resource_expand_to_fit - Insert a resource into the resource tree |
441 | * @parent: parent of the new resource | 441 | * @root: root resource descriptor |
442 | * @new: new resource to insert | 442 | * @new: new resource to insert |
443 | * | 443 | * |
444 | * Insert a resource into the resource tree, possibly expanding it in order | 444 | * Insert a resource into the resource tree, possibly expanding it in order |
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 1a07f8ca4b92..cb838ee93a82 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
@@ -180,10 +180,6 @@ static void check_hung_task(struct task_struct *t, unsigned long now) | |||
180 | if (t->flags & PF_FROZEN) | 180 | if (t->flags & PF_FROZEN) |
181 | return; | 181 | return; |
182 | 182 | ||
183 | /* Don't check for tasks waiting on network file systems like NFS */ | ||
184 | if (t->state & TASK_KILLABLE) | ||
185 | return; | ||
186 | |||
187 | if (switch_count != t->last_switch_count || !t->last_switch_timestamp) { | 183 | if (switch_count != t->last_switch_count || !t->last_switch_timestamp) { |
188 | t->last_switch_count = switch_count; | 184 | t->last_switch_count = switch_count; |
189 | t->last_switch_timestamp = now; | 185 | t->last_switch_timestamp = now; |
@@ -237,7 +233,8 @@ static void check_hung_uninterruptible_tasks(int this_cpu) | |||
237 | do_each_thread(g, t) { | 233 | do_each_thread(g, t) { |
238 | if (!--max_count) | 234 | if (!--max_count) |
239 | goto unlock; | 235 | goto unlock; |
240 | if (t->state & TASK_UNINTERRUPTIBLE) | 236 | /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ |
237 | if (t->state == TASK_UNINTERRUPTIBLE) | ||
241 | check_hung_task(t, now); | 238 | check_hung_task(t, now); |
242 | } while_each_thread(g, t); | 239 | } while_each_thread(g, t); |
243 | unlock: | 240 | unlock: |
diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 3444b58033c8..c69f84fe038d 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * linux/mm/page_isolation.c | 2 | * linux/mm/page_isolation.c |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <stddef.h> | ||
6 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
7 | #include <linux/page-isolation.h> | 6 | #include <linux/page-isolation.h> |
8 | #include <linux/pageblock-flags.h> | 7 | #include <linux/pageblock-flags.h> |
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 0f8c439b848a..5231f7aaac0e 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
@@ -60,24 +60,14 @@ static int proc_do_xprt(ctl_table *table, int write, struct file *file, | |||
60 | void __user *buffer, size_t *lenp, loff_t *ppos) | 60 | void __user *buffer, size_t *lenp, loff_t *ppos) |
61 | { | 61 | { |
62 | char tmpbuf[256]; | 62 | char tmpbuf[256]; |
63 | int len; | 63 | size_t len; |
64 | |||
64 | if ((*ppos && !write) || !*lenp) { | 65 | if ((*ppos && !write) || !*lenp) { |
65 | *lenp = 0; | 66 | *lenp = 0; |
66 | return 0; | 67 | return 0; |
67 | } | 68 | } |
68 | if (write) | 69 | len = svc_print_xprts(tmpbuf, sizeof(tmpbuf)); |
69 | return -EINVAL; | 70 | return simple_read_from_buffer(buffer, *lenp, ppos, tmpbuf, len); |
70 | else { | ||
71 | len = svc_print_xprts(tmpbuf, sizeof(tmpbuf)); | ||
72 | if (!access_ok(VERIFY_WRITE, buffer, len)) | ||
73 | return -EFAULT; | ||
74 | |||
75 | if (__copy_to_user(buffer, tmpbuf, len)) | ||
76 | return -EFAULT; | ||
77 | } | ||
78 | *lenp -= len; | ||
79 | *ppos += len; | ||
80 | return 0; | ||
81 | } | 71 | } |
82 | 72 | ||
83 | static int | 73 | static int |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index b4b17f44cb29..74de31a06616 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |||
@@ -443,18 +443,18 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) | |||
443 | 443 | ||
444 | dprintk("svcrdma: rqstp=%p\n", rqstp); | 444 | dprintk("svcrdma: rqstp=%p\n", rqstp); |
445 | 445 | ||
446 | spin_lock_bh(&rdma_xprt->sc_read_complete_lock); | 446 | spin_lock_bh(&rdma_xprt->sc_rq_dto_lock); |
447 | if (!list_empty(&rdma_xprt->sc_read_complete_q)) { | 447 | if (!list_empty(&rdma_xprt->sc_read_complete_q)) { |
448 | ctxt = list_entry(rdma_xprt->sc_read_complete_q.next, | 448 | ctxt = list_entry(rdma_xprt->sc_read_complete_q.next, |
449 | struct svc_rdma_op_ctxt, | 449 | struct svc_rdma_op_ctxt, |
450 | dto_q); | 450 | dto_q); |
451 | list_del_init(&ctxt->dto_q); | 451 | list_del_init(&ctxt->dto_q); |
452 | } | 452 | } |
453 | spin_unlock_bh(&rdma_xprt->sc_read_complete_lock); | 453 | if (ctxt) { |
454 | if (ctxt) | 454 | spin_unlock_bh(&rdma_xprt->sc_rq_dto_lock); |
455 | return rdma_read_complete(rqstp, ctxt); | 455 | return rdma_read_complete(rqstp, ctxt); |
456 | } | ||
456 | 457 | ||
457 | spin_lock_bh(&rdma_xprt->sc_rq_dto_lock); | ||
458 | if (!list_empty(&rdma_xprt->sc_rq_dto_q)) { | 458 | if (!list_empty(&rdma_xprt->sc_rq_dto_q)) { |
459 | ctxt = list_entry(rdma_xprt->sc_rq_dto_q.next, | 459 | ctxt = list_entry(rdma_xprt->sc_rq_dto_q.next, |
460 | struct svc_rdma_op_ctxt, | 460 | struct svc_rdma_op_ctxt, |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 19ddc382b777..900cb69728c6 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -359,11 +359,11 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) | |||
359 | if (test_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags)) { | 359 | if (test_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags)) { |
360 | struct svc_rdma_op_ctxt *read_hdr = ctxt->read_hdr; | 360 | struct svc_rdma_op_ctxt *read_hdr = ctxt->read_hdr; |
361 | BUG_ON(!read_hdr); | 361 | BUG_ON(!read_hdr); |
362 | spin_lock_bh(&xprt->sc_rq_dto_lock); | ||
362 | set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); | 363 | set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); |
363 | spin_lock_bh(&xprt->sc_read_complete_lock); | ||
364 | list_add_tail(&read_hdr->dto_q, | 364 | list_add_tail(&read_hdr->dto_q, |
365 | &xprt->sc_read_complete_q); | 365 | &xprt->sc_read_complete_q); |
366 | spin_unlock_bh(&xprt->sc_read_complete_lock); | 366 | spin_unlock_bh(&xprt->sc_rq_dto_lock); |
367 | svc_xprt_enqueue(&xprt->sc_xprt); | 367 | svc_xprt_enqueue(&xprt->sc_xprt); |
368 | } | 368 | } |
369 | svc_rdma_put_context(ctxt, 0); | 369 | svc_rdma_put_context(ctxt, 0); |
@@ -428,7 +428,6 @@ static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv, | |||
428 | init_waitqueue_head(&cma_xprt->sc_send_wait); | 428 | init_waitqueue_head(&cma_xprt->sc_send_wait); |
429 | 429 | ||
430 | spin_lock_init(&cma_xprt->sc_lock); | 430 | spin_lock_init(&cma_xprt->sc_lock); |
431 | spin_lock_init(&cma_xprt->sc_read_complete_lock); | ||
432 | spin_lock_init(&cma_xprt->sc_rq_dto_lock); | 431 | spin_lock_init(&cma_xprt->sc_rq_dto_lock); |
433 | 432 | ||
434 | cma_xprt->sc_ord = svcrdma_ord; | 433 | cma_xprt->sc_ord = svcrdma_ord; |