diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 00:55:22 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 00:55:22 -0400 |
| commit | 617e44fdfd7ee3d53388ab295d9411b826437ce9 (patch) | |
| tree | ed6bd2a5960f706fa93c6df2cbfb75ede926fd1c | |
| parent | 4887f76ec3d38e99286c9d0fdd6a719174d02e44 (diff) | |
| parent | 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff) | |
Merge /spare/repo/linux-2.6/
82 files changed, 314 insertions, 264 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/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/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 8a835eb58808..8edb6936fb9b 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
| @@ -1145,7 +1145,7 @@ config IBMVETH | |||
| 1145 | be called ibmveth. | 1145 | be called ibmveth. |
| 1146 | 1146 | ||
| 1147 | config IBM_EMAC | 1147 | config IBM_EMAC |
| 1148 | tristate "IBM PPC4xx EMAC driver support" | 1148 | bool "IBM PPC4xx EMAC driver support" |
| 1149 | depends on 4xx | 1149 | depends on 4xx |
| 1150 | select CRC32 | 1150 | select CRC32 |
| 1151 | ---help--- | 1151 | ---help--- |
| @@ -1154,7 +1154,7 @@ config IBM_EMAC | |||
| 1154 | 1154 | ||
| 1155 | config IBM_EMAC_ERRMSG | 1155 | config IBM_EMAC_ERRMSG |
| 1156 | bool "Verbose error messages" | 1156 | bool "Verbose error messages" |
| 1157 | depends on IBM_EMAC | 1157 | depends on IBM_EMAC && BROKEN |
| 1158 | 1158 | ||
| 1159 | config IBM_EMAC_RXB | 1159 | config IBM_EMAC_RXB |
| 1160 | int "Number of receive buffers" | 1160 | 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/tokenring/Kconfig b/drivers/net/tokenring/Kconfig index 23d0fa4bbceb..7e99e9f8045e 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) | 87 | depends on TR && (PCI || ISA && ISA_DMA_API) |
| 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/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/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/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/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/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/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/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 |
