diff options
66 files changed, 383 insertions, 237 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index f38be60312e9..c3c5842402df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -568,6 +568,18 @@ L: linuxppc-dev@ozlabs.org | |||
568 | W: http://www.penguinppc.org/ppc64/ | 568 | W: http://www.penguinppc.org/ppc64/ |
569 | S: Supported | 569 | S: Supported |
570 | 570 | ||
571 | BROADCOM BNX2 GIGABIT ETHERNET DRIVER | ||
572 | P: Michael Chan | ||
573 | M: mchan@broadcom.com | ||
574 | L: netdev@vger.kernel.org | ||
575 | S: Supported | ||
576 | |||
577 | BROADCOM TG3 GIGABIT ETHERNET DRIVER | ||
578 | P: Michael Chan | ||
579 | M: mchan@broadcom.com | ||
580 | L: netdev@vger.kernel.org | ||
581 | S: Supported | ||
582 | |||
571 | BTTV VIDEO4LINUX DRIVER | 583 | BTTV VIDEO4LINUX DRIVER |
572 | P: Mauro Carvalho Chehab | 584 | P: Mauro Carvalho Chehab |
573 | M: mchehab@infradead.org | 585 | M: mchehab@infradead.org |
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index c645c5e14786..2b245ad731ee 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c | |||
@@ -182,7 +182,6 @@ EXPORT_SYMBOL(smp_num_cpus); | |||
182 | EXPORT_SYMBOL(smp_call_function); | 182 | EXPORT_SYMBOL(smp_call_function); |
183 | EXPORT_SYMBOL(smp_call_function_on_cpu); | 183 | EXPORT_SYMBOL(smp_call_function_on_cpu); |
184 | EXPORT_SYMBOL(_atomic_dec_and_lock); | 184 | EXPORT_SYMBOL(_atomic_dec_and_lock); |
185 | EXPORT_SYMBOL(cpu_present_mask); | ||
186 | #endif /* CONFIG_SMP */ | 185 | #endif /* CONFIG_SMP */ |
187 | 186 | ||
188 | /* | 187 | /* |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 9924fd07743a..c760a831fd1a 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -94,7 +94,7 @@ common_shutdown_1(void *generic_ptr) | |||
94 | if (cpuid != boot_cpuid) { | 94 | if (cpuid != boot_cpuid) { |
95 | flags |= 0x00040000UL; /* "remain halted" */ | 95 | flags |= 0x00040000UL; /* "remain halted" */ |
96 | *pflags = flags; | 96 | *pflags = flags; |
97 | clear_bit(cpuid, &cpu_present_mask); | 97 | cpu_clear(cpuid, cpu_present_map); |
98 | halt(); | 98 | halt(); |
99 | } | 99 | } |
100 | #endif | 100 | #endif |
@@ -120,8 +120,8 @@ common_shutdown_1(void *generic_ptr) | |||
120 | 120 | ||
121 | #ifdef CONFIG_SMP | 121 | #ifdef CONFIG_SMP |
122 | /* Wait for the secondaries to halt. */ | 122 | /* Wait for the secondaries to halt. */ |
123 | cpu_clear(boot_cpuid, cpu_possible_map); | 123 | cpu_clear(boot_cpuid, cpu_present_map); |
124 | while (cpus_weight(cpu_possible_map)) | 124 | while (cpus_weight(cpu_present_map)) |
125 | barrier(); | 125 | barrier(); |
126 | #endif | 126 | #endif |
127 | 127 | ||
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 185255416e85..4dc273e537fd 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -68,7 +68,6 @@ enum ipi_message_type { | |||
68 | static int smp_secondary_alive __initdata = 0; | 68 | static int smp_secondary_alive __initdata = 0; |
69 | 69 | ||
70 | /* Which cpus ids came online. */ | 70 | /* Which cpus ids came online. */ |
71 | cpumask_t cpu_present_mask; | ||
72 | cpumask_t cpu_online_map; | 71 | cpumask_t cpu_online_map; |
73 | 72 | ||
74 | EXPORT_SYMBOL(cpu_online_map); | 73 | EXPORT_SYMBOL(cpu_online_map); |
@@ -439,7 +438,7 @@ setup_smp(void) | |||
439 | if ((cpu->flags & 0x1cc) == 0x1cc) { | 438 | if ((cpu->flags & 0x1cc) == 0x1cc) { |
440 | smp_num_probed++; | 439 | smp_num_probed++; |
441 | /* Assume here that "whami" == index */ | 440 | /* Assume here that "whami" == index */ |
442 | cpu_set(i, cpu_present_mask); | 441 | cpu_set(i, cpu_present_map); |
443 | cpu->pal_revision = boot_cpu_palrev; | 442 | cpu->pal_revision = boot_cpu_palrev; |
444 | } | 443 | } |
445 | 444 | ||
@@ -450,11 +449,10 @@ setup_smp(void) | |||
450 | } | 449 | } |
451 | } else { | 450 | } else { |
452 | smp_num_probed = 1; | 451 | smp_num_probed = 1; |
453 | cpu_set(boot_cpuid, cpu_present_mask); | ||
454 | } | 452 | } |
455 | 453 | ||
456 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", | 454 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", |
457 | smp_num_probed, cpu_possible_map.bits[0]); | 455 | smp_num_probed, cpu_present_map.bits[0]); |
458 | } | 456 | } |
459 | 457 | ||
460 | /* | 458 | /* |
@@ -473,7 +471,7 @@ smp_prepare_cpus(unsigned int max_cpus) | |||
473 | 471 | ||
474 | /* Nothing to do on a UP box, or when told not to. */ | 472 | /* Nothing to do on a UP box, or when told not to. */ |
475 | if (smp_num_probed == 1 || max_cpus == 0) { | 473 | if (smp_num_probed == 1 || max_cpus == 0) { |
476 | cpu_present_mask = cpumask_of_cpu(boot_cpuid); | 474 | cpu_present_map = cpumask_of_cpu(boot_cpuid); |
477 | printk(KERN_INFO "SMP mode deactivated.\n"); | 475 | printk(KERN_INFO "SMP mode deactivated.\n"); |
478 | return; | 476 | return; |
479 | } | 477 | } |
@@ -486,10 +484,6 @@ smp_prepare_cpus(unsigned int max_cpus) | |||
486 | void __devinit | 484 | void __devinit |
487 | smp_prepare_boot_cpu(void) | 485 | smp_prepare_boot_cpu(void) |
488 | { | 486 | { |
489 | /* | ||
490 | * Mark the boot cpu (current cpu) as online | ||
491 | */ | ||
492 | cpu_set(smp_processor_id(), cpu_online_map); | ||
493 | } | 487 | } |
494 | 488 | ||
495 | int __devinit | 489 | int __devinit |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 5f84417eeb7b..2551fb49ae09 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
@@ -66,7 +66,7 @@ titan_update_irq_hw(unsigned long mask) | |||
66 | register int bcpu = boot_cpuid; | 66 | register int bcpu = boot_cpuid; |
67 | 67 | ||
68 | #ifdef CONFIG_SMP | 68 | #ifdef CONFIG_SMP |
69 | cpumask_t cpm = cpu_present_mask; | 69 | cpumask_t cpm = cpu_present_map; |
70 | volatile unsigned long *dim0, *dim1, *dim2, *dim3; | 70 | volatile unsigned long *dim0, *dim1, *dim2, *dim3; |
71 | unsigned long mask0, mask1, mask2, mask3, dummy; | 71 | unsigned long mask0, mask1, mask2, mask3, dummy; |
72 | 72 | ||
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 5d3acff8c596..d22f38b957db 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -101,7 +101,7 @@ config DEBUG_S3C2410_UART | |||
101 | help | 101 | help |
102 | Choice for UART for kernel low-level using S3C2410 UARTS, | 102 | Choice for UART for kernel low-level using S3C2410 UARTS, |
103 | should be between zero and two. The port must have been | 103 | should be between zero and two. The port must have been |
104 | initalised by the boot-loader before use. | 104 | initialised by the boot-loader before use. |
105 | 105 | ||
106 | The uncompressor code port configuration is now handled | 106 | The uncompressor code port configuration is now handled |
107 | by CONFIG_S3C2410_LOWLEVEL_UART_PORT. | 107 | by CONFIG_S3C2410_LOWLEVEL_UART_PORT. |
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index 2a39f9e481ad..3b23f43cb160 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig | |||
@@ -141,7 +141,7 @@ config IXP4XX_INDIRECT_PCI | |||
141 | 2) If > 64MB of memory space is required, the IXP4xx can be | 141 | 2) If > 64MB of memory space is required, the IXP4xx can be |
142 | configured to use indirect registers to access PCI This allows | 142 | configured to use indirect registers to access PCI This allows |
143 | for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. | 143 | for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. |
144 | The disadvantadge of this is that every PCI access requires | 144 | The disadvantage of this is that every PCI access requires |
145 | three local register accesses plus a spinlock, but in some | 145 | three local register accesses plus a spinlock, but in some |
146 | cases the performance hit is acceptable. In addition, you cannot | 146 | cases the performance hit is acceptable. In addition, you cannot |
147 | mmap() PCI devices in this case due to the indirect nature | 147 | mmap() PCI devices in this case due to the indirect nature |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 02e188d98e7d..b307f11951df 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -493,6 +493,7 @@ static void __init mainstone_map_io(void) | |||
493 | MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") | 493 | MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") |
494 | /* Maintainer: MontaVista Software Inc. */ | 494 | /* Maintainer: MontaVista Software Inc. */ |
495 | .phys_io = 0x40000000, | 495 | .phys_io = 0x40000000, |
496 | .boot_params = 0xa0000100, /* BLOB boot parameter setting */ | ||
496 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 497 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
497 | .map_io = mainstone_map_io, | 498 | .map_io = mainstone_map_io, |
498 | .init_irq = mainstone_init_irq, | 499 | .init_irq = mainstone_init_irq, |
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index ce7d81000695..970f98dadffc 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -170,7 +170,7 @@ config S3C2410_PM_DEBUG | |||
170 | depends on ARCH_S3C2410 && PM | 170 | depends on ARCH_S3C2410 && PM |
171 | help | 171 | help |
172 | Say Y here if you want verbose debugging from the PM Suspend and | 172 | Say Y here if you want verbose debugging from the PM Suspend and |
173 | Resume code. See `Documentation/arm/Samsing-S3C24XX/Suspend.txt` | 173 | Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> |
174 | for more information. | 174 | for more information. |
175 | 175 | ||
176 | config S3C2410_PM_CHECK | 176 | config S3C2410_PM_CHECK |
diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c index 9c171afd9a53..ae7d8c57bf3f 100644 --- a/arch/mips/au1000/common/prom.c +++ b/arch/mips/au1000/common/prom.c | |||
@@ -1,10 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * BRIEF MODULE DESCRIPTION | 3 | * BRIEF MODULE DESCRIPTION |
4 | * PROM library initialisation code, assuming a version of | 4 | * PROM library initialisation code, assuming YAMON is the boot loader. |
5 | * pmon is the boot code. | ||
6 | * | 5 | * |
7 | * Copyright 2000,2001 MontaVista Software Inc. | 6 | * Copyright 2000, 2001, 2006 MontaVista Software Inc. |
8 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. |
9 | * ppopov@mvista.com or source@mvista.com | 8 | * ppopov@mvista.com or source@mvista.com |
10 | * | 9 | * |
@@ -49,9 +48,9 @@ extern char **prom_argv, **prom_envp; | |||
49 | 48 | ||
50 | typedef struct | 49 | typedef struct |
51 | { | 50 | { |
52 | char *name; | 51 | char *name; |
53 | /* char *val; */ | 52 | char *val; |
54 | }t_env_var; | 53 | } t_env_var; |
55 | 54 | ||
56 | 55 | ||
57 | char * prom_getcmdline(void) | 56 | char * prom_getcmdline(void) |
@@ -85,21 +84,16 @@ char *prom_getenv(char *envname) | |||
85 | { | 84 | { |
86 | /* | 85 | /* |
87 | * Return a pointer to the given environment variable. | 86 | * Return a pointer to the given environment variable. |
88 | * Environment variables are stored in the form of "memsize=64". | ||
89 | */ | 87 | */ |
90 | 88 | ||
91 | t_env_var *env = (t_env_var *)prom_envp; | 89 | t_env_var *env = (t_env_var *)prom_envp; |
92 | int i; | ||
93 | |||
94 | i = strlen(envname); | ||
95 | 90 | ||
96 | while(env->name) { | 91 | while (env->name) { |
97 | if(strncmp(envname, env->name, i) == 0) { | 92 | if (strcmp(envname, env->name) == 0) |
98 | return(env->name + strlen(envname) + 1); | 93 | return env->val; |
99 | } | ||
100 | env++; | 94 | env++; |
101 | } | 95 | } |
102 | return(NULL); | 96 | return NULL; |
103 | } | 97 | } |
104 | 98 | ||
105 | inline unsigned char str2hexnum(unsigned char c) | 99 | inline unsigned char str2hexnum(unsigned char c) |
diff --git a/arch/mips/au1000/common/sleeper.S b/arch/mips/au1000/common/sleeper.S index 44dac3b0df3b..683d9da84b66 100644 --- a/arch/mips/au1000/common/sleeper.S +++ b/arch/mips/au1000/common/sleeper.S | |||
@@ -112,6 +112,11 @@ sdsleep: | |||
112 | mtc0 k0, CP0_PAGEMASK | 112 | mtc0 k0, CP0_PAGEMASK |
113 | lw k0, 0x14(sp) | 113 | lw k0, 0x14(sp) |
114 | mtc0 k0, CP0_CONFIG | 114 | mtc0 k0, CP0_CONFIG |
115 | |||
116 | /* We need to catch the ealry Alchemy SOCs with | ||
117 | * the write-only Config[OD] bit and set it back to one... | ||
118 | */ | ||
119 | jal au1x00_fixup_config_od | ||
115 | lw $1, PT_R1(sp) | 120 | lw $1, PT_R1(sp) |
116 | lw $2, PT_R2(sp) | 121 | lw $2, PT_R2(sp) |
117 | lw $3, PT_R3(sp) | 122 | lw $3, PT_R3(sp) |
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index 47a087b6c11b..d268827c62bd 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
@@ -206,7 +206,7 @@ static inline void check_daddi(void) | |||
206 | "daddi %0, %1, %3\n\t" | 206 | "daddi %0, %1, %3\n\t" |
207 | ".set pop" | 207 | ".set pop" |
208 | : "=r" (v), "=&r" (tmp) | 208 | : "=r" (v), "=&r" (tmp) |
209 | : "I" (0xffffffffffffdb9a), "I" (0x1234)); | 209 | : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); |
210 | set_except_vector(12, handler); | 210 | set_except_vector(12, handler); |
211 | local_irq_restore(flags); | 211 | local_irq_restore(flags); |
212 | 212 | ||
@@ -224,7 +224,7 @@ static inline void check_daddi(void) | |||
224 | "dsrl %1, %1, 1\n\t" | 224 | "dsrl %1, %1, 1\n\t" |
225 | "daddi %0, %1, %3" | 225 | "daddi %0, %1, %3" |
226 | : "=r" (v), "=&r" (tmp) | 226 | : "=r" (v), "=&r" (tmp) |
227 | : "I" (0xffffffffffffdb9a), "I" (0x1234)); | 227 | : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); |
228 | set_except_vector(12, handler); | 228 | set_except_vector(12, handler); |
229 | local_irq_restore(flags); | 229 | local_irq_restore(flags); |
230 | 230 | ||
@@ -280,7 +280,7 @@ static inline void check_daddiu(void) | |||
280 | "daddu %1, %2\n\t" | 280 | "daddu %1, %2\n\t" |
281 | ".set pop" | 281 | ".set pop" |
282 | : "=&r" (v), "=&r" (w), "=&r" (tmp) | 282 | : "=&r" (v), "=&r" (w), "=&r" (tmp) |
283 | : "I" (0xffffffffffffdb9a), "I" (0x1234)); | 283 | : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); |
284 | 284 | ||
285 | if (v == w) { | 285 | if (v == w) { |
286 | printk("no.\n"); | 286 | printk("no.\n"); |
@@ -296,7 +296,7 @@ static inline void check_daddiu(void) | |||
296 | "addiu %1, $0, %4\n\t" | 296 | "addiu %1, $0, %4\n\t" |
297 | "daddu %1, %2" | 297 | "daddu %1, %2" |
298 | : "=&r" (v), "=&r" (w), "=&r" (tmp) | 298 | : "=&r" (v), "=&r" (w), "=&r" (tmp) |
299 | : "I" (0xffffffffffffdb9a), "I" (0x1234)); | 299 | : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); |
300 | 300 | ||
301 | if (v == w) { | 301 | if (v == w) { |
302 | printk("yes.\n"); | 302 | printk("yes.\n"); |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index bef3e2dc7c52..8c2c359a05f4 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -655,7 +655,7 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c) | |||
655 | case PRID_IMP_SB1: | 655 | case PRID_IMP_SB1: |
656 | c->cputype = CPU_SB1; | 656 | c->cputype = CPU_SB1; |
657 | /* FPU in pass1 is known to have issues. */ | 657 | /* FPU in pass1 is known to have issues. */ |
658 | if ((c->processor_id & 0xff) < 0x20) | 658 | if ((c->processor_id & 0xff) < 0x02) |
659 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); | 659 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); |
660 | break; | 660 | break; |
661 | case PRID_IMP_SB1A: | 661 | case PRID_IMP_SB1A: |
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index e54a7f442f8a..d7bf0215bc1d 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -288,6 +288,9 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, | |||
288 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | 288 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr |
289 | + ELF_MIPS_R_SYM(rel[i]); | 289 | + ELF_MIPS_R_SYM(rel[i]); |
290 | if (!sym->st_value) { | 290 | if (!sym->st_value) { |
291 | /* Ignore unresolved weak symbol */ | ||
292 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | ||
293 | continue; | ||
291 | printk(KERN_WARNING "%s: Unknown symbol %s\n", | 294 | printk(KERN_WARNING "%s: Unknown symbol %s\n", |
292 | me->name, strtab + sym->st_name); | 295 | me->name, strtab + sym->st_name); |
293 | return -ENOENT; | 296 | return -ENOENT; |
@@ -325,6 +328,9 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
325 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | 328 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr |
326 | + ELF_MIPS_R_SYM(rel[i]); | 329 | + ELF_MIPS_R_SYM(rel[i]); |
327 | if (!sym->st_value) { | 330 | if (!sym->st_value) { |
331 | /* Ignore unresolved weak symbol */ | ||
332 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | ||
333 | continue; | ||
328 | printk(KERN_WARNING "%s: Unknown symbol %s\n", | 334 | printk(KERN_WARNING "%s: Unknown symbol %s\n", |
329 | me->name, strtab + sym->st_name); | 335 | me->name, strtab + sym->st_name); |
330 | return -ENOENT; | 336 | return -ENOENT; |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index b53a9207f530..8efb23a84131 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -209,7 +209,7 @@ sys_call_table: | |||
209 | PTR sys_fork | 209 | PTR sys_fork |
210 | PTR sys_read | 210 | PTR sys_read |
211 | PTR sys_write | 211 | PTR sys_write |
212 | PTR sys_open /* 4005 */ | 212 | PTR compat_sys_open /* 4005 */ |
213 | PTR sys_close | 213 | PTR sys_close |
214 | PTR sys_waitpid | 214 | PTR sys_waitpid |
215 | PTR sys_creat | 215 | PTR sys_creat |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index bcf1b10e518f..397a70e651b5 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -246,7 +246,7 @@ static inline int parse_rd_cmdline(unsigned long* rd_start, unsigned long* rd_en | |||
246 | #ifdef CONFIG_64BIT | 246 | #ifdef CONFIG_64BIT |
247 | /* HACK: Guess if the sign extension was forgotten */ | 247 | /* HACK: Guess if the sign extension was forgotten */ |
248 | if (start > 0x0000000080000000 && start < 0x00000000ffffffff) | 248 | if (start > 0x0000000080000000 && start < 0x00000000ffffffff) |
249 | start |= 0xffffffff00000000; | 249 | start |= 0xffffffff00000000UL; |
250 | #endif | 250 | #endif |
251 | 251 | ||
252 | end = start + size; | 252 | end = start + size; |
@@ -355,8 +355,6 @@ static inline void bootmem_init(void) | |||
355 | } | 355 | } |
356 | #endif | 356 | #endif |
357 | 357 | ||
358 | memory_present(0, first_usable_pfn, max_low_pfn); | ||
359 | |||
360 | /* Initialize the boot-time allocator with low memory only. */ | 358 | /* Initialize the boot-time allocator with low memory only. */ |
361 | bootmap_size = init_bootmem(first_usable_pfn, max_low_pfn); | 359 | bootmap_size = init_bootmem(first_usable_pfn, max_low_pfn); |
362 | 360 | ||
@@ -410,6 +408,7 @@ static inline void bootmem_init(void) | |||
410 | 408 | ||
411 | /* Register lowmem ranges */ | 409 | /* Register lowmem ranges */ |
412 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size)); | 410 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size)); |
411 | memory_present(0, curr_pfn, curr_pfn + size - 1); | ||
413 | } | 412 | } |
414 | 413 | ||
415 | /* Reserve the bootmap memory. */ | 414 | /* Reserve the bootmap memory. */ |
@@ -419,17 +418,20 @@ static inline void bootmem_init(void) | |||
419 | #ifdef CONFIG_BLK_DEV_INITRD | 418 | #ifdef CONFIG_BLK_DEV_INITRD |
420 | initrd_below_start_ok = 1; | 419 | initrd_below_start_ok = 1; |
421 | if (initrd_start) { | 420 | if (initrd_start) { |
422 | unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start); | 421 | unsigned long initrd_size = ((unsigned char *)initrd_end) - |
422 | ((unsigned char *)initrd_start); | ||
423 | const int width = sizeof(long) * 2; | ||
424 | |||
423 | printk("Initial ramdisk at: 0x%p (%lu bytes)\n", | 425 | printk("Initial ramdisk at: 0x%p (%lu bytes)\n", |
424 | (void *)initrd_start, initrd_size); | 426 | (void *)initrd_start, initrd_size); |
425 | 427 | ||
426 | if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) { | 428 | if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) { |
427 | printk("initrd extends beyond end of memory " | 429 | printk("initrd extends beyond end of memory " |
428 | "(0x%0*Lx > 0x%0*Lx)\ndisabling initrd\n", | 430 | "(0x%0*Lx > 0x%0*Lx)\ndisabling initrd\n", |
429 | sizeof(long) * 2, | 431 | width, |
430 | (unsigned long long)CPHYSADDR(initrd_end), | 432 | (unsigned long long) CPHYSADDR(initrd_end), |
431 | sizeof(long) * 2, | 433 | width, |
432 | (unsigned long long)PFN_PHYS(max_low_pfn)); | 434 | (unsigned long long) PFN_PHYS(max_low_pfn)); |
433 | initrd_start = initrd_end = 0; | 435 | initrd_start = initrd_end = 0; |
434 | initrd_reserve_bootmem = 0; | 436 | initrd_reserve_bootmem = 0; |
435 | } | 437 | } |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index d42f358754ad..298f82fe8440 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -247,6 +247,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
247 | current_thread_info()->cpu = 0; | 247 | current_thread_info()->cpu = 0; |
248 | smp_tune_scheduling(); | 248 | smp_tune_scheduling(); |
249 | plat_prepare_cpus(max_cpus); | 249 | plat_prepare_cpus(max_cpus); |
250 | #ifndef CONFIG_HOTPLUG_CPU | ||
251 | cpu_present_map = cpu_possible_map; | ||
252 | #endif | ||
250 | } | 253 | } |
251 | 254 | ||
252 | /* preload SMP state for boot cpu */ | 255 | /* preload SMP state for boot cpu */ |
@@ -442,7 +445,7 @@ static int __init topology_init(void) | |||
442 | int cpu; | 445 | int cpu; |
443 | int ret; | 446 | int ret; |
444 | 447 | ||
445 | for_each_cpu(cpu) { | 448 | for_each_present_cpu(cpu) { |
446 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); | 449 | ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); |
447 | if (ret) | 450 | if (ret) |
448 | printk(KERN_WARNING "topology_init: register_cpu %d " | 451 | printk(KERN_WARNING "topology_init: register_cpu %d " |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 8f4fdd94dbd0..5e8a18a8e2bd 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -276,8 +276,7 @@ void sys_set_thread_area(unsigned long addr) | |||
276 | 276 | ||
277 | asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) | 277 | asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) |
278 | { | 278 | { |
279 | int tmp, len; | 279 | int tmp; |
280 | char __user *name; | ||
281 | 280 | ||
282 | switch(cmd) { | 281 | switch(cmd) { |
283 | case MIPS_ATOMIC_SET: | 282 | case MIPS_ATOMIC_SET: |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 35cb08da3820..a7564b08eb4d 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -819,15 +819,30 @@ asmlinkage void do_watch(struct pt_regs *regs) | |||
819 | 819 | ||
820 | asmlinkage void do_mcheck(struct pt_regs *regs) | 820 | asmlinkage void do_mcheck(struct pt_regs *regs) |
821 | { | 821 | { |
822 | const int field = 2 * sizeof(unsigned long); | ||
823 | int multi_match = regs->cp0_status & ST0_TS; | ||
824 | |||
822 | show_regs(regs); | 825 | show_regs(regs); |
823 | dump_tlb_all(); | 826 | |
827 | if (multi_match) { | ||
828 | printk("Index : %0x\n", read_c0_index()); | ||
829 | printk("Pagemask: %0x\n", read_c0_pagemask()); | ||
830 | printk("EntryHi : %0*lx\n", field, read_c0_entryhi()); | ||
831 | printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0()); | ||
832 | printk("EntryLo1: %0*lx\n", field, read_c0_entrylo1()); | ||
833 | printk("\n"); | ||
834 | dump_tlb_all(); | ||
835 | } | ||
836 | |||
837 | show_code((unsigned int *) regs->cp0_epc); | ||
838 | |||
824 | /* | 839 | /* |
825 | * Some chips may have other causes of machine check (e.g. SB1 | 840 | * Some chips may have other causes of machine check (e.g. SB1 |
826 | * graduation timer) | 841 | * graduation timer) |
827 | */ | 842 | */ |
828 | panic("Caught Machine Check exception - %scaused by multiple " | 843 | panic("Caught Machine Check exception - %scaused by multiple " |
829 | "matching entries in the TLB.", | 844 | "matching entries in the TLB.", |
830 | (regs->cp0_status & ST0_TS) ? "" : "not "); | 845 | (multi_match) ? "" : "not "); |
831 | } | 846 | } |
832 | 847 | ||
833 | asmlinkage void do_mt(struct pt_regs *regs) | 848 | asmlinkage void do_mt(struct pt_regs *regs) |
diff --git a/arch/mips/math-emu/dp_fint.c b/arch/mips/math-emu/dp_fint.c index a1962eb460f8..39a71de16f47 100644 --- a/arch/mips/math-emu/dp_fint.c +++ b/arch/mips/math-emu/dp_fint.c | |||
@@ -29,7 +29,9 @@ | |||
29 | 29 | ||
30 | ieee754dp ieee754dp_fint(int x) | 30 | ieee754dp ieee754dp_fint(int x) |
31 | { | 31 | { |
32 | COMPXDP; | 32 | u64 xm; |
33 | int xe; | ||
34 | int xs; | ||
33 | 35 | ||
34 | CLEARCX; | 36 | CLEARCX; |
35 | 37 | ||
diff --git a/arch/mips/math-emu/dp_flong.c b/arch/mips/math-emu/dp_flong.c index eae90a866aa1..f08f223e488a 100644 --- a/arch/mips/math-emu/dp_flong.c +++ b/arch/mips/math-emu/dp_flong.c | |||
@@ -29,7 +29,9 @@ | |||
29 | 29 | ||
30 | ieee754dp ieee754dp_flong(s64 x) | 30 | ieee754dp ieee754dp_flong(s64 x) |
31 | { | 31 | { |
32 | COMPXDP; | 32 | u64 xm; |
33 | int xe; | ||
34 | int xs; | ||
33 | 35 | ||
34 | CLEARCX; | 36 | CLEARCX; |
35 | 37 | ||
diff --git a/arch/mips/math-emu/sp_fint.c b/arch/mips/math-emu/sp_fint.c index 7aac13afb09a..e88e125e01c2 100644 --- a/arch/mips/math-emu/sp_fint.c +++ b/arch/mips/math-emu/sp_fint.c | |||
@@ -29,7 +29,9 @@ | |||
29 | 29 | ||
30 | ieee754sp ieee754sp_fint(int x) | 30 | ieee754sp ieee754sp_fint(int x) |
31 | { | 31 | { |
32 | COMPXSP; | 32 | unsigned xm; |
33 | int xe; | ||
34 | int xs; | ||
33 | 35 | ||
34 | CLEARCX; | 36 | CLEARCX; |
35 | 37 | ||
diff --git a/arch/mips/math-emu/sp_flong.c b/arch/mips/math-emu/sp_flong.c index 3d6c1d11c178..26d6919a269a 100644 --- a/arch/mips/math-emu/sp_flong.c +++ b/arch/mips/math-emu/sp_flong.c | |||
@@ -29,7 +29,9 @@ | |||
29 | 29 | ||
30 | ieee754sp ieee754sp_flong(s64 x) | 30 | ieee754sp ieee754sp_flong(s64 x) |
31 | { | 31 | { |
32 | COMPXDP; /* <--- need 64-bit mantissa temp */ | 32 | u64 xm; /* <--- need 64-bit mantissa temp */ |
33 | int xe; | ||
34 | int xs; | ||
33 | 35 | ||
34 | CLEARCX; | 36 | CLEARCX; |
35 | 37 | ||
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 6b3541769602..4a43924cd4fc 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -1161,6 +1161,31 @@ static void __init setup_scache(void) | |||
1161 | c->options |= MIPS_CPU_SUBSET_CACHES; | 1161 | c->options |= MIPS_CPU_SUBSET_CACHES; |
1162 | } | 1162 | } |
1163 | 1163 | ||
1164 | void au1x00_fixup_config_od(void) | ||
1165 | { | ||
1166 | /* | ||
1167 | * c0_config.od (bit 19) was write only (and read as 0) | ||
1168 | * on the early revisions of Alchemy SOCs. It disables the bus | ||
1169 | * transaction overlapping and needs to be set to fix various errata. | ||
1170 | */ | ||
1171 | switch (read_c0_prid()) { | ||
1172 | case 0x00030100: /* Au1000 DA */ | ||
1173 | case 0x00030201: /* Au1000 HA */ | ||
1174 | case 0x00030202: /* Au1000 HB */ | ||
1175 | case 0x01030200: /* Au1500 AB */ | ||
1176 | /* | ||
1177 | * Au1100 errata actually keeps silence about this bit, so we set it | ||
1178 | * just in case for those revisions that require it to be set according | ||
1179 | * to arch/mips/au1000/common/cputable.c | ||
1180 | */ | ||
1181 | case 0x02030200: /* Au1100 AB */ | ||
1182 | case 0x02030201: /* Au1100 BA */ | ||
1183 | case 0x02030202: /* Au1100 BC */ | ||
1184 | set_c0_config(1 << 19); | ||
1185 | break; | ||
1186 | } | ||
1187 | } | ||
1188 | |||
1164 | static inline void coherency_setup(void) | 1189 | static inline void coherency_setup(void) |
1165 | { | 1190 | { |
1166 | change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); | 1191 | change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); |
@@ -1181,6 +1206,15 @@ static inline void coherency_setup(void) | |||
1181 | case CPU_R4400MC: | 1206 | case CPU_R4400MC: |
1182 | clear_c0_config(CONF_CU); | 1207 | clear_c0_config(CONF_CU); |
1183 | break; | 1208 | break; |
1209 | /* | ||
1210 | * We need to catch the ealry Alchemy SOCs with | ||
1211 | * the write-only co_config.od bit and set it back to one... | ||
1212 | */ | ||
1213 | case CPU_AU1000: /* rev. DA, HA, HB */ | ||
1214 | case CPU_AU1100: /* rev. AB, BA, BC ?? */ | ||
1215 | case CPU_AU1500: /* rev. AB */ | ||
1216 | au1x00_fixup_config_od(); | ||
1217 | break; | ||
1184 | } | 1218 | } |
1185 | } | 1219 | } |
1186 | 1220 | ||
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index c22308b93ff0..33f6e1cdfd5b 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -227,7 +227,7 @@ void __init mem_init(void) | |||
227 | for (tmp = 0; tmp < max_low_pfn; tmp++) | 227 | for (tmp = 0; tmp < max_low_pfn; tmp++) |
228 | if (page_is_ram(tmp)) { | 228 | if (page_is_ram(tmp)) { |
229 | ram++; | 229 | ram++; |
230 | if (PageReserved(mem_map+tmp)) | 230 | if (PageReserved(pfn_to_page(tmp))) |
231 | reservedpages++; | 231 | reservedpages++; |
232 | } | 232 | } |
233 | 233 | ||
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index 91b799d2cd88..c31e4cff64e0 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | #include "op_impl.h" | 15 | #include "op_impl.h" |
16 | 16 | ||
17 | extern struct op_mips_model op_model_mipsxx __attribute__((weak)); | 17 | extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak)); |
18 | extern struct op_mips_model op_model_rm9000 __attribute__((weak)); | 18 | extern struct op_mips_model op_model_rm9000_ops __attribute__((weak)); |
19 | 19 | ||
20 | static struct op_mips_model *model; | 20 | static struct op_mips_model *model; |
21 | 21 | ||
@@ -83,11 +83,11 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
83 | case CPU_74K: | 83 | case CPU_74K: |
84 | case CPU_SB1: | 84 | case CPU_SB1: |
85 | case CPU_SB1A: | 85 | case CPU_SB1A: |
86 | lmodel = &op_model_mipsxx; | 86 | lmodel = &op_model_mipsxx_ops; |
87 | break; | 87 | break; |
88 | 88 | ||
89 | case CPU_RM9000: | 89 | case CPU_RM9000: |
90 | lmodel = &op_model_rm9000; | 90 | lmodel = &op_model_rm9000_ops; |
91 | break; | 91 | break; |
92 | }; | 92 | }; |
93 | 93 | ||
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index e7ce92391303..f26a00e13204 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #define M_COUNTER_OVERFLOW (1UL << 31) | 24 | #define M_COUNTER_OVERFLOW (1UL << 31) |
25 | 25 | ||
26 | struct op_mips_model op_model_mipsxx; | 26 | struct op_mips_model op_model_mipsxx_ops; |
27 | 27 | ||
28 | static struct mipsxx_register_config { | 28 | static struct mipsxx_register_config { |
29 | unsigned int control[4]; | 29 | unsigned int control[4]; |
@@ -34,7 +34,7 @@ static struct mipsxx_register_config { | |||
34 | 34 | ||
35 | static void mipsxx_reg_setup(struct op_counter_config *ctr) | 35 | static void mipsxx_reg_setup(struct op_counter_config *ctr) |
36 | { | 36 | { |
37 | unsigned int counters = op_model_mipsxx.num_counters; | 37 | unsigned int counters = op_model_mipsxx_ops.num_counters; |
38 | int i; | 38 | int i; |
39 | 39 | ||
40 | /* Compute the performance counter control word. */ | 40 | /* Compute the performance counter control word. */ |
@@ -62,7 +62,7 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr) | |||
62 | 62 | ||
63 | static void mipsxx_cpu_setup (void *args) | 63 | static void mipsxx_cpu_setup (void *args) |
64 | { | 64 | { |
65 | unsigned int counters = op_model_mipsxx.num_counters; | 65 | unsigned int counters = op_model_mipsxx_ops.num_counters; |
66 | 66 | ||
67 | switch (counters) { | 67 | switch (counters) { |
68 | case 4: | 68 | case 4: |
@@ -83,7 +83,7 @@ static void mipsxx_cpu_setup (void *args) | |||
83 | /* Start all counters on current CPU */ | 83 | /* Start all counters on current CPU */ |
84 | static void mipsxx_cpu_start(void *args) | 84 | static void mipsxx_cpu_start(void *args) |
85 | { | 85 | { |
86 | unsigned int counters = op_model_mipsxx.num_counters; | 86 | unsigned int counters = op_model_mipsxx_ops.num_counters; |
87 | 87 | ||
88 | switch (counters) { | 88 | switch (counters) { |
89 | case 4: | 89 | case 4: |
@@ -100,7 +100,7 @@ static void mipsxx_cpu_start(void *args) | |||
100 | /* Stop all counters on current CPU */ | 100 | /* Stop all counters on current CPU */ |
101 | static void mipsxx_cpu_stop(void *args) | 101 | static void mipsxx_cpu_stop(void *args) |
102 | { | 102 | { |
103 | unsigned int counters = op_model_mipsxx.num_counters; | 103 | unsigned int counters = op_model_mipsxx_ops.num_counters; |
104 | 104 | ||
105 | switch (counters) { | 105 | switch (counters) { |
106 | case 4: | 106 | case 4: |
@@ -116,7 +116,7 @@ static void mipsxx_cpu_stop(void *args) | |||
116 | 116 | ||
117 | static int mipsxx_perfcount_handler(struct pt_regs *regs) | 117 | static int mipsxx_perfcount_handler(struct pt_regs *regs) |
118 | { | 118 | { |
119 | unsigned int counters = op_model_mipsxx.num_counters; | 119 | unsigned int counters = op_model_mipsxx_ops.num_counters; |
120 | unsigned int control; | 120 | unsigned int control; |
121 | unsigned int counter; | 121 | unsigned int counter; |
122 | int handled = 0; | 122 | int handled = 0; |
@@ -187,37 +187,37 @@ static int __init mipsxx_init(void) | |||
187 | 187 | ||
188 | reset_counters(counters); | 188 | reset_counters(counters); |
189 | 189 | ||
190 | op_model_mipsxx.num_counters = counters; | 190 | op_model_mipsxx_ops.num_counters = counters; |
191 | switch (current_cpu_data.cputype) { | 191 | switch (current_cpu_data.cputype) { |
192 | case CPU_20KC: | 192 | case CPU_20KC: |
193 | op_model_mipsxx.cpu_type = "mips/20K"; | 193 | op_model_mipsxx_ops.cpu_type = "mips/20K"; |
194 | break; | 194 | break; |
195 | 195 | ||
196 | case CPU_24K: | 196 | case CPU_24K: |
197 | op_model_mipsxx.cpu_type = "mips/24K"; | 197 | op_model_mipsxx_ops.cpu_type = "mips/24K"; |
198 | break; | 198 | break; |
199 | 199 | ||
200 | case CPU_25KF: | 200 | case CPU_25KF: |
201 | op_model_mipsxx.cpu_type = "mips/25K"; | 201 | op_model_mipsxx_ops.cpu_type = "mips/25K"; |
202 | break; | 202 | break; |
203 | 203 | ||
204 | #ifndef CONFIG_SMP | 204 | #ifndef CONFIG_SMP |
205 | case CPU_34K: | 205 | case CPU_34K: |
206 | op_model_mipsxx.cpu_type = "mips/34K"; | 206 | op_model_mipsxx_ops.cpu_type = "mips/34K"; |
207 | break; | 207 | break; |
208 | 208 | ||
209 | case CPU_74K: | 209 | case CPU_74K: |
210 | op_model_mipsxx.cpu_type = "mips/74K"; | 210 | op_model_mipsxx_ops.cpu_type = "mips/74K"; |
211 | break; | 211 | break; |
212 | #endif | 212 | #endif |
213 | 213 | ||
214 | case CPU_5KC: | 214 | case CPU_5KC: |
215 | op_model_mipsxx.cpu_type = "mips/5K"; | 215 | op_model_mipsxx_ops.cpu_type = "mips/5K"; |
216 | break; | 216 | break; |
217 | 217 | ||
218 | case CPU_SB1: | 218 | case CPU_SB1: |
219 | case CPU_SB1A: | 219 | case CPU_SB1A: |
220 | op_model_mipsxx.cpu_type = "mips/sb1"; | 220 | op_model_mipsxx_ops.cpu_type = "mips/sb1"; |
221 | break; | 221 | break; |
222 | 222 | ||
223 | default: | 223 | default: |
@@ -233,12 +233,12 @@ static int __init mipsxx_init(void) | |||
233 | 233 | ||
234 | static void mipsxx_exit(void) | 234 | static void mipsxx_exit(void) |
235 | { | 235 | { |
236 | reset_counters(op_model_mipsxx.num_counters); | 236 | reset_counters(op_model_mipsxx_ops.num_counters); |
237 | 237 | ||
238 | perf_irq = null_perf_irq; | 238 | perf_irq = null_perf_irq; |
239 | } | 239 | } |
240 | 240 | ||
241 | struct op_mips_model op_model_mipsxx = { | 241 | struct op_mips_model op_model_mipsxx_ops = { |
242 | .reg_setup = mipsxx_reg_setup, | 242 | .reg_setup = mipsxx_reg_setup, |
243 | .cpu_setup = mipsxx_cpu_setup, | 243 | .cpu_setup = mipsxx_cpu_setup, |
244 | .init = mipsxx_init, | 244 | .init = mipsxx_init, |
diff --git a/arch/mips/oprofile/op_model_rm9000.c b/arch/mips/oprofile/op_model_rm9000.c index 9b75e41c78ef..b7063fefa65b 100644 --- a/arch/mips/oprofile/op_model_rm9000.c +++ b/arch/mips/oprofile/op_model_rm9000.c | |||
@@ -126,7 +126,7 @@ static void rm9000_exit(void) | |||
126 | free_irq(rm9000_perfcount_irq, NULL); | 126 | free_irq(rm9000_perfcount_irq, NULL); |
127 | } | 127 | } |
128 | 128 | ||
129 | struct op_mips_model op_model_rm9000 = { | 129 | struct op_mips_model op_model_rm9000_ops = { |
130 | .reg_setup = rm9000_reg_setup, | 130 | .reg_setup = rm9000_reg_setup, |
131 | .cpu_setup = rm9000_cpu_setup, | 131 | .cpu_setup = rm9000_cpu_setup, |
132 | .init = rm9000_init, | 132 | .init = rm9000_init, |
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index de01c9815bdd..8ba08047d164 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -31,12 +31,12 @@ | |||
31 | /* issue a PIO read to make sure no PIO writes are pending */ | 31 | /* issue a PIO read to make sure no PIO writes are pending */ |
32 | static void inline flush_crime_bus(void) | 32 | static void inline flush_crime_bus(void) |
33 | { | 33 | { |
34 | volatile unsigned long junk = crime->control; | 34 | crime->control; |
35 | } | 35 | } |
36 | 36 | ||
37 | static void inline flush_mace_bus(void) | 37 | static void inline flush_mace_bus(void) |
38 | { | 38 | { |
39 | volatile unsigned long junk = mace->perif.ctrl.misc; | 39 | mace->perif.ctrl.misc; |
40 | } | 40 | } |
41 | 41 | ||
42 | #undef DEBUG_IRQ | 42 | #undef DEBUG_IRQ |
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c index 4baa75b1d36f..f08173b0f065 100644 --- a/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/arch/powerpc/platforms/powermac/pfunc_core.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/mutex.h> | ||
14 | 15 | ||
15 | #include <asm/semaphore.h> | 16 | #include <asm/semaphore.h> |
16 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
@@ -546,6 +547,7 @@ struct pmf_device { | |||
546 | 547 | ||
547 | static LIST_HEAD(pmf_devices); | 548 | static LIST_HEAD(pmf_devices); |
548 | static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED; | 549 | static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED; |
550 | static DEFINE_MUTEX(pmf_irq_mutex); | ||
549 | 551 | ||
550 | static void pmf_release_device(struct kref *kref) | 552 | static void pmf_release_device(struct kref *kref) |
551 | { | 553 | { |
@@ -864,15 +866,17 @@ int pmf_register_irq_client(struct device_node *target, | |||
864 | 866 | ||
865 | spin_lock_irqsave(&pmf_lock, flags); | 867 | spin_lock_irqsave(&pmf_lock, flags); |
866 | func = __pmf_find_function(target, name, PMF_FLAGS_INT_GEN); | 868 | func = __pmf_find_function(target, name, PMF_FLAGS_INT_GEN); |
867 | if (func == NULL) { | 869 | if (func) |
868 | spin_unlock_irqrestore(&pmf_lock, flags); | 870 | func = pmf_get_function(func); |
871 | spin_unlock_irqrestore(&pmf_lock, flags); | ||
872 | if (func == NULL) | ||
869 | return -ENODEV; | 873 | return -ENODEV; |
870 | } | 874 | mutex_lock(&pmf_irq_mutex); |
871 | if (list_empty(&func->irq_clients)) | 875 | if (list_empty(&func->irq_clients)) |
872 | func->dev->handlers->irq_enable(func); | 876 | func->dev->handlers->irq_enable(func); |
873 | list_add(&client->link, &func->irq_clients); | 877 | list_add(&client->link, &func->irq_clients); |
874 | client->func = func; | 878 | client->func = func; |
875 | spin_unlock_irqrestore(&pmf_lock, flags); | 879 | mutex_unlock(&pmf_irq_mutex); |
876 | 880 | ||
877 | return 0; | 881 | return 0; |
878 | } | 882 | } |
@@ -881,16 +885,16 @@ EXPORT_SYMBOL_GPL(pmf_register_irq_client); | |||
881 | void pmf_unregister_irq_client(struct pmf_irq_client *client) | 885 | void pmf_unregister_irq_client(struct pmf_irq_client *client) |
882 | { | 886 | { |
883 | struct pmf_function *func = client->func; | 887 | struct pmf_function *func = client->func; |
884 | unsigned long flags; | ||
885 | 888 | ||
886 | BUG_ON(func == NULL); | 889 | BUG_ON(func == NULL); |
887 | 890 | ||
888 | spin_lock_irqsave(&pmf_lock, flags); | 891 | mutex_lock(&pmf_irq_mutex); |
889 | client->func = NULL; | 892 | client->func = NULL; |
890 | list_del(&client->link); | 893 | list_del(&client->link); |
891 | if (list_empty(&func->irq_clients)) | 894 | if (list_empty(&func->irq_clients)) |
892 | func->dev->handlers->irq_disable(func); | 895 | func->dev->handlers->irq_disable(func); |
893 | spin_unlock_irqrestore(&pmf_lock, flags); | 896 | mutex_unlock(&pmf_irq_mutex); |
897 | pmf_put_function(func); | ||
894 | } | 898 | } |
895 | EXPORT_SYMBOL_GPL(pmf_unregister_irq_client); | 899 | EXPORT_SYMBOL_GPL(pmf_unregister_irq_client); |
896 | 900 | ||
diff --git a/arch/sparc64/lib/checksum.S b/arch/sparc64/lib/checksum.S index ba9cd3ccc2b2..1d230f693dc4 100644 --- a/arch/sparc64/lib/checksum.S +++ b/arch/sparc64/lib/checksum.S | |||
@@ -165,8 +165,9 @@ csum_partial_end_cruft: | |||
165 | sll %g1, 8, %g1 | 165 | sll %g1, 8, %g1 |
166 | or %o5, %g1, %o4 | 166 | or %o5, %g1, %o4 |
167 | 167 | ||
168 | 1: add %o2, %o4, %o2 | 168 | 1: addcc %o2, %o4, %o2 |
169 | addc %g0, %o2, %o2 | ||
169 | 170 | ||
170 | csum_partial_finish: | 171 | csum_partial_finish: |
171 | retl | 172 | retl |
172 | mov %o2, %o0 | 173 | srl %o2, 0, %o0 |
diff --git a/arch/sparc64/lib/csum_copy.S b/arch/sparc64/lib/csum_copy.S index 71af48839064..e566c770a0f6 100644 --- a/arch/sparc64/lib/csum_copy.S +++ b/arch/sparc64/lib/csum_copy.S | |||
@@ -221,11 +221,12 @@ FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */ | |||
221 | sll %g1, 8, %g1 | 221 | sll %g1, 8, %g1 |
222 | or %o5, %g1, %o4 | 222 | or %o5, %g1, %o4 |
223 | 223 | ||
224 | 1: add %o3, %o4, %o3 | 224 | 1: addcc %o3, %o4, %o3 |
225 | addc %g0, %o3, %o3 | ||
225 | 226 | ||
226 | 70: | 227 | 70: |
227 | retl | 228 | retl |
228 | mov %o3, %o0 | 229 | srl %o3, 0, %o0 |
229 | 230 | ||
230 | 95: mov 0, GLOBAL_SPARE | 231 | 95: mov 0, GLOBAL_SPARE |
231 | brlez,pn %o2, 4f | 232 | brlez,pn %o2, 4f |
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index 7a0e04e34bf9..b65ca115ef77 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 | |||
@@ -33,5 +33,9 @@ include $(srctree)/arch/i386/Makefile.cpu | |||
33 | # prevent gcc from keeping the stack 16 byte aligned. Taken from i386. | 33 | # prevent gcc from keeping the stack 16 byte aligned. Taken from i386. |
34 | cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) | 34 | cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) |
35 | 35 | ||
36 | # Prevent sprintf in nfsd from being converted to strcpy and resulting in | ||
37 | # an unresolved reference. | ||
38 | cflags-y += -ffreestanding | ||
39 | |||
36 | CFLAGS += $(cflags-y) | 40 | CFLAGS += $(cflags-y) |
37 | USER_CFLAGS += $(cflags-y) | 41 | USER_CFLAGS += $(cflags-y) |
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index efa3d33c0be6..310980b32173 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -120,20 +120,11 @@ extern int is_syscall(unsigned long addr); | |||
120 | extern void free_irq(unsigned int, void *); | 120 | extern void free_irq(unsigned int, void *); |
121 | extern int cpu(void); | 121 | extern int cpu(void); |
122 | 122 | ||
123 | extern void time_init_kern(void); | ||
124 | |||
123 | /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ | 125 | /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ |
124 | extern int __cant_sleep(void); | 126 | extern int __cant_sleep(void); |
125 | extern void segv_handler(int sig, union uml_pt_regs *regs); | 127 | extern void segv_handler(int sig, union uml_pt_regs *regs); |
126 | extern void sigio_handler(int sig, union uml_pt_regs *regs); | 128 | extern void sigio_handler(int sig, union uml_pt_regs *regs); |
127 | 129 | ||
128 | #endif | 130 | #endif |
129 | |||
130 | /* | ||
131 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
132 | * Emacs will notice this stuff at the end of the file and automatically | ||
133 | * adjust the settings for this buffer only. This must remain at the end | ||
134 | * of the file. | ||
135 | * --------------------------------------------------------------------------- | ||
136 | * Local variables: | ||
137 | * c-file-style: "linux" | ||
138 | * End: | ||
139 | */ | ||
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 528cf623f8b4..86f51d04c98d 100644 --- a/arch/um/kernel/time_kern.c +++ b/arch/um/kernel/time_kern.c | |||
@@ -84,6 +84,16 @@ void timer_irq(union uml_pt_regs *regs) | |||
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
87 | |||
88 | void time_init_kern(void) | ||
89 | { | ||
90 | unsigned long long nsecs; | ||
91 | |||
92 | nsecs = os_nsecs(); | ||
93 | set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION, | ||
94 | -nsecs % BILLION); | ||
95 | } | ||
96 | |||
87 | void do_boot_timer_handler(struct sigcontext * sc) | 97 | void do_boot_timer_handler(struct sigcontext * sc) |
88 | { | 98 | { |
89 | struct pt_regs regs; | 99 | struct pt_regs regs; |
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c index 3a0ac38e978b..90912aaca7aa 100644 --- a/arch/um/os-Linux/main.c +++ b/arch/um/os-Linux/main.c | |||
@@ -59,7 +59,7 @@ static __init void do_uml_initcalls(void) | |||
59 | initcall_t *call; | 59 | initcall_t *call; |
60 | 60 | ||
61 | call = &__uml_initcall_start; | 61 | call = &__uml_initcall_start; |
62 | while (call < &__uml_initcall_end){; | 62 | while (call < &__uml_initcall_end){ |
63 | (*call)(); | 63 | (*call)(); |
64 | call++; | 64 | call++; |
65 | } | 65 | } |
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index 6f7626775acb..280c4fb9b585 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c | |||
@@ -81,20 +81,12 @@ void uml_idle_timer(void) | |||
81 | set_interval(ITIMER_REAL); | 81 | set_interval(ITIMER_REAL); |
82 | } | 82 | } |
83 | 83 | ||
84 | extern void ktime_get_ts(struct timespec *ts); | ||
85 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) | ||
86 | |||
87 | void time_init(void) | 84 | void time_init(void) |
88 | { | 85 | { |
89 | struct timespec now; | ||
90 | |||
91 | if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) | 86 | if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) |
92 | panic("Couldn't set SIGVTALRM handler"); | 87 | panic("Couldn't set SIGVTALRM handler"); |
93 | set_interval(ITIMER_VIRTUAL); | 88 | set_interval(ITIMER_VIRTUAL); |
94 | 89 | time_init_kern(); | |
95 | do_posix_clock_monotonic_gettime(&now); | ||
96 | wall_to_monotonic.tv_sec = -now.tv_sec; | ||
97 | wall_to_monotonic.tv_nsec = -now.tv_nsec; | ||
98 | } | 90 | } |
99 | 91 | ||
100 | unsigned long long os_nsecs(void) | 92 | unsigned long long os_nsecs(void) |
diff --git a/arch/um/sys-i386/syscalls.c b/arch/um/sys-i386/syscalls.c index 749dd1bfe60f..710d5fb807e1 100644 --- a/arch/um/sys-i386/syscalls.c +++ b/arch/um/sys-i386/syscalls.c | |||
@@ -99,11 +99,12 @@ long sys_ipc (uint call, int first, int second, | |||
99 | 99 | ||
100 | switch (call) { | 100 | switch (call) { |
101 | case SEMOP: | 101 | case SEMOP: |
102 | return sys_semtimedop(first, (struct sembuf *) ptr, second, | 102 | return sys_semtimedop(first, (struct sembuf __user *) ptr, |
103 | NULL); | 103 | second, NULL); |
104 | case SEMTIMEDOP: | 104 | case SEMTIMEDOP: |
105 | return sys_semtimedop(first, (struct sembuf *) ptr, second, | 105 | return sys_semtimedop(first, (struct sembuf __user *) ptr, |
106 | (const struct timespec *) fifth); | 106 | second, |
107 | (const struct timespec __user *) fifth); | ||
107 | case SEMGET: | 108 | case SEMGET: |
108 | return sys_semget (first, second, third); | 109 | return sys_semget (first, second, third); |
109 | case SEMCTL: { | 110 | case SEMCTL: { |
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index a4c46a8af008..9edf114faf79 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "skas.h" | 21 | #include "skas.h" |
22 | 22 | ||
23 | static int copy_sc_from_user_skas(struct pt_regs *regs, | 23 | static int copy_sc_from_user_skas(struct pt_regs *regs, |
24 | struct sigcontext *from) | 24 | struct sigcontext __user *from) |
25 | { | 25 | { |
26 | int err = 0; | 26 | int err = 0; |
27 | 27 | ||
@@ -54,7 +54,8 @@ static int copy_sc_from_user_skas(struct pt_regs *regs, | |||
54 | return(err); | 54 | return(err); |
55 | } | 55 | } |
56 | 56 | ||
57 | int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp, | 57 | int copy_sc_to_user_skas(struct sigcontext __user *to, |
58 | struct _fpstate __user *to_fp, | ||
58 | struct pt_regs *regs, unsigned long mask, | 59 | struct pt_regs *regs, unsigned long mask, |
59 | unsigned long sp) | 60 | unsigned long sp) |
60 | { | 61 | { |
@@ -106,10 +107,11 @@ int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp, | |||
106 | #endif | 107 | #endif |
107 | 108 | ||
108 | #ifdef CONFIG_MODE_TT | 109 | #ifdef CONFIG_MODE_TT |
109 | int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, | 110 | int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext __user *from, |
110 | int fpsize) | 111 | int fpsize) |
111 | { | 112 | { |
112 | struct _fpstate *to_fp, *from_fp; | 113 | struct _fpstate *to_fp; |
114 | struct _fpstate __user *from_fp; | ||
113 | unsigned long sigs; | 115 | unsigned long sigs; |
114 | int err; | 116 | int err; |
115 | 117 | ||
@@ -124,13 +126,14 @@ int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, | |||
124 | return(err); | 126 | return(err); |
125 | } | 127 | } |
126 | 128 | ||
127 | int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, | 129 | int copy_sc_to_user_tt(struct sigcontext __user *to, struct _fpstate __user *fp, |
128 | struct sigcontext *from, int fpsize, unsigned long sp) | 130 | struct sigcontext *from, int fpsize, unsigned long sp) |
129 | { | 131 | { |
130 | struct _fpstate *to_fp, *from_fp; | 132 | struct _fpstate __user *to_fp; |
133 | struct _fpstate *from_fp; | ||
131 | int err; | 134 | int err; |
132 | 135 | ||
133 | to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); | 136 | to_fp = (fp ? fp : (struct _fpstate __user *) (to + 1)); |
134 | from_fp = from->fpstate; | 137 | from_fp = from->fpstate; |
135 | err = copy_to_user(to, from, sizeof(*to)); | 138 | err = copy_to_user(to, from, sizeof(*to)); |
136 | /* The SP in the sigcontext is the updated one for the signal | 139 | /* The SP in the sigcontext is the updated one for the signal |
@@ -158,7 +161,8 @@ static int copy_sc_from_user(struct pt_regs *to, void __user *from) | |||
158 | return(ret); | 161 | return(ret); |
159 | } | 162 | } |
160 | 163 | ||
161 | static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp, | 164 | static int copy_sc_to_user(struct sigcontext __user *to, |
165 | struct _fpstate __user *fp, | ||
162 | struct pt_regs *from, unsigned long mask, | 166 | struct pt_regs *from, unsigned long mask, |
163 | unsigned long sp) | 167 | unsigned long sp) |
164 | { | 168 | { |
@@ -169,7 +173,7 @@ static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp, | |||
169 | 173 | ||
170 | struct rt_sigframe | 174 | struct rt_sigframe |
171 | { | 175 | { |
172 | char *pretcode; | 176 | char __user *pretcode; |
173 | struct ucontext uc; | 177 | struct ucontext uc; |
174 | struct siginfo info; | 178 | struct siginfo info; |
175 | }; | 179 | }; |
@@ -188,7 +192,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
188 | 192 | ||
189 | frame = (struct rt_sigframe __user *) | 193 | frame = (struct rt_sigframe __user *) |
190 | round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; | 194 | round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; |
191 | frame = (struct rt_sigframe *) ((unsigned long) frame - 128); | 195 | frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128); |
192 | 196 | ||
193 | if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) | 197 | if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) |
194 | goto out; | 198 | goto out; |
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index 6acee5c4ada6..6fce9f45dfdc 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c | |||
@@ -45,7 +45,7 @@ static long arch_prctl_tt(int code, unsigned long addr) | |||
45 | case ARCH_GET_GS: | 45 | case ARCH_GET_GS: |
46 | ret = arch_prctl(code, (unsigned long) &tmp); | 46 | ret = arch_prctl(code, (unsigned long) &tmp); |
47 | if(!ret) | 47 | if(!ret) |
48 | ret = put_user(tmp, &addr); | 48 | ret = put_user(tmp, (long __user *)addr); |
49 | break; | 49 | break; |
50 | default: | 50 | default: |
51 | ret = -EINVAL; | 51 | ret = -EINVAL; |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 128b2632512d..eab5394da666 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -149,7 +149,7 @@ struct cm4000_dev { | |||
149 | #define ZERO_DEV(dev) \ | 149 | #define ZERO_DEV(dev) \ |
150 | memset(&dev->atr_csum,0, \ | 150 | memset(&dev->atr_csum,0, \ |
151 | sizeof(struct cm4000_dev) - \ | 151 | sizeof(struct cm4000_dev) - \ |
152 | /*link*/ sizeof(struct pcmcia_device) - \ | 152 | /*link*/ sizeof(struct pcmcia_device *) - \ |
153 | /*node*/ sizeof(dev_node_t) - \ | 153 | /*node*/ sizeof(dev_node_t) - \ |
154 | /*atr*/ MAX_ATR*sizeof(char) - \ | 154 | /*atr*/ MAX_ATR*sizeof(char) - \ |
155 | /*rbuf*/ 512*sizeof(char) - \ | 155 | /*rbuf*/ 512*sizeof(char) - \ |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 8a23fb54c693..5413dc43b9f1 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -845,7 +845,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud | |||
845 | &sbp2_highlevel, ud->ne->host, &sbp2_ops, | 845 | &sbp2_highlevel, ud->ne->host, &sbp2_ops, |
846 | sizeof(struct sbp2_status_block), sizeof(quadlet_t), | 846 | sizeof(struct sbp2_status_block), sizeof(quadlet_t), |
847 | 0x010000000000ULL, CSR1212_ALL_SPACE_END); | 847 | 0x010000000000ULL, CSR1212_ALL_SPACE_END); |
848 | if (!scsi_id->status_fifo_addr) { | 848 | if (scsi_id->status_fifo_addr == ~0ULL) { |
849 | SBP2_ERR("failed to allocate status FIFO address range"); | 849 | SBP2_ERR("failed to allocate status FIFO address range"); |
850 | goto failed_alloc; | 850 | goto failed_alloc; |
851 | } | 851 | } |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index a54da42849ae..8406839b91cf 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -275,6 +275,7 @@ static void ipoib_ib_handle_wc(struct net_device *dev, | |||
275 | spin_lock_irqsave(&priv->tx_lock, flags); | 275 | spin_lock_irqsave(&priv->tx_lock, flags); |
276 | ++priv->tx_tail; | 276 | ++priv->tx_tail; |
277 | if (netif_queue_stopped(dev) && | 277 | if (netif_queue_stopped(dev) && |
278 | test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) && | ||
278 | priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) | 279 | priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) |
279 | netif_wake_queue(dev); | 280 | netif_wake_queue(dev); |
280 | spin_unlock_irqrestore(&priv->tx_lock, flags); | 281 | spin_unlock_irqrestore(&priv->tx_lock, flags); |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 705e1229d89d..feb5b223cd60 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2615,6 +2615,18 @@ static int nv_nway_reset(struct net_device *dev) | |||
2615 | return ret; | 2615 | return ret; |
2616 | } | 2616 | } |
2617 | 2617 | ||
2618 | #ifdef NETIF_F_TSO | ||
2619 | static int nv_set_tso(struct net_device *dev, u32 value) | ||
2620 | { | ||
2621 | struct fe_priv *np = netdev_priv(dev); | ||
2622 | |||
2623 | if ((np->driver_data & DEV_HAS_CHECKSUM)) | ||
2624 | return ethtool_op_set_tso(dev, value); | ||
2625 | else | ||
2626 | return value ? -EOPNOTSUPP : 0; | ||
2627 | } | ||
2628 | #endif | ||
2629 | |||
2618 | static struct ethtool_ops ops = { | 2630 | static struct ethtool_ops ops = { |
2619 | .get_drvinfo = nv_get_drvinfo, | 2631 | .get_drvinfo = nv_get_drvinfo, |
2620 | .get_link = ethtool_op_get_link, | 2632 | .get_link = ethtool_op_get_link, |
@@ -2626,6 +2638,10 @@ static struct ethtool_ops ops = { | |||
2626 | .get_regs = nv_get_regs, | 2638 | .get_regs = nv_get_regs, |
2627 | .nway_reset = nv_nway_reset, | 2639 | .nway_reset = nv_nway_reset, |
2628 | .get_perm_addr = ethtool_op_get_perm_addr, | 2640 | .get_perm_addr = ethtool_op_get_perm_addr, |
2641 | #ifdef NETIF_F_TSO | ||
2642 | .get_tso = ethtool_op_get_tso, | ||
2643 | .set_tso = nv_set_tso | ||
2644 | #endif | ||
2629 | }; | 2645 | }; |
2630 | 2646 | ||
2631 | static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | 2647 | static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 4260c2128f47..a8f6bfc96fd2 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -1204,7 +1204,7 @@ static int mace_rx(struct net_device *dev, unsigned char RxCnt) | |||
1204 | 1204 | ||
1205 | dev->last_rx = jiffies; | 1205 | dev->last_rx = jiffies; |
1206 | lp->linux_stats.rx_packets++; | 1206 | lp->linux_stats.rx_packets++; |
1207 | lp->linux_stats.rx_bytes += skb->len; | 1207 | lp->linux_stats.rx_bytes += pkt_len; |
1208 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ | 1208 | outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ |
1209 | continue; | 1209 | continue; |
1210 | } else { | 1210 | } else { |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 48d3b3d30c21..74b3124e8247 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -1143,6 +1143,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) | |||
1143 | { | 1143 | { |
1144 | struct pcmcia_socket *s = pcmcia_get_socket(skt); | 1144 | struct pcmcia_socket *s = pcmcia_get_socket(skt); |
1145 | 1145 | ||
1146 | if (!s) { | ||
1147 | printk(KERN_ERR "PCMCIA obtaining reference to socket %p " \ | ||
1148 | "failed, event 0x%x lost!\n", skt, event); | ||
1149 | return -ENODEV; | ||
1150 | } | ||
1151 | |||
1146 | ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", | 1152 | ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", |
1147 | event, priority, skt); | 1153 | event, priority, skt); |
1148 | 1154 | ||
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index f6e7ee04f3dc..8c0d1a6739ad 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c | |||
@@ -48,33 +48,33 @@ static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
48 | struct platform_device *pdev = to_platform_device(dev); | 48 | struct platform_device *pdev = to_platform_device(dev); |
49 | struct m48t86_ops *ops = pdev->dev.platform_data; | 49 | struct m48t86_ops *ops = pdev->dev.platform_data; |
50 | 50 | ||
51 | reg = ops->readb(M48T86_REG_B); | 51 | reg = ops->readbyte(M48T86_REG_B); |
52 | 52 | ||
53 | if (reg & M48T86_REG_B_DM) { | 53 | if (reg & M48T86_REG_B_DM) { |
54 | /* data (binary) mode */ | 54 | /* data (binary) mode */ |
55 | tm->tm_sec = ops->readb(M48T86_REG_SEC); | 55 | tm->tm_sec = ops->readbyte(M48T86_REG_SEC); |
56 | tm->tm_min = ops->readb(M48T86_REG_MIN); | 56 | tm->tm_min = ops->readbyte(M48T86_REG_MIN); |
57 | tm->tm_hour = ops->readb(M48T86_REG_HOUR) & 0x3F; | 57 | tm->tm_hour = ops->readbyte(M48T86_REG_HOUR) & 0x3F; |
58 | tm->tm_mday = ops->readb(M48T86_REG_DOM); | 58 | tm->tm_mday = ops->readbyte(M48T86_REG_DOM); |
59 | /* tm_mon is 0-11 */ | 59 | /* tm_mon is 0-11 */ |
60 | tm->tm_mon = ops->readb(M48T86_REG_MONTH) - 1; | 60 | tm->tm_mon = ops->readbyte(M48T86_REG_MONTH) - 1; |
61 | tm->tm_year = ops->readb(M48T86_REG_YEAR) + 100; | 61 | tm->tm_year = ops->readbyte(M48T86_REG_YEAR) + 100; |
62 | tm->tm_wday = ops->readb(M48T86_REG_DOW); | 62 | tm->tm_wday = ops->readbyte(M48T86_REG_DOW); |
63 | } else { | 63 | } else { |
64 | /* bcd mode */ | 64 | /* bcd mode */ |
65 | tm->tm_sec = BCD2BIN(ops->readb(M48T86_REG_SEC)); | 65 | tm->tm_sec = BCD2BIN(ops->readbyte(M48T86_REG_SEC)); |
66 | tm->tm_min = BCD2BIN(ops->readb(M48T86_REG_MIN)); | 66 | tm->tm_min = BCD2BIN(ops->readbyte(M48T86_REG_MIN)); |
67 | tm->tm_hour = BCD2BIN(ops->readb(M48T86_REG_HOUR) & 0x3F); | 67 | tm->tm_hour = BCD2BIN(ops->readbyte(M48T86_REG_HOUR) & 0x3F); |
68 | tm->tm_mday = BCD2BIN(ops->readb(M48T86_REG_DOM)); | 68 | tm->tm_mday = BCD2BIN(ops->readbyte(M48T86_REG_DOM)); |
69 | /* tm_mon is 0-11 */ | 69 | /* tm_mon is 0-11 */ |
70 | tm->tm_mon = BCD2BIN(ops->readb(M48T86_REG_MONTH)) - 1; | 70 | tm->tm_mon = BCD2BIN(ops->readbyte(M48T86_REG_MONTH)) - 1; |
71 | tm->tm_year = BCD2BIN(ops->readb(M48T86_REG_YEAR)) + 100; | 71 | tm->tm_year = BCD2BIN(ops->readbyte(M48T86_REG_YEAR)) + 100; |
72 | tm->tm_wday = BCD2BIN(ops->readb(M48T86_REG_DOW)); | 72 | tm->tm_wday = BCD2BIN(ops->readbyte(M48T86_REG_DOW)); |
73 | } | 73 | } |
74 | 74 | ||
75 | /* correct the hour if the clock is in 12h mode */ | 75 | /* correct the hour if the clock is in 12h mode */ |
76 | if (!(reg & M48T86_REG_B_H24)) | 76 | if (!(reg & M48T86_REG_B_H24)) |
77 | if (ops->readb(M48T86_REG_HOUR) & 0x80) | 77 | if (ops->readbyte(M48T86_REG_HOUR) & 0x80) |
78 | tm->tm_hour += 12; | 78 | tm->tm_hour += 12; |
79 | 79 | ||
80 | return 0; | 80 | return 0; |
@@ -86,35 +86,35 @@ static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
86 | struct platform_device *pdev = to_platform_device(dev); | 86 | struct platform_device *pdev = to_platform_device(dev); |
87 | struct m48t86_ops *ops = pdev->dev.platform_data; | 87 | struct m48t86_ops *ops = pdev->dev.platform_data; |
88 | 88 | ||
89 | reg = ops->readb(M48T86_REG_B); | 89 | reg = ops->readbyte(M48T86_REG_B); |
90 | 90 | ||
91 | /* update flag and 24h mode */ | 91 | /* update flag and 24h mode */ |
92 | reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; | 92 | reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; |
93 | ops->writeb(reg, M48T86_REG_B); | 93 | ops->writebyte(reg, M48T86_REG_B); |
94 | 94 | ||
95 | if (reg & M48T86_REG_B_DM) { | 95 | if (reg & M48T86_REG_B_DM) { |
96 | /* data (binary) mode */ | 96 | /* data (binary) mode */ |
97 | ops->writeb(tm->tm_sec, M48T86_REG_SEC); | 97 | ops->writebyte(tm->tm_sec, M48T86_REG_SEC); |
98 | ops->writeb(tm->tm_min, M48T86_REG_MIN); | 98 | ops->writebyte(tm->tm_min, M48T86_REG_MIN); |
99 | ops->writeb(tm->tm_hour, M48T86_REG_HOUR); | 99 | ops->writebyte(tm->tm_hour, M48T86_REG_HOUR); |
100 | ops->writeb(tm->tm_mday, M48T86_REG_DOM); | 100 | ops->writebyte(tm->tm_mday, M48T86_REG_DOM); |
101 | ops->writeb(tm->tm_mon + 1, M48T86_REG_MONTH); | 101 | ops->writebyte(tm->tm_mon + 1, M48T86_REG_MONTH); |
102 | ops->writeb(tm->tm_year % 100, M48T86_REG_YEAR); | 102 | ops->writebyte(tm->tm_year % 100, M48T86_REG_YEAR); |
103 | ops->writeb(tm->tm_wday, M48T86_REG_DOW); | 103 | ops->writebyte(tm->tm_wday, M48T86_REG_DOW); |
104 | } else { | 104 | } else { |
105 | /* bcd mode */ | 105 | /* bcd mode */ |
106 | ops->writeb(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); | 106 | ops->writebyte(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); |
107 | ops->writeb(BIN2BCD(tm->tm_min), M48T86_REG_MIN); | 107 | ops->writebyte(BIN2BCD(tm->tm_min), M48T86_REG_MIN); |
108 | ops->writeb(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); | 108 | ops->writebyte(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); |
109 | ops->writeb(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); | 109 | ops->writebyte(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); |
110 | ops->writeb(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); | 110 | ops->writebyte(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); |
111 | ops->writeb(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); | 111 | ops->writebyte(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); |
112 | ops->writeb(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); | 112 | ops->writebyte(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); |
113 | } | 113 | } |
114 | 114 | ||
115 | /* update ended */ | 115 | /* update ended */ |
116 | reg &= ~M48T86_REG_B_SET; | 116 | reg &= ~M48T86_REG_B_SET; |
117 | ops->writeb(reg, M48T86_REG_B); | 117 | ops->writebyte(reg, M48T86_REG_B); |
118 | 118 | ||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
@@ -125,12 +125,12 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq) | |||
125 | struct platform_device *pdev = to_platform_device(dev); | 125 | struct platform_device *pdev = to_platform_device(dev); |
126 | struct m48t86_ops *ops = pdev->dev.platform_data; | 126 | struct m48t86_ops *ops = pdev->dev.platform_data; |
127 | 127 | ||
128 | reg = ops->readb(M48T86_REG_B); | 128 | reg = ops->readbyte(M48T86_REG_B); |
129 | 129 | ||
130 | seq_printf(seq, "mode\t\t: %s\n", | 130 | seq_printf(seq, "mode\t\t: %s\n", |
131 | (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); | 131 | (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); |
132 | 132 | ||
133 | reg = ops->readb(M48T86_REG_D); | 133 | reg = ops->readbyte(M48T86_REG_D); |
134 | 134 | ||
135 | seq_printf(seq, "battery\t\t: %s\n", | 135 | seq_printf(seq, "battery\t\t: %s\n", |
136 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); | 136 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); |
@@ -157,7 +157,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev) | |||
157 | platform_set_drvdata(dev, rtc); | 157 | platform_set_drvdata(dev, rtc); |
158 | 158 | ||
159 | /* read battery status */ | 159 | /* read battery status */ |
160 | reg = ops->readb(M48T86_REG_D); | 160 | reg = ops->readbyte(M48T86_REG_D); |
161 | dev_info(&dev->dev, "battery %s\n", | 161 | dev_info(&dev->dev, "battery %s\n", |
162 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); | 162 | (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); |
163 | 163 | ||
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index 74a257b23383..e210f89a2449 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
@@ -45,11 +45,11 @@ struct pgid { | |||
45 | union { | 45 | union { |
46 | __u8 fc; /* SPID function code */ | 46 | __u8 fc; /* SPID function code */ |
47 | struct path_state ps; /* SNID path state */ | 47 | struct path_state ps; /* SNID path state */ |
48 | } inf; | 48 | } __attribute__ ((packed)) inf; |
49 | union { | 49 | union { |
50 | __u32 cpu_addr : 16; /* CPU address */ | 50 | __u32 cpu_addr : 16; /* CPU address */ |
51 | struct extended_cssid ext_cssid; | 51 | struct extended_cssid ext_cssid; |
52 | } pgid_high; | 52 | } __attribute__ ((packed)) pgid_high; |
53 | __u32 cpu_id : 24; /* CPU identification */ | 53 | __u32 cpu_id : 24; /* CPU identification */ |
54 | __u32 cpu_model : 16; /* CPU model */ | 54 | __u32 cpu_model : 16; /* CPU model */ |
55 | __u32 tod_high; /* high word TOD clock */ | 55 | __u32 tod_high; /* high word TOD clock */ |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 180b3bf8b90d..49ec562d7f60 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -749,7 +749,7 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
749 | /* Unit check but no sense data. Need basic sense. */ | 749 | /* Unit check but no sense data. Need basic sense. */ |
750 | if (ccw_device_do_sense(cdev, irb) != 0) | 750 | if (ccw_device_do_sense(cdev, irb) != 0) |
751 | goto call_handler_unsol; | 751 | goto call_handler_unsol; |
752 | memcpy(irb, &cdev->private->irb, sizeof(struct irb)); | 752 | memcpy(&cdev->private->irb, irb, sizeof(struct irb)); |
753 | cdev->private->state = DEV_STATE_W4SENSE; | 753 | cdev->private->state = DEV_STATE_W4SENSE; |
754 | cdev->private->intparm = 0; | 754 | cdev->private->intparm = 0; |
755 | return; | 755 | return; |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index f7264fd611c2..cb9082fd7e2f 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -454,7 +454,7 @@ static int sil24_softreset(struct ata_port *ap, int verbose, | |||
454 | */ | 454 | */ |
455 | msleep(10); | 455 | msleep(10); |
456 | 456 | ||
457 | prb->ctrl = PRB_CTRL_SRST; | 457 | prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); |
458 | prb->fis[1] = 0; /* no PM yet */ | 458 | prb->fis[1] = 0; /* no PM yet */ |
459 | 459 | ||
460 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); | 460 | writel((u32)paddr, port + PORT_CMD_ACTIVATE); |
@@ -551,9 +551,9 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
551 | 551 | ||
552 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { | 552 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { |
553 | if (qc->tf.flags & ATA_TFLAG_WRITE) | 553 | if (qc->tf.flags & ATA_TFLAG_WRITE) |
554 | prb->ctrl = PRB_CTRL_PACKET_WRITE; | 554 | prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_WRITE); |
555 | else | 555 | else |
556 | prb->ctrl = PRB_CTRL_PACKET_READ; | 556 | prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_READ); |
557 | } else | 557 | } else |
558 | prb->ctrl = 0; | 558 | prb->ctrl = 0; |
559 | 559 | ||
diff --git a/fs/namei.c b/fs/namei.c index 96723ae83c89..d6e2ee251736 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1080,8 +1080,8 @@ static int fastcall do_path_lookup(int dfd, const char *name, | |||
1080 | nd->flags = flags; | 1080 | nd->flags = flags; |
1081 | nd->depth = 0; | 1081 | nd->depth = 0; |
1082 | 1082 | ||
1083 | read_lock(¤t->fs->lock); | ||
1084 | if (*name=='/') { | 1083 | if (*name=='/') { |
1084 | read_lock(¤t->fs->lock); | ||
1085 | if (current->fs->altroot && !(nd->flags & LOOKUP_NOALT)) { | 1085 | if (current->fs->altroot && !(nd->flags & LOOKUP_NOALT)) { |
1086 | nd->mnt = mntget(current->fs->altrootmnt); | 1086 | nd->mnt = mntget(current->fs->altrootmnt); |
1087 | nd->dentry = dget(current->fs->altroot); | 1087 | nd->dentry = dget(current->fs->altroot); |
@@ -1092,33 +1092,35 @@ static int fastcall do_path_lookup(int dfd, const char *name, | |||
1092 | } | 1092 | } |
1093 | nd->mnt = mntget(current->fs->rootmnt); | 1093 | nd->mnt = mntget(current->fs->rootmnt); |
1094 | nd->dentry = dget(current->fs->root); | 1094 | nd->dentry = dget(current->fs->root); |
1095 | read_unlock(¤t->fs->lock); | ||
1095 | } else if (dfd == AT_FDCWD) { | 1096 | } else if (dfd == AT_FDCWD) { |
1097 | read_lock(¤t->fs->lock); | ||
1096 | nd->mnt = mntget(current->fs->pwdmnt); | 1098 | nd->mnt = mntget(current->fs->pwdmnt); |
1097 | nd->dentry = dget(current->fs->pwd); | 1099 | nd->dentry = dget(current->fs->pwd); |
1100 | read_unlock(¤t->fs->lock); | ||
1098 | } else { | 1101 | } else { |
1099 | struct dentry *dentry; | 1102 | struct dentry *dentry; |
1100 | 1103 | ||
1101 | file = fget_light(dfd, &fput_needed); | 1104 | file = fget_light(dfd, &fput_needed); |
1102 | retval = -EBADF; | 1105 | retval = -EBADF; |
1103 | if (!file) | 1106 | if (!file) |
1104 | goto unlock_fail; | 1107 | goto out_fail; |
1105 | 1108 | ||
1106 | dentry = file->f_dentry; | 1109 | dentry = file->f_dentry; |
1107 | 1110 | ||
1108 | retval = -ENOTDIR; | 1111 | retval = -ENOTDIR; |
1109 | if (!S_ISDIR(dentry->d_inode->i_mode)) | 1112 | if (!S_ISDIR(dentry->d_inode->i_mode)) |
1110 | goto fput_unlock_fail; | 1113 | goto fput_fail; |
1111 | 1114 | ||
1112 | retval = file_permission(file, MAY_EXEC); | 1115 | retval = file_permission(file, MAY_EXEC); |
1113 | if (retval) | 1116 | if (retval) |
1114 | goto fput_unlock_fail; | 1117 | goto fput_fail; |
1115 | 1118 | ||
1116 | nd->mnt = mntget(file->f_vfsmnt); | 1119 | nd->mnt = mntget(file->f_vfsmnt); |
1117 | nd->dentry = dget(dentry); | 1120 | nd->dentry = dget(dentry); |
1118 | 1121 | ||
1119 | fput_light(file, fput_needed); | 1122 | fput_light(file, fput_needed); |
1120 | } | 1123 | } |
1121 | read_unlock(¤t->fs->lock); | ||
1122 | current->total_link_count = 0; | 1124 | current->total_link_count = 0; |
1123 | retval = link_path_walk(name, nd); | 1125 | retval = link_path_walk(name, nd); |
1124 | out: | 1126 | out: |
@@ -1127,13 +1129,12 @@ out: | |||
1127 | nd->dentry->d_inode)) | 1129 | nd->dentry->d_inode)) |
1128 | audit_inode(name, nd->dentry->d_inode, flags); | 1130 | audit_inode(name, nd->dentry->d_inode, flags); |
1129 | } | 1131 | } |
1132 | out_fail: | ||
1130 | return retval; | 1133 | return retval; |
1131 | 1134 | ||
1132 | fput_unlock_fail: | 1135 | fput_fail: |
1133 | fput_light(file, fput_needed); | 1136 | fput_light(file, fput_needed); |
1134 | unlock_fail: | 1137 | goto out_fail; |
1135 | read_unlock(¤t->fs->lock); | ||
1136 | return retval; | ||
1137 | } | 1138 | } |
1138 | 1139 | ||
1139 | int fastcall path_lookup(const char *name, unsigned int flags, | 1140 | int fastcall path_lookup(const char *name, unsigned int flags, |
diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h index 9950706abdf8..e1432102be05 100644 --- a/include/asm-alpha/smp.h +++ b/include/asm-alpha/smp.h | |||
@@ -45,10 +45,8 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS]; | |||
45 | #define hard_smp_processor_id() __hard_smp_processor_id() | 45 | #define hard_smp_processor_id() __hard_smp_processor_id() |
46 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 46 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
47 | 47 | ||
48 | extern cpumask_t cpu_present_mask; | ||
49 | extern cpumask_t cpu_online_map; | ||
50 | extern int smp_num_cpus; | 48 | extern int smp_num_cpus; |
51 | #define cpu_possible_map cpu_present_mask | 49 | #define cpu_possible_map cpu_present_map |
52 | 50 | ||
53 | int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, cpumask_t cpu); | 51 | int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, cpumask_t cpu); |
54 | 52 | ||
diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h index 42520cc84b0f..1386af1cb7d9 100644 --- a/include/asm-mips/addrspace.h +++ b/include/asm-mips/addrspace.h | |||
@@ -129,6 +129,7 @@ | |||
129 | #if defined (CONFIG_CPU_R4300) \ | 129 | #if defined (CONFIG_CPU_R4300) \ |
130 | || defined (CONFIG_CPU_R4X00) \ | 130 | || defined (CONFIG_CPU_R4X00) \ |
131 | || defined (CONFIG_CPU_R5000) \ | 131 | || defined (CONFIG_CPU_R5000) \ |
132 | || defined (CONFIG_CPU_RM7000) \ | ||
132 | || defined (CONFIG_CPU_NEVADA) \ | 133 | || defined (CONFIG_CPU_NEVADA) \ |
133 | || defined (CONFIG_CPU_TX49XX) \ | 134 | || defined (CONFIG_CPU_TX49XX) \ |
134 | || defined (CONFIG_CPU_MIPS64) | 135 | || defined (CONFIG_CPU_MIPS64) |
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h index 64dd45150f64..928f30f8c45c 100644 --- a/include/asm-mips/delay.h +++ b/include/asm-mips/delay.h | |||
@@ -19,20 +19,22 @@ static inline void __delay(unsigned long loops) | |||
19 | { | 19 | { |
20 | if (sizeof(long) == 4) | 20 | if (sizeof(long) == 4) |
21 | __asm__ __volatile__ ( | 21 | __asm__ __volatile__ ( |
22 | ".set\tnoreorder\n" | 22 | " .set noreorder \n" |
23 | "1:\tbnez\t%0,1b\n\t" | 23 | " .align 3 \n" |
24 | "subu\t%0,1\n\t" | 24 | "1: bnez %0, 1b \n" |
25 | ".set\treorder" | 25 | " subu %0, 1 \n" |
26 | " .set reorder \n" | ||
26 | : "=r" (loops) | 27 | : "=r" (loops) |
27 | : "0" (loops)); | 28 | : "0" (loops)); |
28 | else if (sizeof(long) == 8) | 29 | else if (sizeof(long) == 8) |
29 | __asm__ __volatile__ ( | 30 | __asm__ __volatile__ ( |
30 | ".set\tnoreorder\n" | 31 | " .set noreorder \n" |
31 | "1:\tbnez\t%0,1b\n\t" | 32 | " .align 3 \n" |
32 | "dsubu\t%0,1\n\t" | 33 | "1: bnez %0, 1b \n" |
33 | ".set\treorder" | 34 | " dsubu %0, 1 \n" |
34 | :"=r" (loops) | 35 | " .set reorder \n" |
35 | :"0" (loops)); | 36 | : "=r" (loops) |
37 | : "0" (loops)); | ||
36 | } | 38 | } |
37 | 39 | ||
38 | 40 | ||
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index a1eab136ff6c..4035ec79ecd4 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -139,9 +139,11 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
139 | 139 | ||
140 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 140 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
141 | 141 | ||
142 | #ifndef CONFIG_SPARSEMEM | ||
142 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 143 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
143 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 144 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
144 | #endif | 145 | #endif |
146 | #endif | ||
145 | 147 | ||
146 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 148 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
147 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 149 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index 4d6bc45df594..087c20769256 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h | |||
@@ -177,48 +177,67 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
177 | ((swp_entry_t) { ((type) << 10) | ((offset) << 15) }) | 177 | ((swp_entry_t) { ((type) << 10) | ((offset) << 15) }) |
178 | 178 | ||
179 | /* | 179 | /* |
180 | * Bits 0, 1, 2, 9 and 10 are taken, split up the 27 bits of offset | 180 | * Bits 0, 4, 8, and 9 are taken, split up 28 bits of offset into this range: |
181 | * into this range: | ||
182 | */ | 181 | */ |
183 | #define PTE_FILE_MAX_BITS 27 | 182 | #define PTE_FILE_MAX_BITS 28 |
184 | 183 | ||
185 | #define pte_to_pgoff(_pte) \ | 184 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ |
186 | ((((_pte).pte >> 3) & 0x3f ) + (((_pte).pte >> 11) << 8 )) | 185 | (((_pte).pte >> 2 ) & 0x38) | \ |
186 | (((_pte).pte >> 10) << 6 )) | ||
187 | 187 | ||
188 | #define pgoff_to_pte(off) \ | 188 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ |
189 | ((pte_t) { (((off) & 0x3f) << 3) + (((off) >> 8) << 11) + _PAGE_FILE }) | 189 | (((off) & 0x38) << 2 ) | \ |
190 | (((off) >> 6 ) << 10) | \ | ||
191 | _PAGE_FILE }) | ||
190 | 192 | ||
191 | #else | 193 | #else |
192 | 194 | ||
193 | /* Swap entries must have VALID and GLOBAL bits cleared. */ | 195 | /* Swap entries must have VALID and GLOBAL bits cleared. */ |
196 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | ||
197 | #define __swp_type(x) (((x).val >> 2) & 0x1f) | ||
198 | #define __swp_offset(x) ((x).val >> 7) | ||
199 | #define __swp_entry(type,offset) \ | ||
200 | ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) | ||
201 | #else | ||
194 | #define __swp_type(x) (((x).val >> 8) & 0x1f) | 202 | #define __swp_type(x) (((x).val >> 8) & 0x1f) |
195 | #define __swp_offset(x) ((x).val >> 13) | 203 | #define __swp_offset(x) ((x).val >> 13) |
196 | #define __swp_entry(type,offset) \ | 204 | #define __swp_entry(type,offset) \ |
197 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) | 205 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) |
206 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ | ||
198 | 207 | ||
208 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | ||
199 | /* | 209 | /* |
200 | * Bits 0, 1, 2, 7 and 8 are taken, split up the 27 bits of offset | 210 | * Bits 0 and 1 of pte_high are taken, use the rest for the page offset... |
201 | * into this range: | ||
202 | */ | 211 | */ |
203 | #define PTE_FILE_MAX_BITS 27 | 212 | #define PTE_FILE_MAX_BITS 30 |
204 | 213 | ||
205 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) | 214 | #define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) |
206 | /* fixme */ | 215 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) |
207 | #define pte_to_pgoff(_pte) (((_pte).pte_high >> 6) + ((_pte).pte_high & 0x3f)) | ||
208 | #define pgoff_to_pte(off) \ | ||
209 | ((pte_t){(((off) & 0x3f) + ((off) << 6) + _PAGE_FILE)}) | ||
210 | 216 | ||
211 | #else | 217 | #else |
212 | #define pte_to_pgoff(_pte) \ | 218 | /* |
213 | ((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 )) | 219 | * Bits 0, 4, 6, and 7 are taken, split up 28 bits of offset into this range: |
220 | */ | ||
221 | #define PTE_FILE_MAX_BITS 28 | ||
222 | |||
223 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ | ||
224 | (((_pte).pte >> 2) & 0x8) | \ | ||
225 | (((_pte).pte >> 8) << 4)) | ||
214 | 226 | ||
215 | #define pgoff_to_pte(off) \ | 227 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ |
216 | ((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE }) | 228 | (((off) & 0x8) << 2) | \ |
229 | (((off) >> 4) << 8) | \ | ||
230 | _PAGE_FILE }) | ||
217 | #endif | 231 | #endif |
218 | 232 | ||
219 | #endif | 233 | #endif |
220 | 234 | ||
235 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | ||
236 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) | ||
237 | #define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) | ||
238 | #else | ||
221 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 239 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
222 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 240 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
241 | #endif | ||
223 | 242 | ||
224 | #endif /* _ASM_PGTABLE_32_H */ | 243 | #endif /* _ASM_PGTABLE_32_H */ |
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h index 82166b254b27..2faf5c9ff127 100644 --- a/include/asm-mips/pgtable-64.h +++ b/include/asm-mips/pgtable-64.h | |||
@@ -224,15 +224,12 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
224 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 224 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
225 | 225 | ||
226 | /* | 226 | /* |
227 | * Bits 0, 1, 2, 7 and 8 are taken, split up the 32 bits of offset | 227 | * Bits 0, 4, 6, and 7 are taken. Let's leave bits 1, 2, 3, and 5 alone to |
228 | * into this range: | 228 | * make things easier, and only use the upper 56 bits for the page offset... |
229 | */ | 229 | */ |
230 | #define PTE_FILE_MAX_BITS 32 | 230 | #define PTE_FILE_MAX_BITS 56 |
231 | 231 | ||
232 | #define pte_to_pgoff(_pte) \ | 232 | #define pte_to_pgoff(_pte) ((_pte).pte >> 8) |
233 | ((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 )) | 233 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 8) | _PAGE_FILE }) |
234 | |||
235 | #define pgoff_to_pte(off) \ | ||
236 | ((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE }) | ||
237 | 234 | ||
238 | #endif /* _ASM_PGTABLE_64_H */ | 235 | #endif /* _ASM_PGTABLE_64_H */ |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index f80fe75c7800..d0af2a3b0152 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -353,8 +353,9 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot) | |||
353 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) | 353 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) |
354 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 354 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
355 | { | 355 | { |
356 | pte.pte_low &= _PAGE_CHG_MASK; | 356 | pte.pte_low &= _PAGE_CHG_MASK; |
357 | pte.pte_low |= pgprot_val(newprot); | 357 | pte.pte_high &= ~0x3f; |
358 | pte.pte_low |= pgprot_val(newprot); | ||
358 | pte.pte_high |= pgprot_val(newprot) & 0x3f; | 359 | pte.pte_high |= pgprot_val(newprot) & 0x3f; |
359 | return pte; | 360 | return pte; |
360 | } | 361 | } |
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h index 75c6fe7c2126..e14e4b69de21 100644 --- a/include/asm-mips/smp.h +++ b/include/asm-mips/smp.h | |||
@@ -48,7 +48,6 @@ extern struct call_data_struct *call_data; | |||
48 | #define SMP_CALL_FUNCTION 0x2 | 48 | #define SMP_CALL_FUNCTION 0x2 |
49 | 49 | ||
50 | extern cpumask_t phys_cpu_present_map; | 50 | extern cpumask_t phys_cpu_present_map; |
51 | extern cpumask_t cpu_online_map; | ||
52 | #define cpu_possible_map phys_cpu_present_map | 51 | #define cpu_possible_map phys_cpu_present_map |
53 | 52 | ||
54 | extern cpumask_t cpu_callout_map; | 53 | extern cpumask_t cpu_callout_map; |
@@ -86,9 +85,9 @@ extern void prom_init_secondary(void); | |||
86 | extern void plat_smp_setup(void); | 85 | extern void plat_smp_setup(void); |
87 | 86 | ||
88 | /* | 87 | /* |
89 | * Called after init_IRQ but before __cpu_up. | 88 | * Called in smp_prepare_cpus. |
90 | */ | 89 | */ |
91 | extern void prom_prepare_cpus(unsigned int max_cpus); | 90 | extern void plat_prepare_cpus(unsigned int max_cpus); |
92 | 91 | ||
93 | /* | 92 | /* |
94 | * Last chance for the board code to finish SMP initialization before | 93 | * Last chance for the board code to finish SMP initialization before |
diff --git a/include/asm-mips/sparsemem.h b/include/asm-mips/sparsemem.h new file mode 100644 index 000000000000..795ac6c23203 --- /dev/null +++ b/include/asm-mips/sparsemem.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _MIPS_SPARSEMEM_H | ||
2 | #define _MIPS_SPARSEMEM_H | ||
3 | #ifdef CONFIG_SPARSEMEM | ||
4 | |||
5 | /* | ||
6 | * SECTION_SIZE_BITS 2^N: how big each section will be | ||
7 | * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space | ||
8 | */ | ||
9 | #define SECTION_SIZE_BITS 28 | ||
10 | #define MAX_PHYSMEM_BITS 35 | ||
11 | |||
12 | #endif /* CONFIG_SPARSEMEM */ | ||
13 | #endif /* _MIPS_SPARSEMEM_H */ | ||
14 | |||
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h index db0606c1abd4..bea727904287 100644 --- a/include/asm-s390/lowcore.h +++ b/include/asm-s390/lowcore.h | |||
@@ -98,8 +98,8 @@ | |||
98 | #define __LC_KERNEL_ASCE 0xD58 | 98 | #define __LC_KERNEL_ASCE 0xD58 |
99 | #define __LC_USER_ASCE 0xD60 | 99 | #define __LC_USER_ASCE 0xD60 |
100 | #define __LC_PANIC_STACK 0xD68 | 100 | #define __LC_PANIC_STACK 0xD68 |
101 | #define __LC_CPUID 0xD90 | 101 | #define __LC_CPUID 0xD80 |
102 | #define __LC_CPUADDR 0xD98 | 102 | #define __LC_CPUADDR 0xD88 |
103 | #define __LC_IPLDEV 0xDB8 | 103 | #define __LC_IPLDEV 0xDB8 |
104 | #define __LC_JIFFY_TIMER 0xDC0 | 104 | #define __LC_JIFFY_TIMER 0xDC0 |
105 | #define __LC_CURRENT 0xDD8 | 105 | #define __LC_CURRENT 0xDD8 |
diff --git a/include/asm-um/irqflags.h b/include/asm-um/irqflags.h new file mode 100644 index 000000000000..659b9abdfdba --- /dev/null +++ b/include/asm-um/irqflags.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __UM_IRQFLAGS_H | ||
2 | #define __UM_IRQFLAGS_H | ||
3 | |||
4 | /* Empty for now */ | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-um/uaccess.h b/include/asm-um/uaccess.h index bea5a015f667..16c734af9193 100644 --- a/include/asm-um/uaccess.h +++ b/include/asm-um/uaccess.h | |||
@@ -41,11 +41,11 @@ | |||
41 | 41 | ||
42 | #define __get_user(x, ptr) \ | 42 | #define __get_user(x, ptr) \ |
43 | ({ \ | 43 | ({ \ |
44 | const __typeof__(ptr) __private_ptr = ptr; \ | 44 | const __typeof__(*(ptr)) __user *__private_ptr = (ptr); \ |
45 | __typeof__(x) __private_val; \ | 45 | __typeof__(x) __private_val; \ |
46 | int __private_ret = -EFAULT; \ | 46 | int __private_ret = -EFAULT; \ |
47 | (x) = (__typeof__(*(__private_ptr)))0; \ | 47 | (x) = (__typeof__(*(__private_ptr)))0; \ |
48 | if (__copy_from_user((void *) &__private_val, (__private_ptr), \ | 48 | if (__copy_from_user((__force void *)&__private_val, (__private_ptr),\ |
49 | sizeof(*(__private_ptr))) == 0) { \ | 49 | sizeof(*(__private_ptr))) == 0) { \ |
50 | (x) = (__typeof__(*(__private_ptr))) __private_val; \ | 50 | (x) = (__typeof__(*(__private_ptr))) __private_val; \ |
51 | __private_ret = 0; \ | 51 | __private_ret = 0; \ |
@@ -62,7 +62,7 @@ | |||
62 | 62 | ||
63 | #define __put_user(x, ptr) \ | 63 | #define __put_user(x, ptr) \ |
64 | ({ \ | 64 | ({ \ |
65 | __typeof__(ptr) __private_ptr = ptr; \ | 65 | __typeof__(*(ptr)) __user *__private_ptr = ptr; \ |
66 | __typeof__(*(__private_ptr)) __private_val; \ | 66 | __typeof__(*(__private_ptr)) __private_val; \ |
67 | int __private_ret = -EFAULT; \ | 67 | int __private_ret = -EFAULT; \ |
68 | __private_val = (__typeof__(*(__private_ptr))) (x); \ | 68 | __private_val = (__typeof__(*(__private_ptr))) (x); \ |
diff --git a/include/linux/m48t86.h b/include/linux/m48t86.h index 9065199319d0..915d6b4f0f89 100644 --- a/include/linux/m48t86.h +++ b/include/linux/m48t86.h | |||
@@ -11,6 +11,6 @@ | |||
11 | 11 | ||
12 | struct m48t86_ops | 12 | struct m48t86_ops |
13 | { | 13 | { |
14 | void (*writeb)(unsigned char value, unsigned long addr); | 14 | void (*writebyte)(unsigned char value, unsigned long addr); |
15 | unsigned char (*readb)(unsigned long addr); | 15 | unsigned char (*readbyte)(unsigned long addr); |
16 | }; | 16 | }; |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 36740354d4db..2d8337150493 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/seqlock.h> | 15 | #include <linux/seqlock.h> |
16 | #include <linux/nodemask.h> | 16 | #include <linux/nodemask.h> |
17 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
18 | #include <asm/page.h> | ||
18 | 19 | ||
19 | /* Free memory management - zoned buddy allocator. */ | 20 | /* Free memory management - zoned buddy allocator. */ |
20 | #ifndef CONFIG_FORCE_MAX_ZONEORDER | 21 | #ifndef CONFIG_FORCE_MAX_ZONEORDER |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 21dad415b896..90b4cdc0c948 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -4422,6 +4422,7 @@ void selinux_complete_init(void) | |||
4422 | 4422 | ||
4423 | /* Set up any superblocks initialized prior to the policy load. */ | 4423 | /* Set up any superblocks initialized prior to the policy load. */ |
4424 | printk(KERN_INFO "SELinux: Setting up existing superblocks.\n"); | 4424 | printk(KERN_INFO "SELinux: Setting up existing superblocks.\n"); |
4425 | spin_lock(&sb_lock); | ||
4425 | spin_lock(&sb_security_lock); | 4426 | spin_lock(&sb_security_lock); |
4426 | next_sb: | 4427 | next_sb: |
4427 | if (!list_empty(&superblock_security_head)) { | 4428 | if (!list_empty(&superblock_security_head)) { |
@@ -4430,19 +4431,20 @@ next_sb: | |||
4430 | struct superblock_security_struct, | 4431 | struct superblock_security_struct, |
4431 | list); | 4432 | list); |
4432 | struct super_block *sb = sbsec->sb; | 4433 | struct super_block *sb = sbsec->sb; |
4433 | spin_lock(&sb_lock); | ||
4434 | sb->s_count++; | 4434 | sb->s_count++; |
4435 | spin_unlock(&sb_lock); | ||
4436 | spin_unlock(&sb_security_lock); | 4435 | spin_unlock(&sb_security_lock); |
4436 | spin_unlock(&sb_lock); | ||
4437 | down_read(&sb->s_umount); | 4437 | down_read(&sb->s_umount); |
4438 | if (sb->s_root) | 4438 | if (sb->s_root) |
4439 | superblock_doinit(sb, NULL); | 4439 | superblock_doinit(sb, NULL); |
4440 | drop_super(sb); | 4440 | drop_super(sb); |
4441 | spin_lock(&sb_lock); | ||
4441 | spin_lock(&sb_security_lock); | 4442 | spin_lock(&sb_security_lock); |
4442 | list_del_init(&sbsec->list); | 4443 | list_del_init(&sbsec->list); |
4443 | goto next_sb; | 4444 | goto next_sb; |
4444 | } | 4445 | } |
4445 | spin_unlock(&sb_security_lock); | 4446 | spin_unlock(&sb_security_lock); |
4447 | spin_unlock(&sb_lock); | ||
4446 | } | 4448 | } |
4447 | 4449 | ||
4448 | /* SELinux requires early initialization in order to label | 4450 | /* SELinux requires early initialization in order to label |