diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:03:34 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:03:34 -0400 |
commit | 75a95178dafb5c8d69b4abe45ea746a9cea23142 (patch) | |
tree | 1dbf80c83d9521dcdebc9e670f48da6c1ba34187 | |
parent | 8531c5ffbca65f6df868637c26e6df6f88bff738 (diff) | |
parent | 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff) |
Merge upstream into 'upstream' branch of netdev-2.6.git.
Hand fix merge conflict in drivers/net/tokenring/Kconfig.
125 files changed, 679 insertions, 644 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 13 | 3 | SUBLEVEL = 13 |
4 | EXTRAVERSION =-rc6 | 4 | EXTRAVERSION =-rc7 |
5 | NAME=Woozy Numbat | 5 | NAME=Woozy Numbat |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 083c5df42d35..189d5eababa8 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -522,7 +522,7 @@ source "mm/Kconfig" | |||
522 | 522 | ||
523 | config NUMA | 523 | config NUMA |
524 | bool "NUMA Support (EXPERIMENTAL)" | 524 | bool "NUMA Support (EXPERIMENTAL)" |
525 | depends on DISCONTIGMEM | 525 | depends on DISCONTIGMEM && BROKEN |
526 | help | 526 | help |
527 | Say Y to compile the kernel to support NUMA (Non-Uniform Memory | 527 | Say Y to compile the kernel to support NUMA (Non-Uniform Memory |
528 | Access). This option is for configuring high-end multiprocessor | 528 | Access). This option is for configuring high-end multiprocessor |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 8f1e78551b1e..e211aa7404e6 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -1036,7 +1036,7 @@ debug_spin_lock(spinlock_t * lock, const char *base_file, int line_no) | |||
1036 | " br 1b\n" | 1036 | " br 1b\n" |
1037 | ".previous" | 1037 | ".previous" |
1038 | : "=r" (tmp), "=m" (lock->lock), "=r" (stuck) | 1038 | : "=r" (tmp), "=m" (lock->lock), "=r" (stuck) |
1039 | : "1" (lock->lock), "2" (stuck) : "memory"); | 1039 | : "m" (lock->lock), "2" (stuck) : "memory"); |
1040 | 1040 | ||
1041 | if (stuck < 0) { | 1041 | if (stuck < 0) { |
1042 | printk(KERN_WARNING | 1042 | printk(KERN_WARNING |
@@ -1115,7 +1115,7 @@ void _raw_write_lock(rwlock_t * lock) | |||
1115 | ".previous" | 1115 | ".previous" |
1116 | : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy), | 1116 | : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy), |
1117 | "=&r" (stuck_lock), "=&r" (stuck_reader) | 1117 | "=&r" (stuck_lock), "=&r" (stuck_reader) |
1118 | : "0" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory"); | 1118 | : "m" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory"); |
1119 | 1119 | ||
1120 | if (stuck_lock < 0) { | 1120 | if (stuck_lock < 0) { |
1121 | printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc); | 1121 | printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc); |
@@ -1153,7 +1153,7 @@ void _raw_read_lock(rwlock_t * lock) | |||
1153 | " br 1b\n" | 1153 | " br 1b\n" |
1154 | ".previous" | 1154 | ".previous" |
1155 | : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock) | 1155 | : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock) |
1156 | : "0" (*(volatile int *)lock), "2" (stuck_lock) : "memory"); | 1156 | : "m" (*(volatile int *)lock), "2" (stuck_lock) : "memory"); |
1157 | 1157 | ||
1158 | if (stuck_lock < 0) { | 1158 | if (stuck_lock < 0) { |
1159 | printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc); | 1159 | printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc); |
diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c index 908eb4af8dec..ba788cfdc3c6 100644 --- a/arch/alpha/oprofile/common.c +++ b/arch/alpha/oprofile/common.c | |||
@@ -65,7 +65,7 @@ op_axp_setup(void) | |||
65 | model->reg_setup(®, ctr, &sys); | 65 | model->reg_setup(®, ctr, &sys); |
66 | 66 | ||
67 | /* Configure the registers on all cpus. */ | 67 | /* Configure the registers on all cpus. */ |
68 | smp_call_function(model->cpu_setup, ®, 0, 1); | 68 | (void)smp_call_function(model->cpu_setup, ®, 0, 1); |
69 | model->cpu_setup(®); | 69 | model->cpu_setup(®); |
70 | return 0; | 70 | return 0; |
71 | } | 71 | } |
@@ -86,7 +86,7 @@ op_axp_cpu_start(void *dummy) | |||
86 | static int | 86 | static int |
87 | op_axp_start(void) | 87 | op_axp_start(void) |
88 | { | 88 | { |
89 | smp_call_function(op_axp_cpu_start, NULL, 0, 1); | 89 | (void)smp_call_function(op_axp_cpu_start, NULL, 0, 1); |
90 | op_axp_cpu_start(NULL); | 90 | op_axp_cpu_start(NULL); |
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
@@ -101,7 +101,7 @@ op_axp_cpu_stop(void *dummy) | |||
101 | static void | 101 | static void |
102 | op_axp_stop(void) | 102 | op_axp_stop(void) |
103 | { | 103 | { |
104 | smp_call_function(op_axp_cpu_stop, NULL, 0, 1); | 104 | (void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1); |
105 | op_axp_cpu_stop(NULL); | 105 | op_axp_cpu_stop(NULL); |
106 | } | 106 | } |
107 | 107 | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7bc4a583f4e1..c65c6eb9810d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -310,7 +310,7 @@ menu "Kernel Features" | |||
310 | 310 | ||
311 | config SMP | 311 | config SMP |
312 | bool "Symmetric Multi-Processing (EXPERIMENTAL)" | 312 | bool "Symmetric Multi-Processing (EXPERIMENTAL)" |
313 | depends on EXPERIMENTAL #&& n | 313 | depends on EXPERIMENTAL && BROKEN #&& n |
314 | help | 314 | help |
315 | This enables support for systems with more than one CPU. If you have | 315 | This enables support for systems with more than one CPU. If you have |
316 | a system with only one CPU, like most personal computers, say N. If | 316 | a system with only one CPU, like most personal computers, say N. If |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index d571c37ac30c..4554c961251c 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -617,7 +617,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) | |||
617 | notify_die("unknown data abort code", regs, &info, instr, 0); | 617 | notify_die("unknown data abort code", regs, &info, instr, 0); |
618 | } | 618 | } |
619 | 619 | ||
620 | volatile void __bug(const char *file, int line, void *data) | 620 | void __attribute__((noreturn)) __bug(const char *file, int line, void *data) |
621 | { | 621 | { |
622 | printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); | 622 | printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); |
623 | if (data) | 623 | if (data) |
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index 8035f4faafbf..1777e92a88e6 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h | |||
@@ -370,20 +370,20 @@ TABLE 5 | |||
370 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) | 370 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) |
371 | 371 | ||
372 | #ifdef CONFIG_FPE_NWFPE_XP | 372 | #ifdef CONFIG_FPE_NWFPE_XP |
373 | static inline const floatx80 getExtendedConstant(const unsigned int nIndex) | 373 | static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) |
374 | { | 374 | { |
375 | extern const floatx80 floatx80Constant[]; | 375 | extern const floatx80 floatx80Constant[]; |
376 | return floatx80Constant[nIndex]; | 376 | return floatx80Constant[nIndex]; |
377 | } | 377 | } |
378 | #endif | 378 | #endif |
379 | 379 | ||
380 | static inline const float64 getDoubleConstant(const unsigned int nIndex) | 380 | static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) |
381 | { | 381 | { |
382 | extern const float64 float64Constant[]; | 382 | extern const float64 float64Constant[]; |
383 | return float64Constant[nIndex]; | 383 | return float64Constant[nIndex]; |
384 | } | 384 | } |
385 | 385 | ||
386 | static inline const float32 getSingleConstant(const unsigned int nIndex) | 386 | static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) |
387 | { | 387 | { |
388 | extern const float32 float32Constant[]; | 388 | extern const float32 float32Constant[]; |
389 | return float32Constant[nIndex]; | 389 | return float32Constant[nIndex]; |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index da6c46d667cb..8c242bb1ef45 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -195,7 +195,7 @@ static void disable_lapic_nmi_watchdog(void) | |||
195 | wrmsr(MSR_P6_EVNTSEL0, 0, 0); | 195 | wrmsr(MSR_P6_EVNTSEL0, 0, 0); |
196 | break; | 196 | break; |
197 | case 15: | 197 | case 15: |
198 | if (boot_cpu_data.x86_model > 0x3) | 198 | if (boot_cpu_data.x86_model > 0x4) |
199 | break; | 199 | break; |
200 | 200 | ||
201 | wrmsr(MSR_P4_IQ_CCCR0, 0, 0); | 201 | wrmsr(MSR_P4_IQ_CCCR0, 0, 0); |
@@ -432,7 +432,7 @@ void setup_apic_nmi_watchdog (void) | |||
432 | setup_p6_watchdog(); | 432 | setup_p6_watchdog(); |
433 | break; | 433 | break; |
434 | case 15: | 434 | case 15: |
435 | if (boot_cpu_data.x86_model > 0x3) | 435 | if (boot_cpu_data.x86_model > 0x4) |
436 | return; | 436 | return; |
437 | 437 | ||
438 | if (!setup_p4_watchdog()) | 438 | if (!setup_p4_watchdog()) |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index a61f33d06ea3..cd2d5d5514fe 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -803,15 +803,17 @@ void math_error(void __user *eip) | |||
803 | */ | 803 | */ |
804 | cwd = get_fpu_cwd(task); | 804 | cwd = get_fpu_cwd(task); |
805 | swd = get_fpu_swd(task); | 805 | swd = get_fpu_swd(task); |
806 | switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) { | 806 | switch (swd & ~cwd & 0x3f) { |
807 | case 0x000: | 807 | case 0x000: |
808 | default: | 808 | default: |
809 | break; | 809 | break; |
810 | case 0x001: /* Invalid Op */ | 810 | case 0x001: /* Invalid Op */ |
811 | case 0x041: /* Stack Fault */ | 811 | /* |
812 | case 0x241: /* Stack Fault | Direction */ | 812 | * swd & 0x240 == 0x040: Stack Underflow |
813 | * swd & 0x240 == 0x240: Stack Overflow | ||
814 | * User must clear the SF bit (0x40) if set | ||
815 | */ | ||
813 | info.si_code = FPE_FLTINV; | 816 | info.si_code = FPE_FLTINV; |
814 | /* Should we clear the SF or let user space do it ???? */ | ||
815 | break; | 817 | break; |
816 | case 0x002: /* Denormalize */ | 818 | case 0x002: /* Denormalize */ |
817 | case 0x010: /* Underflow */ | 819 | case 0x010: /* Underflow */ |
diff --git a/arch/ia64/hp/sim/boot/boot_head.S b/arch/ia64/hp/sim/boot/boot_head.S index 9364199e5632..1c8c7e6a9a5e 100644 --- a/arch/ia64/hp/sim/boot/boot_head.S +++ b/arch/ia64/hp/sim/boot/boot_head.S | |||
@@ -22,7 +22,7 @@ GLOBAL_ENTRY(_start) | |||
22 | .save rp, r0 | 22 | .save rp, r0 |
23 | .body | 23 | .body |
24 | movl gp = __gp | 24 | movl gp = __gp |
25 | movl sp = stack_mem | 25 | movl sp = stack_mem+16384-16 |
26 | bsw.1 | 26 | bsw.1 |
27 | br.call.sptk.many rp=start_bootloader | 27 | br.call.sptk.many rp=start_bootloader |
28 | END(_start) | 28 | END(_start) |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 37e10e010a2f..414cdf2e3c96 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -323,7 +323,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | |||
323 | struct pci_controller *controller; | 323 | struct pci_controller *controller; |
324 | struct pcibus_bussoft *prom_bussoft_ptr; | 324 | struct pcibus_bussoft *prom_bussoft_ptr; |
325 | struct hubdev_info *hubdev_info; | 325 | struct hubdev_info *hubdev_info; |
326 | void *provider_soft; | 326 | void *provider_soft = NULL; |
327 | struct sn_pcibus_provider *provider; | 327 | struct sn_pcibus_provider *provider; |
328 | 328 | ||
329 | status = sal_get_pcibus_info((u64) segment, (u64) busnum, | 329 | status = sal_get_pcibus_info((u64) segment, (u64) busnum, |
@@ -339,7 +339,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | |||
339 | if (bus == NULL) { | 339 | if (bus == NULL) { |
340 | bus = pci_scan_bus(busnum, &pci_root_ops, controller); | 340 | bus = pci_scan_bus(busnum, &pci_root_ops, controller); |
341 | if (bus == NULL) | 341 | if (bus == NULL) |
342 | return; /* error, or bus already scanned */ | 342 | goto error_return; /* error, or bus already scanned */ |
343 | bus->sysdata = NULL; | 343 | bus->sysdata = NULL; |
344 | } | 344 | } |
345 | 345 | ||
@@ -352,28 +352,30 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | |||
352 | */ | 352 | */ |
353 | 353 | ||
354 | if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES) | 354 | if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES) |
355 | return; /* unsupported asic type */ | 355 | goto error_return; /* unsupported asic type */ |
356 | 356 | ||
357 | if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB) | 357 | if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB) |
358 | goto error_return; /* no further fixup necessary */ | 358 | goto error_return; /* no further fixup necessary */ |
359 | 359 | ||
360 | provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type]; | 360 | provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type]; |
361 | if (provider == NULL) | 361 | if (provider == NULL) |
362 | return; /* no provider registerd for this asic */ | 362 | goto error_return; /* no provider registerd for this asic */ |
363 | 363 | ||
364 | provider_soft = NULL; | 364 | bus->sysdata = controller; |
365 | if (provider->bus_fixup) | 365 | if (provider->bus_fixup) |
366 | provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); | 366 | provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); |
367 | 367 | ||
368 | if (provider_soft == NULL) | 368 | if (provider_soft == NULL) { |
369 | return; /* fixup failed or not applicable */ | 369 | /* fixup failed or not applicable */ |
370 | bus->sysdata = NULL; | ||
371 | goto error_return; | ||
372 | } | ||
370 | 373 | ||
371 | /* | 374 | /* |
372 | * Generic bus fixup goes here. Don't reference prom_bussoft_ptr | 375 | * Generic bus fixup goes here. Don't reference prom_bussoft_ptr |
373 | * after this point. | 376 | * after this point. |
374 | */ | 377 | */ |
375 | 378 | ||
376 | bus->sysdata = controller; | ||
377 | PCI_CONTROLLER(bus)->platform_data = provider_soft; | 379 | PCI_CONTROLLER(bus)->platform_data = provider_soft; |
378 | nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); | 380 | nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); |
379 | cnode = nasid_to_cnodeid(nasid); | 381 | cnode = nasid_to_cnodeid(nasid); |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 7772951df313..7622d4ec5f08 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -269,7 +269,7 @@ config NR_CPUS | |||
269 | # Common NUMA Features | 269 | # Common NUMA Features |
270 | config NUMA | 270 | config NUMA |
271 | bool "Numa Memory Allocation Support" | 271 | bool "Numa Memory Allocation Support" |
272 | depends on SMP | 272 | depends on SMP && BROKEN |
273 | default n | 273 | default n |
274 | 274 | ||
275 | # turning this on wastes a bunch of space. | 275 | # turning this on wastes a bunch of space. |
@@ -286,6 +286,7 @@ menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)" | |||
286 | 286 | ||
287 | config PCI | 287 | config PCI |
288 | bool "PCI support" | 288 | bool "PCI support" |
289 | depends on BROKEN | ||
289 | default n | 290 | default n |
290 | help | 291 | help |
291 | Find out whether you have a PCI motherboard. PCI is the name of a | 292 | Find out whether you have a PCI motherboard. PCI is the name of a |
diff --git a/arch/m32r/Kconfig.debug b/arch/m32r/Kconfig.debug index 31039723804f..bbf711bab69e 100644 --- a/arch/m32r/Kconfig.debug +++ b/arch/m32r/Kconfig.debug | |||
@@ -20,7 +20,7 @@ config DEBUG_STACK_USAGE | |||
20 | 20 | ||
21 | config DEBUG_PAGEALLOC | 21 | config DEBUG_PAGEALLOC |
22 | bool "Page alloc debugging" | 22 | bool "Page alloc debugging" |
23 | depends on DEBUG_KERNEL | 23 | depends on DEBUG_KERNEL && BROKEN |
24 | help | 24 | help |
25 | Unmap pages from the kernel linear mapping after free_pages(). | 25 | Unmap pages from the kernel linear mapping after free_pages(). |
26 | This results in a large slowdown, but helps to find certain types | 26 | This results in a large slowdown, but helps to find certain types |
diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c index a146b24a556b..708634b685e4 100644 --- a/arch/m32r/kernel/setup_m32700ut.c +++ b/arch/m32r/kernel/setup_m32700ut.c | |||
@@ -30,9 +30,11 @@ | |||
30 | typedef struct { | 30 | typedef struct { |
31 | unsigned long icucr; /* ICU Control Register */ | 31 | unsigned long icucr; /* ICU Control Register */ |
32 | } icu_data_t; | 32 | } icu_data_t; |
33 | static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; | ||
34 | #else | ||
35 | icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; | ||
33 | #endif /* CONFIG_SMP */ | 36 | #endif /* CONFIG_SMP */ |
34 | 37 | ||
35 | static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; | ||
36 | 38 | ||
37 | static void disable_m32700ut_irq(unsigned int irq) | 39 | static void disable_m32700ut_irq(unsigned int irq) |
38 | { | 40 | { |
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c index f0301f58bcce..d7b7ec6d30f8 100644 --- a/arch/m32r/kernel/setup_opsput.c +++ b/arch/m32r/kernel/setup_opsput.c | |||
@@ -31,9 +31,11 @@ | |||
31 | typedef struct { | 31 | typedef struct { |
32 | unsigned long icucr; /* ICU Control Register */ | 32 | unsigned long icucr; /* ICU Control Register */ |
33 | } icu_data_t; | 33 | } icu_data_t; |
34 | static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; | ||
35 | #else | ||
36 | icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; | ||
34 | #endif /* CONFIG_SMP */ | 37 | #endif /* CONFIG_SMP */ |
35 | 38 | ||
36 | static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; | ||
37 | 39 | ||
38 | static void disable_opsput_irq(unsigned int irq) | 40 | static void disable_opsput_irq(unsigned int irq) |
39 | { | 41 | { |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index f9a0e723478d..640d592ea072 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -91,6 +91,7 @@ extern struct { | |||
91 | 91 | ||
92 | /* which physical physical ID maps to which logical CPU number */ | 92 | /* which physical physical ID maps to which logical CPU number */ |
93 | static volatile int physid_2_cpu[NR_CPUS]; | 93 | static volatile int physid_2_cpu[NR_CPUS]; |
94 | #define physid_to_cpu(physid) physid_2_cpu[physid] | ||
94 | 95 | ||
95 | /* which logical CPU number maps to which physical ID */ | 96 | /* which logical CPU number maps to which physical ID */ |
96 | volatile int cpu_2_physid[NR_CPUS]; | 97 | volatile int cpu_2_physid[NR_CPUS]; |
diff --git a/arch/m32r/lib/csum_partial_copy.c b/arch/m32r/lib/csum_partial_copy.c index c871b4606b07..ddb16a83a8ce 100644 --- a/arch/m32r/lib/csum_partial_copy.c +++ b/arch/m32r/lib/csum_partial_copy.c | |||
@@ -58,3 +58,4 @@ csum_partial_copy_from_user (const unsigned char __user *src, | |||
58 | return csum_partial(dst, len-missing, sum); | 58 | return csum_partial(dst, len-missing, sum); |
59 | } | 59 | } |
60 | EXPORT_SYMBOL(csum_partial_copy_from_user); | 60 | EXPORT_SYMBOL(csum_partial_copy_from_user); |
61 | EXPORT_SYMBOL(csum_partial); | ||
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c index 1d1a01e54b3f..08e727955555 100644 --- a/arch/m32r/mm/discontig.c +++ b/arch/m32r/mm/discontig.c | |||
@@ -12,12 +12,14 @@ | |||
12 | #include <linux/mmzone.h> | 12 | #include <linux/mmzone.h> |
13 | #include <linux/initrd.h> | 13 | #include <linux/initrd.h> |
14 | #include <linux/nodemask.h> | 14 | #include <linux/nodemask.h> |
15 | #include <linux/module.h> | ||
15 | 16 | ||
16 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
17 | 18 | ||
18 | extern char _end[]; | 19 | extern char _end[]; |
19 | 20 | ||
20 | struct pglist_data *node_data[MAX_NUMNODES]; | 21 | struct pglist_data *node_data[MAX_NUMNODES]; |
22 | EXPORT_SYMBOL(node_data); | ||
21 | static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata; | 23 | static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata; |
22 | 24 | ||
23 | pg_data_t m32r_node_data[MAX_NUMNODES]; | 25 | pg_data_t m32r_node_data[MAX_NUMNODES]; |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index f6db3b385fea..e6fa1d1cc03a 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -911,6 +911,7 @@ config PPCBUG_NVRAM | |||
911 | default y if PPC_PREP | 911 | default y if PPC_PREP |
912 | 912 | ||
913 | config SMP | 913 | config SMP |
914 | depends on PPC_STD_MMU | ||
914 | bool "Symmetric multi-processing support" | 915 | bool "Symmetric multi-processing support" |
915 | ---help--- | 916 | ---help--- |
916 | This enables support for systems with more than one CPU. If you have | 917 | This enables support for systems with more than one CPU. If you have |
@@ -930,7 +931,7 @@ config SMP | |||
930 | 931 | ||
931 | config IRQ_ALL_CPUS | 932 | config IRQ_ALL_CPUS |
932 | bool "Distribute interrupts on all CPUs by default" | 933 | bool "Distribute interrupts on all CPUs by default" |
933 | depends on SMP | 934 | depends on SMP && !MV64360 |
934 | help | 935 | help |
935 | This option gives the kernel permission to distribute IRQs across | 936 | This option gives the kernel permission to distribute IRQs across |
936 | multiple CPUs. Saying N here will route all IRQs to the first | 937 | multiple CPUs. Saying N here will route all IRQs to the first |
@@ -1121,7 +1122,9 @@ config PROC_HARDWARE | |||
1121 | 1122 | ||
1122 | source "drivers/zorro/Kconfig" | 1123 | source "drivers/zorro/Kconfig" |
1123 | 1124 | ||
1125 | if !44x || BROKEN | ||
1124 | source kernel/power/Kconfig | 1126 | source kernel/power/Kconfig |
1127 | endif | ||
1125 | 1128 | ||
1126 | config SECCOMP | 1129 | config SECCOMP |
1127 | bool "Enable seccomp to safely compute untrusted bytecode" | 1130 | bool "Enable seccomp to safely compute untrusted bytecode" |
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index f7c045764e04..805dd98908a3 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig | |||
@@ -3,6 +3,11 @@ config 4xx | |||
3 | depends on 40x || 44x | 3 | depends on 40x || 44x |
4 | default y | 4 | default y |
5 | 5 | ||
6 | config WANT_EARLY_SERIAL | ||
7 | bool | ||
8 | select SERIAL_8250 | ||
9 | default n | ||
10 | |||
6 | menu "IBM 4xx options" | 11 | menu "IBM 4xx options" |
7 | depends on 4xx | 12 | depends on 4xx |
8 | 13 | ||
@@ -18,6 +23,7 @@ config ASH | |||
18 | 23 | ||
19 | config BUBINGA | 24 | config BUBINGA |
20 | bool "Bubinga" | 25 | bool "Bubinga" |
26 | select WANT_EARLY_SERIAL | ||
21 | help | 27 | help |
22 | This option enables support for the IBM 405EP evaluation board. | 28 | This option enables support for the IBM 405EP evaluation board. |
23 | 29 | ||
@@ -70,21 +76,25 @@ choice | |||
70 | 76 | ||
71 | config BAMBOO | 77 | config BAMBOO |
72 | bool "Bamboo" | 78 | bool "Bamboo" |
79 | select WANT_EARLY_SERIAL | ||
73 | help | 80 | help |
74 | This option enables support for the IBM PPC440EP evaluation board. | 81 | This option enables support for the IBM PPC440EP evaluation board. |
75 | 82 | ||
76 | config EBONY | 83 | config EBONY |
77 | bool "Ebony" | 84 | bool "Ebony" |
85 | select WANT_EARLY_SERIAL | ||
78 | help | 86 | help |
79 | This option enables support for the IBM PPC440GP evaluation board. | 87 | This option enables support for the IBM PPC440GP evaluation board. |
80 | 88 | ||
81 | config LUAN | 89 | config LUAN |
82 | bool "Luan" | 90 | bool "Luan" |
91 | select WANT_EARLY_SERIAL | ||
83 | help | 92 | help |
84 | This option enables support for the IBM PPC440SP evaluation board. | 93 | This option enables support for the IBM PPC440SP evaluation board. |
85 | 94 | ||
86 | config OCOTEA | 95 | config OCOTEA |
87 | bool "Ocotea" | 96 | bool "Ocotea" |
97 | select WANT_EARLY_SERIAL | ||
88 | help | 98 | help |
89 | This option enables support for the IBM PPC440GX evaluation board. | 99 | This option enables support for the IBM PPC440GX evaluation board. |
90 | 100 | ||
@@ -230,10 +240,6 @@ config PPC_GEN550 | |||
230 | depends on 4xx | 240 | depends on 4xx |
231 | default y | 241 | default y |
232 | 242 | ||
233 | config PM | ||
234 | bool "Power Management support (EXPERIMENTAL)" | ||
235 | depends on 4xx && EXPERIMENTAL | ||
236 | |||
237 | choice | 243 | choice |
238 | prompt "TTYS0 device and default console" | 244 | prompt "TTYS0 device and default console" |
239 | depends on 40x | 245 | depends on 40x |
diff --git a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c index 20062145e84e..d47fecb42cc5 100644 --- a/arch/s390/kernel/cpcmd.c +++ b/arch/s390/kernel/cpcmd.c | |||
@@ -46,9 +46,9 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code) | |||
46 | "lra 3,0(%4)\n" | 46 | "lra 3,0(%4)\n" |
47 | "lr 5,%5\n" | 47 | "lr 5,%5\n" |
48 | "diag 2,4,0x8\n" | 48 | "diag 2,4,0x8\n" |
49 | "brc 8, .Litfits\n" | 49 | "brc 8, 1f\n" |
50 | "ar 5, %5\n" | 50 | "ar 5, %5\n" |
51 | ".Litfits: \n" | 51 | "1: \n" |
52 | "lr %0,4\n" | 52 | "lr %0,4\n" |
53 | "lr %1,5\n" | 53 | "lr %1,5\n" |
54 | : "=d" (return_code), "=d" (return_len) | 54 | : "=d" (return_code), "=d" (return_len) |
@@ -64,9 +64,9 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code) | |||
64 | "sam31\n" | 64 | "sam31\n" |
65 | "diag 2,4,0x8\n" | 65 | "diag 2,4,0x8\n" |
66 | "sam64\n" | 66 | "sam64\n" |
67 | "brc 8, .Litfits\n" | 67 | "brc 8, 1f\n" |
68 | "agr 5, %5\n" | 68 | "agr 5, %5\n" |
69 | ".Litfits: \n" | 69 | "1: \n" |
70 | "lgr %0,4\n" | 70 | "lgr %0,4\n" |
71 | "lgr %1,5\n" | 71 | "lgr %1,5\n" |
72 | : "=d" (return_code), "=d" (return_len) | 72 | : "=d" (return_code), "=d" (return_len) |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 1bd430d0ca06..8faa8dc4de43 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -98,8 +98,9 @@ extern void ___rw_write_enter(void); | |||
98 | * The module references will be fixed up by module_frob_arch_sections. | 98 | * The module references will be fixed up by module_frob_arch_sections. |
99 | */ | 99 | */ |
100 | #define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \ | 100 | #define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \ |
101 | extern __ret __x(__arg1, __arg2) \ | 101 | extern __ret __x(__arg1, __arg2); \ |
102 | __attribute__((weak, alias("." # __x))); | 102 | asm(".weak " #__x);\ |
103 | asm(#__x "=." #__x); | ||
103 | 104 | ||
104 | DOT_ALIAS2(int, div, int, int) | 105 | DOT_ALIAS2(int, div, int, int) |
105 | DOT_ALIAS2(int, mul, int, int) | 106 | DOT_ALIAS2(int, mul, int, int) |
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index 093281bdf85f..6f00ab8b9d23 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile | |||
@@ -8,7 +8,7 @@ EXTRA_CFLAGS := -Werror | |||
8 | extra-y := head.o init_task.o vmlinux.lds | 8 | extra-y := head.o init_task.o vmlinux.lds |
9 | 9 | ||
10 | obj-y := process.o setup.o cpu.o idprom.o \ | 10 | obj-y := process.o setup.o cpu.o idprom.o \ |
11 | traps.o devices.o auxio.o \ | 11 | traps.o devices.o auxio.o una_asm.o \ |
12 | irq.o ptrace.o time.o sys_sparc.o signal.o \ | 12 | irq.o ptrace.o time.o sys_sparc.o signal.o \ |
13 | unaligned.o central.o pci.o starfire.o semaphore.o \ | 13 | unaligned.o central.o pci.o starfire.o semaphore.o \ |
14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o | 14 | power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 100b0107c4be..0c9e54b2f0c8 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -2127,6 +2127,9 @@ void __init trap_init(void) | |||
2127 | TI_PRE_COUNT != offsetof(struct thread_info, preempt_count) || | 2127 | TI_PRE_COUNT != offsetof(struct thread_info, preempt_count) || |
2128 | TI_NEW_CHILD != offsetof(struct thread_info, new_child) || | 2128 | TI_NEW_CHILD != offsetof(struct thread_info, new_child) || |
2129 | TI_SYS_NOERROR != offsetof(struct thread_info, syscall_noerror) || | 2129 | TI_SYS_NOERROR != offsetof(struct thread_info, syscall_noerror) || |
2130 | TI_RESTART_BLOCK != offsetof(struct thread_info, restart_block) || | ||
2131 | TI_KUNA_REGS != offsetof(struct thread_info, kern_una_regs) || | ||
2132 | TI_KUNA_INSN != offsetof(struct thread_info, kern_una_insn) || | ||
2130 | TI_FPREGS != offsetof(struct thread_info, fpregs) || | 2133 | TI_FPREGS != offsetof(struct thread_info, fpregs) || |
2131 | (TI_FPREGS & (64 - 1))) | 2134 | (TI_FPREGS & (64 - 1))) |
2132 | thread_info_offsets_are_bolixed_dave(); | 2135 | thread_info_offsets_are_bolixed_dave(); |
diff --git a/arch/sparc64/kernel/una_asm.S b/arch/sparc64/kernel/una_asm.S new file mode 100644 index 000000000000..cbb40585253c --- /dev/null +++ b/arch/sparc64/kernel/una_asm.S | |||
@@ -0,0 +1,153 @@ | |||
1 | /* una_asm.S: Kernel unaligned trap assembler helpers. | ||
2 | * | ||
3 | * Copyright (C) 1996,2005 David S. Miller (davem@davemloft.net) | ||
4 | * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | ||
5 | */ | ||
6 | |||
7 | .text | ||
8 | |||
9 | kernel_unaligned_trap_fault: | ||
10 | call kernel_mna_trap_fault | ||
11 | nop | ||
12 | retl | ||
13 | nop | ||
14 | .size kern_unaligned_trap_fault, .-kern_unaligned_trap_fault | ||
15 | |||
16 | .globl __do_int_store | ||
17 | __do_int_store: | ||
18 | rd %asi, %o4 | ||
19 | wr %o3, 0, %asi | ||
20 | ldx [%o2], %g3 | ||
21 | cmp %o1, 2 | ||
22 | be,pn %icc, 2f | ||
23 | cmp %o1, 4 | ||
24 | be,pt %icc, 1f | ||
25 | srlx %g3, 24, %g2 | ||
26 | srlx %g3, 56, %g1 | ||
27 | srlx %g3, 48, %g7 | ||
28 | 4: stba %g1, [%o0] %asi | ||
29 | srlx %g3, 40, %g1 | ||
30 | 5: stba %g7, [%o0 + 1] %asi | ||
31 | srlx %g3, 32, %g7 | ||
32 | 6: stba %g1, [%o0 + 2] %asi | ||
33 | 7: stba %g7, [%o0 + 3] %asi | ||
34 | srlx %g3, 16, %g1 | ||
35 | 8: stba %g2, [%o0 + 4] %asi | ||
36 | srlx %g3, 8, %g7 | ||
37 | 9: stba %g1, [%o0 + 5] %asi | ||
38 | 10: stba %g7, [%o0 + 6] %asi | ||
39 | ba,pt %xcc, 0f | ||
40 | 11: stba %g3, [%o0 + 7] %asi | ||
41 | 1: srl %g3, 16, %g7 | ||
42 | 12: stba %g2, [%o0] %asi | ||
43 | srl %g3, 8, %g2 | ||
44 | 13: stba %g7, [%o0 + 1] %asi | ||
45 | 14: stba %g2, [%o0 + 2] %asi | ||
46 | ba,pt %xcc, 0f | ||
47 | 15: stba %g3, [%o0 + 3] %asi | ||
48 | 2: srl %g3, 8, %g2 | ||
49 | 16: stba %g2, [%o0] %asi | ||
50 | 17: stba %g3, [%o0 + 1] %asi | ||
51 | 0: | ||
52 | wr %o4, 0x0, %asi | ||
53 | retl | ||
54 | nop | ||
55 | .size __do_int_store, .-__do_int_store | ||
56 | |||
57 | .section __ex_table | ||
58 | .word 4b, kernel_unaligned_trap_fault | ||
59 | .word 5b, kernel_unaligned_trap_fault | ||
60 | .word 6b, kernel_unaligned_trap_fault | ||
61 | .word 7b, kernel_unaligned_trap_fault | ||
62 | .word 8b, kernel_unaligned_trap_fault | ||
63 | .word 9b, kernel_unaligned_trap_fault | ||
64 | .word 10b, kernel_unaligned_trap_fault | ||
65 | .word 11b, kernel_unaligned_trap_fault | ||
66 | .word 12b, kernel_unaligned_trap_fault | ||
67 | .word 13b, kernel_unaligned_trap_fault | ||
68 | .word 14b, kernel_unaligned_trap_fault | ||
69 | .word 15b, kernel_unaligned_trap_fault | ||
70 | .word 16b, kernel_unaligned_trap_fault | ||
71 | .word 17b, kernel_unaligned_trap_fault | ||
72 | .previous | ||
73 | |||
74 | .globl do_int_load | ||
75 | do_int_load: | ||
76 | rd %asi, %o5 | ||
77 | wr %o4, 0, %asi | ||
78 | cmp %o1, 8 | ||
79 | bge,pn %icc, 9f | ||
80 | cmp %o1, 4 | ||
81 | be,pt %icc, 6f | ||
82 | 4: lduba [%o2] %asi, %g2 | ||
83 | 5: lduba [%o2 + 1] %asi, %g3 | ||
84 | sll %g2, 8, %g2 | ||
85 | brz,pt %o3, 3f | ||
86 | add %g2, %g3, %g2 | ||
87 | sllx %g2, 48, %g2 | ||
88 | srax %g2, 48, %g2 | ||
89 | 3: ba,pt %xcc, 0f | ||
90 | stx %g2, [%o0] | ||
91 | 6: lduba [%o2 + 1] %asi, %g3 | ||
92 | sll %g2, 24, %g2 | ||
93 | 7: lduba [%o2 + 2] %asi, %g7 | ||
94 | sll %g3, 16, %g3 | ||
95 | 8: lduba [%o2 + 3] %asi, %g1 | ||
96 | sll %g7, 8, %g7 | ||
97 | or %g2, %g3, %g2 | ||
98 | or %g7, %g1, %g7 | ||
99 | or %g2, %g7, %g2 | ||
100 | brnz,a,pt %o3, 3f | ||
101 | sra %g2, 0, %g2 | ||
102 | 3: ba,pt %xcc, 0f | ||
103 | stx %g2, [%o0] | ||
104 | 9: lduba [%o2] %asi, %g2 | ||
105 | 10: lduba [%o2 + 1] %asi, %g3 | ||
106 | sllx %g2, 56, %g2 | ||
107 | 11: lduba [%o2 + 2] %asi, %g7 | ||
108 | sllx %g3, 48, %g3 | ||
109 | 12: lduba [%o2 + 3] %asi, %g1 | ||
110 | sllx %g7, 40, %g7 | ||
111 | sllx %g1, 32, %g1 | ||
112 | or %g2, %g3, %g2 | ||
113 | or %g7, %g1, %g7 | ||
114 | 13: lduba [%o2 + 4] %asi, %g3 | ||
115 | or %g2, %g7, %g7 | ||
116 | 14: lduba [%o2 + 5] %asi, %g1 | ||
117 | sllx %g3, 24, %g3 | ||
118 | 15: lduba [%o2 + 6] %asi, %g2 | ||
119 | sllx %g1, 16, %g1 | ||
120 | or %g7, %g3, %g7 | ||
121 | 16: lduba [%o2 + 7] %asi, %g3 | ||
122 | sllx %g2, 8, %g2 | ||
123 | or %g7, %g1, %g7 | ||
124 | or %g2, %g3, %g2 | ||
125 | or %g7, %g2, %g7 | ||
126 | cmp %o1, 8 | ||
127 | be,a,pt %icc, 0f | ||
128 | stx %g7, [%o0] | ||
129 | srlx %g7, 32, %g2 | ||
130 | sra %g7, 0, %g7 | ||
131 | stx %g2, [%o0] | ||
132 | stx %g7, [%o0 + 8] | ||
133 | 0: | ||
134 | wr %o5, 0x0, %asi | ||
135 | retl | ||
136 | nop | ||
137 | .size __do_int_load, .-__do_int_load | ||
138 | |||
139 | .section __ex_table | ||
140 | .word 4b, kernel_unaligned_trap_fault | ||
141 | .word 5b, kernel_unaligned_trap_fault | ||
142 | .word 6b, kernel_unaligned_trap_fault | ||
143 | .word 7b, kernel_unaligned_trap_fault | ||
144 | .word 8b, kernel_unaligned_trap_fault | ||
145 | .word 9b, kernel_unaligned_trap_fault | ||
146 | .word 10b, kernel_unaligned_trap_fault | ||
147 | .word 11b, kernel_unaligned_trap_fault | ||
148 | .word 12b, kernel_unaligned_trap_fault | ||
149 | .word 13b, kernel_unaligned_trap_fault | ||
150 | .word 14b, kernel_unaligned_trap_fault | ||
151 | .word 15b, kernel_unaligned_trap_fault | ||
152 | .word 16b, kernel_unaligned_trap_fault | ||
153 | .previous | ||
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index 4372bf32ecf6..11c3e88732e4 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -180,169 +180,28 @@ static void __attribute_used__ unaligned_panic(char *str, struct pt_regs *regs) | |||
180 | die_if_kernel(str, regs); | 180 | die_if_kernel(str, regs); |
181 | } | 181 | } |
182 | 182 | ||
183 | #define do_integer_load(dest_reg, size, saddr, is_signed, asi, errh) ({ \ | 183 | extern void do_int_load(unsigned long *dest_reg, int size, |
184 | __asm__ __volatile__ ( \ | 184 | unsigned long *saddr, int is_signed, int asi); |
185 | "wr %4, 0, %%asi\n\t" \ | ||
186 | "cmp %1, 8\n\t" \ | ||
187 | "bge,pn %%icc, 9f\n\t" \ | ||
188 | " cmp %1, 4\n\t" \ | ||
189 | "be,pt %%icc, 6f\n" \ | ||
190 | "4:\t" " lduba [%2] %%asi, %%l1\n" \ | ||
191 | "5:\t" "lduba [%2 + 1] %%asi, %%l2\n\t" \ | ||
192 | "sll %%l1, 8, %%l1\n\t" \ | ||
193 | "brz,pt %3, 3f\n\t" \ | ||
194 | " add %%l1, %%l2, %%l1\n\t" \ | ||
195 | "sllx %%l1, 48, %%l1\n\t" \ | ||
196 | "srax %%l1, 48, %%l1\n" \ | ||
197 | "3:\t" "ba,pt %%xcc, 0f\n\t" \ | ||
198 | " stx %%l1, [%0]\n" \ | ||
199 | "6:\t" "lduba [%2 + 1] %%asi, %%l2\n\t" \ | ||
200 | "sll %%l1, 24, %%l1\n" \ | ||
201 | "7:\t" "lduba [%2 + 2] %%asi, %%g7\n\t" \ | ||
202 | "sll %%l2, 16, %%l2\n" \ | ||
203 | "8:\t" "lduba [%2 + 3] %%asi, %%g1\n\t" \ | ||
204 | "sll %%g7, 8, %%g7\n\t" \ | ||
205 | "or %%l1, %%l2, %%l1\n\t" \ | ||
206 | "or %%g7, %%g1, %%g7\n\t" \ | ||
207 | "or %%l1, %%g7, %%l1\n\t" \ | ||
208 | "brnz,a,pt %3, 3f\n\t" \ | ||
209 | " sra %%l1, 0, %%l1\n" \ | ||
210 | "3:\t" "ba,pt %%xcc, 0f\n\t" \ | ||
211 | " stx %%l1, [%0]\n" \ | ||
212 | "9:\t" "lduba [%2] %%asi, %%l1\n" \ | ||
213 | "10:\t" "lduba [%2 + 1] %%asi, %%l2\n\t" \ | ||
214 | "sllx %%l1, 56, %%l1\n" \ | ||
215 | "11:\t" "lduba [%2 + 2] %%asi, %%g7\n\t" \ | ||
216 | "sllx %%l2, 48, %%l2\n" \ | ||
217 | "12:\t" "lduba [%2 + 3] %%asi, %%g1\n\t" \ | ||
218 | "sllx %%g7, 40, %%g7\n\t" \ | ||
219 | "sllx %%g1, 32, %%g1\n\t" \ | ||
220 | "or %%l1, %%l2, %%l1\n\t" \ | ||
221 | "or %%g7, %%g1, %%g7\n" \ | ||
222 | "13:\t" "lduba [%2 + 4] %%asi, %%l2\n\t" \ | ||
223 | "or %%l1, %%g7, %%g7\n" \ | ||
224 | "14:\t" "lduba [%2 + 5] %%asi, %%g1\n\t" \ | ||
225 | "sllx %%l2, 24, %%l2\n" \ | ||
226 | "15:\t" "lduba [%2 + 6] %%asi, %%l1\n\t" \ | ||
227 | "sllx %%g1, 16, %%g1\n\t" \ | ||
228 | "or %%g7, %%l2, %%g7\n" \ | ||
229 | "16:\t" "lduba [%2 + 7] %%asi, %%l2\n\t" \ | ||
230 | "sllx %%l1, 8, %%l1\n\t" \ | ||
231 | "or %%g7, %%g1, %%g7\n\t" \ | ||
232 | "or %%l1, %%l2, %%l1\n\t" \ | ||
233 | "or %%g7, %%l1, %%g7\n\t" \ | ||
234 | "cmp %1, 8\n\t" \ | ||
235 | "be,a,pt %%icc, 0f\n\t" \ | ||
236 | " stx %%g7, [%0]\n\t" \ | ||
237 | "srlx %%g7, 32, %%l1\n\t" \ | ||
238 | "sra %%g7, 0, %%g7\n\t" \ | ||
239 | "stx %%l1, [%0]\n\t" \ | ||
240 | "stx %%g7, [%0 + 8]\n" \ | ||
241 | "0:\n\t" \ | ||
242 | "wr %%g0, %5, %%asi\n\n\t" \ | ||
243 | ".section __ex_table\n\t" \ | ||
244 | ".word 4b, " #errh "\n\t" \ | ||
245 | ".word 5b, " #errh "\n\t" \ | ||
246 | ".word 6b, " #errh "\n\t" \ | ||
247 | ".word 7b, " #errh "\n\t" \ | ||
248 | ".word 8b, " #errh "\n\t" \ | ||
249 | ".word 9b, " #errh "\n\t" \ | ||
250 | ".word 10b, " #errh "\n\t" \ | ||
251 | ".word 11b, " #errh "\n\t" \ | ||
252 | ".word 12b, " #errh "\n\t" \ | ||
253 | ".word 13b, " #errh "\n\t" \ | ||
254 | ".word 14b, " #errh "\n\t" \ | ||
255 | ".word 15b, " #errh "\n\t" \ | ||
256 | ".word 16b, " #errh "\n\n\t" \ | ||
257 | ".previous\n\t" \ | ||
258 | : : "r" (dest_reg), "r" (size), "r" (saddr), "r" (is_signed), \ | ||
259 | "r" (asi), "i" (ASI_AIUS) \ | ||
260 | : "l1", "l2", "g7", "g1", "cc"); \ | ||
261 | }) | ||
262 | 185 | ||
263 | #define store_common(dst_addr, size, src_val, asi, errh) ({ \ | 186 | extern void __do_int_store(unsigned long *dst_addr, int size, |
264 | __asm__ __volatile__ ( \ | 187 | unsigned long *src_val, int asi); |
265 | "wr %3, 0, %%asi\n\t" \ | 188 | |
266 | "ldx [%2], %%l1\n" \ | 189 | static inline void do_int_store(int reg_num, int size, unsigned long *dst_addr, |
267 | "cmp %1, 2\n\t" \ | 190 | struct pt_regs *regs, int asi) |
268 | "be,pn %%icc, 2f\n\t" \ | 191 | { |
269 | " cmp %1, 4\n\t" \ | 192 | unsigned long zero = 0; |
270 | "be,pt %%icc, 1f\n\t" \ | 193 | unsigned long *src_val = &zero; |
271 | " srlx %%l1, 24, %%l2\n\t" \ | 194 | |
272 | "srlx %%l1, 56, %%g1\n\t" \ | 195 | if (size == 16) { |
273 | "srlx %%l1, 48, %%g7\n" \ | 196 | size = 8; |
274 | "4:\t" "stba %%g1, [%0] %%asi\n\t" \ | 197 | zero = (((long)(reg_num ? |
275 | "srlx %%l1, 40, %%g1\n" \ | 198 | (unsigned)fetch_reg(reg_num, regs) : 0)) << 32) | |
276 | "5:\t" "stba %%g7, [%0 + 1] %%asi\n\t" \ | 199 | (unsigned)fetch_reg(reg_num + 1, regs); |
277 | "srlx %%l1, 32, %%g7\n" \ | 200 | } else if (reg_num) { |
278 | "6:\t" "stba %%g1, [%0 + 2] %%asi\n" \ | 201 | src_val = fetch_reg_addr(reg_num, regs); |
279 | "7:\t" "stba %%g7, [%0 + 3] %%asi\n\t" \ | 202 | } |
280 | "srlx %%l1, 16, %%g1\n" \ | 203 | __do_int_store(dst_addr, size, src_val, asi); |
281 | "8:\t" "stba %%l2, [%0 + 4] %%asi\n\t" \ | 204 | } |
282 | "srlx %%l1, 8, %%g7\n" \ | ||
283 | "9:\t" "stba %%g1, [%0 + 5] %%asi\n" \ | ||
284 | "10:\t" "stba %%g7, [%0 + 6] %%asi\n\t" \ | ||
285 | "ba,pt %%xcc, 0f\n" \ | ||
286 | "11:\t" " stba %%l1, [%0 + 7] %%asi\n" \ | ||
287 | "1:\t" "srl %%l1, 16, %%g7\n" \ | ||
288 | "12:\t" "stba %%l2, [%0] %%asi\n\t" \ | ||
289 | "srl %%l1, 8, %%l2\n" \ | ||
290 | "13:\t" "stba %%g7, [%0 + 1] %%asi\n" \ | ||
291 | "14:\t" "stba %%l2, [%0 + 2] %%asi\n\t" \ | ||
292 | "ba,pt %%xcc, 0f\n" \ | ||
293 | "15:\t" " stba %%l1, [%0 + 3] %%asi\n" \ | ||
294 | "2:\t" "srl %%l1, 8, %%l2\n" \ | ||
295 | "16:\t" "stba %%l2, [%0] %%asi\n" \ | ||
296 | "17:\t" "stba %%l1, [%0 + 1] %%asi\n" \ | ||
297 | "0:\n\t" \ | ||
298 | "wr %%g0, %4, %%asi\n\n\t" \ | ||
299 | ".section __ex_table\n\t" \ | ||
300 | ".word 4b, " #errh "\n\t" \ | ||
301 | ".word 5b, " #errh "\n\t" \ | ||
302 | ".word 6b, " #errh "\n\t" \ | ||
303 | ".word 7b, " #errh "\n\t" \ | ||
304 | ".word 8b, " #errh "\n\t" \ | ||
305 | ".word 9b, " #errh "\n\t" \ | ||
306 | ".word 10b, " #errh "\n\t" \ | ||
307 | ".word 11b, " #errh "\n\t" \ | ||
308 | ".word 12b, " #errh "\n\t" \ | ||
309 | ".word 13b, " #errh "\n\t" \ | ||
310 | ".word 14b, " #errh "\n\t" \ | ||
311 | ".word 15b, " #errh "\n\t" \ | ||
312 | ".word 16b, " #errh "\n\t" \ | ||
313 | ".word 17b, " #errh "\n\n\t" \ | ||
314 | ".previous\n\t" \ | ||
315 | : : "r" (dst_addr), "r" (size), "r" (src_val), "r" (asi), "i" (ASI_AIUS)\ | ||
316 | : "l1", "l2", "g7", "g1", "cc"); \ | ||
317 | }) | ||
318 | |||
319 | #define do_integer_store(reg_num, size, dst_addr, regs, asi, errh) ({ \ | ||
320 | unsigned long zero = 0; \ | ||
321 | unsigned long *src_val = &zero; \ | ||
322 | \ | ||
323 | if (size == 16) { \ | ||
324 | size = 8; \ | ||
325 | zero = (((long)(reg_num ? \ | ||
326 | (unsigned)fetch_reg(reg_num, regs) : 0)) << 32) | \ | ||
327 | (unsigned)fetch_reg(reg_num + 1, regs); \ | ||
328 | } else if (reg_num) src_val = fetch_reg_addr(reg_num, regs); \ | ||
329 | store_common(dst_addr, size, src_val, asi, errh); \ | ||
330 | }) | ||
331 | |||
332 | extern void smp_capture(void); | ||
333 | extern void smp_release(void); | ||
334 | |||
335 | #define do_atomic(srcdest_reg, mem, errh) ({ \ | ||
336 | unsigned long flags, tmp; \ | ||
337 | \ | ||
338 | smp_capture(); \ | ||
339 | local_irq_save(flags); \ | ||
340 | tmp = *srcdest_reg; \ | ||
341 | do_integer_load(srcdest_reg, 4, mem, 0, errh); \ | ||
342 | store_common(mem, 4, &tmp, errh); \ | ||
343 | local_irq_restore(flags); \ | ||
344 | smp_release(); \ | ||
345 | }) | ||
346 | 205 | ||
347 | static inline void advance(struct pt_regs *regs) | 206 | static inline void advance(struct pt_regs *regs) |
348 | { | 207 | { |
@@ -364,24 +223,29 @@ static inline int ok_for_kernel(unsigned int insn) | |||
364 | return !floating_point_load_or_store_p(insn); | 223 | return !floating_point_load_or_store_p(insn); |
365 | } | 224 | } |
366 | 225 | ||
367 | void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) __asm__ ("kernel_mna_trap_fault"); | 226 | void kernel_mna_trap_fault(void) |
368 | |||
369 | void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) | ||
370 | { | 227 | { |
371 | unsigned long g2 = regs->u_regs [UREG_G2]; | 228 | struct pt_regs *regs = current_thread_info()->kern_una_regs; |
229 | unsigned int insn = current_thread_info()->kern_una_insn; | ||
230 | unsigned long g2 = regs->u_regs[UREG_G2]; | ||
372 | unsigned long fixup = search_extables_range(regs->tpc, &g2); | 231 | unsigned long fixup = search_extables_range(regs->tpc, &g2); |
373 | 232 | ||
374 | if (!fixup) { | 233 | if (!fixup) { |
375 | unsigned long address = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f)); | 234 | unsigned long address; |
235 | |||
236 | address = compute_effective_address(regs, insn, | ||
237 | ((insn >> 25) & 0x1f)); | ||
376 | if (address < PAGE_SIZE) { | 238 | if (address < PAGE_SIZE) { |
377 | printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference in mna handler"); | 239 | printk(KERN_ALERT "Unable to handle kernel NULL " |
240 | "pointer dereference in mna handler"); | ||
378 | } else | 241 | } else |
379 | printk(KERN_ALERT "Unable to handle kernel paging request in mna handler"); | 242 | printk(KERN_ALERT "Unable to handle kernel paging " |
243 | "request in mna handler"); | ||
380 | printk(KERN_ALERT " at virtual address %016lx\n",address); | 244 | printk(KERN_ALERT " at virtual address %016lx\n",address); |
381 | printk(KERN_ALERT "current->{mm,active_mm}->context = %016lx\n", | 245 | printk(KERN_ALERT "current->{active_,}mm->context = %016lx\n", |
382 | (current->mm ? CTX_HWBITS(current->mm->context) : | 246 | (current->mm ? CTX_HWBITS(current->mm->context) : |
383 | CTX_HWBITS(current->active_mm->context))); | 247 | CTX_HWBITS(current->active_mm->context))); |
384 | printk(KERN_ALERT "current->{mm,active_mm}->pgd = %016lx\n", | 248 | printk(KERN_ALERT "current->{active_,}mm->pgd = %016lx\n", |
385 | (current->mm ? (unsigned long) current->mm->pgd : | 249 | (current->mm ? (unsigned long) current->mm->pgd : |
386 | (unsigned long) current->active_mm->pgd)); | 250 | (unsigned long) current->active_mm->pgd)); |
387 | die_if_kernel("Oops", regs); | 251 | die_if_kernel("Oops", regs); |
@@ -400,48 +264,41 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn, u | |||
400 | enum direction dir = decode_direction(insn); | 264 | enum direction dir = decode_direction(insn); |
401 | int size = decode_access_size(insn); | 265 | int size = decode_access_size(insn); |
402 | 266 | ||
267 | current_thread_info()->kern_una_regs = regs; | ||
268 | current_thread_info()->kern_una_insn = insn; | ||
269 | |||
403 | if (!ok_for_kernel(insn) || dir == both) { | 270 | if (!ok_for_kernel(insn) || dir == both) { |
404 | printk("Unsupported unaligned load/store trap for kernel at <%016lx>.\n", | 271 | printk("Unsupported unaligned load/store trap for kernel " |
405 | regs->tpc); | 272 | "at <%016lx>.\n", regs->tpc); |
406 | unaligned_panic("Kernel does fpu/atomic unaligned load/store.", regs); | 273 | unaligned_panic("Kernel does fpu/atomic " |
407 | 274 | "unaligned load/store.", regs); | |
408 | __asm__ __volatile__ ("\n" | 275 | |
409 | "kernel_unaligned_trap_fault:\n\t" | 276 | kernel_mna_trap_fault(); |
410 | "mov %0, %%o0\n\t" | ||
411 | "call kernel_mna_trap_fault\n\t" | ||
412 | " mov %1, %%o1\n\t" | ||
413 | : | ||
414 | : "r" (regs), "r" (insn) | ||
415 | : "o0", "o1", "o2", "o3", "o4", "o5", "o7", | ||
416 | "g1", "g2", "g3", "g4", "g7", "cc"); | ||
417 | } else { | 277 | } else { |
418 | unsigned long addr = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f)); | 278 | unsigned long addr; |
419 | 279 | ||
280 | addr = compute_effective_address(regs, insn, | ||
281 | ((insn >> 25) & 0x1f)); | ||
420 | #ifdef DEBUG_MNA | 282 | #ifdef DEBUG_MNA |
421 | printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] retpc[%016lx]\n", | 283 | printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] " |
422 | regs->tpc, dirstrings[dir], addr, size, regs->u_regs[UREG_RETPC]); | 284 | "retpc[%016lx]\n", |
285 | regs->tpc, dirstrings[dir], addr, size, | ||
286 | regs->u_regs[UREG_RETPC]); | ||
423 | #endif | 287 | #endif |
424 | switch (dir) { | 288 | switch (dir) { |
425 | case load: | 289 | case load: |
426 | do_integer_load(fetch_reg_addr(((insn>>25)&0x1f), regs), | 290 | do_int_load(fetch_reg_addr(((insn>>25)&0x1f), regs), |
427 | size, (unsigned long *) addr, | 291 | size, (unsigned long *) addr, |
428 | decode_signedness(insn), decode_asi(insn, regs), | 292 | decode_signedness(insn), |
429 | kernel_unaligned_trap_fault); | 293 | decode_asi(insn, regs)); |
430 | break; | 294 | break; |
431 | 295 | ||
432 | case store: | 296 | case store: |
433 | do_integer_store(((insn>>25)&0x1f), size, | 297 | do_int_store(((insn>>25)&0x1f), size, |
434 | (unsigned long *) addr, regs, | 298 | (unsigned long *) addr, regs, |
435 | decode_asi(insn, regs), | 299 | decode_asi(insn, regs)); |
436 | kernel_unaligned_trap_fault); | ||
437 | break; | ||
438 | #if 0 /* unsupported */ | ||
439 | case both: | ||
440 | do_atomic(fetch_reg_addr(((insn>>25)&0x1f), regs), | ||
441 | (unsigned long *) addr, | ||
442 | kernel_unaligned_trap_fault); | ||
443 | break; | 300 | break; |
444 | #endif | 301 | |
445 | default: | 302 | default: |
446 | panic("Impossible kernel unaligned trap."); | 303 | panic("Impossible kernel unaligned trap."); |
447 | /* Not reached... */ | 304 | /* Not reached... */ |
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index b15761ff4101..fa25e39fe54d 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -492,6 +492,14 @@ void __cpuinit start_secondary(void) | |||
492 | */ | 492 | */ |
493 | set_cpu_sibling_map(smp_processor_id()); | 493 | set_cpu_sibling_map(smp_processor_id()); |
494 | 494 | ||
495 | /* | ||
496 | * Wait for TSC sync to not schedule things before. | ||
497 | * We still process interrupts, which could see an inconsistent | ||
498 | * time in that window unfortunately. | ||
499 | * Do this here because TSC sync has global unprotected state. | ||
500 | */ | ||
501 | tsc_sync_wait(); | ||
502 | |||
495 | /* | 503 | /* |
496 | * We need to hold call_lock, so there is no inconsistency | 504 | * We need to hold call_lock, so there is no inconsistency |
497 | * between the time smp_call_function() determines number of | 505 | * between the time smp_call_function() determines number of |
@@ -509,13 +517,6 @@ void __cpuinit start_secondary(void) | |||
509 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 517 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
510 | unlock_ipi_call_lock(); | 518 | unlock_ipi_call_lock(); |
511 | 519 | ||
512 | mb(); | ||
513 | |||
514 | /* Wait for TSC sync to not schedule things before. | ||
515 | We still process interrupts, which could see an inconsistent | ||
516 | time in that window unfortunately. */ | ||
517 | tsc_sync_wait(); | ||
518 | |||
519 | cpu_idle(); | 520 | cpu_idle(); |
520 | } | 521 | } |
521 | 522 | ||
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index 493819e543a5..ca914c3bd49c 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -211,9 +211,7 @@ int unhandled_signal(struct task_struct *tsk, int sig) | |||
211 | { | 211 | { |
212 | if (tsk->pid == 1) | 212 | if (tsk->pid == 1) |
213 | return 1; | 213 | return 1; |
214 | /* Warn for strace, but not for gdb */ | 214 | if (tsk->ptrace & PT_PTRACED) |
215 | if (!test_ti_thread_flag(tsk->thread_info, TIF_SYSCALL_TRACE) && | ||
216 | (tsk->ptrace & PT_PTRACED)) | ||
217 | return 0; | 215 | return 0; |
218 | return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) || | 216 | return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) || |
219 | (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL); | 217 | (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL); |
diff --git a/arch/x86_64/pci/k8-bus.c b/arch/x86_64/pci/k8-bus.c index c2c38b579939..d80c323669e0 100644 --- a/arch/x86_64/pci/k8-bus.c +++ b/arch/x86_64/pci/k8-bus.c | |||
@@ -47,13 +47,22 @@ fill_mp_bus_to_cpumask(void) | |||
47 | * if there are no busses hanging off of the current | 47 | * if there are no busses hanging off of the current |
48 | * ldt link then both the secondary and subordinate | 48 | * ldt link then both the secondary and subordinate |
49 | * bus number fields are set to 0. | 49 | * bus number fields are set to 0. |
50 | * | ||
51 | * RED-PEN | ||
52 | * This is slightly broken because it assumes | ||
53 | * HT node IDs == Linux node ids, which is not always | ||
54 | * true. However it is probably mostly true. | ||
50 | */ | 55 | */ |
51 | if (!(SECONDARY_LDT_BUS_NUMBER(ldtbus) == 0 | 56 | if (!(SECONDARY_LDT_BUS_NUMBER(ldtbus) == 0 |
52 | && SUBORDINATE_LDT_BUS_NUMBER(ldtbus) == 0)) { | 57 | && SUBORDINATE_LDT_BUS_NUMBER(ldtbus) == 0)) { |
53 | for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus); | 58 | for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus); |
54 | j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); | 59 | j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); |
55 | j++) | 60 | j++) { |
56 | pci_bus_to_node[j] = NODE_ID(nid); | 61 | int node = NODE_ID(nid); |
62 | if (!node_online(node)) | ||
63 | node = 0; | ||
64 | pci_bus_to_node[j] = node; | ||
65 | } | ||
57 | } | 66 | } |
58 | } | 67 | } |
59 | } | 68 | } |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 4f27e5519296..7333b41d4224 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -80,7 +80,7 @@ config SERIAL_NONSTANDARD | |||
80 | 80 | ||
81 | config COMPUTONE | 81 | config COMPUTONE |
82 | tristate "Computone IntelliPort Plus serial support" | 82 | tristate "Computone IntelliPort Plus serial support" |
83 | depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP | 83 | depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (BROKEN || !SPARC32) |
84 | ---help--- | 84 | ---help--- |
85 | This driver supports the entire family of Intelliport II/Plus | 85 | This driver supports the entire family of Intelliport II/Plus |
86 | controllers with the exception of the MicroChannel controllers and | 86 | controllers with the exception of the MicroChannel controllers and |
@@ -138,7 +138,7 @@ config CYZ_INTR | |||
138 | 138 | ||
139 | config DIGIEPCA | 139 | config DIGIEPCA |
140 | tristate "Digiboard Intelligent Async Support" | 140 | tristate "Digiboard Intelligent Async Support" |
141 | depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP | 141 | depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (!64BIT || BROKEN) |
142 | ---help--- | 142 | ---help--- |
143 | This is a driver for Digi International's Xx, Xeve, and Xem series | 143 | This is a driver for Digi International's Xx, Xeve, and Xem series |
144 | of cards which provide multiple serial ports. You would need | 144 | of cards which provide multiple serial ports. You would need |
@@ -208,7 +208,7 @@ config SYNCLINK | |||
208 | 208 | ||
209 | config SYNCLINKMP | 209 | config SYNCLINKMP |
210 | tristate "SyncLink Multiport support" | 210 | tristate "SyncLink Multiport support" |
211 | depends on SERIAL_NONSTANDARD | 211 | depends on SERIAL_NONSTANDARD && (BROKEN || !SPARC32) |
212 | help | 212 | help |
213 | Enable support for the SyncLink Multiport (2 or 4 ports) | 213 | Enable support for the SyncLink Multiport (2 or 4 ports) |
214 | serial adapter, running asynchronous and HDLC communications up | 214 | serial adapter, running asynchronous and HDLC communications up |
@@ -735,7 +735,7 @@ config SGI_IP27_RTC | |||
735 | 735 | ||
736 | config GEN_RTC | 736 | config GEN_RTC |
737 | tristate "Generic /dev/rtc emulation" | 737 | tristate "Generic /dev/rtc emulation" |
738 | depends on RTC!=y && !IA64 && !ARM && !PPC64 | 738 | depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R && !SPARC32 |
739 | ---help--- | 739 | ---help--- |
740 | If you say Y here and create a character special file /dev/rtc with | 740 | If you say Y here and create a character special file /dev/rtc with |
741 | major number 10 and minor number 135 using mknod ("man mknod"), you | 741 | major number 10 and minor number 135 using mknod ("man mknod"), you |
diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index 79c8e2dd9c33..32cdfb30e9b4 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | menu "InfiniBand support" | 1 | menu "InfiniBand support" |
2 | 2 | ||
3 | config INFINIBAND | 3 | config INFINIBAND |
4 | depends on PCI || BROKEN | ||
4 | tristate "InfiniBand support" | 5 | tristate "InfiniBand support" |
5 | ---help--- | 6 | ---help--- |
6 | Core support for InfiniBand (IB). Make sure to also select | 7 | Core support for InfiniBand (IB). Make sure to also select |
diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index 6c7b8bffc6fd..801c98f30e5c 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig | |||
@@ -134,6 +134,7 @@ config HISAX_AVM_A1 | |||
134 | 134 | ||
135 | config HISAX_FRITZPCI | 135 | config HISAX_FRITZPCI |
136 | bool "AVM PnP/PCI (Fritz!PnP/PCI)" | 136 | bool "AVM PnP/PCI (Fritz!PnP/PCI)" |
137 | depends on BROKEN || !PPC64 | ||
137 | help | 138 | help |
138 | This enables HiSax support for the AVM "Fritz!PnP" and "Fritz!PCI". | 139 | This enables HiSax support for the AVM "Fritz!PnP" and "Fritz!PCI". |
139 | See <file:Documentation/isdn/README.HiSax> on how to configure it. | 140 | See <file:Documentation/isdn/README.HiSax> on how to configure it. |
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index 65ab64c43b3e..bc3e096d84f7 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig | |||
@@ -103,7 +103,7 @@ config PMAC_MEDIABAY | |||
103 | # on non-powerbook machines (but only on PMU based ones AFAIK) | 103 | # on non-powerbook machines (but only on PMU based ones AFAIK) |
104 | config PMAC_BACKLIGHT | 104 | config PMAC_BACKLIGHT |
105 | bool "Backlight control for LCD screens" | 105 | bool "Backlight control for LCD screens" |
106 | depends on ADB_PMU | 106 | depends on ADB_PMU && (BROKEN || !PPC64) |
107 | help | 107 | help |
108 | Say Y here to build in code to manage the LCD backlight on a | 108 | Say Y here to build in code to manage the LCD backlight on a |
109 | Macintosh PowerBook. With this code, the backlight will be turned | 109 | Macintosh PowerBook. With this code, the backlight will be turned |
diff --git a/drivers/md/md.c b/drivers/md/md.c index d4c275604a3e..486ee50cfdda 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -256,8 +256,7 @@ static inline void mddev_unlock(mddev_t * mddev) | |||
256 | { | 256 | { |
257 | up(&mddev->reconfig_sem); | 257 | up(&mddev->reconfig_sem); |
258 | 258 | ||
259 | if (mddev->thread) | 259 | md_wakeup_thread(mddev->thread); |
260 | md_wakeup_thread(mddev->thread); | ||
261 | } | 260 | } |
262 | 261 | ||
263 | mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr) | 262 | mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr) |
@@ -1714,6 +1713,7 @@ static int do_md_run(mddev_t * mddev) | |||
1714 | mddev->in_sync = 1; | 1713 | mddev->in_sync = 1; |
1715 | 1714 | ||
1716 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 1715 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
1716 | md_wakeup_thread(mddev->thread); | ||
1717 | 1717 | ||
1718 | if (mddev->sb_dirty) | 1718 | if (mddev->sb_dirty) |
1719 | md_update_sb(mddev); | 1719 | md_update_sb(mddev); |
@@ -2236,8 +2236,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) | |||
2236 | export_rdev(rdev); | 2236 | export_rdev(rdev); |
2237 | 2237 | ||
2238 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 2238 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
2239 | if (mddev->thread) | 2239 | md_wakeup_thread(mddev->thread); |
2240 | md_wakeup_thread(mddev->thread); | ||
2241 | return err; | 2240 | return err; |
2242 | } | 2241 | } |
2243 | 2242 | ||
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index ac81e5e01a9a..3f5742396096 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -356,7 +356,7 @@ config VIDEO_M32R_AR | |||
356 | 356 | ||
357 | config VIDEO_M32R_AR_M64278 | 357 | config VIDEO_M32R_AR_M64278 |
358 | tristate "Use Colour AR module M64278(VGA)" | 358 | tristate "Use Colour AR module M64278(VGA)" |
359 | depends on VIDEO_M32R_AR | 359 | depends on VIDEO_M32R_AR && PLAT_M32700UT |
360 | ---help--- | 360 | ---help--- |
361 | Say Y here to use the Renesas M64278E-800 camera module, | 361 | Say Y here to use the Renesas M64278E-800 camera module, |
362 | which supports VGA(640x480 pixcels) size of images. | 362 | which supports VGA(640x480 pixcels) size of images. |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 1e50b8e32add..79e8aa6f2b9e 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1147,7 +1147,7 @@ config IBMVETH | |||
1147 | be called ibmveth. | 1147 | be called ibmveth. |
1148 | 1148 | ||
1149 | config IBM_EMAC | 1149 | config IBM_EMAC |
1150 | tristate "IBM PPC4xx EMAC driver support" | 1150 | bool "IBM PPC4xx EMAC driver support" |
1151 | depends on 4xx | 1151 | depends on 4xx |
1152 | select CRC32 | 1152 | select CRC32 |
1153 | ---help--- | 1153 | ---help--- |
@@ -1156,7 +1156,7 @@ config IBM_EMAC | |||
1156 | 1156 | ||
1157 | config IBM_EMAC_ERRMSG | 1157 | config IBM_EMAC_ERRMSG |
1158 | bool "Verbose error messages" | 1158 | bool "Verbose error messages" |
1159 | depends on IBM_EMAC | 1159 | depends on IBM_EMAC && BROKEN |
1160 | 1160 | ||
1161 | config IBM_EMAC_RXB | 1161 | config IBM_EMAC_RXB |
1162 | int "Number of receive buffers" | 1162 | int "Number of receive buffers" |
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 6482d994d489..c7fb3675c09d 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c | |||
@@ -1712,11 +1712,10 @@ struct mal_commac_ops emac_commac_ops = { | |||
1712 | }; | 1712 | }; |
1713 | 1713 | ||
1714 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1714 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1715 | static int emac_netpoll(struct net_device *ndev) | 1715 | static void emac_netpoll(struct net_device *ndev) |
1716 | { | 1716 | { |
1717 | emac_rxeob_dev((void *)ndev, 0); | 1717 | emac_rxeob_dev((void *)ndev, 0); |
1718 | emac_txeob_dev((void *)ndev, 0); | 1718 | emac_txeob_dev((void *)ndev, 0); |
1719 | return 0; | ||
1720 | } | 1719 | } |
1721 | #endif | 1720 | #endif |
1722 | 1721 | ||
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 368b8fb14023..01419aff333e 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -66,8 +66,8 @@ | |||
66 | 66 | ||
67 | #define DRV_MODULE_NAME "tg3" | 67 | #define DRV_MODULE_NAME "tg3" |
68 | #define PFX DRV_MODULE_NAME ": " | 68 | #define PFX DRV_MODULE_NAME ": " |
69 | #define DRV_MODULE_VERSION "3.35" | 69 | #define DRV_MODULE_VERSION "3.36" |
70 | #define DRV_MODULE_RELDATE "August 6, 2005" | 70 | #define DRV_MODULE_RELDATE "August 19, 2005" |
71 | 71 | ||
72 | #define TG3_DEF_MAC_MODE 0 | 72 | #define TG3_DEF_MAC_MODE 0 |
73 | #define TG3_DEF_RX_MODE 0 | 73 | #define TG3_DEF_RX_MODE 0 |
@@ -8970,6 +8970,8 @@ static int __devinit tg3_phy_probe(struct tg3 *tp) | |||
8970 | tp->phy_id = hw_phy_id; | 8970 | tp->phy_id = hw_phy_id; |
8971 | if (hw_phy_id_masked == PHY_ID_BCM8002) | 8971 | if (hw_phy_id_masked == PHY_ID_BCM8002) |
8972 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; | 8972 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; |
8973 | else | ||
8974 | tp->tg3_flags2 &= ~TG3_FLG2_PHY_SERDES; | ||
8973 | } else { | 8975 | } else { |
8974 | if (tp->phy_id != PHY_ID_INVALID) { | 8976 | if (tp->phy_id != PHY_ID_INVALID) { |
8975 | /* Do nothing, phy ID already set up in | 8977 | /* Do nothing, phy ID already set up in |
diff --git a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig index 7d5c23e8cdd7..e4cfc80b283b 100644 --- a/drivers/net/tokenring/Kconfig +++ b/drivers/net/tokenring/Kconfig | |||
@@ -84,7 +84,7 @@ config 3C359 | |||
84 | 84 | ||
85 | config TMS380TR | 85 | config TMS380TR |
86 | tristate "Generic TMS380 Token Ring ISA/PCI adapter support" | 86 | tristate "Generic TMS380 Token Ring ISA/PCI adapter support" |
87 | depends on TR && (PCI || ISA || MCA) | 87 | depends on TR && (PCI || ISA && ISA_DMA_API || MCA) |
88 | select FW_LOADER | 88 | select FW_LOADER |
89 | ---help--- | 89 | ---help--- |
90 | This driver provides generic support for token ring adapters | 90 | This driver provides generic support for token ring adapters |
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 1d3231cc471a..ec3f75a030d2 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -270,7 +270,7 @@ config PCMCIA_HERMES | |||
270 | 270 | ||
271 | config AIRO_CS | 271 | config AIRO_CS |
272 | tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" | 272 | tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" |
273 | depends on NET_RADIO && PCMCIA | 273 | depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) |
274 | ---help--- | 274 | ---help--- |
275 | This is the standard Linux driver to support Cisco/Aironet PCMCIA | 275 | This is the standard Linux driver to support Cisco/Aironet PCMCIA |
276 | 802.11 wireless cards. This driver is the same as the Aironet | 276 | 802.11 wireless cards. This driver is the same as the Aironet |
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig index 16a2e6ae37f4..725a14119f2a 100644 --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig | |||
@@ -34,7 +34,7 @@ config PARPORT | |||
34 | 34 | ||
35 | config PARPORT_PC | 35 | config PARPORT_PC |
36 | tristate "PC-style hardware" | 36 | tristate "PC-style hardware" |
37 | depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 | 37 | depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 && !M32R |
38 | ---help--- | 38 | ---help--- |
39 | You should say Y here if you have a PC-style parallel port. All | 39 | You should say Y here if you have a PC-style parallel port. All |
40 | IBM PC compatible computers and some Alphas have PC-style | 40 | IBM PC compatible computers and some Alphas have PC-style |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 6f9fdb276402..599b116d9747 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -41,6 +41,7 @@ module_param(io_speed, int, 0444); | |||
41 | 41 | ||
42 | 42 | ||
43 | #ifdef CONFIG_PCMCIA_PROBE | 43 | #ifdef CONFIG_PCMCIA_PROBE |
44 | #include <asm/irq.h> | ||
44 | /* mask of IRQs already reserved by other cards, we should avoid using them */ | 45 | /* mask of IRQs already reserved by other cards, we should avoid using them */ |
45 | static u8 pcmcia_used_irq[NR_IRQS]; | 46 | static u8 pcmcia_used_irq[NR_IRQS]; |
46 | #endif | 47 | #endif |
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index d36258d6665f..533f90c05cdf 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
@@ -230,7 +230,7 @@ qdio_siga_input(struct qdio_q *q) | |||
230 | } | 230 | } |
231 | 231 | ||
232 | /* locked by the locks in qdio_activate and qdio_cleanup */ | 232 | /* locked by the locks in qdio_activate and qdio_cleanup */ |
233 | static __u32 * volatile | 233 | static __u32 volatile * |
234 | qdio_get_indicator(void) | 234 | qdio_get_indicator(void) |
235 | { | 235 | { |
236 | int i; | 236 | int i; |
diff --git a/drivers/s390/crypto/z90crypt.h b/drivers/s390/crypto/z90crypt.h index 82a1d97001d7..0a3bb5a10dd4 100644 --- a/drivers/s390/crypto/z90crypt.h +++ b/drivers/s390/crypto/z90crypt.h | |||
@@ -36,15 +36,6 @@ | |||
36 | #define z90crypt_VARIANT 2 // 2 = added PCIXCC MCL3 and CEX2C support | 36 | #define z90crypt_VARIANT 2 // 2 = added PCIXCC MCL3 and CEX2C support |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * If we are not using the sparse checker, __user has no use. | ||
40 | */ | ||
41 | #ifdef __CHECKER__ | ||
42 | # define __user __attribute__((noderef, address_space(1))) | ||
43 | #else | ||
44 | # define __user | ||
45 | #endif | ||
46 | |||
47 | /** | ||
48 | * struct ica_rsa_modexpo | 39 | * struct ica_rsa_modexpo |
49 | * | 40 | * |
50 | * Requirements: | 41 | * Requirements: |
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index f1e8c4223ed1..12c208fb18c5 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -1696,7 +1696,7 @@ config TT_DMA_EMUL | |||
1696 | 1696 | ||
1697 | config MAC_SCSI | 1697 | config MAC_SCSI |
1698 | bool "Macintosh NCR5380 SCSI" | 1698 | bool "Macintosh NCR5380 SCSI" |
1699 | depends on MAC && SCSI | 1699 | depends on MAC && SCSI=y |
1700 | help | 1700 | help |
1701 | This is the NCR 5380 SCSI controller included on most of the 68030 | 1701 | This is the NCR 5380 SCSI controller included on most of the 68030 |
1702 | based Macintoshes. If you have one of these say Y and read the | 1702 | based Macintoshes. If you have one of these say Y and read the |
@@ -1717,7 +1717,7 @@ config SCSI_MAC_ESP | |||
1717 | 1717 | ||
1718 | config MVME147_SCSI | 1718 | config MVME147_SCSI |
1719 | bool "WD33C93 SCSI driver for MVME147" | 1719 | bool "WD33C93 SCSI driver for MVME147" |
1720 | depends on MVME147 && SCSI | 1720 | depends on MVME147 && SCSI=y |
1721 | help | 1721 | help |
1722 | Support for the on-board SCSI controller on the Motorola MVME147 | 1722 | Support for the on-board SCSI controller on the Motorola MVME147 |
1723 | single-board computer. | 1723 | single-board computer. |
@@ -1758,7 +1758,7 @@ config SUN3_SCSI | |||
1758 | 1758 | ||
1759 | config SUN3X_ESP | 1759 | config SUN3X_ESP |
1760 | bool "Sun3x ESP SCSI" | 1760 | bool "Sun3x ESP SCSI" |
1761 | depends on SUN3X && SCSI | 1761 | depends on SUN3X && SCSI=y |
1762 | help | 1762 | help |
1763 | The ESP was an on-board SCSI controller used on Sun 3/80 | 1763 | The ESP was an on-board SCSI controller used on Sun 3/80 |
1764 | machines. Say Y here to compile in support for it. | 1764 | machines. Say Y here to compile in support for it. |
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index c5623694d10f..e3b9692b9688 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -1105,6 +1105,7 @@ MODULE_AUTHOR("Jeff Garzik"); | |||
1105 | MODULE_DESCRIPTION("AHCI SATA low-level driver"); | 1105 | MODULE_DESCRIPTION("AHCI SATA low-level driver"); |
1106 | MODULE_LICENSE("GPL"); | 1106 | MODULE_LICENSE("GPL"); |
1107 | MODULE_DEVICE_TABLE(pci, ahci_pci_tbl); | 1107 | MODULE_DEVICE_TABLE(pci, ahci_pci_tbl); |
1108 | MODULE_VERSION(DRV_VERSION); | ||
1108 | 1109 | ||
1109 | module_init(ahci_init); | 1110 | module_init(ahci_init); |
1110 | module_exit(ahci_exit); | 1111 | module_exit(ahci_exit); |
diff --git a/drivers/scsi/arm/Kconfig b/drivers/scsi/arm/Kconfig index 54b32868aaf7..13f23043c8a3 100644 --- a/drivers/scsi/arm/Kconfig +++ b/drivers/scsi/arm/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | config SCSI_ACORNSCSI_3 | 4 | config SCSI_ACORNSCSI_3 |
5 | tristate "Acorn SCSI card (aka30) support" | 5 | tristate "Acorn SCSI card (aka30) support" |
6 | depends on ARCH_ACORN && SCSI | 6 | depends on ARCH_ACORN && SCSI && BROKEN |
7 | help | 7 | help |
8 | This enables support for the Acorn SCSI card (aka30). If you have an | 8 | This enables support for the Acorn SCSI card (aka30). If you have an |
9 | Acorn system with one of these, say Y. If unsure, say N. | 9 | Acorn system with one of these, say Y. If unsure, say N. |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index a2cfade2c1c6..d96ebf9d2228 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/libata.h> | 32 | #include <linux/libata.h> |
33 | 33 | ||
34 | #define DRV_NAME "ata_piix" | 34 | #define DRV_NAME "ata_piix" |
35 | #define DRV_VERSION "1.03" | 35 | #define DRV_VERSION "1.04" |
36 | 36 | ||
37 | enum { | 37 | enum { |
38 | PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ | 38 | PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 73b1f72b7e43..f4e7dcb6492b 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -2268,19 +2268,6 @@ void ata_qc_prep(struct ata_queued_cmd *qc) | |||
2268 | * spin_lock_irqsave(host_set lock) | 2268 | * spin_lock_irqsave(host_set lock) |
2269 | */ | 2269 | */ |
2270 | 2270 | ||
2271 | |||
2272 | |||
2273 | /** | ||
2274 | * ata_sg_init_one - Prepare a one-entry scatter-gather list. | ||
2275 | * @qc: Queued command | ||
2276 | * @buf: transfer buffer | ||
2277 | * @buflen: length of buf | ||
2278 | * | ||
2279 | * Builds a single-entry scatter-gather list to initiate a | ||
2280 | * transfer utilizing the specified buffer. | ||
2281 | * | ||
2282 | * LOCKING: | ||
2283 | */ | ||
2284 | void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) | 2271 | void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) |
2285 | { | 2272 | { |
2286 | struct scatterlist *sg; | 2273 | struct scatterlist *sg; |
@@ -2312,18 +2299,6 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) | |||
2312 | * spin_lock_irqsave(host_set lock) | 2299 | * spin_lock_irqsave(host_set lock) |
2313 | */ | 2300 | */ |
2314 | 2301 | ||
2315 | |||
2316 | /** | ||
2317 | * ata_sg_init - Assign a scatter gather list to a queued command | ||
2318 | * @qc: Queued command | ||
2319 | * @sg: Scatter-gather list | ||
2320 | * @n_elem: length of sg list | ||
2321 | * | ||
2322 | * Attaches a scatter-gather list to a queued command. | ||
2323 | * | ||
2324 | * LOCKING: | ||
2325 | */ | ||
2326 | |||
2327 | void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, | 2302 | void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, |
2328 | unsigned int n_elem) | 2303 | unsigned int n_elem) |
2329 | { | 2304 | { |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index d90430bbb0de..3e7f4843020f 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define __LIBATA_H__ | 26 | #define __LIBATA_H__ |
27 | 27 | ||
28 | #define DRV_NAME "libata" | 28 | #define DRV_NAME "libata" |
29 | #define DRV_VERSION "1.11" /* must be exactly four chars */ | 29 | #define DRV_VERSION "1.12" /* must be exactly four chars */ |
30 | 30 | ||
31 | struct ata_scsi_args { | 31 | struct ata_scsi_args { |
32 | u16 *id; | 32 | u16 *id; |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 5c1d4411457a..919fb314ad10 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include "sata_promise.h" | 40 | #include "sata_promise.h" |
41 | 41 | ||
42 | #define DRV_NAME "sata_promise" | 42 | #define DRV_NAME "sata_promise" |
43 | #define DRV_VERSION "1.01" | 43 | #define DRV_VERSION "1.02" |
44 | 44 | ||
45 | 45 | ||
46 | enum { | 46 | enum { |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 97034d3937fd..d5797618a3b9 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -211,7 +211,7 @@ comment "Non-8250 serial port support" | |||
211 | 211 | ||
212 | config SERIAL_AMBA_PL010 | 212 | config SERIAL_AMBA_PL010 |
213 | tristate "ARM AMBA PL010 serial port support" | 213 | tristate "ARM AMBA PL010 serial port support" |
214 | depends on ARM_AMBA | 214 | depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE) |
215 | select SERIAL_CORE | 215 | select SERIAL_CORE |
216 | help | 216 | help |
217 | This selects the ARM(R) AMBA(R) PrimeCell PL010 UART. If you have | 217 | This selects the ARM(R) AMBA(R) PrimeCell PL010 UART. If you have |
@@ -819,7 +819,7 @@ config SERIAL_M32R_SIO_CONSOLE | |||
819 | 819 | ||
820 | config SERIAL_M32R_PLDSIO | 820 | config SERIAL_M32R_PLDSIO |
821 | bool "M32R SIO I/F on a PLD" | 821 | bool "M32R SIO I/F on a PLD" |
822 | depends on SERIAL_M32R_SIO=y | 822 | depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PALT_USRV || PLAT_M32700UT) |
823 | default n | 823 | default n |
824 | help | 824 | help |
825 | Say Y here if you want to use the M32R serial controller | 825 | Say Y here if you want to use the M32R serial controller |
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index 0301feacbde4..9b50560b9d16 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c | |||
@@ -1123,7 +1123,7 @@ static int __init m32r_sio_console_setup(struct console *co, char *options) | |||
1123 | return uart_set_options(port, co, baud, parity, bits, flow); | 1123 | return uart_set_options(port, co, baud, parity, bits, flow); |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | extern struct uart_driver m32r_sio_reg; | 1126 | static struct uart_driver m32r_sio_reg; |
1127 | static struct console m32r_sio_console = { | 1127 | static struct console m32r_sio_console = { |
1128 | .name = "ttyS", | 1128 | .name = "ttyS", |
1129 | .write = m32r_sio_console_write, | 1129 | .write = m32r_sio_console_write, |
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 576f3b852fce..4528a00c45b0 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -1922,7 +1922,7 @@ static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb) | |||
1922 | 1922 | ||
1923 | // copy the packet data to the new skb | 1923 | // copy the packet data to the new skb |
1924 | memcpy(skb_put(gl_skb, size), packet->packet_data, size); | 1924 | memcpy(skb_put(gl_skb, size), packet->packet_data, size); |
1925 | skb_return (dev, skb); | 1925 | skb_return (dev, gl_skb); |
1926 | } | 1926 | } |
1927 | 1927 | ||
1928 | // advance to the next packet | 1928 | // advance to the next packet |
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index 29cd801eb958..e32a80b39182 100644 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c | |||
@@ -346,8 +346,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) | |||
346 | if (datalen<14) | 346 | if (datalen<14) |
347 | goto resubmit; | 347 | goto resubmit; |
348 | if ((seq & IEEE802_11_SCTL_FRAG) == 0) { | 348 | if ((seq & IEEE802_11_SCTL_FRAG) == 0) { |
349 | frag = kmalloc(sizeof(struct zd1201_frag*), | 349 | frag = kmalloc(sizeof(*frag), GFP_ATOMIC); |
350 | GFP_ATOMIC); | ||
351 | if (!frag) | 350 | if (!frag) |
352 | goto resubmit; | 351 | goto resubmit; |
353 | skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2); | 352 | skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2); |
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index cbff98337aa6..5fe182d6e4ab 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -6,7 +6,7 @@ menu "Console display driver support" | |||
6 | 6 | ||
7 | config VGA_CONSOLE | 7 | config VGA_CONSOLE |
8 | bool "VGA text console" if EMBEDDED || !X86 | 8 | bool "VGA text console" if EMBEDDED || !X86 |
9 | depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC | 9 | depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE |
10 | default y | 10 | default y |
11 | help | 11 | help |
12 | Saying Y here will allow you to use Linux in text mode through a | 12 | Saying Y here will allow you to use Linux in text mode through a |
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index bfc28abe1cb1..31ee06590de5 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c | |||
@@ -30,7 +30,7 @@ static struct dentry *afs_mntpt_lookup(struct inode *dir, | |||
30 | struct dentry *dentry, | 30 | struct dentry *dentry, |
31 | struct nameidata *nd); | 31 | struct nameidata *nd); |
32 | static int afs_mntpt_open(struct inode *inode, struct file *file); | 32 | static int afs_mntpt_open(struct inode *inode, struct file *file); |
33 | static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd); | 33 | static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd); |
34 | 34 | ||
35 | struct file_operations afs_mntpt_file_operations = { | 35 | struct file_operations afs_mntpt_file_operations = { |
36 | .open = afs_mntpt_open, | 36 | .open = afs_mntpt_open, |
@@ -233,7 +233,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) | |||
233 | /* | 233 | /* |
234 | * follow a link from a mountpoint directory, thus causing it to be mounted | 234 | * follow a link from a mountpoint directory, thus causing it to be mounted |
235 | */ | 235 | */ |
236 | static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) | 236 | static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) |
237 | { | 237 | { |
238 | struct vfsmount *newmnt; | 238 | struct vfsmount *newmnt; |
239 | struct dentry *old_dentry; | 239 | struct dentry *old_dentry; |
@@ -249,7 +249,7 @@ static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
249 | newmnt = afs_mntpt_do_automount(dentry); | 249 | newmnt = afs_mntpt_do_automount(dentry); |
250 | if (IS_ERR(newmnt)) { | 250 | if (IS_ERR(newmnt)) { |
251 | path_release(nd); | 251 | path_release(nd); |
252 | return PTR_ERR(newmnt); | 252 | return (void *)newmnt; |
253 | } | 253 | } |
254 | 254 | ||
255 | old_dentry = nd->dentry; | 255 | old_dentry = nd->dentry; |
@@ -267,7 +267,7 @@ static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
267 | } | 267 | } |
268 | 268 | ||
269 | kleave(" = %d", err); | 269 | kleave(" = %d", err); |
270 | return err; | 270 | return ERR_PTR(err); |
271 | } /* end afs_mntpt_follow_link() */ | 271 | } /* end afs_mntpt_follow_link() */ |
272 | 272 | ||
273 | /*****************************************************************************/ | 273 | /*****************************************************************************/ |
diff --git a/fs/autofs/symlink.c b/fs/autofs/symlink.c index f028396f1383..52e8772b066e 100644 --- a/fs/autofs/symlink.c +++ b/fs/autofs/symlink.c | |||
@@ -12,11 +12,12 @@ | |||
12 | 12 | ||
13 | #include "autofs_i.h" | 13 | #include "autofs_i.h" |
14 | 14 | ||
15 | static int autofs_follow_link(struct dentry *dentry, struct nameidata *nd) | 15 | /* Nothing to release.. */ |
16 | static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd) | ||
16 | { | 17 | { |
17 | char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data; | 18 | char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data; |
18 | nd_set_link(nd, s); | 19 | nd_set_link(nd, s); |
19 | return 0; | 20 | return NULL; |
20 | } | 21 | } |
21 | 22 | ||
22 | struct inode_operations autofs_symlink_inode_operations = { | 23 | struct inode_operations autofs_symlink_inode_operations = { |
diff --git a/fs/autofs4/symlink.c b/fs/autofs4/symlink.c index c265a66edf0f..2ea2c98fd84b 100644 --- a/fs/autofs4/symlink.c +++ b/fs/autofs4/symlink.c | |||
@@ -12,11 +12,11 @@ | |||
12 | 12 | ||
13 | #include "autofs_i.h" | 13 | #include "autofs_i.h" |
14 | 14 | ||
15 | static int autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) | 15 | static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) |
16 | { | 16 | { |
17 | struct autofs_info *ino = autofs4_dentry_ino(dentry); | 17 | struct autofs_info *ino = autofs4_dentry_ino(dentry); |
18 | nd_set_link(nd, (char *)ino->u.symlink); | 18 | nd_set_link(nd, (char *)ino->u.symlink); |
19 | return 0; | 19 | return NULL; |
20 | } | 20 | } |
21 | 21 | ||
22 | struct inode_operations autofs4_symlink_inode_operations = { | 22 | struct inode_operations autofs4_symlink_inode_operations = { |
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index de5bb280a828..e0a6025f1d06 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -41,8 +41,8 @@ static struct inode *befs_alloc_inode(struct super_block *sb); | |||
41 | static void befs_destroy_inode(struct inode *inode); | 41 | static void befs_destroy_inode(struct inode *inode); |
42 | static int befs_init_inodecache(void); | 42 | static int befs_init_inodecache(void); |
43 | static void befs_destroy_inodecache(void); | 43 | static void befs_destroy_inodecache(void); |
44 | static int befs_follow_link(struct dentry *, struct nameidata *); | 44 | static void *befs_follow_link(struct dentry *, struct nameidata *); |
45 | static void befs_put_link(struct dentry *, struct nameidata *); | 45 | static void befs_put_link(struct dentry *, struct nameidata *, void *); |
46 | static int befs_utf2nls(struct super_block *sb, const char *in, int in_len, | 46 | static int befs_utf2nls(struct super_block *sb, const char *in, int in_len, |
47 | char **out, int *out_len); | 47 | char **out, int *out_len); |
48 | static int befs_nls2utf(struct super_block *sb, const char *in, int in_len, | 48 | static int befs_nls2utf(struct super_block *sb, const char *in, int in_len, |
@@ -461,7 +461,7 @@ befs_destroy_inodecache(void) | |||
461 | * The data stream become link name. Unless the LONG_SYMLINK | 461 | * The data stream become link name. Unless the LONG_SYMLINK |
462 | * flag is set. | 462 | * flag is set. |
463 | */ | 463 | */ |
464 | static int | 464 | static void * |
465 | befs_follow_link(struct dentry *dentry, struct nameidata *nd) | 465 | befs_follow_link(struct dentry *dentry, struct nameidata *nd) |
466 | { | 466 | { |
467 | befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); | 467 | befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); |
@@ -487,10 +487,10 @@ befs_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
487 | } | 487 | } |
488 | 488 | ||
489 | nd_set_link(nd, link); | 489 | nd_set_link(nd, link); |
490 | return 0; | 490 | return NULL; |
491 | } | 491 | } |
492 | 492 | ||
493 | static void befs_put_link(struct dentry *dentry, struct nameidata *nd) | 493 | static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) |
494 | { | 494 | { |
495 | befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); | 495 | befs_inode_info *befs_ino = BEFS_I(dentry->d_inode); |
496 | if (befs_ino->i_flags & BEFS_LONG_SYMLINK) { | 496 | if (befs_ino->i_flags & BEFS_LONG_SYMLINK) { |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 78af5850c558..1fd21f66f243 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -83,8 +83,8 @@ extern int cifs_dir_notify(struct file *, unsigned long arg); | |||
83 | extern struct dentry_operations cifs_dentry_ops; | 83 | extern struct dentry_operations cifs_dentry_ops; |
84 | 84 | ||
85 | /* Functions related to symlinks */ | 85 | /* Functions related to symlinks */ |
86 | extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd); | 86 | extern void *cifs_follow_link(struct dentry *direntry, struct nameidata *nd); |
87 | extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd); | 87 | extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *); |
88 | extern int cifs_readlink(struct dentry *direntry, char __user *buffer, | 88 | extern int cifs_readlink(struct dentry *direntry, char __user *buffer, |
89 | int buflen); | 89 | int buflen); |
90 | extern int cifs_symlink(struct inode *inode, struct dentry *direntry, | 90 | extern int cifs_symlink(struct inode *inode, struct dentry *direntry, |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index bde0fabfece0..ab925ef4f863 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -92,7 +92,7 @@ cifs_hl_exit: | |||
92 | return rc; | 92 | return rc; |
93 | } | 93 | } |
94 | 94 | ||
95 | int | 95 | void * |
96 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | 96 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) |
97 | { | 97 | { |
98 | struct inode *inode = direntry->d_inode; | 98 | struct inode *inode = direntry->d_inode; |
@@ -148,7 +148,7 @@ out: | |||
148 | out_no_free: | 148 | out_no_free: |
149 | FreeXid(xid); | 149 | FreeXid(xid); |
150 | nd_set_link(nd, target_path); | 150 | nd_set_link(nd, target_path); |
151 | return 0; | 151 | return NULL; /* No cookie */ |
152 | } | 152 | } |
153 | 153 | ||
154 | int | 154 | int |
@@ -330,7 +330,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen) | |||
330 | return rc; | 330 | return rc; |
331 | } | 331 | } |
332 | 332 | ||
333 | void cifs_put_link(struct dentry *direntry, struct nameidata *nd) | 333 | void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie) |
334 | { | 334 | { |
335 | char *p = nd_get_link(nd); | 335 | char *p = nd_get_link(nd); |
336 | if (!IS_ERR(p)) | 336 | if (!IS_ERR(p)) |
diff --git a/fs/devfs/base.c b/fs/devfs/base.c index 1ecfe1f184d4..8b679b67e5e0 100644 --- a/fs/devfs/base.c +++ b/fs/devfs/base.c | |||
@@ -2491,11 +2491,11 @@ static int devfs_mknod(struct inode *dir, struct dentry *dentry, int mode, | |||
2491 | return 0; | 2491 | return 0; |
2492 | } /* End Function devfs_mknod */ | 2492 | } /* End Function devfs_mknod */ |
2493 | 2493 | ||
2494 | static int devfs_follow_link(struct dentry *dentry, struct nameidata *nd) | 2494 | static void *devfs_follow_link(struct dentry *dentry, struct nameidata *nd) |
2495 | { | 2495 | { |
2496 | struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode); | 2496 | struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode); |
2497 | nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV)); | 2497 | nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV)); |
2498 | return 0; | 2498 | return NULL; |
2499 | } /* End Function devfs_follow_link */ | 2499 | } /* End Function devfs_follow_link */ |
2500 | 2500 | ||
2501 | static struct inode_operations devfs_iops = { | 2501 | static struct inode_operations devfs_iops = { |
diff --git a/fs/ext2/symlink.c b/fs/ext2/symlink.c index 9f7bac01d557..1e67d87cfa91 100644 --- a/fs/ext2/symlink.c +++ b/fs/ext2/symlink.c | |||
@@ -21,11 +21,11 @@ | |||
21 | #include "xattr.h" | 21 | #include "xattr.h" |
22 | #include <linux/namei.h> | 22 | #include <linux/namei.h> |
23 | 23 | ||
24 | static int ext2_follow_link(struct dentry *dentry, struct nameidata *nd) | 24 | static void *ext2_follow_link(struct dentry *dentry, struct nameidata *nd) |
25 | { | 25 | { |
26 | struct ext2_inode_info *ei = EXT2_I(dentry->d_inode); | 26 | struct ext2_inode_info *ei = EXT2_I(dentry->d_inode); |
27 | nd_set_link(nd, (char *)ei->i_data); | 27 | nd_set_link(nd, (char *)ei->i_data); |
28 | return 0; | 28 | return NULL; |
29 | } | 29 | } |
30 | 30 | ||
31 | struct inode_operations ext2_symlink_inode_operations = { | 31 | struct inode_operations ext2_symlink_inode_operations = { |
diff --git a/fs/ext3/symlink.c b/fs/ext3/symlink.c index 8c3e72818fb0..4f79122cde67 100644 --- a/fs/ext3/symlink.c +++ b/fs/ext3/symlink.c | |||
@@ -23,11 +23,11 @@ | |||
23 | #include <linux/namei.h> | 23 | #include <linux/namei.h> |
24 | #include "xattr.h" | 24 | #include "xattr.h" |
25 | 25 | ||
26 | static int ext3_follow_link(struct dentry *dentry, struct nameidata *nd) | 26 | static void * ext3_follow_link(struct dentry *dentry, struct nameidata *nd) |
27 | { | 27 | { |
28 | struct ext3_inode_info *ei = EXT3_I(dentry->d_inode); | 28 | struct ext3_inode_info *ei = EXT3_I(dentry->d_inode); |
29 | nd_set_link(nd, (char*)ei->i_data); | 29 | nd_set_link(nd, (char*)ei->i_data); |
30 | return 0; | 30 | return NULL; |
31 | } | 31 | } |
32 | 32 | ||
33 | struct inode_operations ext3_symlink_inode_operations = { | 33 | struct inode_operations ext3_symlink_inode_operations = { |
diff --git a/fs/freevxfs/vxfs_immed.c b/fs/freevxfs/vxfs_immed.c index ac677ab262b2..d0401dc68d41 100644 --- a/fs/freevxfs/vxfs_immed.c +++ b/fs/freevxfs/vxfs_immed.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include "vxfs_inode.h" | 38 | #include "vxfs_inode.h" |
39 | 39 | ||
40 | 40 | ||
41 | static int vxfs_immed_follow_link(struct dentry *, struct nameidata *); | 41 | static void * vxfs_immed_follow_link(struct dentry *, struct nameidata *); |
42 | 42 | ||
43 | static int vxfs_immed_readpage(struct file *, struct page *); | 43 | static int vxfs_immed_readpage(struct file *, struct page *); |
44 | 44 | ||
@@ -72,12 +72,12 @@ struct address_space_operations vxfs_immed_aops = { | |||
72 | * Returns: | 72 | * Returns: |
73 | * Zero on success, else a negative error code. | 73 | * Zero on success, else a negative error code. |
74 | */ | 74 | */ |
75 | static int | 75 | static void * |
76 | vxfs_immed_follow_link(struct dentry *dp, struct nameidata *np) | 76 | vxfs_immed_follow_link(struct dentry *dp, struct nameidata *np) |
77 | { | 77 | { |
78 | struct vxfs_inode_info *vip = VXFS_INO(dp->d_inode); | 78 | struct vxfs_inode_info *vip = VXFS_INO(dp->d_inode); |
79 | nd_set_link(np, vip->vii_immed.vi_immed); | 79 | nd_set_link(np, vip->vii_immed.vi_immed); |
80 | return 0; | 80 | return NULL; |
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |
diff --git a/fs/ioprio.c b/fs/ioprio.c index 97e1f088ba00..d1c1f2b2c9da 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c | |||
@@ -62,6 +62,8 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio) | |||
62 | 62 | ||
63 | break; | 63 | break; |
64 | case IOPRIO_CLASS_IDLE: | 64 | case IOPRIO_CLASS_IDLE: |
65 | if (!capable(CAP_SYS_ADMIN)) | ||
66 | return -EPERM; | ||
65 | break; | 67 | break; |
66 | default: | 68 | default: |
67 | return -EINVAL; | 69 | return -EINVAL; |
diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c index 65ab6b001dca..82ef484f5e12 100644 --- a/fs/jffs2/symlink.c +++ b/fs/jffs2/symlink.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/namei.h> | 18 | #include <linux/namei.h> |
19 | #include "nodelist.h" | 19 | #include "nodelist.h" |
20 | 20 | ||
21 | static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); | 21 | static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); |
22 | 22 | ||
23 | struct inode_operations jffs2_symlink_inode_operations = | 23 | struct inode_operations jffs2_symlink_inode_operations = |
24 | { | 24 | { |
@@ -27,9 +27,10 @@ struct inode_operations jffs2_symlink_inode_operations = | |||
27 | .setattr = jffs2_setattr | 27 | .setattr = jffs2_setattr |
28 | }; | 28 | }; |
29 | 29 | ||
30 | static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) | 30 | static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) |
31 | { | 31 | { |
32 | struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode); | 32 | struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode); |
33 | char *p = (char *)f->dents; | ||
33 | 34 | ||
34 | /* | 35 | /* |
35 | * We don't acquire the f->sem mutex here since the only data we | 36 | * We don't acquire the f->sem mutex here since the only data we |
@@ -45,19 +46,20 @@ static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
45 | * nd_set_link() call. | 46 | * nd_set_link() call. |
46 | */ | 47 | */ |
47 | 48 | ||
48 | if (!f->dents) { | 49 | if (!p) { |
49 | printk(KERN_ERR "jffs2_follow_link(): can't find symlink taerget\n"); | 50 | printk(KERN_ERR "jffs2_follow_link(): can't find symlink taerget\n"); |
50 | return -EIO; | 51 | p = ERR_PTR(-EIO); |
52 | } else { | ||
53 | D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->dents)); | ||
51 | } | 54 | } |
52 | D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->dents)); | ||
53 | 55 | ||
54 | nd_set_link(nd, (char *)f->dents); | 56 | nd_set_link(nd, p); |
55 | 57 | ||
56 | /* | 58 | /* |
57 | * We unlock the f->sem mutex but VFS will use the f->dents string. This is safe | 59 | * We unlock the f->sem mutex but VFS will use the f->dents string. This is safe |
58 | * since the only way that may cause f->dents to be changed is iput() operation. | 60 | * since the only way that may cause f->dents to be changed is iput() operation. |
59 | * But VFS will not use f->dents after iput() has been called. | 61 | * But VFS will not use f->dents after iput() has been called. |
60 | */ | 62 | */ |
61 | return 0; | 63 | return NULL; |
62 | } | 64 | } |
63 | 65 | ||
diff --git a/fs/jfs/symlink.c b/fs/jfs/symlink.c index 287d8d6c3cfd..16477b3835e1 100644 --- a/fs/jfs/symlink.c +++ b/fs/jfs/symlink.c | |||
@@ -22,11 +22,11 @@ | |||
22 | #include "jfs_inode.h" | 22 | #include "jfs_inode.h" |
23 | #include "jfs_xattr.h" | 23 | #include "jfs_xattr.h" |
24 | 24 | ||
25 | static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) | 25 | static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd) |
26 | { | 26 | { |
27 | char *s = JFS_IP(dentry->d_inode)->i_inline; | 27 | char *s = JFS_IP(dentry->d_inode)->i_inline; |
28 | nd_set_link(nd, s); | 28 | nd_set_link(nd, s); |
29 | return 0; | 29 | return NULL; |
30 | } | 30 | } |
31 | 31 | ||
32 | struct inode_operations jfs_symlink_inode_operations = { | 32 | struct inode_operations jfs_symlink_inode_operations = { |
diff --git a/fs/namei.c b/fs/namei.c index b85f158aef0c..6ec1f0fefc5b 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -501,6 +501,7 @@ struct path { | |||
501 | static inline int __do_follow_link(struct path *path, struct nameidata *nd) | 501 | static inline int __do_follow_link(struct path *path, struct nameidata *nd) |
502 | { | 502 | { |
503 | int error; | 503 | int error; |
504 | void *cookie; | ||
504 | struct dentry *dentry = path->dentry; | 505 | struct dentry *dentry = path->dentry; |
505 | 506 | ||
506 | touch_atime(path->mnt, dentry); | 507 | touch_atime(path->mnt, dentry); |
@@ -508,13 +509,15 @@ static inline int __do_follow_link(struct path *path, struct nameidata *nd) | |||
508 | 509 | ||
509 | if (path->mnt == nd->mnt) | 510 | if (path->mnt == nd->mnt) |
510 | mntget(path->mnt); | 511 | mntget(path->mnt); |
511 | error = dentry->d_inode->i_op->follow_link(dentry, nd); | 512 | cookie = dentry->d_inode->i_op->follow_link(dentry, nd); |
512 | if (!error) { | 513 | error = PTR_ERR(cookie); |
514 | if (!IS_ERR(cookie)) { | ||
513 | char *s = nd_get_link(nd); | 515 | char *s = nd_get_link(nd); |
516 | error = 0; | ||
514 | if (s) | 517 | if (s) |
515 | error = __vfs_follow_link(nd, s); | 518 | error = __vfs_follow_link(nd, s); |
516 | if (dentry->d_inode->i_op->put_link) | 519 | if (dentry->d_inode->i_op->put_link) |
517 | dentry->d_inode->i_op->put_link(dentry, nd); | 520 | dentry->d_inode->i_op->put_link(dentry, nd, cookie); |
518 | } | 521 | } |
519 | dput(dentry); | 522 | dput(dentry); |
520 | mntput(path->mnt); | 523 | mntput(path->mnt); |
@@ -2344,15 +2347,17 @@ out: | |||
2344 | int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) | 2347 | int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen) |
2345 | { | 2348 | { |
2346 | struct nameidata nd; | 2349 | struct nameidata nd; |
2347 | int res; | 2350 | void *cookie; |
2351 | |||
2348 | nd.depth = 0; | 2352 | nd.depth = 0; |
2349 | res = dentry->d_inode->i_op->follow_link(dentry, &nd); | 2353 | cookie = dentry->d_inode->i_op->follow_link(dentry, &nd); |
2350 | if (!res) { | 2354 | if (!IS_ERR(cookie)) { |
2351 | res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd)); | 2355 | int res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd)); |
2352 | if (dentry->d_inode->i_op->put_link) | 2356 | if (dentry->d_inode->i_op->put_link) |
2353 | dentry->d_inode->i_op->put_link(dentry, &nd); | 2357 | dentry->d_inode->i_op->put_link(dentry, &nd, cookie); |
2358 | cookie = ERR_PTR(res); | ||
2354 | } | 2359 | } |
2355 | return res; | 2360 | return PTR_ERR(cookie); |
2356 | } | 2361 | } |
2357 | 2362 | ||
2358 | int vfs_follow_link(struct nameidata *nd, const char *link) | 2363 | int vfs_follow_link(struct nameidata *nd, const char *link) |
@@ -2395,23 +2400,20 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen) | |||
2395 | return res; | 2400 | return res; |
2396 | } | 2401 | } |
2397 | 2402 | ||
2398 | int page_follow_link_light(struct dentry *dentry, struct nameidata *nd) | 2403 | void *page_follow_link_light(struct dentry *dentry, struct nameidata *nd) |
2399 | { | 2404 | { |
2400 | struct page *page; | 2405 | struct page *page = NULL; |
2401 | nd_set_link(nd, page_getlink(dentry, &page)); | 2406 | nd_set_link(nd, page_getlink(dentry, &page)); |
2402 | return 0; | 2407 | return page; |
2403 | } | 2408 | } |
2404 | 2409 | ||
2405 | void page_put_link(struct dentry *dentry, struct nameidata *nd) | 2410 | void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) |
2406 | { | 2411 | { |
2407 | if (!IS_ERR(nd_get_link(nd))) { | 2412 | struct page *page = cookie; |
2408 | struct page *page; | 2413 | |
2409 | page = find_get_page(dentry->d_inode->i_mapping, 0); | 2414 | if (page) { |
2410 | if (!page) | ||
2411 | BUG(); | ||
2412 | kunmap(page); | 2415 | kunmap(page); |
2413 | page_cache_release(page); | 2416 | page_cache_release(page); |
2414 | page_cache_release(page); | ||
2415 | } | 2417 | } |
2416 | } | 2418 | } |
2417 | 2419 | ||
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 147cbf9261ce..2df639f143e8 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -939,6 +939,7 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry | |||
939 | error = nfs_revalidate_inode(NFS_SERVER(dir), dir); | 939 | error = nfs_revalidate_inode(NFS_SERVER(dir), dir); |
940 | if (error < 0) { | 940 | if (error < 0) { |
941 | res = ERR_PTR(error); | 941 | res = ERR_PTR(error); |
942 | unlock_kernel(); | ||
942 | goto out; | 943 | goto out; |
943 | } | 944 | } |
944 | 945 | ||
diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c index 35f106599144..18dc95b0b646 100644 --- a/fs/nfs/symlink.c +++ b/fs/nfs/symlink.c | |||
@@ -27,26 +27,14 @@ | |||
27 | 27 | ||
28 | /* Symlink caching in the page cache is even more simplistic | 28 | /* Symlink caching in the page cache is even more simplistic |
29 | * and straight-forward than readdir caching. | 29 | * and straight-forward than readdir caching. |
30 | * | ||
31 | * At the beginning of the page we store pointer to struct page in question, | ||
32 | * simplifying nfs_put_link() (if inode got invalidated we can't find the page | ||
33 | * to be freed via pagecache lookup). | ||
34 | * The NUL-terminated string follows immediately thereafter. | ||
35 | */ | 30 | */ |
36 | 31 | ||
37 | struct nfs_symlink { | ||
38 | struct page *page; | ||
39 | char body[0]; | ||
40 | }; | ||
41 | |||
42 | static int nfs_symlink_filler(struct inode *inode, struct page *page) | 32 | static int nfs_symlink_filler(struct inode *inode, struct page *page) |
43 | { | 33 | { |
44 | const unsigned int pgbase = offsetof(struct nfs_symlink, body); | ||
45 | const unsigned int pglen = PAGE_SIZE - pgbase; | ||
46 | int error; | 34 | int error; |
47 | 35 | ||
48 | lock_kernel(); | 36 | lock_kernel(); |
49 | error = NFS_PROTO(inode)->readlink(inode, page, pgbase, pglen); | 37 | error = NFS_PROTO(inode)->readlink(inode, page, 0, PAGE_SIZE); |
50 | unlock_kernel(); | 38 | unlock_kernel(); |
51 | if (error < 0) | 39 | if (error < 0) |
52 | goto error; | 40 | goto error; |
@@ -60,11 +48,10 @@ error: | |||
60 | return -EIO; | 48 | return -EIO; |
61 | } | 49 | } |
62 | 50 | ||
63 | static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd) | 51 | static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd) |
64 | { | 52 | { |
65 | struct inode *inode = dentry->d_inode; | 53 | struct inode *inode = dentry->d_inode; |
66 | struct page *page; | 54 | struct page *page; |
67 | struct nfs_symlink *p; | ||
68 | void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode)); | 55 | void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode)); |
69 | if (err) | 56 | if (err) |
70 | goto read_failed; | 57 | goto read_failed; |
@@ -78,28 +65,20 @@ static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
78 | err = ERR_PTR(-EIO); | 65 | err = ERR_PTR(-EIO); |
79 | goto getlink_read_error; | 66 | goto getlink_read_error; |
80 | } | 67 | } |
81 | p = kmap(page); | 68 | nd_set_link(nd, kmap(page)); |
82 | p->page = page; | 69 | return page; |
83 | nd_set_link(nd, p->body); | ||
84 | return 0; | ||
85 | 70 | ||
86 | getlink_read_error: | 71 | getlink_read_error: |
87 | page_cache_release(page); | 72 | page_cache_release(page); |
88 | read_failed: | 73 | read_failed: |
89 | nd_set_link(nd, err); | 74 | nd_set_link(nd, err); |
90 | return 0; | 75 | return NULL; |
91 | } | 76 | } |
92 | 77 | ||
93 | static void nfs_put_link(struct dentry *dentry, struct nameidata *nd) | 78 | static void nfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) |
94 | { | 79 | { |
95 | char *s = nd_get_link(nd); | 80 | if (cookie) { |
96 | if (!IS_ERR(s)) { | 81 | struct page *page = cookie; |
97 | struct nfs_symlink *p; | ||
98 | struct page *page; | ||
99 | |||
100 | p = container_of(s, struct nfs_symlink, body[0]); | ||
101 | page = p->page; | ||
102 | |||
103 | kunmap(page); | 82 | kunmap(page); |
104 | page_cache_release(page); | 83 | page_cache_release(page); |
105 | } | 84 | } |
diff --git a/fs/proc/base.c b/fs/proc/base.c index ace151fa4878..491f2d9f89ac 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -890,7 +890,7 @@ static struct file_operations proc_seccomp_operations = { | |||
890 | }; | 890 | }; |
891 | #endif /* CONFIG_SECCOMP */ | 891 | #endif /* CONFIG_SECCOMP */ |
892 | 892 | ||
893 | static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) | 893 | static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) |
894 | { | 894 | { |
895 | struct inode *inode = dentry->d_inode; | 895 | struct inode *inode = dentry->d_inode; |
896 | int error = -EACCES; | 896 | int error = -EACCES; |
@@ -907,7 +907,7 @@ static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
907 | error = PROC_I(inode)->op.proc_get_link(inode, &nd->dentry, &nd->mnt); | 907 | error = PROC_I(inode)->op.proc_get_link(inode, &nd->dentry, &nd->mnt); |
908 | nd->last_type = LAST_BIND; | 908 | nd->last_type = LAST_BIND; |
909 | out: | 909 | out: |
910 | return error; | 910 | return ERR_PTR(error); |
911 | } | 911 | } |
912 | 912 | ||
913 | static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt, | 913 | static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt, |
@@ -1692,11 +1692,11 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer, | |||
1692 | return vfs_readlink(dentry,buffer,buflen,tmp); | 1692 | return vfs_readlink(dentry,buffer,buflen,tmp); |
1693 | } | 1693 | } |
1694 | 1694 | ||
1695 | static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) | 1695 | static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) |
1696 | { | 1696 | { |
1697 | char tmp[30]; | 1697 | char tmp[30]; |
1698 | sprintf(tmp, "%d", current->tgid); | 1698 | sprintf(tmp, "%d", current->tgid); |
1699 | return vfs_follow_link(nd,tmp); | 1699 | return ERR_PTR(vfs_follow_link(nd,tmp)); |
1700 | } | 1700 | } |
1701 | 1701 | ||
1702 | static struct inode_operations proc_self_inode_operations = { | 1702 | static struct inode_operations proc_self_inode_operations = { |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 6c6315d04028..abe8920313fb 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -329,10 +329,10 @@ static void release_inode_number(unsigned int inum) | |||
329 | spin_unlock(&proc_inum_lock); | 329 | spin_unlock(&proc_inum_lock); |
330 | } | 330 | } |
331 | 331 | ||
332 | static int proc_follow_link(struct dentry *dentry, struct nameidata *nd) | 332 | static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd) |
333 | { | 333 | { |
334 | nd_set_link(nd, PDE(dentry->d_inode)->data); | 334 | nd_set_link(nd, PDE(dentry->d_inode)->data); |
335 | return 0; | 335 | return NULL; |
336 | } | 336 | } |
337 | 337 | ||
338 | static struct inode_operations proc_link_inode_operations = { | 338 | static struct inode_operations proc_link_inode_operations = { |
diff --git a/fs/smbfs/symlink.c b/fs/smbfs/symlink.c index 8b069e06433d..0c64bc3a0127 100644 --- a/fs/smbfs/symlink.c +++ b/fs/smbfs/symlink.c | |||
@@ -34,7 +34,7 @@ int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname) | |||
34 | return smb_proc_symlink(server_from_dentry(dentry), dentry, oldname); | 34 | return smb_proc_symlink(server_from_dentry(dentry), dentry, oldname); |
35 | } | 35 | } |
36 | 36 | ||
37 | static int smb_follow_link(struct dentry *dentry, struct nameidata *nd) | 37 | static void *smb_follow_link(struct dentry *dentry, struct nameidata *nd) |
38 | { | 38 | { |
39 | char *link = __getname(); | 39 | char *link = __getname(); |
40 | DEBUG1("followlink of %s/%s\n", DENTRY_PATH(dentry)); | 40 | DEBUG1("followlink of %s/%s\n", DENTRY_PATH(dentry)); |
@@ -52,10 +52,10 @@ static int smb_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
52 | } | 52 | } |
53 | } | 53 | } |
54 | nd_set_link(nd, link); | 54 | nd_set_link(nd, link); |
55 | return 0; | 55 | return NULL; |
56 | } | 56 | } |
57 | 57 | ||
58 | static void smb_put_link(struct dentry *dentry, struct nameidata *nd) | 58 | static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p) |
59 | { | 59 | { |
60 | char *s = nd_get_link(nd); | 60 | char *s = nd_get_link(nd); |
61 | if (!IS_ERR(s)) | 61 | if (!IS_ERR(s)) |
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index fae57c83a722..de402fa915f2 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c | |||
@@ -151,17 +151,17 @@ static int sysfs_getlink(struct dentry *dentry, char * path) | |||
151 | 151 | ||
152 | } | 152 | } |
153 | 153 | ||
154 | static int sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) | 154 | static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) |
155 | { | 155 | { |
156 | int error = -ENOMEM; | 156 | int error = -ENOMEM; |
157 | unsigned long page = get_zeroed_page(GFP_KERNEL); | 157 | unsigned long page = get_zeroed_page(GFP_KERNEL); |
158 | if (page) | 158 | if (page) |
159 | error = sysfs_getlink(dentry, (char *) page); | 159 | error = sysfs_getlink(dentry, (char *) page); |
160 | nd_set_link(nd, error ? ERR_PTR(error) : (char *)page); | 160 | nd_set_link(nd, error ? ERR_PTR(error) : (char *)page); |
161 | return 0; | 161 | return NULL; |
162 | } | 162 | } |
163 | 163 | ||
164 | static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd) | 164 | static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) |
165 | { | 165 | { |
166 | char *page = nd_get_link(nd); | 166 | char *page = nd_get_link(nd); |
167 | if (!IS_ERR(page)) | 167 | if (!IS_ERR(page)) |
diff --git a/fs/sysv/symlink.c b/fs/sysv/symlink.c index ed637db2dcb1..b85ce61d635c 100644 --- a/fs/sysv/symlink.c +++ b/fs/sysv/symlink.c | |||
@@ -8,10 +8,10 @@ | |||
8 | #include "sysv.h" | 8 | #include "sysv.h" |
9 | #include <linux/namei.h> | 9 | #include <linux/namei.h> |
10 | 10 | ||
11 | static int sysv_follow_link(struct dentry *dentry, struct nameidata *nd) | 11 | static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd) |
12 | { | 12 | { |
13 | nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data); | 13 | nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data); |
14 | return 0; | 14 | return NULL; |
15 | } | 15 | } |
16 | 16 | ||
17 | struct inode_operations sysv_fast_symlink_inode_operations = { | 17 | struct inode_operations sysv_fast_symlink_inode_operations = { |
diff --git a/fs/ufs/symlink.c b/fs/ufs/symlink.c index a0e49149098f..337512ed5781 100644 --- a/fs/ufs/symlink.c +++ b/fs/ufs/symlink.c | |||
@@ -29,11 +29,11 @@ | |||
29 | #include <linux/namei.h> | 29 | #include <linux/namei.h> |
30 | #include <linux/ufs_fs.h> | 30 | #include <linux/ufs_fs.h> |
31 | 31 | ||
32 | static int ufs_follow_link(struct dentry *dentry, struct nameidata *nd) | 32 | static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd) |
33 | { | 33 | { |
34 | struct ufs_inode_info *p = UFS_I(dentry->d_inode); | 34 | struct ufs_inode_info *p = UFS_I(dentry->d_inode); |
35 | nd_set_link(nd, (char*)p->i_u1.i_symlink); | 35 | nd_set_link(nd, (char*)p->i_u1.i_symlink); |
36 | return 0; | 36 | return NULL; |
37 | } | 37 | } |
38 | 38 | ||
39 | struct inode_operations ufs_fast_symlink_inode_operations = { | 39 | struct inode_operations ufs_fast_symlink_inode_operations = { |
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 407e99359391..f252605514eb 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -374,7 +374,7 @@ linvfs_rename( | |||
374 | * we need to be very careful about how much stack we use. | 374 | * we need to be very careful about how much stack we use. |
375 | * uio is kmalloced for this reason... | 375 | * uio is kmalloced for this reason... |
376 | */ | 376 | */ |
377 | STATIC int | 377 | STATIC void * |
378 | linvfs_follow_link( | 378 | linvfs_follow_link( |
379 | struct dentry *dentry, | 379 | struct dentry *dentry, |
380 | struct nameidata *nd) | 380 | struct nameidata *nd) |
@@ -391,14 +391,14 @@ linvfs_follow_link( | |||
391 | link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL); | 391 | link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL); |
392 | if (!link) { | 392 | if (!link) { |
393 | nd_set_link(nd, ERR_PTR(-ENOMEM)); | 393 | nd_set_link(nd, ERR_PTR(-ENOMEM)); |
394 | return 0; | 394 | return NULL; |
395 | } | 395 | } |
396 | 396 | ||
397 | uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL); | 397 | uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL); |
398 | if (!uio) { | 398 | if (!uio) { |
399 | kfree(link); | 399 | kfree(link); |
400 | nd_set_link(nd, ERR_PTR(-ENOMEM)); | 400 | nd_set_link(nd, ERR_PTR(-ENOMEM)); |
401 | return 0; | 401 | return NULL; |
402 | } | 402 | } |
403 | 403 | ||
404 | vp = LINVFS_GET_VP(dentry->d_inode); | 404 | vp = LINVFS_GET_VP(dentry->d_inode); |
@@ -422,10 +422,10 @@ linvfs_follow_link( | |||
422 | kfree(uio); | 422 | kfree(uio); |
423 | 423 | ||
424 | nd_set_link(nd, link); | 424 | nd_set_link(nd, link); |
425 | return 0; | 425 | return NULL; |
426 | } | 426 | } |
427 | 427 | ||
428 | static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd) | 428 | static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) |
429 | { | 429 | { |
430 | char *s = nd_get_link(nd); | 430 | char *s = nd_get_link(nd); |
431 | if (!IS_ERR(s)) | 431 | if (!IS_ERR(s)) |
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index c08ce970ff8c..bdb4d66418f1 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -443,22 +443,19 @@ __xchg_u64(volatile long *m, unsigned long val) | |||
443 | if something tries to do an invalid xchg(). */ | 443 | if something tries to do an invalid xchg(). */ |
444 | extern void __xchg_called_with_bad_pointer(void); | 444 | extern void __xchg_called_with_bad_pointer(void); |
445 | 445 | ||
446 | static inline unsigned long | 446 | #define __xchg(ptr, x, size) \ |
447 | __xchg(volatile void *ptr, unsigned long x, int size) | 447 | ({ \ |
448 | { | 448 | unsigned long __xchg__res; \ |
449 | switch (size) { | 449 | volatile void *__xchg__ptr = (ptr); \ |
450 | case 1: | 450 | switch (size) { \ |
451 | return __xchg_u8(ptr, x); | 451 | case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \ |
452 | case 2: | 452 | case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \ |
453 | return __xchg_u16(ptr, x); | 453 | case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \ |
454 | case 4: | 454 | case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \ |
455 | return __xchg_u32(ptr, x); | 455 | default: __xchg_called_with_bad_pointer(); __xchg__res = x; \ |
456 | case 8: | 456 | } \ |
457 | return __xchg_u64(ptr, x); | 457 | __xchg__res; \ |
458 | } | 458 | }) |
459 | __xchg_called_with_bad_pointer(); | ||
460 | return x; | ||
461 | } | ||
462 | 459 | ||
463 | #define xchg(ptr,x) \ | 460 | #define xchg(ptr,x) \ |
464 | ({ \ | 461 | ({ \ |
diff --git a/include/asm-arm/arch-ixp4xx/timex.h b/include/asm-arm/arch-ixp4xx/timex.h index 38c9d77d3727..3745e35cc030 100644 --- a/include/asm-arm/arch-ixp4xx/timex.h +++ b/include/asm-arm/arch-ixp4xx/timex.h | |||
@@ -7,7 +7,9 @@ | |||
7 | 7 | ||
8 | /* | 8 | /* |
9 | * We use IXP425 General purpose timer for our timer needs, it runs at | 9 | * We use IXP425 General purpose timer for our timer needs, it runs at |
10 | * 66.66... MHz | 10 | * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the |
11 | * timer register ignores the bottom 2 bits of the LATCH value. | ||
11 | */ | 12 | */ |
12 | #define CLOCK_TICK_RATE (66666666) | 13 | #define FREQ 66666666 |
14 | #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) | ||
13 | 15 | ||
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h index 24d11672eb60..7fb02138f585 100644 --- a/include/asm-arm/bug.h +++ b/include/asm-arm/bug.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #ifdef CONFIG_BUG | 6 | #ifdef CONFIG_BUG |
7 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
8 | extern volatile void __bug(const char *file, int line, void *data); | 8 | extern void __bug(const char *file, int line, void *data) __attribute__((noreturn)); |
9 | 9 | ||
10 | /* give file/line information */ | 10 | /* give file/line information */ |
11 | #define BUG() __bug(__FILE__, __LINE__, NULL) | 11 | #define BUG() __bug(__FILE__, __LINE__, NULL) |
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h index ff48022e4720..4679f63688e9 100644 --- a/include/asm-arm/cpu-multi32.h +++ b/include/asm-arm/cpu-multi32.h | |||
@@ -31,7 +31,7 @@ extern struct processor { | |||
31 | /* | 31 | /* |
32 | * Special stuff for a reset | 32 | * Special stuff for a reset |
33 | */ | 33 | */ |
34 | volatile void (*reset)(unsigned long addr); | 34 | void (*reset)(unsigned long addr) __attribute__((noreturn)); |
35 | /* | 35 | /* |
36 | * Idle the processor | 36 | * Idle the processor |
37 | */ | 37 | */ |
diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h index b5ec5d54665d..6723e67244fa 100644 --- a/include/asm-arm/cpu-single.h +++ b/include/asm-arm/cpu-single.h | |||
@@ -41,4 +41,4 @@ extern int cpu_do_idle(void); | |||
41 | extern void cpu_dcache_clean_area(void *, int); | 41 | extern void cpu_dcache_clean_area(void *, int); |
42 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); | 42 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); |
43 | extern void cpu_set_pte(pte_t *ptep, pte_t pte); | 43 | extern void cpu_set_pte(pte_t *ptep, pte_t pte); |
44 | extern volatile void cpu_reset(unsigned long addr); | 44 | extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); |
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index 491e9d1fc538..54e7637a326c 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -120,14 +120,6 @@ static inline void ___ia64_mmiowb(void) | |||
120 | ia64_mfa(); | 120 | ia64_mfa(); |
121 | } | 121 | } |
122 | 122 | ||
123 | static inline const unsigned long | ||
124 | __ia64_get_io_port_base (void) | ||
125 | { | ||
126 | extern unsigned long ia64_iobase; | ||
127 | |||
128 | return ia64_iobase; | ||
129 | } | ||
130 | |||
131 | static inline void* | 123 | static inline void* |
132 | __ia64_mk_io_addr (unsigned long port) | 124 | __ia64_mk_io_addr (unsigned long port) |
133 | { | 125 | { |
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index b9a20cdad65f..7885b7df84a2 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h | |||
@@ -61,9 +61,7 @@ extern physid_mask_t phys_cpu_present_map; | |||
61 | * Some lowlevel functions might want to know about | 61 | * Some lowlevel functions might want to know about |
62 | * the real CPU ID <-> CPU # mapping. | 62 | * the real CPU ID <-> CPU # mapping. |
63 | */ | 63 | */ |
64 | extern volatile int physid_2_cpu[NR_CPUS]; | ||
65 | extern volatile int cpu_2_physid[NR_CPUS]; | 64 | extern volatile int cpu_2_physid[NR_CPUS]; |
66 | #define physid_to_cpu(physid) physid_2_cpu[physid] | ||
67 | #define cpu_to_physid(cpu_id) cpu_2_physid[cpu_id] | 65 | #define cpu_to_physid(cpu_id) cpu_2_physid[cpu_id] |
68 | 66 | ||
69 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 67 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h index ce09b47fa819..321fb75b5f22 100644 --- a/include/asm-ppc/time.h +++ b/include/asm-ppc/time.h | |||
@@ -58,7 +58,7 @@ static __inline__ void set_dec(unsigned int val) | |||
58 | /* Accessor functions for the timebase (RTC on 601) registers. */ | 58 | /* Accessor functions for the timebase (RTC on 601) registers. */ |
59 | /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ | 59 | /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ |
60 | #ifdef CONFIG_6xx | 60 | #ifdef CONFIG_6xx |
61 | extern __inline__ int const __USE_RTC(void) { | 61 | extern __inline__ int __attribute_pure__ __USE_RTC(void) { |
62 | return (mfspr(SPRN_PVR)>>16) == 1; | 62 | return (mfspr(SPRN_PVR)>>16) == 1; |
63 | } | 63 | } |
64 | #else | 64 | #else |
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h index a7f43a251f81..3e3bfe6a8fa8 100644 --- a/include/asm-s390/uaccess.h +++ b/include/asm-s390/uaccess.h | |||
@@ -149,11 +149,11 @@ struct exception_table_entry | |||
149 | }) | 149 | }) |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | #ifndef __CHECKER__ | ||
153 | #define __put_user(x, ptr) \ | 152 | #define __put_user(x, ptr) \ |
154 | ({ \ | 153 | ({ \ |
155 | __typeof__(*(ptr)) __x = (x); \ | 154 | __typeof__(*(ptr)) __x = (x); \ |
156 | int __pu_err; \ | 155 | int __pu_err; \ |
156 | __chk_user_ptr(ptr); \ | ||
157 | switch (sizeof (*(ptr))) { \ | 157 | switch (sizeof (*(ptr))) { \ |
158 | case 1: \ | 158 | case 1: \ |
159 | case 2: \ | 159 | case 2: \ |
@@ -167,14 +167,6 @@ struct exception_table_entry | |||
167 | } \ | 167 | } \ |
168 | __pu_err; \ | 168 | __pu_err; \ |
169 | }) | 169 | }) |
170 | #else | ||
171 | #define __put_user(x, ptr) \ | ||
172 | ({ \ | ||
173 | void __user *p; \ | ||
174 | p = (ptr); \ | ||
175 | 0; \ | ||
176 | }) | ||
177 | #endif | ||
178 | 170 | ||
179 | #define put_user(x, ptr) \ | 171 | #define put_user(x, ptr) \ |
180 | ({ \ | 172 | ({ \ |
@@ -213,11 +205,11 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
213 | }) | 205 | }) |
214 | #endif | 206 | #endif |
215 | 207 | ||
216 | #ifndef __CHECKER__ | ||
217 | #define __get_user(x, ptr) \ | 208 | #define __get_user(x, ptr) \ |
218 | ({ \ | 209 | ({ \ |
219 | __typeof__(*(ptr)) __x; \ | 210 | __typeof__(*(ptr)) __x; \ |
220 | int __gu_err; \ | 211 | int __gu_err; \ |
212 | __chk_user_ptr(ptr); \ | ||
221 | switch (sizeof(*(ptr))) { \ | 213 | switch (sizeof(*(ptr))) { \ |
222 | case 1: \ | 214 | case 1: \ |
223 | case 2: \ | 215 | case 2: \ |
@@ -232,15 +224,6 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
232 | (x) = __x; \ | 224 | (x) = __x; \ |
233 | __gu_err; \ | 225 | __gu_err; \ |
234 | }) | 226 | }) |
235 | #else | ||
236 | #define __get_user(x, ptr) \ | ||
237 | ({ \ | ||
238 | void __user *p; \ | ||
239 | p = (ptr); \ | ||
240 | 0; \ | ||
241 | }) | ||
242 | #endif | ||
243 | |||
244 | 227 | ||
245 | #define get_user(x, ptr) \ | 228 | #define get_user(x, ptr) \ |
246 | ({ \ | 229 | ({ \ |
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h index 352d9943661a..c94d8b3991bd 100644 --- a/include/asm-sparc64/thread_info.h +++ b/include/asm-sparc64/thread_info.h | |||
@@ -68,6 +68,9 @@ struct thread_info { | |||
68 | 68 | ||
69 | struct restart_block restart_block; | 69 | struct restart_block restart_block; |
70 | 70 | ||
71 | struct pt_regs *kern_una_regs; | ||
72 | unsigned int kern_una_insn; | ||
73 | |||
71 | unsigned long fpregs[0] __attribute__ ((aligned(64))); | 74 | unsigned long fpregs[0] __attribute__ ((aligned(64))); |
72 | }; | 75 | }; |
73 | 76 | ||
@@ -103,6 +106,8 @@ struct thread_info { | |||
103 | #define TI_PCR 0x00000490 | 106 | #define TI_PCR 0x00000490 |
104 | #define TI_CEE_STUFF 0x00000498 | 107 | #define TI_CEE_STUFF 0x00000498 |
105 | #define TI_RESTART_BLOCK 0x000004a0 | 108 | #define TI_RESTART_BLOCK 0x000004a0 |
109 | #define TI_KUNA_REGS 0x000004c8 | ||
110 | #define TI_KUNA_INSN 0x000004d0 | ||
106 | #define TI_FPREGS 0x00000500 | 111 | #define TI_FPREGS 0x00000500 |
107 | 112 | ||
108 | /* We embed this in the uppermost byte of thread_info->flags */ | 113 | /* We embed this in the uppermost byte of thread_info->flags */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index f9adf75fd9b4..67e6732d4fdc 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -993,8 +993,8 @@ struct inode_operations { | |||
993 | int (*rename) (struct inode *, struct dentry *, | 993 | int (*rename) (struct inode *, struct dentry *, |
994 | struct inode *, struct dentry *); | 994 | struct inode *, struct dentry *); |
995 | int (*readlink) (struct dentry *, char __user *,int); | 995 | int (*readlink) (struct dentry *, char __user *,int); |
996 | int (*follow_link) (struct dentry *, struct nameidata *); | 996 | void * (*follow_link) (struct dentry *, struct nameidata *); |
997 | void (*put_link) (struct dentry *, struct nameidata *); | 997 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
998 | void (*truncate) (struct inode *); | 998 | void (*truncate) (struct inode *); |
999 | int (*permission) (struct inode *, int, struct nameidata *); | 999 | int (*permission) (struct inode *, int, struct nameidata *); |
1000 | int (*setattr) (struct dentry *, struct iattr *); | 1000 | int (*setattr) (struct dentry *, struct iattr *); |
@@ -1602,8 +1602,8 @@ extern struct file_operations generic_ro_fops; | |||
1602 | extern int vfs_readlink(struct dentry *, char __user *, int, const char *); | 1602 | extern int vfs_readlink(struct dentry *, char __user *, int, const char *); |
1603 | extern int vfs_follow_link(struct nameidata *, const char *); | 1603 | extern int vfs_follow_link(struct nameidata *, const char *); |
1604 | extern int page_readlink(struct dentry *, char __user *, int); | 1604 | extern int page_readlink(struct dentry *, char __user *, int); |
1605 | extern int page_follow_link_light(struct dentry *, struct nameidata *); | 1605 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); |
1606 | extern void page_put_link(struct dentry *, struct nameidata *); | 1606 | extern void page_put_link(struct dentry *, struct nameidata *, void *); |
1607 | extern int page_symlink(struct inode *inode, const char *symname, int len); | 1607 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
1608 | extern struct inode_operations page_symlink_inode_operations; | 1608 | extern struct inode_operations page_symlink_inode_operations; |
1609 | extern int generic_readlink(struct dentry *, char __user *, int); | 1609 | extern int generic_readlink(struct dentry *, char __user *, int); |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 828a3a93dda1..3696f988a9f1 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -139,11 +139,25 @@ enum { | |||
139 | #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ | 139 | #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ |
140 | 140 | ||
141 | typedef struct ax25_uid_assoc { | 141 | typedef struct ax25_uid_assoc { |
142 | struct ax25_uid_assoc *next; | 142 | struct hlist_node uid_node; |
143 | atomic_t refcount; | ||
143 | uid_t uid; | 144 | uid_t uid; |
144 | ax25_address call; | 145 | ax25_address call; |
145 | } ax25_uid_assoc; | 146 | } ax25_uid_assoc; |
146 | 147 | ||
148 | #define ax25_uid_for_each(__ax25, node, list) \ | ||
149 | hlist_for_each_entry(__ax25, node, list, uid_node) | ||
150 | |||
151 | #define ax25_uid_hold(ax25) \ | ||
152 | atomic_inc(&((ax25)->refcount)) | ||
153 | |||
154 | static inline void ax25_uid_put(ax25_uid_assoc *assoc) | ||
155 | { | ||
156 | if (atomic_dec_and_test(&assoc->refcount)) { | ||
157 | kfree(assoc); | ||
158 | } | ||
159 | } | ||
160 | |||
147 | typedef struct { | 161 | typedef struct { |
148 | ax25_address calls[AX25_MAX_DIGIS]; | 162 | ax25_address calls[AX25_MAX_DIGIS]; |
149 | unsigned char repeated[AX25_MAX_DIGIS]; | 163 | unsigned char repeated[AX25_MAX_DIGIS]; |
@@ -376,7 +390,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
376 | 390 | ||
377 | /* ax25_uid.c */ | 391 | /* ax25_uid.c */ |
378 | extern int ax25_uid_policy; | 392 | extern int ax25_uid_policy; |
379 | extern ax25_address *ax25_findbyuid(uid_t); | 393 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); |
380 | extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 394 | extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
381 | extern struct file_operations ax25_uid_fops; | 395 | extern struct file_operations ax25_uid_fops; |
382 | extern void ax25_uid_free(void); | 396 | extern void ax25_uid_free(void); |
diff --git a/include/net/sock.h b/include/net/sock.h index a1042d08becd..e9b1dbab90d0 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -384,6 +384,11 @@ enum sock_flags { | |||
384 | SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ | 384 | SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ |
385 | }; | 385 | }; |
386 | 386 | ||
387 | static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) | ||
388 | { | ||
389 | nsk->sk_flags = osk->sk_flags; | ||
390 | } | ||
391 | |||
387 | static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) | 392 | static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) |
388 | { | 393 | { |
389 | __set_bit(flag, &sk->sk_flags); | 394 | __set_bit(flag, &sk->sk_flags); |
diff --git a/include/sound/core.h b/include/sound/core.h index 38b357fc8958..f72b3ef515e2 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -360,11 +360,13 @@ int snd_device_free_all(snd_card_t *card, snd_device_cmd_t cmd); | |||
360 | 360 | ||
361 | /* isadma.c */ | 361 | /* isadma.c */ |
362 | 362 | ||
363 | #ifdef CONFIG_ISA_DMA_API | ||
363 | #define DMA_MODE_NO_ENABLE 0x0100 | 364 | #define DMA_MODE_NO_ENABLE 0x0100 |
364 | 365 | ||
365 | void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode); | 366 | void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode); |
366 | void snd_dma_disable(unsigned long dma); | 367 | void snd_dma_disable(unsigned long dma); |
367 | unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); | 368 | unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); |
369 | #endif | ||
368 | 370 | ||
369 | /* misc.c */ | 371 | /* misc.c */ |
370 | 372 | ||
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 21a4e3b2cbda..e0d296c5b302 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -636,6 +636,23 @@ static void update_cpu_domains(struct cpuset *cur) | |||
636 | return; | 636 | return; |
637 | 637 | ||
638 | /* | 638 | /* |
639 | * Hack to avoid 2.6.13 partial node dynamic sched domain bug. | ||
640 | * Require the 'cpu_exclusive' cpuset to include all (or none) | ||
641 | * of the CPUs on each node, or return w/o changing sched domains. | ||
642 | * Remove this hack when dynamic sched domains fixed. | ||
643 | */ | ||
644 | { | ||
645 | int i, j; | ||
646 | |||
647 | for_each_cpu_mask(i, cur->cpus_allowed) { | ||
648 | for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) { | ||
649 | if (!cpu_isset(j, cur->cpus_allowed)) | ||
650 | return; | ||
651 | } | ||
652 | } | ||
653 | } | ||
654 | |||
655 | /* | ||
639 | * Get all cpus from parent's cpus_allowed not part of exclusive | 656 | * Get all cpus from parent's cpus_allowed not part of exclusive |
640 | * children | 657 | * children |
641 | */ | 658 | */ |
diff --git a/kernel/timer.c b/kernel/timer.c index f2a11887a726..5377f40723ff 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1023,7 +1023,7 @@ asmlinkage long sys_getppid(void) | |||
1023 | parent = me->group_leader->real_parent; | 1023 | parent = me->group_leader->real_parent; |
1024 | for (;;) { | 1024 | for (;;) { |
1025 | pid = parent->tgid; | 1025 | pid = parent->tgid; |
1026 | #ifdef CONFIG_SMP | 1026 | #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) |
1027 | { | 1027 | { |
1028 | struct task_struct *old = parent; | 1028 | struct task_struct *old = parent; |
1029 | 1029 | ||
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index a9bda0a361f3..e4e9031dd9c3 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -269,6 +269,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | |||
269 | int qualifier; /* 'h', 'l', or 'L' for integer fields */ | 269 | int qualifier; /* 'h', 'l', or 'L' for integer fields */ |
270 | /* 'z' support added 23/7/1999 S.H. */ | 270 | /* 'z' support added 23/7/1999 S.H. */ |
271 | /* 'z' changed to 'Z' --davidm 1/25/99 */ | 271 | /* 'z' changed to 'Z' --davidm 1/25/99 */ |
272 | /* 't' added for ptrdiff_t */ | ||
272 | 273 | ||
273 | /* Reject out-of-range values early */ | 274 | /* Reject out-of-range values early */ |
274 | if (unlikely((int) size < 0)) { | 275 | if (unlikely((int) size < 0)) { |
@@ -339,7 +340,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | |||
339 | /* get the conversion qualifier */ | 340 | /* get the conversion qualifier */ |
340 | qualifier = -1; | 341 | qualifier = -1; |
341 | if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || | 342 | if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || |
342 | *fmt =='Z' || *fmt == 'z') { | 343 | *fmt =='Z' || *fmt == 'z' || *fmt == 't') { |
343 | qualifier = *fmt; | 344 | qualifier = *fmt; |
344 | ++fmt; | 345 | ++fmt; |
345 | if (qualifier == 'l' && *fmt == 'l') { | 346 | if (qualifier == 'l' && *fmt == 'l') { |
@@ -467,6 +468,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | |||
467 | num = (signed long) num; | 468 | num = (signed long) num; |
468 | } else if (qualifier == 'Z' || qualifier == 'z') { | 469 | } else if (qualifier == 'Z' || qualifier == 'z') { |
469 | num = va_arg(args, size_t); | 470 | num = va_arg(args, size_t); |
471 | } else if (qualifier == 't') { | ||
472 | num = va_arg(args, ptrdiff_t); | ||
470 | } else if (qualifier == 'h') { | 473 | } else if (qualifier == 'h') { |
471 | num = (unsigned short) va_arg(args, int); | 474 | num = (unsigned short) va_arg(args, int); |
472 | if (flags & SIGN) | 475 | if (flags & SIGN) |
diff --git a/mm/shmem.c b/mm/shmem.c index e64fa726a790..5a81b1ee4f7a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1773,32 +1773,27 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s | |||
1773 | return 0; | 1773 | return 0; |
1774 | } | 1774 | } |
1775 | 1775 | ||
1776 | static int shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd) | 1776 | static void *shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd) |
1777 | { | 1777 | { |
1778 | nd_set_link(nd, (char *)SHMEM_I(dentry->d_inode)); | 1778 | nd_set_link(nd, (char *)SHMEM_I(dentry->d_inode)); |
1779 | return 0; | 1779 | return NULL; |
1780 | } | 1780 | } |
1781 | 1781 | ||
1782 | static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd) | 1782 | static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd) |
1783 | { | 1783 | { |
1784 | struct page *page = NULL; | 1784 | struct page *page = NULL; |
1785 | int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL); | 1785 | int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL); |
1786 | nd_set_link(nd, res ? ERR_PTR(res) : kmap(page)); | 1786 | nd_set_link(nd, res ? ERR_PTR(res) : kmap(page)); |
1787 | return 0; | 1787 | return page; |
1788 | } | 1788 | } |
1789 | 1789 | ||
1790 | static void shmem_put_link(struct dentry *dentry, struct nameidata *nd) | 1790 | static void shmem_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) |
1791 | { | 1791 | { |
1792 | if (!IS_ERR(nd_get_link(nd))) { | 1792 | if (!IS_ERR(nd_get_link(nd))) { |
1793 | struct page *page; | 1793 | struct page *page = cookie; |
1794 | |||
1795 | page = find_get_page(dentry->d_inode->i_mapping, 0); | ||
1796 | if (!page) | ||
1797 | BUG(); | ||
1798 | kunmap(page); | 1794 | kunmap(page); |
1799 | mark_page_accessed(page); | 1795 | mark_page_accessed(page); |
1800 | page_cache_release(page); | 1796 | page_cache_release(page); |
1801 | page_cache_release(page); | ||
1802 | } | 1797 | } |
1803 | } | 1798 | } |
1804 | 1799 | ||
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 707097deac3d..a5c94f11547c 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -875,12 +875,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev) | |||
875 | sk->sk_sndbuf = osk->sk_sndbuf; | 875 | sk->sk_sndbuf = osk->sk_sndbuf; |
876 | sk->sk_state = TCP_ESTABLISHED; | 876 | sk->sk_state = TCP_ESTABLISHED; |
877 | sk->sk_sleep = osk->sk_sleep; | 877 | sk->sk_sleep = osk->sk_sleep; |
878 | 878 | sock_copy_flags(sk, osk); | |
879 | if (sock_flag(osk, SOCK_DBG)) | ||
880 | sock_set_flag(sk, SOCK_DBG); | ||
881 | |||
882 | if (sock_flag(osk, SOCK_ZAPPED)) | ||
883 | sock_set_flag(sk, SOCK_ZAPPED); | ||
884 | 879 | ||
885 | oax25 = ax25_sk(osk); | 880 | oax25 = ax25_sk(osk); |
886 | 881 | ||
@@ -1007,7 +1002,8 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
1007 | struct sock *sk = sock->sk; | 1002 | struct sock *sk = sock->sk; |
1008 | struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; | 1003 | struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; |
1009 | ax25_dev *ax25_dev = NULL; | 1004 | ax25_dev *ax25_dev = NULL; |
1010 | ax25_address *call; | 1005 | ax25_uid_assoc *user; |
1006 | ax25_address call; | ||
1011 | ax25_cb *ax25; | 1007 | ax25_cb *ax25; |
1012 | int err = 0; | 1008 | int err = 0; |
1013 | 1009 | ||
@@ -1026,9 +1022,15 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
1026 | if (addr->fsa_ax25.sax25_family != AF_AX25) | 1022 | if (addr->fsa_ax25.sax25_family != AF_AX25) |
1027 | return -EINVAL; | 1023 | return -EINVAL; |
1028 | 1024 | ||
1029 | call = ax25_findbyuid(current->euid); | 1025 | user = ax25_findbyuid(current->euid); |
1030 | if (call == NULL && ax25_uid_policy && !capable(CAP_NET_ADMIN)) { | 1026 | if (user) { |
1031 | return -EACCES; | 1027 | call = user->call; |
1028 | ax25_uid_put(user); | ||
1029 | } else { | ||
1030 | if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) | ||
1031 | return -EACCES; | ||
1032 | |||
1033 | call = addr->fsa_ax25.sax25_call; | ||
1032 | } | 1034 | } |
1033 | 1035 | ||
1034 | lock_sock(sk); | 1036 | lock_sock(sk); |
@@ -1039,10 +1041,7 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
1039 | goto out; | 1041 | goto out; |
1040 | } | 1042 | } |
1041 | 1043 | ||
1042 | if (call == NULL) | 1044 | ax25->source_addr = call; |
1043 | ax25->source_addr = addr->fsa_ax25.sax25_call; | ||
1044 | else | ||
1045 | ax25->source_addr = *call; | ||
1046 | 1045 | ||
1047 | /* | 1046 | /* |
1048 | * User already set interface with SO_BINDTODEVICE | 1047 | * User already set interface with SO_BINDTODEVICE |
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index 44b99b1ff9f8..c288526da4ce 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c | |||
@@ -422,8 +422,8 @@ static inline void ax25_adjust_path(ax25_address *addr, ax25_digi *digipeat) | |||
422 | */ | 422 | */ |
423 | int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr) | 423 | int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr) |
424 | { | 424 | { |
425 | ax25_uid_assoc *user; | ||
425 | ax25_route *ax25_rt; | 426 | ax25_route *ax25_rt; |
426 | ax25_address *call; | ||
427 | int err; | 427 | int err; |
428 | 428 | ||
429 | if ((ax25_rt = ax25_get_route(addr, NULL)) == NULL) | 429 | if ((ax25_rt = ax25_get_route(addr, NULL)) == NULL) |
@@ -434,16 +434,18 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr) | |||
434 | goto put; | 434 | goto put; |
435 | } | 435 | } |
436 | 436 | ||
437 | if ((call = ax25_findbyuid(current->euid)) == NULL) { | 437 | user = ax25_findbyuid(current->euid); |
438 | if (user) { | ||
439 | ax25->source_addr = user->call; | ||
440 | ax25_uid_put(user); | ||
441 | } else { | ||
438 | if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { | 442 | if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { |
439 | err = -EPERM; | 443 | err = -EPERM; |
440 | goto put; | 444 | goto put; |
441 | } | 445 | } |
442 | call = (ax25_address *)ax25->ax25_dev->dev->dev_addr; | 446 | ax25->source_addr = *(ax25_address *)ax25->ax25_dev->dev->dev_addr; |
443 | } | 447 | } |
444 | 448 | ||
445 | ax25->source_addr = *call; | ||
446 | |||
447 | if (ax25_rt->digipeat != NULL) { | 449 | if (ax25_rt->digipeat != NULL) { |
448 | if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { | 450 | if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { |
449 | err = -ENOMEM; | 451 | err = -ENOMEM; |
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index cea6b7d19729..a8b3822f3ee4 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/fcntl.h> | 28 | #include <linux/fcntl.h> |
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/list.h> | ||
31 | #include <linux/notifier.h> | 32 | #include <linux/notifier.h> |
32 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
33 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
@@ -41,38 +42,41 @@ | |||
41 | * Callsign/UID mapper. This is in kernel space for security on multi-amateur machines. | 42 | * Callsign/UID mapper. This is in kernel space for security on multi-amateur machines. |
42 | */ | 43 | */ |
43 | 44 | ||
44 | static ax25_uid_assoc *ax25_uid_list; | 45 | HLIST_HEAD(ax25_uid_list); |
45 | static DEFINE_RWLOCK(ax25_uid_lock); | 46 | static DEFINE_RWLOCK(ax25_uid_lock); |
46 | 47 | ||
47 | int ax25_uid_policy = 0; | 48 | int ax25_uid_policy = 0; |
48 | 49 | ||
49 | ax25_address *ax25_findbyuid(uid_t uid) | 50 | ax25_uid_assoc *ax25_findbyuid(uid_t uid) |
50 | { | 51 | { |
51 | ax25_uid_assoc *ax25_uid; | 52 | ax25_uid_assoc *ax25_uid, *res = NULL; |
52 | ax25_address *res = NULL; | 53 | struct hlist_node *node; |
53 | 54 | ||
54 | read_lock(&ax25_uid_lock); | 55 | read_lock(&ax25_uid_lock); |
55 | for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) { | 56 | ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { |
56 | if (ax25_uid->uid == uid) { | 57 | if (ax25_uid->uid == uid) { |
57 | res = &ax25_uid->call; | 58 | ax25_uid_hold(ax25_uid); |
59 | res = ax25_uid; | ||
58 | break; | 60 | break; |
59 | } | 61 | } |
60 | } | 62 | } |
61 | read_unlock(&ax25_uid_lock); | 63 | read_unlock(&ax25_uid_lock); |
62 | 64 | ||
63 | return NULL; | 65 | return res; |
64 | } | 66 | } |
65 | 67 | ||
66 | int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) | 68 | int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) |
67 | { | 69 | { |
68 | ax25_uid_assoc *s, *ax25_uid; | 70 | ax25_uid_assoc *ax25_uid; |
71 | struct hlist_node *node; | ||
72 | ax25_uid_assoc *user; | ||
69 | unsigned long res; | 73 | unsigned long res; |
70 | 74 | ||
71 | switch (cmd) { | 75 | switch (cmd) { |
72 | case SIOCAX25GETUID: | 76 | case SIOCAX25GETUID: |
73 | res = -ENOENT; | 77 | res = -ENOENT; |
74 | read_lock(&ax25_uid_lock); | 78 | read_lock(&ax25_uid_lock); |
75 | for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) { | 79 | ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { |
76 | if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) { | 80 | if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) { |
77 | res = ax25_uid->uid; | 81 | res = ax25_uid->uid; |
78 | break; | 82 | break; |
@@ -85,19 +89,22 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) | |||
85 | case SIOCAX25ADDUID: | 89 | case SIOCAX25ADDUID: |
86 | if (!capable(CAP_NET_ADMIN)) | 90 | if (!capable(CAP_NET_ADMIN)) |
87 | return -EPERM; | 91 | return -EPERM; |
88 | if (ax25_findbyuid(sax->sax25_uid)) | 92 | user = ax25_findbyuid(sax->sax25_uid); |
93 | if (user) { | ||
94 | ax25_uid_put(user); | ||
89 | return -EEXIST; | 95 | return -EEXIST; |
96 | } | ||
90 | if (sax->sax25_uid == 0) | 97 | if (sax->sax25_uid == 0) |
91 | return -EINVAL; | 98 | return -EINVAL; |
92 | if ((ax25_uid = kmalloc(sizeof(*ax25_uid), GFP_KERNEL)) == NULL) | 99 | if ((ax25_uid = kmalloc(sizeof(*ax25_uid), GFP_KERNEL)) == NULL) |
93 | return -ENOMEM; | 100 | return -ENOMEM; |
94 | 101 | ||
102 | atomic_set(&ax25_uid->refcount, 1); | ||
95 | ax25_uid->uid = sax->sax25_uid; | 103 | ax25_uid->uid = sax->sax25_uid; |
96 | ax25_uid->call = sax->sax25_call; | 104 | ax25_uid->call = sax->sax25_call; |
97 | 105 | ||
98 | write_lock(&ax25_uid_lock); | 106 | write_lock(&ax25_uid_lock); |
99 | ax25_uid->next = ax25_uid_list; | 107 | hlist_add_head(&ax25_uid->uid_node, &ax25_uid_list); |
100 | ax25_uid_list = ax25_uid; | ||
101 | write_unlock(&ax25_uid_lock); | 108 | write_unlock(&ax25_uid_lock); |
102 | 109 | ||
103 | return 0; | 110 | return 0; |
@@ -106,34 +113,21 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) | |||
106 | if (!capable(CAP_NET_ADMIN)) | 113 | if (!capable(CAP_NET_ADMIN)) |
107 | return -EPERM; | 114 | return -EPERM; |
108 | 115 | ||
116 | ax25_uid = NULL; | ||
109 | write_lock(&ax25_uid_lock); | 117 | write_lock(&ax25_uid_lock); |
110 | for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) { | 118 | ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { |
111 | if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) { | 119 | if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) |
112 | break; | 120 | break; |
113 | } | ||
114 | } | 121 | } |
115 | if (ax25_uid == NULL) { | 122 | if (ax25_uid == NULL) { |
116 | write_unlock(&ax25_uid_lock); | 123 | write_unlock(&ax25_uid_lock); |
117 | return -ENOENT; | 124 | return -ENOENT; |
118 | } | 125 | } |
119 | if ((s = ax25_uid_list) == ax25_uid) { | 126 | hlist_del_init(&ax25_uid->uid_node); |
120 | ax25_uid_list = s->next; | 127 | ax25_uid_put(ax25_uid); |
121 | write_unlock(&ax25_uid_lock); | ||
122 | kfree(ax25_uid); | ||
123 | return 0; | ||
124 | } | ||
125 | while (s != NULL && s->next != NULL) { | ||
126 | if (s->next == ax25_uid) { | ||
127 | s->next = ax25_uid->next; | ||
128 | write_unlock(&ax25_uid_lock); | ||
129 | kfree(ax25_uid); | ||
130 | return 0; | ||
131 | } | ||
132 | s = s->next; | ||
133 | } | ||
134 | write_unlock(&ax25_uid_lock); | 128 | write_unlock(&ax25_uid_lock); |
135 | 129 | ||
136 | return -ENOENT; | 130 | return 0; |
137 | 131 | ||
138 | default: | 132 | default: |
139 | return -EINVAL; | 133 | return -EINVAL; |
@@ -147,13 +141,11 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax) | |||
147 | static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) | 141 | static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) |
148 | { | 142 | { |
149 | struct ax25_uid_assoc *pt; | 143 | struct ax25_uid_assoc *pt; |
150 | int i = 1; | 144 | struct hlist_node *node; |
145 | int i = 0; | ||
151 | 146 | ||
152 | read_lock(&ax25_uid_lock); | 147 | read_lock(&ax25_uid_lock); |
153 | if (*pos == 0) | 148 | ax25_uid_for_each(pt, node, &ax25_uid_list) { |
154 | return SEQ_START_TOKEN; | ||
155 | |||
156 | for (pt = ax25_uid_list; pt != NULL; pt = pt->next) { | ||
157 | if (i == *pos) | 149 | if (i == *pos) |
158 | return pt; | 150 | return pt; |
159 | ++i; | 151 | ++i; |
@@ -164,8 +156,9 @@ static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) | |||
164 | static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 156 | static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
165 | { | 157 | { |
166 | ++*pos; | 158 | ++*pos; |
167 | return (v == SEQ_START_TOKEN) ? ax25_uid_list : | 159 | |
168 | ((struct ax25_uid_assoc *) v)->next; | 160 | return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next, |
161 | ax25_uid_assoc, uid_node); | ||
169 | } | 162 | } |
170 | 163 | ||
171 | static void ax25_uid_seq_stop(struct seq_file *seq, void *v) | 164 | static void ax25_uid_seq_stop(struct seq_file *seq, void *v) |
@@ -179,7 +172,6 @@ static int ax25_uid_seq_show(struct seq_file *seq, void *v) | |||
179 | seq_printf(seq, "Policy: %d\n", ax25_uid_policy); | 172 | seq_printf(seq, "Policy: %d\n", ax25_uid_policy); |
180 | else { | 173 | else { |
181 | struct ax25_uid_assoc *pt = v; | 174 | struct ax25_uid_assoc *pt = v; |
182 | |||
183 | 175 | ||
184 | seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(&pt->call)); | 176 | seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(&pt->call)); |
185 | } | 177 | } |
@@ -213,16 +205,13 @@ struct file_operations ax25_uid_fops = { | |||
213 | */ | 205 | */ |
214 | void __exit ax25_uid_free(void) | 206 | void __exit ax25_uid_free(void) |
215 | { | 207 | { |
216 | ax25_uid_assoc *s, *ax25_uid; | 208 | ax25_uid_assoc *ax25_uid; |
209 | struct hlist_node *node; | ||
217 | 210 | ||
218 | write_lock(&ax25_uid_lock); | 211 | write_lock(&ax25_uid_lock); |
219 | ax25_uid = ax25_uid_list; | 212 | ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { |
220 | while (ax25_uid != NULL) { | 213 | hlist_del_init(&ax25_uid->uid_node); |
221 | s = ax25_uid; | 214 | ax25_uid_put(ax25_uid); |
222 | ax25_uid = ax25_uid->next; | ||
223 | |||
224 | kfree(s); | ||
225 | } | 215 | } |
226 | ax25_uid_list = NULL; | ||
227 | write_unlock(&ax25_uid_lock); | 216 | write_unlock(&ax25_uid_lock); |
228 | } | 217 | } |
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index 95473953c406..ab18a853d7ce 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
@@ -450,10 +450,13 @@ static void peer_check_expire(unsigned long dummy) | |||
450 | /* Trigger the timer after inet_peer_gc_mintime .. inet_peer_gc_maxtime | 450 | /* Trigger the timer after inet_peer_gc_mintime .. inet_peer_gc_maxtime |
451 | * interval depending on the total number of entries (more entries, | 451 | * interval depending on the total number of entries (more entries, |
452 | * less interval). */ | 452 | * less interval). */ |
453 | peer_periodic_timer.expires = jiffies | 453 | if (peer_total >= inet_peer_threshold) |
454 | + inet_peer_gc_maxtime | 454 | peer_periodic_timer.expires = jiffies + inet_peer_gc_mintime; |
455 | - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ * | 455 | else |
456 | peer_total / inet_peer_threshold * HZ; | 456 | peer_periodic_timer.expires = jiffies |
457 | + inet_peer_gc_maxtime | ||
458 | - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ * | ||
459 | peer_total / inet_peer_threshold * HZ; | ||
457 | add_timer(&peer_periodic_timer); | 460 | add_timer(&peer_periodic_timer); |
458 | } | 461 | } |
459 | 462 | ||
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index eda1fba431a4..c6baa8174389 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -214,6 +214,12 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp) | |||
214 | break; | 214 | break; |
215 | 215 | ||
216 | case IPQ_COPY_PACKET: | 216 | case IPQ_COPY_PACKET: |
217 | if (entry->skb->ip_summed == CHECKSUM_HW && | ||
218 | (*errp = skb_checksum_help(entry->skb, | ||
219 | entry->info->outdev == NULL))) { | ||
220 | read_unlock_bh(&queue_lock); | ||
221 | return NULL; | ||
222 | } | ||
217 | if (copy_range == 0 || copy_range > entry->skb->len) | 223 | if (copy_range == 0 || copy_range > entry->skb->len) |
218 | data_len = entry->skb->len; | 224 | data_len = entry->skb->len; |
219 | else | 225 | else |
@@ -385,6 +391,7 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e) | |||
385 | if (!skb_ip_make_writable(&e->skb, v->data_len)) | 391 | if (!skb_ip_make_writable(&e->skb, v->data_len)) |
386 | return -ENOMEM; | 392 | return -ENOMEM; |
387 | memcpy(e->skb->data, v->payload, v->data_len); | 393 | memcpy(e->skb->data, v->payload, v->data_len); |
394 | e->skb->ip_summed = CHECKSUM_NONE; | ||
388 | e->skb->nfcache |= NFC_ALTERED; | 395 | e->skb->nfcache |= NFC_ALTERED; |
389 | 396 | ||
390 | /* | 397 | /* |
diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c index ada9911118e9..94a0ce1c1c9d 100644 --- a/net/ipv4/netfilter/ipt_ECN.c +++ b/net/ipv4/netfilter/ipt_ECN.c | |||
@@ -61,16 +61,20 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward) | |||
61 | if (!tcph) | 61 | if (!tcph) |
62 | return 0; | 62 | return 0; |
63 | 63 | ||
64 | if (!(einfo->operation & IPT_ECN_OP_SET_ECE | 64 | if ((!(einfo->operation & IPT_ECN_OP_SET_ECE) || |
65 | || tcph->ece == einfo->proto.tcp.ece) | 65 | tcph->ece == einfo->proto.tcp.ece) && |
66 | && (!(einfo->operation & IPT_ECN_OP_SET_CWR | 66 | ((!(einfo->operation & IPT_ECN_OP_SET_CWR) || |
67 | || tcph->cwr == einfo->proto.tcp.cwr))) | 67 | tcph->cwr == einfo->proto.tcp.cwr))) |
68 | return 1; | 68 | return 1; |
69 | 69 | ||
70 | if (!skb_ip_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph))) | 70 | if (!skb_ip_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph))) |
71 | return 0; | 71 | return 0; |
72 | tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4; | 72 | tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4; |
73 | 73 | ||
74 | if ((*pskb)->ip_summed == CHECKSUM_HW && | ||
75 | skb_checksum_help(*pskb, inward)) | ||
76 | return 0; | ||
77 | |||
74 | diffs[0] = ((u_int16_t *)tcph)[6]; | 78 | diffs[0] = ((u_int16_t *)tcph)[6]; |
75 | if (einfo->operation & IPT_ECN_OP_SET_ECE) | 79 | if (einfo->operation & IPT_ECN_OP_SET_ECE) |
76 | tcph->ece = einfo->proto.tcp.ece; | 80 | tcph->ece = einfo->proto.tcp.ece; |
@@ -79,13 +83,10 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward) | |||
79 | diffs[1] = ((u_int16_t *)tcph)[6]; | 83 | diffs[1] = ((u_int16_t *)tcph)[6]; |
80 | diffs[0] = diffs[0] ^ 0xFFFF; | 84 | diffs[0] = diffs[0] ^ 0xFFFF; |
81 | 85 | ||
82 | if ((*pskb)->ip_summed != CHECKSUM_HW) | 86 | if ((*pskb)->ip_summed != CHECKSUM_UNNECESSARY) |
83 | tcph->check = csum_fold(csum_partial((char *)diffs, | 87 | tcph->check = csum_fold(csum_partial((char *)diffs, |
84 | sizeof(diffs), | 88 | sizeof(diffs), |
85 | tcph->check^0xFFFF)); | 89 | tcph->check^0xFFFF)); |
86 | else | ||
87 | if (skb_checksum_help(*pskb, inward)) | ||
88 | return 0; | ||
89 | (*pskb)->nfcache |= NFC_ALTERED; | 90 | (*pskb)->nfcache |= NFC_ALTERED; |
90 | return 1; | 91 | return 1; |
91 | } | 92 | } |
diff --git a/net/ipv4/netfilter/ipt_TCPMSS.c b/net/ipv4/netfilter/ipt_TCPMSS.c index 1049050b2bfb..7b84a254440e 100644 --- a/net/ipv4/netfilter/ipt_TCPMSS.c +++ b/net/ipv4/netfilter/ipt_TCPMSS.c | |||
@@ -61,6 +61,10 @@ ipt_tcpmss_target(struct sk_buff **pskb, | |||
61 | if (!skb_ip_make_writable(pskb, (*pskb)->len)) | 61 | if (!skb_ip_make_writable(pskb, (*pskb)->len)) |
62 | return NF_DROP; | 62 | return NF_DROP; |
63 | 63 | ||
64 | if ((*pskb)->ip_summed == CHECKSUM_HW && | ||
65 | skb_checksum_help(*pskb, out == NULL)) | ||
66 | return NF_DROP; | ||
67 | |||
64 | iph = (*pskb)->nh.iph; | 68 | iph = (*pskb)->nh.iph; |
65 | tcplen = (*pskb)->len - iph->ihl*4; | 69 | tcplen = (*pskb)->len - iph->ihl*4; |
66 | 70 | ||
@@ -186,9 +190,6 @@ ipt_tcpmss_target(struct sk_buff **pskb, | |||
186 | newmss); | 190 | newmss); |
187 | 191 | ||
188 | retmodified: | 192 | retmodified: |
189 | /* We never hw checksum SYN packets. */ | ||
190 | BUG_ON((*pskb)->ip_summed == CHECKSUM_HW); | ||
191 | |||
192 | (*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED; | 193 | (*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED; |
193 | return IPT_CONTINUE; | 194 | return IPT_CONTINUE; |
194 | } | 195 | } |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index ddb6ce4ecff2..69b1fcf70077 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -584,7 +584,7 @@ static inline void skb_entail(struct sock *sk, struct tcp_sock *tp, | |||
584 | sk_charge_skb(sk, skb); | 584 | sk_charge_skb(sk, skb); |
585 | if (!sk->sk_send_head) | 585 | if (!sk->sk_send_head) |
586 | sk->sk_send_head = skb; | 586 | sk->sk_send_head = skb; |
587 | else if (tp->nonagle&TCP_NAGLE_PUSH) | 587 | if (tp->nonagle & TCP_NAGLE_PUSH) |
588 | tp->nonagle &= ~TCP_NAGLE_PUSH; | 588 | tp->nonagle &= ~TCP_NAGLE_PUSH; |
589 | } | 589 | } |
590 | 590 | ||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 5d91213d34c0..67c670886c1f 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -242,9 +242,14 @@ static int tcp_v4_get_port(struct sock *sk, unsigned short snum) | |||
242 | tcp_port_rover = rover; | 242 | tcp_port_rover = rover; |
243 | spin_unlock(&tcp_portalloc_lock); | 243 | spin_unlock(&tcp_portalloc_lock); |
244 | 244 | ||
245 | /* Exhausted local port range during search? */ | 245 | /* Exhausted local port range during search? It is not |
246 | * possible for us to be holding one of the bind hash | ||
247 | * locks if this test triggers, because if 'remaining' | ||
248 | * drops to zero, we broke out of the do/while loop at | ||
249 | * the top level, not from the 'break;' statement. | ||
250 | */ | ||
246 | ret = 1; | 251 | ret = 1; |
247 | if (remaining <= 0) | 252 | if (unlikely(remaining <= 0)) |
248 | goto fail; | 253 | goto fail; |
249 | 254 | ||
250 | /* OK, here is the one we will use. HEAD is | 255 | /* OK, here is the one we will use. HEAD is |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 566045e58437..dd30dd137b74 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -925,10 +925,6 @@ static int tcp_tso_should_defer(struct sock *sk, struct tcp_sock *tp, struct sk_ | |||
925 | 925 | ||
926 | limit = min(send_win, cong_win); | 926 | limit = min(send_win, cong_win); |
927 | 927 | ||
928 | /* If sk_send_head can be sent fully now, just do it. */ | ||
929 | if (skb->len <= limit) | ||
930 | return 0; | ||
931 | |||
932 | if (sysctl_tcp_tso_win_divisor) { | 928 | if (sysctl_tcp_tso_win_divisor) { |
933 | u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); | 929 | u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); |
934 | 930 | ||
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 5493180f0d44..a16df5b27c84 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
@@ -211,6 +211,12 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp) | |||
211 | break; | 211 | break; |
212 | 212 | ||
213 | case IPQ_COPY_PACKET: | 213 | case IPQ_COPY_PACKET: |
214 | if (entry->skb->ip_summed == CHECKSUM_HW && | ||
215 | (*errp = skb_checksum_help(entry->skb, | ||
216 | entry->info->outdev == NULL))) { | ||
217 | read_unlock_bh(&queue_lock); | ||
218 | return NULL; | ||
219 | } | ||
214 | if (copy_range == 0 || copy_range > entry->skb->len) | 220 | if (copy_range == 0 || copy_range > entry->skb->len) |
215 | data_len = entry->skb->len; | 221 | data_len = entry->skb->len; |
216 | else | 222 | else |
@@ -381,6 +387,7 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e) | |||
381 | if (!skb_ip_make_writable(&e->skb, v->data_len)) | 387 | if (!skb_ip_make_writable(&e->skb, v->data_len)) |
382 | return -ENOMEM; | 388 | return -ENOMEM; |
383 | memcpy(e->skb->data, v->payload, v->data_len); | 389 | memcpy(e->skb->data, v->payload, v->data_len); |
390 | e->skb->ip_summed = CHECKSUM_NONE; | ||
384 | e->skb->nfcache |= NFC_ALTERED; | 391 | e->skb->nfcache |= NFC_ALTERED; |
385 | 392 | ||
386 | /* | 393 | /* |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index f6e288dc116e..ef29cfd936d3 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -158,9 +158,14 @@ static int tcp_v6_get_port(struct sock *sk, unsigned short snum) | |||
158 | tcp_port_rover = rover; | 158 | tcp_port_rover = rover; |
159 | spin_unlock(&tcp_portalloc_lock); | 159 | spin_unlock(&tcp_portalloc_lock); |
160 | 160 | ||
161 | /* Exhausted local port range during search? */ | 161 | /* Exhausted local port range during search? It is not |
162 | * possible for us to be holding one of the bind hash | ||
163 | * locks if this test triggers, because if 'remaining' | ||
164 | * drops to zero, we broke out of the do/while loop at | ||
165 | * the top level, not from the 'break;' statement. | ||
166 | */ | ||
162 | ret = 1; | 167 | ret = 1; |
163 | if (remaining <= 0) | 168 | if (unlikely(remaining <= 0)) |
164 | goto fail; | 169 | goto fail; |
165 | 170 | ||
166 | /* OK, here is the one we will use. */ | 171 | /* OK, here is the one we will use. */ |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 31ed4a9a1d06..162a85fed150 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -459,12 +459,7 @@ static struct sock *nr_make_new(struct sock *osk) | |||
459 | sk->sk_sndbuf = osk->sk_sndbuf; | 459 | sk->sk_sndbuf = osk->sk_sndbuf; |
460 | sk->sk_state = TCP_ESTABLISHED; | 460 | sk->sk_state = TCP_ESTABLISHED; |
461 | sk->sk_sleep = osk->sk_sleep; | 461 | sk->sk_sleep = osk->sk_sleep; |
462 | 462 | sock_copy_flags(sk, osk); | |
463 | if (sock_flag(osk, SOCK_ZAPPED)) | ||
464 | sock_set_flag(sk, SOCK_ZAPPED); | ||
465 | |||
466 | if (sock_flag(osk, SOCK_DBG)) | ||
467 | sock_set_flag(sk, SOCK_DBG); | ||
468 | 463 | ||
469 | skb_queue_head_init(&nr->ack_queue); | 464 | skb_queue_head_init(&nr->ack_queue); |
470 | skb_queue_head_init(&nr->reseq_queue); | 465 | skb_queue_head_init(&nr->reseq_queue); |
@@ -541,7 +536,8 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
541 | struct nr_sock *nr = nr_sk(sk); | 536 | struct nr_sock *nr = nr_sk(sk); |
542 | struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; | 537 | struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; |
543 | struct net_device *dev; | 538 | struct net_device *dev; |
544 | ax25_address *user, *source; | 539 | ax25_uid_assoc *user; |
540 | ax25_address *source; | ||
545 | 541 | ||
546 | lock_sock(sk); | 542 | lock_sock(sk); |
547 | if (!sock_flag(sk, SOCK_ZAPPED)) { | 543 | if (!sock_flag(sk, SOCK_ZAPPED)) { |
@@ -580,16 +576,19 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
580 | } else { | 576 | } else { |
581 | source = &addr->fsa_ax25.sax25_call; | 577 | source = &addr->fsa_ax25.sax25_call; |
582 | 578 | ||
583 | if ((user = ax25_findbyuid(current->euid)) == NULL) { | 579 | user = ax25_findbyuid(current->euid); |
580 | if (user) { | ||
581 | nr->user_addr = user->call; | ||
582 | ax25_uid_put(user); | ||
583 | } else { | ||
584 | if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { | 584 | if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) { |
585 | release_sock(sk); | 585 | release_sock(sk); |
586 | dev_put(dev); | 586 | dev_put(dev); |
587 | return -EPERM; | 587 | return -EPERM; |
588 | } | 588 | } |
589 | user = source; | 589 | nr->user_addr = *source; |
590 | } | 590 | } |
591 | 591 | ||
592 | nr->user_addr = *user; | ||
593 | nr->source_addr = *source; | 592 | nr->source_addr = *source; |
594 | } | 593 | } |
595 | 594 | ||
@@ -609,7 +608,8 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr, | |||
609 | struct sock *sk = sock->sk; | 608 | struct sock *sk = sock->sk; |
610 | struct nr_sock *nr = nr_sk(sk); | 609 | struct nr_sock *nr = nr_sk(sk); |
611 | struct sockaddr_ax25 *addr = (struct sockaddr_ax25 *)uaddr; | 610 | struct sockaddr_ax25 *addr = (struct sockaddr_ax25 *)uaddr; |
612 | ax25_address *user, *source = NULL; | 611 | ax25_address *source = NULL; |
612 | ax25_uid_assoc *user; | ||
613 | struct net_device *dev; | 613 | struct net_device *dev; |
614 | 614 | ||
615 | lock_sock(sk); | 615 | lock_sock(sk); |
@@ -650,16 +650,19 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr, | |||
650 | } | 650 | } |
651 | source = (ax25_address *)dev->dev_addr; | 651 | source = (ax25_address *)dev->dev_addr; |
652 | 652 | ||
653 | if ((user = ax25_findbyuid(current->euid)) == NULL) { | 653 | user = ax25_findbyuid(current->euid); |
654 | if (user) { | ||
655 | nr->user_addr = user->call; | ||
656 | ax25_uid_put(user); | ||
657 | } else { | ||
654 | if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) { | 658 | if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) { |
655 | dev_put(dev); | 659 | dev_put(dev); |
656 | release_sock(sk); | 660 | release_sock(sk); |
657 | return -EPERM; | 661 | return -EPERM; |
658 | } | 662 | } |
659 | user = source; | 663 | nr->user_addr = *source; |
660 | } | 664 | } |
661 | 665 | ||
662 | nr->user_addr = *user; | ||
663 | nr->source_addr = *source; | 666 | nr->source_addr = *source; |
664 | nr->device = dev; | 667 | nr->device = dev; |
665 | 668 | ||
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 7eb6a5bf93ea..5480caf8ccc2 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -556,12 +556,7 @@ static struct sock *rose_make_new(struct sock *osk) | |||
556 | sk->sk_sndbuf = osk->sk_sndbuf; | 556 | sk->sk_sndbuf = osk->sk_sndbuf; |
557 | sk->sk_state = TCP_ESTABLISHED; | 557 | sk->sk_state = TCP_ESTABLISHED; |
558 | sk->sk_sleep = osk->sk_sleep; | 558 | sk->sk_sleep = osk->sk_sleep; |
559 | 559 | sock_copy_flags(sk, osk); | |
560 | if (sock_flag(osk, SOCK_ZAPPED)) | ||
561 | sock_set_flag(sk, SOCK_ZAPPED); | ||
562 | |||
563 | if (sock_flag(osk, SOCK_DBG)) | ||
564 | sock_set_flag(sk, SOCK_DBG); | ||
565 | 560 | ||
566 | init_timer(&rose->timer); | 561 | init_timer(&rose->timer); |
567 | init_timer(&rose->idletimer); | 562 | init_timer(&rose->idletimer); |
@@ -631,7 +626,8 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
631 | struct rose_sock *rose = rose_sk(sk); | 626 | struct rose_sock *rose = rose_sk(sk); |
632 | struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; | 627 | struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; |
633 | struct net_device *dev; | 628 | struct net_device *dev; |
634 | ax25_address *user, *source; | 629 | ax25_address *source; |
630 | ax25_uid_assoc *user; | ||
635 | int n; | 631 | int n; |
636 | 632 | ||
637 | if (!sock_flag(sk, SOCK_ZAPPED)) | 633 | if (!sock_flag(sk, SOCK_ZAPPED)) |
@@ -656,14 +652,17 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
656 | 652 | ||
657 | source = &addr->srose_call; | 653 | source = &addr->srose_call; |
658 | 654 | ||
659 | if ((user = ax25_findbyuid(current->euid)) == NULL) { | 655 | user = ax25_findbyuid(current->euid); |
656 | if (user) { | ||
657 | rose->source_call = user->call; | ||
658 | ax25_uid_put(user); | ||
659 | } else { | ||
660 | if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) | 660 | if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) |
661 | return -EACCES; | 661 | return -EACCES; |
662 | user = source; | 662 | rose->source_call = *source; |
663 | } | 663 | } |
664 | 664 | ||
665 | rose->source_addr = addr->srose_addr; | 665 | rose->source_addr = addr->srose_addr; |
666 | rose->source_call = *user; | ||
667 | rose->device = dev; | 666 | rose->device = dev; |
668 | rose->source_ndigis = addr->srose_ndigis; | 667 | rose->source_ndigis = addr->srose_ndigis; |
669 | 668 | ||
@@ -690,8 +689,8 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le | |||
690 | struct rose_sock *rose = rose_sk(sk); | 689 | struct rose_sock *rose = rose_sk(sk); |
691 | struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; | 690 | struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; |
692 | unsigned char cause, diagnostic; | 691 | unsigned char cause, diagnostic; |
693 | ax25_address *user; | ||
694 | struct net_device *dev; | 692 | struct net_device *dev; |
693 | ax25_uid_assoc *user; | ||
695 | int n; | 694 | int n; |
696 | 695 | ||
697 | if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) { | 696 | if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) { |
@@ -741,12 +740,14 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le | |||
741 | if ((dev = rose_dev_first()) == NULL) | 740 | if ((dev = rose_dev_first()) == NULL) |
742 | return -ENETUNREACH; | 741 | return -ENETUNREACH; |
743 | 742 | ||
744 | if ((user = ax25_findbyuid(current->euid)) == NULL) | 743 | user = ax25_findbyuid(current->euid); |
744 | if (!user) | ||
745 | return -EINVAL; | 745 | return -EINVAL; |
746 | 746 | ||
747 | memcpy(&rose->source_addr, dev->dev_addr, ROSE_ADDR_LEN); | 747 | memcpy(&rose->source_addr, dev->dev_addr, ROSE_ADDR_LEN); |
748 | rose->source_call = *user; | 748 | rose->source_call = user->call; |
749 | rose->device = dev; | 749 | rose->device = dev; |
750 | ax25_uid_put(user); | ||
750 | 751 | ||
751 | rose_insert_socket(sk); /* Finish the bind */ | 752 | rose_insert_socket(sk); /* Finish the bind */ |
752 | } | 753 | } |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index ff73ebb912b8..25da6f699fd0 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -994,8 +994,10 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) | |||
994 | * 1. The frame isn't for us, | 994 | * 1. The frame isn't for us, |
995 | * 2. It isn't "owned" by any existing route. | 995 | * 2. It isn't "owned" by any existing route. |
996 | */ | 996 | */ |
997 | if (frametype != ROSE_CALL_REQUEST) /* XXX */ | 997 | if (frametype != ROSE_CALL_REQUEST) { /* XXX */ |
998 | return 0; | 998 | res = 0; |
999 | goto out; | ||
1000 | } | ||
999 | 1001 | ||
1000 | len = (((skb->data[3] >> 4) & 0x0F) + 1) / 2; | 1002 | len = (((skb->data[3] >> 4) & 0x0F) + 1) / 2; |
1001 | len += (((skb->data[3] >> 0) & 0x0F) + 1) / 2; | 1003 | len += (((skb->data[3] >> 0) & 0x0F) + 1) / 2; |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 8edefd5d095d..0d066c965342 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -438,6 +438,7 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) | |||
438 | if (!ops->init || ops->init(sch, NULL) == 0) | 438 | if (!ops->init || ops->init(sch, NULL) == 0) |
439 | return sch; | 439 | return sch; |
440 | 440 | ||
441 | qdisc_destroy(sch); | ||
441 | errout: | 442 | errout: |
442 | return NULL; | 443 | return NULL; |
443 | } | 444 | } |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 98d49ec9b74b..b74f7772b576 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -57,6 +57,7 @@ static struct snmp_mib sctp_snmp_list[] = { | |||
57 | SNMP_MIB_ITEM("SctpReasmUsrMsgs", SCTP_MIB_REASMUSRMSGS), | 57 | SNMP_MIB_ITEM("SctpReasmUsrMsgs", SCTP_MIB_REASMUSRMSGS), |
58 | SNMP_MIB_ITEM("SctpOutSCTPPacks", SCTP_MIB_OUTSCTPPACKS), | 58 | SNMP_MIB_ITEM("SctpOutSCTPPacks", SCTP_MIB_OUTSCTPPACKS), |
59 | SNMP_MIB_ITEM("SctpInSCTPPacks", SCTP_MIB_INSCTPPACKS), | 59 | SNMP_MIB_ITEM("SctpInSCTPPacks", SCTP_MIB_INSCTPPACKS), |
60 | SNMP_MIB_SENTINEL | ||
60 | }; | 61 | }; |
61 | 62 | ||
62 | /* Return the current value of a particular entry in the mib by adding its | 63 | /* Return the current value of a particular entry in the mib by adding its |
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c index 24c21f2a33a7..5a7265aeaf83 100644 --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c | |||
@@ -185,9 +185,7 @@ make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, | |||
185 | sg->page = body->pages[i]; | 185 | sg->page = body->pages[i]; |
186 | sg->offset = offset; | 186 | sg->offset = offset; |
187 | sg->length = thislen; | 187 | sg->length = thislen; |
188 | kmap(sg->page); /* XXX kmap_atomic? */ | ||
189 | crypto_digest_update(tfm, sg, 1); | 188 | crypto_digest_update(tfm, sg, 1); |
190 | kunmap(sg->page); | ||
191 | len -= thislen; | 189 | len -= thislen; |
192 | i++; | 190 | i++; |
193 | offset = 0; | 191 | offset = 0; |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 9b9f94c915d2..09ffca54b373 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -359,11 +359,16 @@ handle_modversions(struct module *mod, struct elf_info *info, | |||
359 | /* ignore __this_module, it will be resolved shortly */ | 359 | /* ignore __this_module, it will be resolved shortly */ |
360 | if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) | 360 | if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) |
361 | break; | 361 | break; |
362 | #ifdef STT_REGISTER | 362 | /* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ |
363 | #if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER) | ||
364 | /* add compatibility with older glibc */ | ||
365 | #ifndef STT_SPARC_REGISTER | ||
366 | #define STT_SPARC_REGISTER STT_REGISTER | ||
367 | #endif | ||
363 | if (info->hdr->e_machine == EM_SPARC || | 368 | if (info->hdr->e_machine == EM_SPARC || |
364 | info->hdr->e_machine == EM_SPARCV9) { | 369 | info->hdr->e_machine == EM_SPARCV9) { |
365 | /* Ignore register directives. */ | 370 | /* Ignore register directives. */ |
366 | if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER) | 371 | if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) |
367 | break; | 372 | break; |
368 | } | 373 | } |
369 | #endif | 374 | #endif |
diff --git a/sound/Kconfig b/sound/Kconfig index ee794ae06040..b65ee4701f98 100644 --- a/sound/Kconfig +++ b/sound/Kconfig | |||
@@ -77,7 +77,7 @@ source "sound/parisc/Kconfig" | |||
77 | endmenu | 77 | endmenu |
78 | 78 | ||
79 | menu "Open Sound System" | 79 | menu "Open Sound System" |
80 | depends on SOUND!=n && (BROKEN || (!SPARC32 && !SPARC64)) | 80 | depends on SOUND!=n |
81 | 81 | ||
82 | config SOUND_PRIME | 82 | config SOUND_PRIME |
83 | tristate "Open Sound System (DEPRECATED)" | 83 | tristate "Open Sound System (DEPRECATED)" |
diff --git a/sound/core/Makefile b/sound/core/Makefile index 764ac184b223..969d75528bde 100644 --- a/sound/core/Makefile +++ b/sound/core/Makefile | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | snd-objs := sound.o init.o memory.o info.o control.o misc.o \ | 6 | snd-objs := sound.o init.o memory.o info.o control.o misc.o \ |
7 | device.o wrappers.o | 7 | device.o wrappers.o |
8 | ifeq ($(CONFIG_ISA),y) | 8 | ifeq ($(CONFIG_ISA_DMA_API),y) |
9 | snd-objs += isadma.o | 9 | snd-objs += isadma.o |
10 | endif | 10 | endif |
11 | ifeq ($(CONFIG_SND_OSSEMUL),y) | 11 | ifeq ($(CONFIG_SND_OSSEMUL),y) |
diff --git a/sound/core/sound.c b/sound/core/sound.c index 7612884f530b..3271e9245490 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -432,7 +432,7 @@ EXPORT_SYMBOL(snd_device_new); | |||
432 | EXPORT_SYMBOL(snd_device_register); | 432 | EXPORT_SYMBOL(snd_device_register); |
433 | EXPORT_SYMBOL(snd_device_free); | 433 | EXPORT_SYMBOL(snd_device_free); |
434 | /* isadma.c */ | 434 | /* isadma.c */ |
435 | #ifdef CONFIG_ISA | 435 | #ifdef CONFIG_ISA_DMA_API |
436 | EXPORT_SYMBOL(snd_dma_program); | 436 | EXPORT_SYMBOL(snd_dma_program); |
437 | EXPORT_SYMBOL(snd_dma_disable); | 437 | EXPORT_SYMBOL(snd_dma_disable); |
438 | EXPORT_SYMBOL(snd_dma_pointer); | 438 | EXPORT_SYMBOL(snd_dma_pointer); |
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index 148a856a43ad..be4ea60a3679 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # ALSA ISA drivers | 1 | # ALSA ISA drivers |
2 | 2 | ||
3 | menu "ISA devices" | 3 | menu "ISA devices" |
4 | depends on SND!=n && ISA | 4 | depends on SND!=n && ISA && ISA_DMA_API |
5 | 5 | ||
6 | config SND_AD1848_LIB | 6 | config SND_AD1848_LIB |
7 | tristate | 7 | tristate |
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index 7bd95ceab7cc..953e5f3ea03d 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig | |||
@@ -6,7 +6,7 @@ | |||
6 | # Prompt user for primary drivers. | 6 | # Prompt user for primary drivers. |
7 | config SOUND_BT878 | 7 | config SOUND_BT878 |
8 | tristate "BT878 audio dma" | 8 | tristate "BT878 audio dma" |
9 | depends on SOUND_PRIME | 9 | depends on SOUND_PRIME && PCI |
10 | ---help--- | 10 | ---help--- |
11 | Audio DMA support for bt878 based grabber boards. As you might have | 11 | Audio DMA support for bt878 based grabber boards. As you might have |
12 | already noticed, bt878 is listed with two functions in /proc/pci. | 12 | already noticed, bt878 is listed with two functions in /proc/pci. |
@@ -80,14 +80,14 @@ config SOUND_EMU10K1 | |||
80 | 80 | ||
81 | config MIDI_EMU10K1 | 81 | config MIDI_EMU10K1 |
82 | bool "Creative SBLive! MIDI (EXPERIMENTAL)" | 82 | bool "Creative SBLive! MIDI (EXPERIMENTAL)" |
83 | depends on SOUND_EMU10K1 && EXPERIMENTAL | 83 | depends on SOUND_EMU10K1 && EXPERIMENTAL && ISA_DMA_API |
84 | help | 84 | help |
85 | Say Y if you want to be able to use the OSS /dev/sequencer | 85 | Say Y if you want to be able to use the OSS /dev/sequencer |
86 | interface. This code is still experimental. | 86 | interface. This code is still experimental. |
87 | 87 | ||
88 | config SOUND_FUSION | 88 | config SOUND_FUSION |
89 | tristate "Crystal SoundFusion (CS4280/461x)" | 89 | tristate "Crystal SoundFusion (CS4280/461x)" |
90 | depends on SOUND_PRIME | 90 | depends on SOUND_PRIME && PCI |
91 | help | 91 | help |
92 | This module drives the Crystal SoundFusion devices (CS4280/46xx | 92 | This module drives the Crystal SoundFusion devices (CS4280/46xx |
93 | series) when wired as native sound drivers with AC97 codecs. If | 93 | series) when wired as native sound drivers with AC97 codecs. If |
@@ -95,7 +95,7 @@ config SOUND_FUSION | |||
95 | 95 | ||
96 | config SOUND_CS4281 | 96 | config SOUND_CS4281 |
97 | tristate "Crystal Sound CS4281" | 97 | tristate "Crystal Sound CS4281" |
98 | depends on SOUND_PRIME | 98 | depends on SOUND_PRIME && PCI |
99 | help | 99 | help |
100 | Picture and feature list at | 100 | Picture and feature list at |
101 | <http://www.pcbroker.com/crystal4281.html>. | 101 | <http://www.pcbroker.com/crystal4281.html>. |
@@ -179,7 +179,7 @@ config SOUND_HARMONY | |||
179 | 179 | ||
180 | config SOUND_SONICVIBES | 180 | config SOUND_SONICVIBES |
181 | tristate "S3 SonicVibes" | 181 | tristate "S3 SonicVibes" |
182 | depends on SOUND_PRIME | 182 | depends on SOUND_PRIME && PCI |
183 | help | 183 | help |
184 | Say Y or M if you have a PCI sound card utilizing the S3 | 184 | Say Y or M if you have a PCI sound card utilizing the S3 |
185 | SonicVibes chipset. To find out if your sound card uses a | 185 | SonicVibes chipset. To find out if your sound card uses a |
@@ -226,7 +226,7 @@ config SOUND_AU1550_AC97 | |||
226 | 226 | ||
227 | config SOUND_TRIDENT | 227 | config SOUND_TRIDENT |
228 | tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core" | 228 | tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core" |
229 | depends on SOUND_PRIME | 229 | depends on SOUND_PRIME && PCI |
230 | ---help--- | 230 | ---help--- |
231 | Say Y or M if you have a PCI sound card utilizing the Trident | 231 | Say Y or M if you have a PCI sound card utilizing the Trident |
232 | 4DWave-DX/NX chipset or your mother board chipset has SiS 7018 | 232 | 4DWave-DX/NX chipset or your mother board chipset has SiS 7018 |
@@ -503,7 +503,7 @@ config SOUND_VIA82CXXX | |||
503 | 503 | ||
504 | config MIDI_VIA82CXXX | 504 | config MIDI_VIA82CXXX |
505 | bool "VIA 82C686 MIDI" | 505 | bool "VIA 82C686 MIDI" |
506 | depends on SOUND_VIA82CXXX | 506 | depends on SOUND_VIA82CXXX && ISA_DMA_API |
507 | help | 507 | help |
508 | Answer Y to use the MIDI interface of the Via686. You may need to | 508 | Answer Y to use the MIDI interface of the Via686. You may need to |
509 | enable this in the BIOS before it will work. This is for connection | 509 | enable this in the BIOS before it will work. This is for connection |
@@ -512,7 +512,7 @@ config MIDI_VIA82CXXX | |||
512 | 512 | ||
513 | config SOUND_OSS | 513 | config SOUND_OSS |
514 | tristate "OSS sound modules" | 514 | tristate "OSS sound modules" |
515 | depends on SOUND_PRIME | 515 | depends on SOUND_PRIME && ISA_DMA_API |
516 | help | 516 | help |
517 | OSS is the Open Sound System suite of sound card drivers. They make | 517 | OSS is the Open Sound System suite of sound card drivers. They make |
518 | sound programming easier since they provide a common API. Say Y or | 518 | sound programming easier since they provide a common API. Say Y or |
diff --git a/sound/oss/Makefile b/sound/oss/Makefile index db9afb61d6ff..9bf3ee544d86 100644 --- a/sound/oss/Makefile +++ b/sound/oss/Makefile | |||
@@ -80,7 +80,7 @@ obj-$(CONFIG_SOUND_ALI5455) += ali5455.o ac97_codec.o | |||
80 | obj-$(CONFIG_SOUND_IT8172) += ite8172.o ac97_codec.o | 80 | obj-$(CONFIG_SOUND_IT8172) += ite8172.o ac97_codec.o |
81 | obj-$(CONFIG_SOUND_FORTE) += forte.o ac97_codec.o | 81 | obj-$(CONFIG_SOUND_FORTE) += forte.o ac97_codec.o |
82 | 82 | ||
83 | obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o | 83 | obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o ac97_codec.o |
84 | obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o | 84 | obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o |
85 | 85 | ||
86 | ifeq ($(CONFIG_MIDI_EMU10K1),y) | 86 | ifeq ($(CONFIG_MIDI_EMU10K1),y) |
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index 7e9f667cf7a7..b9a640fe48b1 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c | |||
@@ -3430,9 +3430,9 @@ out_iospace: | |||
3430 | release_mem_region(card->iobase_mmio_phys, 256); | 3430 | release_mem_region(card->iobase_mmio_phys, 256); |
3431 | } | 3431 | } |
3432 | out_pio: | 3432 | out_pio: |
3433 | release_region(card->iobase, 64); | ||
3434 | out_region2: | ||
3435 | release_region(card->ac97base, 256); | 3433 | release_region(card->ac97base, 256); |
3434 | out_region2: | ||
3435 | release_region(card->iobase, 64); | ||
3436 | out_region1: | 3436 | out_region1: |
3437 | pci_free_consistent(pci_dev, sizeof(struct i810_channel)*NR_HW_CH, | 3437 | pci_free_consistent(pci_dev, sizeof(struct i810_channel)*NR_HW_CH, |
3438 | card->channel, card->chandma); | 3438 | card->channel, card->chandma); |
diff --git a/sound/oss/vidc.h b/sound/oss/vidc.h index bab7044572d3..d5b8064dc565 100644 --- a/sound/oss/vidc.h +++ b/sound/oss/vidc.h | |||
@@ -10,10 +10,6 @@ | |||
10 | * VIDC sound function prototypes | 10 | * VIDC sound function prototypes |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* vidc.c */ | ||
14 | |||
15 | extern int vidc_busy; | ||
16 | |||
17 | /* vidc_fill.S */ | 13 | /* vidc_fill.S */ |
18 | 14 | ||
19 | /* | 15 | /* |
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 6d7a00f34d82..26b42bb20a0a 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig | |||
@@ -314,7 +314,7 @@ config SND_YMFPCI | |||
314 | 314 | ||
315 | config SND_ALS4000 | 315 | config SND_ALS4000 |
316 | tristate "Avance Logic ALS4000" | 316 | tristate "Avance Logic ALS4000" |
317 | depends on SND | 317 | depends on SND && ISA_DMA_API |
318 | select SND_OPL3_LIB | 318 | select SND_OPL3_LIB |
319 | select SND_MPU401_UART | 319 | select SND_MPU401_UART |
320 | select SND_PCM | 320 | select SND_PCM |