diff options
211 files changed, 2151 insertions, 1534 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index df82116a9f26..88ad615dd338 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -214,12 +214,13 @@ hardware. | |||
214 | The interaction of the iflag bits is as follows (parity error | 214 | The interaction of the iflag bits is as follows (parity error |
215 | given as an example): | 215 | given as an example): |
216 | Parity error INPCK IGNPAR | 216 | Parity error INPCK IGNPAR |
217 | None n/a n/a character received | 217 | n/a 0 n/a character received, marked as |
218 | Yes n/a 0 character discarded | ||
219 | Yes 0 1 character received, marked as | ||
220 | TTY_NORMAL | 218 | TTY_NORMAL |
221 | Yes 1 1 character received, marked as | 219 | None 1 n/a character received, marked as |
220 | TTY_NORMAL | ||
221 | Yes 1 0 character received, marked as | ||
222 | TTY_PARITY | 222 | TTY_PARITY |
223 | Yes 1 1 character discarded | ||
223 | 224 | ||
224 | Other flags may be used (eg, xon/xoff characters) if your | 225 | Other flags may be used (eg, xon/xoff characters) if your |
225 | hardware supports hardware "soft" flow control. | 226 | hardware supports hardware "soft" flow control. |
diff --git a/MAINTAINERS b/MAINTAINERS index 328da34a7de2..e593acee2a11 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -565,7 +565,19 @@ BROADBAND PROCESSOR ARCHITECTURE | |||
565 | P: Arnd Bergmann | 565 | P: Arnd Bergmann |
566 | M: arnd@arndb.de | 566 | M: arnd@arndb.de |
567 | L: linuxppc-dev@ozlabs.org | 567 | L: linuxppc-dev@ozlabs.org |
568 | W: http://linuxppc64.org | 568 | W: http://www.penguinppc.org/ppc64/ |
569 | S: Supported | ||
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 | ||
569 | S: Supported | 581 | S: Supported |
570 | 582 | ||
571 | BTTV VIDEO4LINUX DRIVER | 583 | BTTV VIDEO4LINUX DRIVER |
@@ -1734,7 +1746,7 @@ M: paulus@au.ibm.com | |||
1734 | P: Anton Blanchard | 1746 | P: Anton Blanchard |
1735 | M: anton@samba.org | 1747 | M: anton@samba.org |
1736 | M: anton@au.ibm.com | 1748 | M: anton@au.ibm.com |
1737 | W: http://linuxppc64.org | 1749 | W: http://www.penguinppc.org/ppc64/ |
1738 | L: linuxppc-dev@ozlabs.org | 1750 | L: linuxppc-dev@ozlabs.org |
1739 | S: Supported | 1751 | S: Supported |
1740 | 1752 | ||
@@ -1895,6 +1907,11 @@ L: linux-kernel@vger.kernel.org | |||
1895 | W: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html | 1907 | W: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html |
1896 | S: Maintained | 1908 | S: Maintained |
1897 | 1909 | ||
1910 | MULTIMEDIA CARD SUBSYSTEM | ||
1911 | P: Russell King | ||
1912 | M: rmk+mmc@arm.linux.org.uk | ||
1913 | S: Maintained | ||
1914 | |||
1898 | MULTISOUND SOUND DRIVER | 1915 | MULTISOUND SOUND DRIVER |
1899 | P: Andrew Veliath | 1916 | P: Andrew Veliath |
1900 | M: andrewtv@usa.net | 1917 | M: andrewtv@usa.net |
@@ -1917,6 +1934,12 @@ M: James.Bottomley@HansenPartnership.com | |||
1917 | L: linux-scsi@vger.kernel.org | 1934 | L: linux-scsi@vger.kernel.org |
1918 | S: Maintained | 1935 | S: Maintained |
1919 | 1936 | ||
1937 | NETEM NETWORK EMULATOR | ||
1938 | P: Stephen Hemminger | ||
1939 | M: shemminger@osdl.org | ||
1940 | L: netem@osdl.org | ||
1941 | S: Maintained | ||
1942 | |||
1920 | NETFILTER/IPTABLES/IPCHAINS | 1943 | NETFILTER/IPTABLES/IPCHAINS |
1921 | P: Rusty Russell | 1944 | P: Rusty Russell |
1922 | P: Marc Boucher | 1945 | P: Marc Boucher |
@@ -1,8 +1,8 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 17 | 3 | SUBLEVEL = 17 |
4 | EXTRAVERSION =-rc5 | 4 | EXTRAVERSION =-rc6 |
5 | NAME=Lordi Rules | 5 | NAME=Crazed Snow-Weasel |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
8 | # To see a list of typical targets execute "make help" | 8 | # To see a list of typical targets execute "make help" |
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-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c index 092ee12ced42..affd1d5d7440 100644 --- a/arch/arm/mach-ixp23xx/core.c +++ b/arch/arm/mach-ixp23xx/core.c | |||
@@ -178,8 +178,12 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type) | |||
178 | 178 | ||
179 | static void ixp23xx_irq_mask(unsigned int irq) | 179 | static void ixp23xx_irq_mask(unsigned int irq) |
180 | { | 180 | { |
181 | volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | 181 | volatile unsigned long *intr_reg; |
182 | 182 | ||
183 | if (irq >= 56) | ||
184 | irq += 8; | ||
185 | |||
186 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
183 | *intr_reg &= ~(1 << (irq % 32)); | 187 | *intr_reg &= ~(1 << (irq % 32)); |
184 | } | 188 | } |
185 | 189 | ||
@@ -199,17 +203,25 @@ static void ixp23xx_irq_ack(unsigned int irq) | |||
199 | */ | 203 | */ |
200 | static void ixp23xx_irq_level_unmask(unsigned int irq) | 204 | static void ixp23xx_irq_level_unmask(unsigned int irq) |
201 | { | 205 | { |
202 | volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | 206 | volatile unsigned long *intr_reg; |
203 | 207 | ||
204 | ixp23xx_irq_ack(irq); | 208 | ixp23xx_irq_ack(irq); |
205 | 209 | ||
210 | if (irq >= 56) | ||
211 | irq += 8; | ||
212 | |||
213 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
206 | *intr_reg |= (1 << (irq % 32)); | 214 | *intr_reg |= (1 << (irq % 32)); |
207 | } | 215 | } |
208 | 216 | ||
209 | static void ixp23xx_irq_edge_unmask(unsigned int irq) | 217 | static void ixp23xx_irq_edge_unmask(unsigned int irq) |
210 | { | 218 | { |
211 | volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | 219 | volatile unsigned long *intr_reg; |
220 | |||
221 | if (irq >= 56) | ||
222 | irq += 8; | ||
212 | 223 | ||
224 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
213 | *intr_reg |= (1 << (irq % 32)); | 225 | *intr_reg |= (1 << (irq % 32)); |
214 | } | 226 | } |
215 | 227 | ||
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/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index f14b2d0f3690..95273de4f772 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
@@ -376,7 +376,7 @@ void __init build_mem_type_table(void) | |||
376 | ecc_mask = 0; | 376 | ecc_mask = 0; |
377 | } | 377 | } |
378 | 378 | ||
379 | if (cpu_arch <= CPU_ARCH_ARMv5TEJ) { | 379 | if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) { |
380 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { | 380 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { |
381 | if (mem_types[i].prot_l1) | 381 | if (mem_types[i].prot_l1) |
382 | mem_types[i].prot_l1 |= PMD_BIT4; | 382 | mem_types[i].prot_l1 |= PMD_BIT4; |
@@ -631,7 +631,7 @@ void setup_mm_for_reboot(char mode) | |||
631 | pgd = init_mm.pgd; | 631 | pgd = init_mm.pgd; |
632 | 632 | ||
633 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; | 633 | base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; |
634 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ) | 634 | if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) |
635 | base_pmdval |= PMD_BIT4; | 635 | base_pmdval |= PMD_BIT4; |
636 | 636 | ||
637 | for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { | 637 | for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 80873b36c3f7..8d32e21fe151 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -427,12 +427,13 @@ __xsc3_setup: | |||
427 | #endif | 427 | #endif |
428 | mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg | 428 | mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg |
429 | mrc p15, 0, r0, c1, c0, 0 @ get control register | 429 | mrc p15, 0, r0, c1, c0, 0 @ get control register |
430 | bic r0, r0, #0x0200 @ .... ..R. .... .... | ||
431 | bic r0, r0, #0x0002 @ .... .... .... ..A. | 430 | bic r0, r0, #0x0002 @ .... .... .... ..A. |
432 | orr r0, r0, #0x0005 @ .... .... .... .C.M | 431 | orr r0, r0, #0x0005 @ .... .... .... .C.M |
433 | #if BTB_ENABLE | 432 | #if BTB_ENABLE |
433 | bic r0, r0, #0x0200 @ .... ..R. .... .... | ||
434 | orr r0, r0, #0x3900 @ ..VI Z..S .... .... | 434 | orr r0, r0, #0x3900 @ ..VI Z..S .... .... |
435 | #else | 435 | #else |
436 | bic r0, r0, #0x0a00 @ .... Z.R. .... .... | ||
436 | orr r0, r0, #0x3100 @ ..VI ...S .... .... | 437 | orr r0, r0, #0x3100 @ ..VI ...S .... .... |
437 | #endif | 438 | #endif |
438 | #if L2_CACHE_ENABLE | 439 | #if L2_CACHE_ENABLE |
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index daee69579b1c..40e5aba3ad3d 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -1066,14 +1066,6 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = { | |||
1066 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), | 1066 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), |
1067 | }, | 1067 | }, |
1068 | }, | 1068 | }, |
1069 | { | ||
1070 | .callback = disable_acpi_pci, | ||
1071 | .ident = "HP xw9300", | ||
1072 | .matches = { | ||
1073 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
1074 | DMI_MATCH(DMI_PRODUCT_NAME, "HP xw9300 Workstation"), | ||
1075 | }, | ||
1076 | }, | ||
1077 | {} | 1069 | {} |
1078 | }; | 1070 | }; |
1079 | 1071 | ||
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index f48bef15b4f0..af56987f69b0 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
@@ -315,3 +315,4 @@ ENTRY(sys_call_table) | |||
315 | .long sys_splice | 315 | .long sys_splice |
316 | .long sys_sync_file_range | 316 | .long sys_sync_file_range |
317 | .long sys_tee /* 315 */ | 317 | .long sys_tee /* 315 */ |
318 | .long sys_vmsplice | ||
diff --git a/arch/i386/mach-generic/probe.c b/arch/i386/mach-generic/probe.c index cea5b3ce4b57..d55fa7b187ab 100644 --- a/arch/i386/mach-generic/probe.c +++ b/arch/i386/mach-generic/probe.c | |||
@@ -93,9 +93,11 @@ int __init mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid | |||
93 | int i; | 93 | int i; |
94 | for (i = 0; apic_probe[i]; ++i) { | 94 | for (i = 0; apic_probe[i]; ++i) { |
95 | if (apic_probe[i]->mps_oem_check(mpc,oem,productid)) { | 95 | if (apic_probe[i]->mps_oem_check(mpc,oem,productid)) { |
96 | genapic = apic_probe[i]; | 96 | if (!cmdline_apic) { |
97 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", | 97 | genapic = apic_probe[i]; |
98 | genapic->name); | 98 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", |
99 | genapic->name); | ||
100 | } | ||
99 | return 1; | 101 | return 1; |
100 | } | 102 | } |
101 | } | 103 | } |
@@ -107,9 +109,11 @@ int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
107 | int i; | 109 | int i; |
108 | for (i = 0; apic_probe[i]; ++i) { | 110 | for (i = 0; apic_probe[i]; ++i) { |
109 | if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { | 111 | if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { |
110 | genapic = apic_probe[i]; | 112 | if (!cmdline_apic) { |
111 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", | 113 | genapic = apic_probe[i]; |
112 | genapic->name); | 114 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", |
115 | genapic->name); | ||
116 | } | ||
113 | return 1; | 117 | return 1; |
114 | } | 118 | } |
115 | } | 119 | } |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ee5fbb02b28f..e8ff09fe73d9 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -13,7 +13,7 @@ choice | |||
13 | default SGI_IP22 | 13 | default SGI_IP22 |
14 | 14 | ||
15 | config MIPS_MTX1 | 15 | config MIPS_MTX1 |
16 | bool "Support for 4G Systems MTX-1 board" | 16 | bool "4G Systems MTX-1 board" |
17 | select DMA_NONCOHERENT | 17 | select DMA_NONCOHERENT |
18 | select HW_HAS_PCI | 18 | select HW_HAS_PCI |
19 | select SOC_AU1500 | 19 | select SOC_AU1500 |
@@ -120,7 +120,7 @@ config MIPS_MIRAGE | |||
120 | select SYS_SUPPORTS_LITTLE_ENDIAN | 120 | select SYS_SUPPORTS_LITTLE_ENDIAN |
121 | 121 | ||
122 | config MIPS_COBALT | 122 | config MIPS_COBALT |
123 | bool "Support for Cobalt Server" | 123 | bool "Cobalt Server" |
124 | select DMA_NONCOHERENT | 124 | select DMA_NONCOHERENT |
125 | select HW_HAS_PCI | 125 | select HW_HAS_PCI |
126 | select I8259 | 126 | select I8259 |
@@ -132,7 +132,7 @@ config MIPS_COBALT | |||
132 | select SYS_SUPPORTS_LITTLE_ENDIAN | 132 | select SYS_SUPPORTS_LITTLE_ENDIAN |
133 | 133 | ||
134 | config MACH_DECSTATION | 134 | config MACH_DECSTATION |
135 | bool "Support for DECstations" | 135 | bool "DECstations" |
136 | select BOOT_ELF32 | 136 | select BOOT_ELF32 |
137 | select DMA_NONCOHERENT | 137 | select DMA_NONCOHERENT |
138 | select EARLY_PRINTK | 138 | select EARLY_PRINTK |
@@ -158,7 +158,7 @@ config MACH_DECSTATION | |||
158 | otherwise choose R3000. | 158 | otherwise choose R3000. |
159 | 159 | ||
160 | config MIPS_EV64120 | 160 | config MIPS_EV64120 |
161 | bool "Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)" | 161 | bool "Galileo EV64120 Evaluation board (EXPERIMENTAL)" |
162 | depends on EXPERIMENTAL | 162 | depends on EXPERIMENTAL |
163 | select DMA_NONCOHERENT | 163 | select DMA_NONCOHERENT |
164 | select HW_HAS_PCI | 164 | select HW_HAS_PCI |
@@ -175,7 +175,7 @@ config MIPS_EV64120 | |||
175 | kernel for this platform. | 175 | kernel for this platform. |
176 | 176 | ||
177 | config MIPS_EV96100 | 177 | config MIPS_EV96100 |
178 | bool "Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)" | 178 | bool "Galileo EV96100 Evaluation board (EXPERIMENTAL)" |
179 | depends on EXPERIMENTAL | 179 | depends on EXPERIMENTAL |
180 | select DMA_NONCOHERENT | 180 | select DMA_NONCOHERENT |
181 | select HW_HAS_PCI | 181 | select HW_HAS_PCI |
@@ -195,7 +195,7 @@ config MIPS_EV96100 | |||
195 | here if you wish to build a kernel for this platform. | 195 | here if you wish to build a kernel for this platform. |
196 | 196 | ||
197 | config MIPS_IVR | 197 | config MIPS_IVR |
198 | bool "Support for Globespan IVR board" | 198 | bool "Globespan IVR board" |
199 | select DMA_NONCOHERENT | 199 | select DMA_NONCOHERENT |
200 | select HW_HAS_PCI | 200 | select HW_HAS_PCI |
201 | select ITE_BOARD_GEN | 201 | select ITE_BOARD_GEN |
@@ -211,7 +211,7 @@ config MIPS_IVR | |||
211 | build a kernel for this platform. | 211 | build a kernel for this platform. |
212 | 212 | ||
213 | config MIPS_ITE8172 | 213 | config MIPS_ITE8172 |
214 | bool "Support for ITE 8172G board" | 214 | bool "ITE 8172G board" |
215 | select DMA_NONCOHERENT | 215 | select DMA_NONCOHERENT |
216 | select HW_HAS_PCI | 216 | select HW_HAS_PCI |
217 | select ITE_BOARD_GEN | 217 | select ITE_BOARD_GEN |
@@ -228,7 +228,7 @@ config MIPS_ITE8172 | |||
228 | a kernel for this platform. | 228 | a kernel for this platform. |
229 | 229 | ||
230 | config MACH_JAZZ | 230 | config MACH_JAZZ |
231 | bool "Support for the Jazz family of machines" | 231 | bool "Jazz family of machines" |
232 | select ARC | 232 | select ARC |
233 | select ARC32 | 233 | select ARC32 |
234 | select ARCH_MAY_HAVE_PC_FDC | 234 | select ARCH_MAY_HAVE_PC_FDC |
@@ -246,7 +246,7 @@ config MACH_JAZZ | |||
246 | Olivetti M700-10 workstations. | 246 | Olivetti M700-10 workstations. |
247 | 247 | ||
248 | config LASAT | 248 | config LASAT |
249 | bool "Support for LASAT Networks platforms" | 249 | bool "LASAT Networks platforms" |
250 | select DMA_NONCOHERENT | 250 | select DMA_NONCOHERENT |
251 | select HW_HAS_PCI | 251 | select HW_HAS_PCI |
252 | select MIPS_GT64120 | 252 | select MIPS_GT64120 |
@@ -258,7 +258,7 @@ config LASAT | |||
258 | select SYS_SUPPORTS_LITTLE_ENDIAN | 258 | select SYS_SUPPORTS_LITTLE_ENDIAN |
259 | 259 | ||
260 | config MIPS_ATLAS | 260 | config MIPS_ATLAS |
261 | bool "Support for MIPS Atlas board" | 261 | bool "MIPS Atlas board" |
262 | select BOOT_ELF32 | 262 | select BOOT_ELF32 |
263 | select DMA_NONCOHERENT | 263 | select DMA_NONCOHERENT |
264 | select IRQ_CPU | 264 | select IRQ_CPU |
@@ -283,7 +283,7 @@ config MIPS_ATLAS | |||
283 | board. | 283 | board. |
284 | 284 | ||
285 | config MIPS_MALTA | 285 | config MIPS_MALTA |
286 | bool "Support for MIPS Malta board" | 286 | bool "MIPS Malta board" |
287 | select ARCH_MAY_HAVE_PC_FDC | 287 | select ARCH_MAY_HAVE_PC_FDC |
288 | select BOOT_ELF32 | 288 | select BOOT_ELF32 |
289 | select HAVE_STD_PC_SERIAL_PORT | 289 | select HAVE_STD_PC_SERIAL_PORT |
@@ -311,7 +311,7 @@ config MIPS_MALTA | |||
311 | board. | 311 | board. |
312 | 312 | ||
313 | config MIPS_SEAD | 313 | config MIPS_SEAD |
314 | bool "Support for MIPS SEAD board (EXPERIMENTAL)" | 314 | bool "MIPS SEAD board (EXPERIMENTAL)" |
315 | depends on EXPERIMENTAL | 315 | depends on EXPERIMENTAL |
316 | select IRQ_CPU | 316 | select IRQ_CPU |
317 | select DMA_NONCOHERENT | 317 | select DMA_NONCOHERENT |
@@ -328,7 +328,7 @@ config MIPS_SEAD | |||
328 | board. | 328 | board. |
329 | 329 | ||
330 | config MIPS_SIM | 330 | config MIPS_SIM |
331 | bool 'Support for MIPS simulator (MIPSsim)' | 331 | bool 'MIPS simulator (MIPSsim)' |
332 | select DMA_NONCOHERENT | 332 | select DMA_NONCOHERENT |
333 | select IRQ_CPU | 333 | select IRQ_CPU |
334 | select SYS_HAS_CPU_MIPS32_R1 | 334 | select SYS_HAS_CPU_MIPS32_R1 |
@@ -341,7 +341,7 @@ config MIPS_SIM | |||
341 | emulator. | 341 | emulator. |
342 | 342 | ||
343 | config MOMENCO_JAGUAR_ATX | 343 | config MOMENCO_JAGUAR_ATX |
344 | bool "Support for Momentum Jaguar board" | 344 | bool "Momentum Jaguar board" |
345 | select BOOT_ELF32 | 345 | select BOOT_ELF32 |
346 | select DMA_NONCOHERENT | 346 | select DMA_NONCOHERENT |
347 | select HW_HAS_PCI | 347 | select HW_HAS_PCI |
@@ -361,7 +361,7 @@ config MOMENCO_JAGUAR_ATX | |||
361 | Momentum Computer <http://www.momenco.com/>. | 361 | Momentum Computer <http://www.momenco.com/>. |
362 | 362 | ||
363 | config MOMENCO_OCELOT | 363 | config MOMENCO_OCELOT |
364 | bool "Support for Momentum Ocelot board" | 364 | bool "Momentum Ocelot board" |
365 | select DMA_NONCOHERENT | 365 | select DMA_NONCOHERENT |
366 | select HW_HAS_PCI | 366 | select HW_HAS_PCI |
367 | select IRQ_CPU | 367 | select IRQ_CPU |
@@ -378,7 +378,7 @@ config MOMENCO_OCELOT | |||
378 | Momentum Computer <http://www.momenco.com/>. | 378 | Momentum Computer <http://www.momenco.com/>. |
379 | 379 | ||
380 | config MOMENCO_OCELOT_3 | 380 | config MOMENCO_OCELOT_3 |
381 | bool "Support for Momentum Ocelot-3 board" | 381 | bool "Momentum Ocelot-3 board" |
382 | select BOOT_ELF32 | 382 | select BOOT_ELF32 |
383 | select DMA_NONCOHERENT | 383 | select DMA_NONCOHERENT |
384 | select HW_HAS_PCI | 384 | select HW_HAS_PCI |
@@ -397,7 +397,7 @@ config MOMENCO_OCELOT_3 | |||
397 | PMC-Sierra Rm79000 core. | 397 | PMC-Sierra Rm79000 core. |
398 | 398 | ||
399 | config MOMENCO_OCELOT_C | 399 | config MOMENCO_OCELOT_C |
400 | bool "Support for Momentum Ocelot-C board" | 400 | bool "Momentum Ocelot-C board" |
401 | select DMA_NONCOHERENT | 401 | select DMA_NONCOHERENT |
402 | select HW_HAS_PCI | 402 | select HW_HAS_PCI |
403 | select IRQ_CPU | 403 | select IRQ_CPU |
@@ -414,7 +414,7 @@ config MOMENCO_OCELOT_C | |||
414 | Momentum Computer <http://www.momenco.com/>. | 414 | Momentum Computer <http://www.momenco.com/>. |
415 | 415 | ||
416 | config MOMENCO_OCELOT_G | 416 | config MOMENCO_OCELOT_G |
417 | bool "Support for Momentum Ocelot-G board" | 417 | bool "Momentum Ocelot-G board" |
418 | select DMA_NONCOHERENT | 418 | select DMA_NONCOHERENT |
419 | select HW_HAS_PCI | 419 | select HW_HAS_PCI |
420 | select IRQ_CPU | 420 | select IRQ_CPU |
@@ -431,23 +431,23 @@ config MOMENCO_OCELOT_G | |||
431 | Momentum Computer <http://www.momenco.com/>. | 431 | Momentum Computer <http://www.momenco.com/>. |
432 | 432 | ||
433 | config MIPS_XXS1500 | 433 | config MIPS_XXS1500 |
434 | bool "Support for MyCable XXS1500 board" | 434 | bool "MyCable XXS1500 board" |
435 | select DMA_NONCOHERENT | 435 | select DMA_NONCOHERENT |
436 | select SOC_AU1500 | 436 | select SOC_AU1500 |
437 | select SYS_SUPPORTS_LITTLE_ENDIAN | 437 | select SYS_SUPPORTS_LITTLE_ENDIAN |
438 | 438 | ||
439 | config PNX8550_V2PCI | 439 | config PNX8550_V2PCI |
440 | bool "Support for Philips PNX8550 based Viper2-PCI board" | 440 | bool "Philips PNX8550 based Viper2-PCI board" |
441 | select PNX8550 | 441 | select PNX8550 |
442 | select SYS_SUPPORTS_LITTLE_ENDIAN | 442 | select SYS_SUPPORTS_LITTLE_ENDIAN |
443 | 443 | ||
444 | config PNX8550_JBS | 444 | config PNX8550_JBS |
445 | bool "Support for Philips PNX8550 based JBS board" | 445 | bool "Philips PNX8550 based JBS board" |
446 | select PNX8550 | 446 | select PNX8550 |
447 | select SYS_SUPPORTS_LITTLE_ENDIAN | 447 | select SYS_SUPPORTS_LITTLE_ENDIAN |
448 | 448 | ||
449 | config DDB5074 | 449 | config DDB5074 |
450 | bool "Support for NEC DDB Vrc-5074 (EXPERIMENTAL)" | 450 | bool "NEC DDB Vrc-5074 (EXPERIMENTAL)" |
451 | depends on EXPERIMENTAL | 451 | depends on EXPERIMENTAL |
452 | select DDB5XXX_COMMON | 452 | select DDB5XXX_COMMON |
453 | select DMA_NONCOHERENT | 453 | select DMA_NONCOHERENT |
@@ -465,7 +465,7 @@ config DDB5074 | |||
465 | evaluation board. | 465 | evaluation board. |
466 | 466 | ||
467 | config DDB5476 | 467 | config DDB5476 |
468 | bool "Support for NEC DDB Vrc-5476" | 468 | bool "NEC DDB Vrc-5476" |
469 | select DDB5XXX_COMMON | 469 | select DDB5XXX_COMMON |
470 | select DMA_NONCOHERENT | 470 | select DMA_NONCOHERENT |
471 | select HAVE_STD_PC_SERIAL_PORT | 471 | select HAVE_STD_PC_SERIAL_PORT |
@@ -486,7 +486,7 @@ config DDB5476 | |||
486 | IDE controller, PS2 keyboard, PS2 mouse, etc. | 486 | IDE controller, PS2 keyboard, PS2 mouse, etc. |
487 | 487 | ||
488 | config DDB5477 | 488 | config DDB5477 |
489 | bool "Support for NEC DDB Vrc-5477" | 489 | bool "NEC DDB Vrc-5477" |
490 | select DDB5XXX_COMMON | 490 | select DDB5XXX_COMMON |
491 | select DMA_NONCOHERENT | 491 | select DMA_NONCOHERENT |
492 | select HW_HAS_PCI | 492 | select HW_HAS_PCI |
@@ -504,13 +504,13 @@ config DDB5477 | |||
504 | ether port USB, AC97, PCI, etc. | 504 | ether port USB, AC97, PCI, etc. |
505 | 505 | ||
506 | config MACH_VR41XX | 506 | config MACH_VR41XX |
507 | bool "Support for NEC VR4100 series based machines" | 507 | bool "NEC VR41XX-based machines" |
508 | select SYS_HAS_CPU_VR41XX | 508 | select SYS_HAS_CPU_VR41XX |
509 | select SYS_SUPPORTS_32BIT_KERNEL | 509 | select SYS_SUPPORTS_32BIT_KERNEL |
510 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | 510 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL |
511 | 511 | ||
512 | config PMC_YOSEMITE | 512 | config PMC_YOSEMITE |
513 | bool "Support for PMC-Sierra Yosemite eval board" | 513 | bool "PMC-Sierra Yosemite eval board" |
514 | select DMA_COHERENT | 514 | select DMA_COHERENT |
515 | select HW_HAS_PCI | 515 | select HW_HAS_PCI |
516 | select IRQ_CPU | 516 | select IRQ_CPU |
@@ -527,7 +527,7 @@ config PMC_YOSEMITE | |||
527 | manufactured by PMC-Sierra. | 527 | manufactured by PMC-Sierra. |
528 | 528 | ||
529 | config QEMU | 529 | config QEMU |
530 | bool "Support for Qemu" | 530 | bool "Qemu" |
531 | select DMA_COHERENT | 531 | select DMA_COHERENT |
532 | select GENERIC_ISA_DMA | 532 | select GENERIC_ISA_DMA |
533 | select HAVE_STD_PC_SERIAL_PORT | 533 | select HAVE_STD_PC_SERIAL_PORT |
@@ -547,7 +547,7 @@ config QEMU | |||
547 | can be found at http://www.linux-mips.org/wiki/Qemu. | 547 | can be found at http://www.linux-mips.org/wiki/Qemu. |
548 | 548 | ||
549 | config SGI_IP22 | 549 | config SGI_IP22 |
550 | bool "Support for SGI IP22 (Indy/Indigo2)" | 550 | bool "SGI IP22 (Indy/Indigo2)" |
551 | select ARC | 551 | select ARC |
552 | select ARC32 | 552 | select ARC32 |
553 | select BOOT_ELF32 | 553 | select BOOT_ELF32 |
@@ -567,7 +567,7 @@ config SGI_IP22 | |||
567 | that runs on these, say Y here. | 567 | that runs on these, say Y here. |
568 | 568 | ||
569 | config SGI_IP27 | 569 | config SGI_IP27 |
570 | bool "Support for SGI IP27 (Origin200/2000)" | 570 | bool "SGI IP27 (Origin200/2000)" |
571 | select ARC | 571 | select ARC |
572 | select ARC64 | 572 | select ARC64 |
573 | select BOOT_ELF64 | 573 | select BOOT_ELF64 |
@@ -583,7 +583,7 @@ config SGI_IP27 | |||
583 | here. | 583 | here. |
584 | 584 | ||
585 | config SGI_IP32 | 585 | config SGI_IP32 |
586 | bool "Support for SGI IP32 (O2) (EXPERIMENTAL)" | 586 | bool "SGI IP32 (O2) (EXPERIMENTAL)" |
587 | depends on EXPERIMENTAL | 587 | depends on EXPERIMENTAL |
588 | select ARC | 588 | select ARC |
589 | select ARC32 | 589 | select ARC32 |
@@ -604,7 +604,7 @@ config SGI_IP32 | |||
604 | If you want this kernel to run on SGI O2 workstation, say Y here. | 604 | If you want this kernel to run on SGI O2 workstation, say Y here. |
605 | 605 | ||
606 | config SIBYTE_BIGSUR | 606 | config SIBYTE_BIGSUR |
607 | bool "Support for Sibyte BCM91480B-BigSur" | 607 | bool "Sibyte BCM91480B-BigSur" |
608 | select BOOT_ELF32 | 608 | select BOOT_ELF32 |
609 | select DMA_COHERENT | 609 | select DMA_COHERENT |
610 | select PCI_DOMAINS | 610 | select PCI_DOMAINS |
@@ -615,7 +615,7 @@ config SIBYTE_BIGSUR | |||
615 | select SYS_SUPPORTS_LITTLE_ENDIAN | 615 | select SYS_SUPPORTS_LITTLE_ENDIAN |
616 | 616 | ||
617 | config SIBYTE_SWARM | 617 | config SIBYTE_SWARM |
618 | bool "Support for Sibyte BCM91250A-SWARM" | 618 | bool "Sibyte BCM91250A-SWARM" |
619 | select BOOT_ELF32 | 619 | select BOOT_ELF32 |
620 | select DMA_COHERENT | 620 | select DMA_COHERENT |
621 | select SIBYTE_SB1250 | 621 | select SIBYTE_SB1250 |
@@ -626,7 +626,7 @@ config SIBYTE_SWARM | |||
626 | select SYS_SUPPORTS_LITTLE_ENDIAN | 626 | select SYS_SUPPORTS_LITTLE_ENDIAN |
627 | 627 | ||
628 | config SIBYTE_SENTOSA | 628 | config SIBYTE_SENTOSA |
629 | bool "Support for Sibyte BCM91250E-Sentosa" | 629 | bool "Sibyte BCM91250E-Sentosa" |
630 | depends on EXPERIMENTAL | 630 | depends on EXPERIMENTAL |
631 | select BOOT_ELF32 | 631 | select BOOT_ELF32 |
632 | select DMA_COHERENT | 632 | select DMA_COHERENT |
@@ -637,7 +637,7 @@ config SIBYTE_SENTOSA | |||
637 | select SYS_SUPPORTS_LITTLE_ENDIAN | 637 | select SYS_SUPPORTS_LITTLE_ENDIAN |
638 | 638 | ||
639 | config SIBYTE_RHONE | 639 | config SIBYTE_RHONE |
640 | bool "Support for Sibyte BCM91125E-Rhone" | 640 | bool "Sibyte BCM91125E-Rhone" |
641 | depends on EXPERIMENTAL | 641 | depends on EXPERIMENTAL |
642 | select BOOT_ELF32 | 642 | select BOOT_ELF32 |
643 | select DMA_COHERENT | 643 | select DMA_COHERENT |
@@ -648,7 +648,7 @@ config SIBYTE_RHONE | |||
648 | select SYS_SUPPORTS_LITTLE_ENDIAN | 648 | select SYS_SUPPORTS_LITTLE_ENDIAN |
649 | 649 | ||
650 | config SIBYTE_CARMEL | 650 | config SIBYTE_CARMEL |
651 | bool "Support for Sibyte BCM91120x-Carmel" | 651 | bool "Sibyte BCM91120x-Carmel" |
652 | depends on EXPERIMENTAL | 652 | depends on EXPERIMENTAL |
653 | select BOOT_ELF32 | 653 | select BOOT_ELF32 |
654 | select DMA_COHERENT | 654 | select DMA_COHERENT |
@@ -659,7 +659,7 @@ config SIBYTE_CARMEL | |||
659 | select SYS_SUPPORTS_LITTLE_ENDIAN | 659 | select SYS_SUPPORTS_LITTLE_ENDIAN |
660 | 660 | ||
661 | config SIBYTE_PTSWARM | 661 | config SIBYTE_PTSWARM |
662 | bool "Support for Sibyte BCM91250PT-PTSWARM" | 662 | bool "Sibyte BCM91250PT-PTSWARM" |
663 | depends on EXPERIMENTAL | 663 | depends on EXPERIMENTAL |
664 | select BOOT_ELF32 | 664 | select BOOT_ELF32 |
665 | select DMA_COHERENT | 665 | select DMA_COHERENT |
@@ -671,7 +671,7 @@ config SIBYTE_PTSWARM | |||
671 | select SYS_SUPPORTS_LITTLE_ENDIAN | 671 | select SYS_SUPPORTS_LITTLE_ENDIAN |
672 | 672 | ||
673 | config SIBYTE_LITTLESUR | 673 | config SIBYTE_LITTLESUR |
674 | bool "Support for Sibyte BCM91250C2-LittleSur" | 674 | bool "Sibyte BCM91250C2-LittleSur" |
675 | depends on EXPERIMENTAL | 675 | depends on EXPERIMENTAL |
676 | select BOOT_ELF32 | 676 | select BOOT_ELF32 |
677 | select DMA_COHERENT | 677 | select DMA_COHERENT |
@@ -683,7 +683,7 @@ config SIBYTE_LITTLESUR | |||
683 | select SYS_SUPPORTS_LITTLE_ENDIAN | 683 | select SYS_SUPPORTS_LITTLE_ENDIAN |
684 | 684 | ||
685 | config SIBYTE_CRHINE | 685 | config SIBYTE_CRHINE |
686 | bool "Support for Sibyte BCM91120C-CRhine" | 686 | bool "Sibyte BCM91120C-CRhine" |
687 | depends on EXPERIMENTAL | 687 | depends on EXPERIMENTAL |
688 | select BOOT_ELF32 | 688 | select BOOT_ELF32 |
689 | select DMA_COHERENT | 689 | select DMA_COHERENT |
@@ -694,7 +694,7 @@ config SIBYTE_CRHINE | |||
694 | select SYS_SUPPORTS_LITTLE_ENDIAN | 694 | select SYS_SUPPORTS_LITTLE_ENDIAN |
695 | 695 | ||
696 | config SIBYTE_CRHONE | 696 | config SIBYTE_CRHONE |
697 | bool "Support for Sibyte BCM91125C-CRhone" | 697 | bool "Sibyte BCM91125C-CRhone" |
698 | depends on EXPERIMENTAL | 698 | depends on EXPERIMENTAL |
699 | select BOOT_ELF32 | 699 | select BOOT_ELF32 |
700 | select DMA_COHERENT | 700 | select DMA_COHERENT |
@@ -706,7 +706,7 @@ config SIBYTE_CRHONE | |||
706 | select SYS_SUPPORTS_LITTLE_ENDIAN | 706 | select SYS_SUPPORTS_LITTLE_ENDIAN |
707 | 707 | ||
708 | config SNI_RM200_PCI | 708 | config SNI_RM200_PCI |
709 | bool "Support for SNI RM200 PCI" | 709 | bool "SNI RM200 PCI" |
710 | select ARC | 710 | select ARC |
711 | select ARC32 | 711 | select ARC32 |
712 | select ARCH_MAY_HAVE_PC_FDC | 712 | select ARCH_MAY_HAVE_PC_FDC |
@@ -732,7 +732,7 @@ config SNI_RM200_PCI | |||
732 | support this machine type. | 732 | support this machine type. |
733 | 733 | ||
734 | config TOSHIBA_JMR3927 | 734 | config TOSHIBA_JMR3927 |
735 | bool "Support for Toshiba JMR-TX3927 board" | 735 | bool "Toshiba JMR-TX3927 board" |
736 | select DMA_NONCOHERENT | 736 | select DMA_NONCOHERENT |
737 | select HW_HAS_PCI | 737 | select HW_HAS_PCI |
738 | select MIPS_TX3927 | 738 | select MIPS_TX3927 |
@@ -743,7 +743,7 @@ config TOSHIBA_JMR3927 | |||
743 | select TOSHIBA_BOARDS | 743 | select TOSHIBA_BOARDS |
744 | 744 | ||
745 | config TOSHIBA_RBTX4927 | 745 | config TOSHIBA_RBTX4927 |
746 | bool "Support for Toshiba TBTX49[23]7 board" | 746 | bool "Toshiba TBTX49[23]7 board" |
747 | select DMA_NONCOHERENT | 747 | select DMA_NONCOHERENT |
748 | select HAS_TXX9_SERIAL | 748 | select HAS_TXX9_SERIAL |
749 | select HW_HAS_PCI | 749 | select HW_HAS_PCI |
@@ -760,7 +760,7 @@ config TOSHIBA_RBTX4927 | |||
760 | support this machine type | 760 | support this machine type |
761 | 761 | ||
762 | config TOSHIBA_RBTX4938 | 762 | config TOSHIBA_RBTX4938 |
763 | bool "Support for Toshiba RBTX4938 board" | 763 | bool "Toshiba RBTX4938 board" |
764 | select HAVE_STD_PC_SERIAL_PORT | 764 | select HAVE_STD_PC_SERIAL_PORT |
765 | select DMA_NONCOHERENT | 765 | select DMA_NONCOHERENT |
766 | select GENERIC_ISA_DMA | 766 | select GENERIC_ISA_DMA |
@@ -1411,13 +1411,12 @@ config PAGE_SIZE_8KB | |||
1411 | 1411 | ||
1412 | config PAGE_SIZE_16KB | 1412 | config PAGE_SIZE_16KB |
1413 | bool "16kB" | 1413 | bool "16kB" |
1414 | depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX | 1414 | depends on !CPU_R3000 && !CPU_TX39XX |
1415 | help | 1415 | help |
1416 | Using 16kB page size will result in higher performance kernel at | 1416 | Using 16kB page size will result in higher performance kernel at |
1417 | the price of higher memory consumption. This option is available on | 1417 | the price of higher memory consumption. This option is available on |
1418 | all non-R3000 family processor. Not that at the time of this | 1418 | all non-R3000 family processors. Note that you will need a suitable |
1419 | writing this option is still high experimental; there are also | 1419 | Linux distribution to support this. |
1420 | issues with compatibility of user applications. | ||
1421 | 1420 | ||
1422 | config PAGE_SIZE_64KB | 1421 | config PAGE_SIZE_64KB |
1423 | bool "64kB" | 1422 | bool "64kB" |
@@ -1426,8 +1425,7 @@ config PAGE_SIZE_64KB | |||
1426 | Using 64kB page size will result in higher performance kernel at | 1425 | Using 64kB page size will result in higher performance kernel at |
1427 | the price of higher memory consumption. This option is available on | 1426 | the price of higher memory consumption. This option is available on |
1428 | all non-R3000 family processor. Not that at the time of this | 1427 | all non-R3000 family processor. Not that at the time of this |
1429 | writing this option is still high experimental; there are also | 1428 | writing this option is still high experimental. |
1430 | issues with compatibility of user applications. | ||
1431 | 1429 | ||
1432 | endchoice | 1430 | endchoice |
1433 | 1431 | ||
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c index da61de776154..afe05ec12c27 100644 --- a/arch/mips/au1000/common/irq.c +++ b/arch/mips/au1000/common/irq.c | |||
@@ -68,6 +68,7 @@ | |||
68 | 68 | ||
69 | extern void set_debug_traps(void); | 69 | extern void set_debug_traps(void); |
70 | extern irq_cpustat_t irq_stat [NR_CPUS]; | 70 | extern irq_cpustat_t irq_stat [NR_CPUS]; |
71 | extern void mips_timer_interrupt(struct pt_regs *regs); | ||
71 | 72 | ||
72 | static void setup_local_irq(unsigned int irq, int type, int int_req); | 73 | static void setup_local_irq(unsigned int irq, int type, int int_req); |
73 | static unsigned int startup_irq(unsigned int irq); | 74 | static unsigned int startup_irq(unsigned int irq); |
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/au1000/common/time.c b/arch/mips/au1000/common/time.c index f85f1524b366..f74d66a58a21 100644 --- a/arch/mips/au1000/common/time.c +++ b/arch/mips/au1000/common/time.c | |||
@@ -116,6 +116,7 @@ void mips_timer_interrupt(struct pt_regs *regs) | |||
116 | 116 | ||
117 | null: | 117 | null: |
118 | ack_r4ktimer(0); | 118 | ack_r4ktimer(0); |
119 | irq_exit(); | ||
119 | } | 120 | } |
120 | 121 | ||
121 | #ifdef CONFIG_PM | 122 | #ifdef CONFIG_PM |
diff --git a/arch/mips/ddb5xxx/ddb5476/dbg_io.c b/arch/mips/ddb5xxx/ddb5476/dbg_io.c index 85e9e5013679..f2296a999953 100644 --- a/arch/mips/ddb5xxx/ddb5476/dbg_io.c +++ b/arch/mips/ddb5xxx/ddb5476/dbg_io.c | |||
@@ -86,7 +86,7 @@ void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | |||
86 | /* disable interrupts */ | 86 | /* disable interrupts */ |
87 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | 87 | UART16550_WRITE(OFS_INTR_ENABLE, 0); |
88 | 88 | ||
89 | /* set up buad rate */ | 89 | /* set up baud rate */ |
90 | { | 90 | { |
91 | uint32 divisor; | 91 | uint32 divisor; |
92 | 92 | ||
diff --git a/arch/mips/ddb5xxx/ddb5477/kgdb_io.c b/arch/mips/ddb5xxx/ddb5477/kgdb_io.c index 1d18d590495b..385bbdb10170 100644 --- a/arch/mips/ddb5xxx/ddb5477/kgdb_io.c +++ b/arch/mips/ddb5xxx/ddb5477/kgdb_io.c | |||
@@ -86,7 +86,7 @@ void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | |||
86 | /* disable interrupts */ | 86 | /* disable interrupts */ |
87 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | 87 | UART16550_WRITE(OFS_INTR_ENABLE, 0); |
88 | 88 | ||
89 | /* set up buad rate */ | 89 | /* set up baud rate */ |
90 | { | 90 | { |
91 | uint32 divisor; | 91 | uint32 divisor; |
92 | 92 | ||
diff --git a/arch/mips/gt64120/ev64120/serialGT.c b/arch/mips/gt64120/ev64120/serialGT.c index 16e34a546e54..8f0d835491ff 100644 --- a/arch/mips/gt64120/ev64120/serialGT.c +++ b/arch/mips/gt64120/ev64120/serialGT.c | |||
@@ -149,7 +149,7 @@ void serial_set(int channel, unsigned long baud) | |||
149 | #else | 149 | #else |
150 | /* | 150 | /* |
151 | * Note: Set baud rate, hardcoded here for rate of 115200 | 151 | * Note: Set baud rate, hardcoded here for rate of 115200 |
152 | * since became unsure of above "buad rate" algorithm (??). | 152 | * since became unsure of above "baud rate" algorithm (??). |
153 | */ | 153 | */ |
154 | outreg(channel, LCR, 0x83); | 154 | outreg(channel, LCR, 0x83); |
155 | outreg(channel, DLM, 0x00); // See note above | 155 | outreg(channel, DLM, 0x00); // See note above |
diff --git a/arch/mips/gt64120/momenco_ocelot/dbg_io.c b/arch/mips/gt64120/momenco_ocelot/dbg_io.c index 8720bccfdea2..f0a6a38fcf4d 100644 --- a/arch/mips/gt64120/momenco_ocelot/dbg_io.c +++ b/arch/mips/gt64120/momenco_ocelot/dbg_io.c | |||
@@ -73,7 +73,7 @@ void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | |||
73 | /* disable interrupts */ | 73 | /* disable interrupts */ |
74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | 74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); |
75 | 75 | ||
76 | /* set up buad rate */ | 76 | /* set up baud rate */ |
77 | { | 77 | { |
78 | uint32 divisor; | 78 | uint32 divisor; |
79 | 79 | ||
diff --git a/arch/mips/ite-boards/generic/dbg_io.c b/arch/mips/ite-boards/generic/dbg_io.c index c4f8530fd07e..6a7ccaf93502 100644 --- a/arch/mips/ite-boards/generic/dbg_io.c +++ b/arch/mips/ite-boards/generic/dbg_io.c | |||
@@ -72,7 +72,7 @@ void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | |||
72 | /* disable interrupts */ | 72 | /* disable interrupts */ |
73 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | 73 | UART16550_WRITE(OFS_INTR_ENABLE, 0); |
74 | 74 | ||
75 | /* set up buad rate */ | 75 | /* set up baud rate */ |
76 | { | 76 | { |
77 | uint32 divisor; | 77 | uint32 divisor; |
78 | 78 | ||
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 92b28b674d6f..0facfaf4e950 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c | |||
@@ -272,8 +272,8 @@ void output_sc_defines(void) | |||
272 | text("/* Linux sigcontext offsets. */"); | 272 | text("/* Linux sigcontext offsets. */"); |
273 | offset("#define SC_REGS ", struct sigcontext, sc_regs); | 273 | offset("#define SC_REGS ", struct sigcontext, sc_regs); |
274 | offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs); | 274 | offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs); |
275 | offset("#define SC_MDHI ", struct sigcontext, sc_hi); | 275 | offset("#define SC_MDHI ", struct sigcontext, sc_mdhi); |
276 | offset("#define SC_MDLO ", struct sigcontext, sc_lo); | 276 | offset("#define SC_MDLO ", struct sigcontext, sc_mdlo); |
277 | offset("#define SC_PC ", struct sigcontext, sc_pc); | 277 | offset("#define SC_PC ", struct sigcontext, sc_pc); |
278 | offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr); | 278 | offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr); |
279 | linefeed; | 279 | linefeed; |
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 58b3b14873cb..8c2c359a05f4 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -121,6 +121,7 @@ static inline void check_wait(void) | |||
121 | case CPU_24K: | 121 | case CPU_24K: |
122 | case CPU_25KF: | 122 | case CPU_25KF: |
123 | case CPU_34K: | 123 | case CPU_34K: |
124 | case CPU_74K: | ||
124 | case CPU_PR4450: | 125 | case CPU_PR4450: |
125 | cpu_wait = r4k_wait; | 126 | cpu_wait = r4k_wait; |
126 | printk(" available.\n"); | 127 | printk(" available.\n"); |
@@ -432,6 +433,15 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c) | |||
432 | MIPS_CPU_LLSC; | 433 | MIPS_CPU_LLSC; |
433 | c->tlbsize = 64; | 434 | c->tlbsize = 64; |
434 | break; | 435 | break; |
436 | case PRID_IMP_R14000: | ||
437 | c->cputype = CPU_R14000; | ||
438 | c->isa_level = MIPS_CPU_ISA_IV; | ||
439 | c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX | | ||
440 | MIPS_CPU_FPU | MIPS_CPU_32FPR | | ||
441 | MIPS_CPU_COUNTER | MIPS_CPU_WATCH | | ||
442 | MIPS_CPU_LLSC; | ||
443 | c->tlbsize = 64; | ||
444 | break; | ||
435 | } | 445 | } |
436 | } | 446 | } |
437 | 447 | ||
@@ -593,6 +603,9 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c) | |||
593 | case PRID_IMP_34K: | 603 | case PRID_IMP_34K: |
594 | c->cputype = CPU_34K; | 604 | c->cputype = CPU_34K; |
595 | break; | 605 | break; |
606 | case PRID_IMP_74K: | ||
607 | c->cputype = CPU_74K; | ||
608 | break; | ||
596 | } | 609 | } |
597 | } | 610 | } |
598 | 611 | ||
@@ -642,7 +655,7 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c) | |||
642 | case PRID_IMP_SB1: | 655 | case PRID_IMP_SB1: |
643 | c->cputype = CPU_SB1; | 656 | c->cputype = CPU_SB1; |
644 | /* FPU in pass1 is known to have issues. */ | 657 | /* FPU in pass1 is known to have issues. */ |
645 | if ((c->processor_id & 0xff) < 0x20) | 658 | if ((c->processor_id & 0xff) < 0x02) |
646 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); | 659 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); |
647 | break; | 660 | break; |
648 | case PRID_IMP_SB1A: | 661 | case PRID_IMP_SB1A: |
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index d101d2fb24ca..a9c6de1b9542 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S | |||
@@ -101,7 +101,7 @@ FEXPORT(restore_all) # restore full frame | |||
101 | EMT | 101 | EMT |
102 | 1: | 102 | 1: |
103 | mfc0 v1, CP0_TCSTATUS | 103 | mfc0 v1, CP0_TCSTATUS |
104 | /* We set IXMT above, XOR should cler it here */ | 104 | /* We set IXMT above, XOR should clear it here */ |
105 | xori v1, v1, TCSTATUS_IXMT | 105 | xori v1, v1, TCSTATUS_IXMT |
106 | or v1, v0, v1 | 106 | or v1, v0, v1 |
107 | mtc0 v1, CP0_TCSTATUS | 107 | mtc0 v1, CP0_TCSTATUS |
diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S index 10f28fb9f008..5fd7a8af0c62 100644 --- a/arch/mips/kernel/gdb-low.S +++ b/arch/mips/kernel/gdb-low.S | |||
@@ -54,9 +54,11 @@ | |||
54 | */ | 54 | */ |
55 | mfc0 k0, CP0_CAUSE | 55 | mfc0 k0, CP0_CAUSE |
56 | andi k0, k0, 0x7c | 56 | andi k0, k0, 0x7c |
57 | add k1, k1, k0 | 57 | #ifdef CONFIG_64BIT |
58 | PTR_L k0, saved_vectors(k1) | 58 | dsll k0, k0, 1 |
59 | jr k0 | 59 | #endif |
60 | PTR_L k1, saved_vectors(k0) | ||
61 | jr k1 | ||
60 | nop | 62 | nop |
61 | 1: | 63 | 1: |
62 | move k0, sp | 64 | move k0, sp |
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/proc.c b/arch/mips/kernel/proc.c index 84ab959f924a..9def554f335b 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
@@ -42,6 +42,7 @@ static const char *cpu_name[] = { | |||
42 | [CPU_R8000] = "R8000", | 42 | [CPU_R8000] = "R8000", |
43 | [CPU_R10000] = "R10000", | 43 | [CPU_R10000] = "R10000", |
44 | [CPU_R12000] = "R12000", | 44 | [CPU_R12000] = "R12000", |
45 | [CPU_R14000] = "R14000", | ||
45 | [CPU_R4300] = "R4300", | 46 | [CPU_R4300] = "R4300", |
46 | [CPU_R4650] = "R4650", | 47 | [CPU_R4650] = "R4650", |
47 | [CPU_R4700] = "R4700", | 48 | [CPU_R4700] = "R4700", |
@@ -74,6 +75,7 @@ static const char *cpu_name[] = { | |||
74 | [CPU_24K] = "MIPS 24K", | 75 | [CPU_24K] = "MIPS 24K", |
75 | [CPU_25KF] = "MIPS 25Kf", | 76 | [CPU_25KF] = "MIPS 25Kf", |
76 | [CPU_34K] = "MIPS 34K", | 77 | [CPU_34K] = "MIPS 34K", |
78 | [CPU_74K] = "MIPS 74K", | ||
77 | [CPU_VR4111] = "NEC VR4111", | 79 | [CPU_VR4111] = "NEC VR4111", |
78 | [CPU_VR4121] = "NEC VR4121", | 80 | [CPU_VR4121] = "NEC VR4121", |
79 | [CPU_VR4122] = "NEC VR4122", | 81 | [CPU_VR4122] = "NEC VR4122", |
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/signal-common.h b/arch/mips/kernel/signal-common.h index 3ca786215d48..ce6cb915c0a7 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h | |||
@@ -31,7 +31,6 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
31 | save_gp_reg(31); | 31 | save_gp_reg(31); |
32 | #undef save_gp_reg | 32 | #undef save_gp_reg |
33 | 33 | ||
34 | #ifdef CONFIG_32BIT | ||
35 | err |= __put_user(regs->hi, &sc->sc_mdhi); | 34 | err |= __put_user(regs->hi, &sc->sc_mdhi); |
36 | err |= __put_user(regs->lo, &sc->sc_mdlo); | 35 | err |= __put_user(regs->lo, &sc->sc_mdlo); |
37 | if (cpu_has_dsp) { | 36 | if (cpu_has_dsp) { |
@@ -43,20 +42,6 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
43 | err |= __put_user(mflo3(), &sc->sc_lo3); | 42 | err |= __put_user(mflo3(), &sc->sc_lo3); |
44 | err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); | 43 | err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); |
45 | } | 44 | } |
46 | #endif | ||
47 | #ifdef CONFIG_64BIT | ||
48 | err |= __put_user(regs->hi, &sc->sc_hi[0]); | ||
49 | err |= __put_user(regs->lo, &sc->sc_lo[0]); | ||
50 | if (cpu_has_dsp) { | ||
51 | err |= __put_user(mfhi1(), &sc->sc_hi[1]); | ||
52 | err |= __put_user(mflo1(), &sc->sc_lo[1]); | ||
53 | err |= __put_user(mfhi2(), &sc->sc_hi[2]); | ||
54 | err |= __put_user(mflo2(), &sc->sc_lo[2]); | ||
55 | err |= __put_user(mfhi3(), &sc->sc_hi[3]); | ||
56 | err |= __put_user(mflo3(), &sc->sc_lo[3]); | ||
57 | err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); | ||
58 | } | ||
59 | #endif | ||
60 | 45 | ||
61 | err |= __put_user(!!used_math(), &sc->sc_used_math); | 46 | err |= __put_user(!!used_math(), &sc->sc_used_math); |
62 | 47 | ||
@@ -92,7 +77,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
92 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 77 | current_thread_info()->restart_block.fn = do_no_restart_syscall; |
93 | 78 | ||
94 | err |= __get_user(regs->cp0_epc, &sc->sc_pc); | 79 | err |= __get_user(regs->cp0_epc, &sc->sc_pc); |
95 | #ifdef CONFIG_32BIT | ||
96 | err |= __get_user(regs->hi, &sc->sc_mdhi); | 80 | err |= __get_user(regs->hi, &sc->sc_mdhi); |
97 | err |= __get_user(regs->lo, &sc->sc_mdlo); | 81 | err |= __get_user(regs->lo, &sc->sc_mdlo); |
98 | if (cpu_has_dsp) { | 82 | if (cpu_has_dsp) { |
@@ -104,20 +88,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
104 | err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg); | 88 | err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg); |
105 | err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK); | 89 | err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK); |
106 | } | 90 | } |
107 | #endif | ||
108 | #ifdef CONFIG_64BIT | ||
109 | err |= __get_user(regs->hi, &sc->sc_hi[0]); | ||
110 | err |= __get_user(regs->lo, &sc->sc_lo[0]); | ||
111 | if (cpu_has_dsp) { | ||
112 | err |= __get_user(treg, &sc->sc_hi[1]); mthi1(treg); | ||
113 | err |= __get_user(treg, &sc->sc_lo[1]); mthi1(treg); | ||
114 | err |= __get_user(treg, &sc->sc_hi[2]); mthi2(treg); | ||
115 | err |= __get_user(treg, &sc->sc_lo[2]); mthi2(treg); | ||
116 | err |= __get_user(treg, &sc->sc_hi[3]); mthi3(treg); | ||
117 | err |= __get_user(treg, &sc->sc_lo[3]); mthi3(treg); | ||
118 | err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK); | ||
119 | } | ||
120 | #endif | ||
121 | 91 | ||
122 | #define restore_gp_reg(i) do { \ | 92 | #define restore_gp_reg(i) do { \ |
123 | err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \ | 93 | err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \ |
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 2aeaa2fd4b32..5e8a18a8e2bd 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -276,31 +276,9 @@ 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 SETNAME: { | ||
284 | char nodename[__NEW_UTS_LEN + 1]; | ||
285 | |||
286 | if (!capable(CAP_SYS_ADMIN)) | ||
287 | return -EPERM; | ||
288 | |||
289 | name = (char __user *) arg1; | ||
290 | |||
291 | len = strncpy_from_user(nodename, name, __NEW_UTS_LEN); | ||
292 | if (len < 0) | ||
293 | return -EFAULT; | ||
294 | |||
295 | down_write(&uts_sem); | ||
296 | strncpy(system_utsname.nodename, nodename, len); | ||
297 | nodename[__NEW_UTS_LEN] = '\0'; | ||
298 | strlcpy(system_utsname.nodename, nodename, | ||
299 | sizeof(system_utsname.nodename)); | ||
300 | up_write(&uts_sem); | ||
301 | return 0; | ||
302 | } | ||
303 | |||
304 | case MIPS_ATOMIC_SET: | 282 | case MIPS_ATOMIC_SET: |
305 | printk(KERN_CRIT "How did I get here?\n"); | 283 | printk(KERN_CRIT "How did I get here?\n"); |
306 | return -EINVAL; | 284 | return -EINVAL; |
@@ -313,9 +291,6 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) | |||
313 | case FLUSH_CACHE: | 291 | case FLUSH_CACHE: |
314 | __flush_cache_all(); | 292 | __flush_cache_all(); |
315 | return 0; | 293 | return 0; |
316 | |||
317 | case MIPS_RDNVRAM: | ||
318 | return -EIO; | ||
319 | } | 294 | } |
320 | 295 | ||
321 | return -EINVAL; | 296 | return -EINVAL; |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 4901f0a37fca..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) |
@@ -902,6 +917,7 @@ static inline void parity_protection_init(void) | |||
902 | { | 917 | { |
903 | switch (current_cpu_data.cputype) { | 918 | switch (current_cpu_data.cputype) { |
904 | case CPU_24K: | 919 | case CPU_24K: |
920 | case CPU_34K: | ||
905 | case CPU_5KC: | 921 | case CPU_5KC: |
906 | write_c0_ecc(0x80000000); | 922 | write_c0_ecc(0x80000000); |
907 | back_to_back_c0_hazard(); | 923 | back_to_back_c0_hazard(); |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 14fa00e3cdfa..b84d1f9ce28e 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -151,23 +151,13 @@ SECTIONS | |||
151 | 151 | ||
152 | /* This is the MIPS specific mdebug section. */ | 152 | /* This is the MIPS specific mdebug section. */ |
153 | .mdebug : { *(.mdebug) } | 153 | .mdebug : { *(.mdebug) } |
154 | /* These are needed for ELF backends which have not yet been | 154 | |
155 | converted to the new style linker. */ | 155 | STABS_DEBUG |
156 | .stab 0 : { *(.stab) } | 156 | |
157 | .stabstr 0 : { *(.stabstr) } | 157 | DWARF_DEBUG |
158 | /* DWARF debug sections. | 158 | |
159 | Symbols in the .debug DWARF section are relative to the beginning of the | ||
160 | section so we begin .debug at 0. It's not clear yet what needs to happen | ||
161 | for the others. */ | ||
162 | .debug 0 : { *(.debug) } | ||
163 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | ||
164 | .debug_aranges 0 : { *(.debug_aranges) } | ||
165 | .debug_pubnames 0 : { *(.debug_pubnames) } | ||
166 | .debug_sfnames 0 : { *(.debug_sfnames) } | ||
167 | .line 0 : { *(.line) } | ||
168 | /* These must appear regardless of . */ | 159 | /* These must appear regardless of . */ |
169 | .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } | 160 | .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } |
170 | .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } | 161 | .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } |
171 | .comment : { *(.comment) } | ||
172 | .note : { *(.note) } | 162 | .note : { *(.note) } |
173 | } | 163 | } |
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 4182e1176fae..4a43924cd4fc 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -29,6 +29,27 @@ | |||
29 | #include <asm/war.h> | 29 | #include <asm/war.h> |
30 | #include <asm/cacheflush.h> /* for run_uncached() */ | 30 | #include <asm/cacheflush.h> /* for run_uncached() */ |
31 | 31 | ||
32 | |||
33 | /* | ||
34 | * Special Variant of smp_call_function for use by cache functions: | ||
35 | * | ||
36 | * o No return value | ||
37 | * o collapses to normal function call on UP kernels | ||
38 | * o collapses to normal function call on systems with a single shared | ||
39 | * primary cache. | ||
40 | */ | ||
41 | static inline void r4k_on_each_cpu(void (*func) (void *info), void *info, | ||
42 | int retry, int wait) | ||
43 | { | ||
44 | preempt_disable(); | ||
45 | |||
46 | #if !defined(CONFIG_MIPS_MT_SMP) && !defined(CONFIG_MIPS_MT_SMTC) | ||
47 | smp_call_function(func, info, retry, wait); | ||
48 | #endif | ||
49 | func(info); | ||
50 | preempt_enable(); | ||
51 | } | ||
52 | |||
32 | /* | 53 | /* |
33 | * Must die. | 54 | * Must die. |
34 | */ | 55 | */ |
@@ -299,7 +320,7 @@ static void r4k_flush_cache_all(void) | |||
299 | if (!cpu_has_dc_aliases) | 320 | if (!cpu_has_dc_aliases) |
300 | return; | 321 | return; |
301 | 322 | ||
302 | on_each_cpu(local_r4k_flush_cache_all, NULL, 1, 1); | 323 | r4k_on_each_cpu(local_r4k_flush_cache_all, NULL, 1, 1); |
303 | } | 324 | } |
304 | 325 | ||
305 | static inline void local_r4k___flush_cache_all(void * args) | 326 | static inline void local_r4k___flush_cache_all(void * args) |
@@ -314,13 +335,14 @@ static inline void local_r4k___flush_cache_all(void * args) | |||
314 | case CPU_R4400MC: | 335 | case CPU_R4400MC: |
315 | case CPU_R10000: | 336 | case CPU_R10000: |
316 | case CPU_R12000: | 337 | case CPU_R12000: |
338 | case CPU_R14000: | ||
317 | r4k_blast_scache(); | 339 | r4k_blast_scache(); |
318 | } | 340 | } |
319 | } | 341 | } |
320 | 342 | ||
321 | static void r4k___flush_cache_all(void) | 343 | static void r4k___flush_cache_all(void) |
322 | { | 344 | { |
323 | on_each_cpu(local_r4k___flush_cache_all, NULL, 1, 1); | 345 | r4k_on_each_cpu(local_r4k___flush_cache_all, NULL, 1, 1); |
324 | } | 346 | } |
325 | 347 | ||
326 | static inline void local_r4k_flush_cache_range(void * args) | 348 | static inline void local_r4k_flush_cache_range(void * args) |
@@ -341,7 +363,7 @@ static inline void local_r4k_flush_cache_range(void * args) | |||
341 | static void r4k_flush_cache_range(struct vm_area_struct *vma, | 363 | static void r4k_flush_cache_range(struct vm_area_struct *vma, |
342 | unsigned long start, unsigned long end) | 364 | unsigned long start, unsigned long end) |
343 | { | 365 | { |
344 | on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1); | 366 | r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1); |
345 | } | 367 | } |
346 | 368 | ||
347 | static inline void local_r4k_flush_cache_mm(void * args) | 369 | static inline void local_r4k_flush_cache_mm(void * args) |
@@ -370,7 +392,7 @@ static void r4k_flush_cache_mm(struct mm_struct *mm) | |||
370 | if (!cpu_has_dc_aliases) | 392 | if (!cpu_has_dc_aliases) |
371 | return; | 393 | return; |
372 | 394 | ||
373 | on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1); | 395 | r4k_on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1); |
374 | } | 396 | } |
375 | 397 | ||
376 | struct flush_cache_page_args { | 398 | struct flush_cache_page_args { |
@@ -461,7 +483,7 @@ static void r4k_flush_cache_page(struct vm_area_struct *vma, | |||
461 | args.addr = addr; | 483 | args.addr = addr; |
462 | args.pfn = pfn; | 484 | args.pfn = pfn; |
463 | 485 | ||
464 | on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); | 486 | r4k_on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); |
465 | } | 487 | } |
466 | 488 | ||
467 | static inline void local_r4k_flush_data_cache_page(void * addr) | 489 | static inline void local_r4k_flush_data_cache_page(void * addr) |
@@ -471,7 +493,7 @@ static inline void local_r4k_flush_data_cache_page(void * addr) | |||
471 | 493 | ||
472 | static void r4k_flush_data_cache_page(unsigned long addr) | 494 | static void r4k_flush_data_cache_page(unsigned long addr) |
473 | { | 495 | { |
474 | on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 1, 1); | 496 | r4k_on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 1, 1); |
475 | } | 497 | } |
476 | 498 | ||
477 | struct flush_icache_range_args { | 499 | struct flush_icache_range_args { |
@@ -514,7 +536,7 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end) | |||
514 | args.start = start; | 536 | args.start = start; |
515 | args.end = end; | 537 | args.end = end; |
516 | 538 | ||
517 | on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1); | 539 | r4k_on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1); |
518 | instruction_hazard(); | 540 | instruction_hazard(); |
519 | } | 541 | } |
520 | 542 | ||
@@ -590,7 +612,7 @@ static void r4k_flush_icache_page(struct vm_area_struct *vma, | |||
590 | args.vma = vma; | 612 | args.vma = vma; |
591 | args.page = page; | 613 | args.page = page; |
592 | 614 | ||
593 | on_each_cpu(local_r4k_flush_icache_page, &args, 1, 1); | 615 | r4k_on_each_cpu(local_r4k_flush_icache_page, &args, 1, 1); |
594 | } | 616 | } |
595 | 617 | ||
596 | 618 | ||
@@ -689,7 +711,7 @@ static void local_r4k_flush_cache_sigtramp(void * arg) | |||
689 | 711 | ||
690 | static void r4k_flush_cache_sigtramp(unsigned long addr) | 712 | static void r4k_flush_cache_sigtramp(unsigned long addr) |
691 | { | 713 | { |
692 | on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1, 1); | 714 | r4k_on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1, 1); |
693 | } | 715 | } |
694 | 716 | ||
695 | static void r4k_flush_icache_all(void) | 717 | static void r4k_flush_icache_all(void) |
@@ -812,6 +834,7 @@ static void __init probe_pcache(void) | |||
812 | 834 | ||
813 | case CPU_R10000: | 835 | case CPU_R10000: |
814 | case CPU_R12000: | 836 | case CPU_R12000: |
837 | case CPU_R14000: | ||
815 | icache_size = 1 << (12 + ((config & R10K_CONF_IC) >> 29)); | 838 | icache_size = 1 << (12 + ((config & R10K_CONF_IC) >> 29)); |
816 | c->icache.linesz = 64; | 839 | c->icache.linesz = 64; |
817 | c->icache.ways = 2; | 840 | c->icache.ways = 2; |
@@ -965,9 +988,11 @@ static void __init probe_pcache(void) | |||
965 | c->dcache.flags |= MIPS_CACHE_PINDEX; | 988 | c->dcache.flags |= MIPS_CACHE_PINDEX; |
966 | case CPU_R10000: | 989 | case CPU_R10000: |
967 | case CPU_R12000: | 990 | case CPU_R12000: |
991 | case CPU_R14000: | ||
968 | case CPU_SB1: | 992 | case CPU_SB1: |
969 | break; | 993 | break; |
970 | case CPU_24K: | 994 | case CPU_24K: |
995 | case CPU_34K: | ||
971 | if (!(read_c0_config7() & (1 << 16))) | 996 | if (!(read_c0_config7() & (1 << 16))) |
972 | default: | 997 | default: |
973 | if (c->dcache.waysize > PAGE_SIZE) | 998 | if (c->dcache.waysize > PAGE_SIZE) |
@@ -1091,6 +1116,7 @@ static void __init setup_scache(void) | |||
1091 | 1116 | ||
1092 | case CPU_R10000: | 1117 | case CPU_R10000: |
1093 | case CPU_R12000: | 1118 | case CPU_R12000: |
1119 | case CPU_R14000: | ||
1094 | scache_size = 0x80000 << ((config & R10K_CONF_SS) >> 16); | 1120 | scache_size = 0x80000 << ((config & R10K_CONF_SS) >> 16); |
1095 | c->scache.linesz = 64 << ((config >> 13) & 1); | 1121 | c->scache.linesz = 64 << ((config >> 13) & 1); |
1096 | c->scache.ways = 2; | 1122 | c->scache.ways = 2; |
@@ -1135,6 +1161,31 @@ static void __init setup_scache(void) | |||
1135 | c->options |= MIPS_CPU_SUBSET_CACHES; | 1161 | c->options |= MIPS_CPU_SUBSET_CACHES; |
1136 | } | 1162 | } |
1137 | 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 | |||
1138 | static inline void coherency_setup(void) | 1189 | static inline void coherency_setup(void) |
1139 | { | 1190 | { |
1140 | change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); | 1191 | change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); |
@@ -1155,6 +1206,15 @@ static inline void coherency_setup(void) | |||
1155 | case CPU_R4400MC: | 1206 | case CPU_R4400MC: |
1156 | clear_c0_config(CONF_CU); | 1207 | clear_c0_config(CONF_CU); |
1157 | 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; | ||
1158 | } | 1218 | } |
1159 | } | 1219 | } |
1160 | 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/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c index e4390dc3eb48..b7c749232ffe 100644 --- a/arch/mips/mm/pg-r4k.c +++ b/arch/mips/mm/pg-r4k.c | |||
@@ -357,6 +357,7 @@ void __init build_clear_page(void) | |||
357 | 357 | ||
358 | case CPU_R10000: | 358 | case CPU_R10000: |
359 | case CPU_R12000: | 359 | case CPU_R12000: |
360 | case CPU_R14000: | ||
360 | pref_src_mode = Pref_LoadStreamed; | 361 | pref_src_mode = Pref_LoadStreamed; |
361 | pref_dst_mode = Pref_StoreStreamed; | 362 | pref_dst_mode = Pref_StoreStreamed; |
362 | break; | 363 | break; |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 053dbacac56b..54507be2ab5b 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -875,6 +875,7 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l, | |||
875 | 875 | ||
876 | case CPU_R10000: | 876 | case CPU_R10000: |
877 | case CPU_R12000: | 877 | case CPU_R12000: |
878 | case CPU_R14000: | ||
878 | case CPU_4KC: | 879 | case CPU_4KC: |
879 | case CPU_SB1: | 880 | case CPU_SB1: |
880 | case CPU_SB1A: | 881 | case CPU_SB1A: |
@@ -906,6 +907,7 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l, | |||
906 | case CPU_4KEC: | 907 | case CPU_4KEC: |
907 | case CPU_24K: | 908 | case CPU_24K: |
908 | case CPU_34K: | 909 | case CPU_34K: |
910 | case CPU_74K: | ||
909 | i_ehb(p); | 911 | i_ehb(p); |
910 | tlbw(p); | 912 | tlbw(p); |
911 | break; | 913 | break; |
diff --git a/arch/mips/momentum/jaguar_atx/dbg_io.c b/arch/mips/momentum/jaguar_atx/dbg_io.c index 542eac82b63c..d7dea0a136aa 100644 --- a/arch/mips/momentum/jaguar_atx/dbg_io.c +++ b/arch/mips/momentum/jaguar_atx/dbg_io.c | |||
@@ -73,7 +73,7 @@ void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | |||
73 | /* disable interrupts */ | 73 | /* disable interrupts */ |
74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | 74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); |
75 | 75 | ||
76 | /* set up buad rate */ | 76 | /* set up baud rate */ |
77 | { | 77 | { |
78 | uint32 divisor; | 78 | uint32 divisor; |
79 | 79 | ||
diff --git a/arch/mips/momentum/ocelot_c/dbg_io.c b/arch/mips/momentum/ocelot_c/dbg_io.c index 8720bccfdea2..f0a6a38fcf4d 100644 --- a/arch/mips/momentum/ocelot_c/dbg_io.c +++ b/arch/mips/momentum/ocelot_c/dbg_io.c | |||
@@ -73,7 +73,7 @@ void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | |||
73 | /* disable interrupts */ | 73 | /* disable interrupts */ |
74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | 74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); |
75 | 75 | ||
76 | /* set up buad rate */ | 76 | /* set up baud rate */ |
77 | { | 77 | { |
78 | uint32 divisor; | 78 | uint32 divisor; |
79 | 79 | ||
diff --git a/arch/mips/momentum/ocelot_g/dbg_io.c b/arch/mips/momentum/ocelot_g/dbg_io.c index 8720bccfdea2..f0a6a38fcf4d 100644 --- a/arch/mips/momentum/ocelot_g/dbg_io.c +++ b/arch/mips/momentum/ocelot_g/dbg_io.c | |||
@@ -73,7 +73,7 @@ void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | |||
73 | /* disable interrupts */ | 73 | /* disable interrupts */ |
74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | 74 | UART16550_WRITE(OFS_INTR_ENABLE, 0); |
75 | 75 | ||
76 | /* set up buad rate */ | 76 | /* set up baud rate */ |
77 | { | 77 | { |
78 | uint32 divisor; | 78 | uint32 divisor; |
79 | 79 | ||
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index f2b4862aaae5..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 | ||
@@ -80,13 +80,14 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
80 | case CPU_24K: | 80 | case CPU_24K: |
81 | case CPU_25KF: | 81 | case CPU_25KF: |
82 | case CPU_34K: | 82 | case CPU_34K: |
83 | case CPU_74K: | ||
83 | case CPU_SB1: | 84 | case CPU_SB1: |
84 | case CPU_SB1A: | 85 | case CPU_SB1A: |
85 | lmodel = &op_model_mipsxx; | 86 | lmodel = &op_model_mipsxx_ops; |
86 | break; | 87 | break; |
87 | 88 | ||
88 | case CPU_RM9000: | 89 | case CPU_RM9000: |
89 | lmodel = &op_model_rm9000; | 90 | lmodel = &op_model_rm9000_ops; |
90 | break; | 91 | break; |
91 | }; | 92 | }; |
92 | 93 | ||
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index 95d488ca0754..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,33 +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; | ||
208 | |||
209 | case CPU_74K: | ||
210 | op_model_mipsxx_ops.cpu_type = "mips/74K"; | ||
207 | break; | 211 | break; |
208 | #endif | 212 | #endif |
209 | 213 | ||
210 | case CPU_5KC: | 214 | case CPU_5KC: |
211 | op_model_mipsxx.cpu_type = "mips/5K"; | 215 | op_model_mipsxx_ops.cpu_type = "mips/5K"; |
212 | break; | 216 | break; |
213 | 217 | ||
214 | case CPU_SB1: | 218 | case CPU_SB1: |
215 | case CPU_SB1A: | 219 | case CPU_SB1A: |
216 | op_model_mipsxx.cpu_type = "mips/sb1"; | 220 | op_model_mipsxx_ops.cpu_type = "mips/sb1"; |
217 | break; | 221 | break; |
218 | 222 | ||
219 | default: | 223 | default: |
@@ -229,12 +233,12 @@ static int __init mipsxx_init(void) | |||
229 | 233 | ||
230 | static void mipsxx_exit(void) | 234 | static void mipsxx_exit(void) |
231 | { | 235 | { |
232 | reset_counters(op_model_mipsxx.num_counters); | 236 | reset_counters(op_model_mipsxx_ops.num_counters); |
233 | 237 | ||
234 | perf_irq = null_perf_irq; | 238 | perf_irq = null_perf_irq; |
235 | } | 239 | } |
236 | 240 | ||
237 | struct op_mips_model op_model_mipsxx = { | 241 | struct op_mips_model op_model_mipsxx_ops = { |
238 | .reg_setup = mipsxx_reg_setup, | 242 | .reg_setup = mipsxx_reg_setup, |
239 | .cpu_setup = mipsxx_cpu_setup, | 243 | .cpu_setup = mipsxx_cpu_setup, |
240 | .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/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 2d80653aa2af..41e9ab40cd54 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2057,10 +2057,45 @@ static void __init flatten_device_tree(void) | |||
2057 | 2057 | ||
2058 | } | 2058 | } |
2059 | 2059 | ||
2060 | 2060 | #ifdef CONFIG_PPC_MAPLE | |
2061 | static void __init fixup_device_tree(void) | 2061 | /* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property. |
2062 | * The values are bad, and it doesn't even have the right number of cells. */ | ||
2063 | static void __init fixup_device_tree_maple(void) | ||
2062 | { | 2064 | { |
2065 | phandle isa; | ||
2066 | u32 isa_ranges[6]; | ||
2067 | |||
2068 | isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4")); | ||
2069 | if (!PHANDLE_VALID(isa)) | ||
2070 | return; | ||
2071 | |||
2072 | if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges)) | ||
2073 | == PROM_ERROR) | ||
2074 | return; | ||
2075 | |||
2076 | if (isa_ranges[0] != 0x1 || | ||
2077 | isa_ranges[1] != 0xf4000000 || | ||
2078 | isa_ranges[2] != 0x00010000) | ||
2079 | return; | ||
2080 | |||
2081 | prom_printf("fixing up bogus ISA range on Maple...\n"); | ||
2082 | |||
2083 | isa_ranges[0] = 0x1; | ||
2084 | isa_ranges[1] = 0x0; | ||
2085 | isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */ | ||
2086 | isa_ranges[3] = 0x0; | ||
2087 | isa_ranges[4] = 0x0; | ||
2088 | isa_ranges[5] = 0x00010000; | ||
2089 | prom_setprop(isa, "/ht@0/isa@4", "ranges", | ||
2090 | isa_ranges, sizeof(isa_ranges)); | ||
2091 | } | ||
2092 | #else | ||
2093 | #define fixup_device_tree_maple() | ||
2094 | #endif | ||
2095 | |||
2063 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) | 2096 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) |
2097 | static void __init fixup_device_tree_pmac(void) | ||
2098 | { | ||
2064 | phandle u3, i2c, mpic; | 2099 | phandle u3, i2c, mpic; |
2065 | u32 u3_rev; | 2100 | u32 u3_rev; |
2066 | u32 interrupts[2]; | 2101 | u32 interrupts[2]; |
@@ -2097,9 +2132,16 @@ static void __init fixup_device_tree(void) | |||
2097 | parent = (u32)mpic; | 2132 | parent = (u32)mpic; |
2098 | prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", | 2133 | prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", |
2099 | &parent, sizeof(parent)); | 2134 | &parent, sizeof(parent)); |
2100 | #endif | ||
2101 | } | 2135 | } |
2136 | #else | ||
2137 | #define fixup_device_tree_pmac() | ||
2138 | #endif | ||
2102 | 2139 | ||
2140 | static void __init fixup_device_tree(void) | ||
2141 | { | ||
2142 | fixup_device_tree_maple(); | ||
2143 | fixup_device_tree_pmac(); | ||
2144 | } | ||
2103 | 2145 | ||
2104 | static void __init prom_find_boot_cpu(void) | 2146 | static void __init prom_find_boot_cpu(void) |
2105 | { | 2147 | { |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index df2343e1956b..c896ce83d412 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -1157,6 +1157,7 @@ EXPORT_SYMBOL_GPL(pmac_i2c_xfer); | |||
1157 | /* some quirks for platform function decoding */ | 1157 | /* some quirks for platform function decoding */ |
1158 | enum { | 1158 | enum { |
1159 | pmac_i2c_quirk_invmask = 0x00000001u, | 1159 | pmac_i2c_quirk_invmask = 0x00000001u, |
1160 | pmac_i2c_quirk_skip = 0x00000002u, | ||
1160 | }; | 1161 | }; |
1161 | 1162 | ||
1162 | static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | 1163 | static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, |
@@ -1172,6 +1173,15 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | |||
1172 | /* XXX Study device-tree's & apple drivers are get the quirks | 1173 | /* XXX Study device-tree's & apple drivers are get the quirks |
1173 | * right ! | 1174 | * right ! |
1174 | */ | 1175 | */ |
1176 | /* Workaround: It seems that running the clockspreading | ||
1177 | * properties on the eMac will cause lockups during boot. | ||
1178 | * The machine seems to work fine without that. So for now, | ||
1179 | * let's make sure i2c-hwclock doesn't match about "imic" | ||
1180 | * clocks and we'll figure out if we really need to do | ||
1181 | * something special about those later. | ||
1182 | */ | ||
1183 | { "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip }, | ||
1184 | { "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip }, | ||
1175 | { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, | 1185 | { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, |
1176 | { "i2c-cpu-voltage", NULL, 0}, | 1186 | { "i2c-cpu-voltage", NULL, 0}, |
1177 | { "temp-monitor", NULL, 0 }, | 1187 | { "temp-monitor", NULL, 0 }, |
@@ -1198,6 +1208,8 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | |||
1198 | if (p->compatible && | 1208 | if (p->compatible && |
1199 | !device_is_compatible(np, p->compatible)) | 1209 | !device_is_compatible(np, p->compatible)) |
1200 | continue; | 1210 | continue; |
1211 | if (p->quirks & pmac_i2c_quirk_skip) | ||
1212 | break; | ||
1201 | callback(np, p->quirks); | 1213 | callback(np, p->quirks); |
1202 | break; | 1214 | break; |
1203 | } | 1215 | } |
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/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 4d15e396655c..b9200fb07815 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -463,11 +463,23 @@ static int pmac_pm_finish(suspend_state_t state) | |||
463 | return 0; | 463 | return 0; |
464 | } | 464 | } |
465 | 465 | ||
466 | static int pmac_pm_valid(suspend_state_t state) | ||
467 | { | ||
468 | switch (state) { | ||
469 | case PM_SUSPEND_DISK: | ||
470 | return 1; | ||
471 | /* can't do any other states via generic mechanism yet */ | ||
472 | default: | ||
473 | return 0; | ||
474 | } | ||
475 | } | ||
476 | |||
466 | static struct pm_ops pmac_pm_ops = { | 477 | static struct pm_ops pmac_pm_ops = { |
467 | .pm_disk_mode = PM_DISK_SHUTDOWN, | 478 | .pm_disk_mode = PM_DISK_SHUTDOWN, |
468 | .prepare = pmac_pm_prepare, | 479 | .prepare = pmac_pm_prepare, |
469 | .enter = pmac_pm_enter, | 480 | .enter = pmac_pm_enter, |
470 | .finish = pmac_pm_finish, | 481 | .finish = pmac_pm_finish, |
482 | .valid = pmac_pm_valid, | ||
471 | }; | 483 | }; |
472 | 484 | ||
473 | #endif /* CONFIG_SOFTWARE_SUSPEND */ | 485 | #endif /* CONFIG_SOFTWARE_SUSPEND */ |
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c index cc7c4aea9397..2f5c5e157617 100644 --- a/arch/ppc/kernel/asm-offsets.c +++ b/arch/ppc/kernel/asm-offsets.c | |||
@@ -134,7 +134,7 @@ main(void) | |||
134 | DEFINE(TI_TASK, offsetof(struct thread_info, task)); | 134 | DEFINE(TI_TASK, offsetof(struct thread_info, task)); |
135 | DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain)); | 135 | DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain)); |
136 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); | 136 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); |
137 | DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, flags)); | 137 | DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); |
138 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); | 138 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); |
139 | DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); | 139 | DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); |
140 | 140 | ||
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c index e62b75707f7a..abb7154de2c7 100644 --- a/arch/ppc/platforms/mpc8272ads_setup.c +++ b/arch/ppc/platforms/mpc8272ads_setup.c | |||
@@ -279,11 +279,11 @@ static int mpc8272ads_platform_notify(struct device *dev) | |||
279 | static const struct platform_notify_dev_map dev_map[] = { | 279 | static const struct platform_notify_dev_map dev_map[] = { |
280 | { | 280 | { |
281 | .bus_id = "fsl-cpm-fcc", | 281 | .bus_id = "fsl-cpm-fcc", |
282 | .rtn = mpc8272ads_fixup_enet_pdata | 282 | .rtn = mpc8272ads_fixup_enet_pdata, |
283 | }, | 283 | }, |
284 | { | 284 | { |
285 | .bus_id = "fsl-cpm-scc:uart", | 285 | .bus_id = "fsl-cpm-scc:uart", |
286 | .rtn = mpc | 286 | .rtn = mpc8272ads_fixup_uart_pdata, |
287 | }, | 287 | }, |
288 | { | 288 | { |
289 | .bus_id = NULL | 289 | .bus_id = NULL |
@@ -335,15 +335,15 @@ struct platform_device* early_uart_get_pdev(int index) | |||
335 | struct platform_device* pdev = NULL; | 335 | struct platform_device* pdev = NULL; |
336 | if(index) { /*assume SCC4 here*/ | 336 | if(index) { /*assume SCC4 here*/ |
337 | pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC4]; | 337 | pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC4]; |
338 | pinfo = &mpc8272<F12>_uart_pdata[1]; | 338 | pinfo = &mpc8272_uart_pdata[fsid_scc4_uart]; |
339 | } else { /*over SCC1*/ | 339 | } else { /*over SCC1*/ |
340 | pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC1]; | 340 | pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC1]; |
341 | pinfo = &mpc8272_uart_pdata[0]; | 341 | pinfo = &mpc8272_uart_pdata[fsid_scc1_uart]; |
342 | } | 342 | } |
343 | 343 | ||
344 | pinfo->uart_clk = bd->bi_intfreq; | 344 | pinfo->uart_clk = bd->bi_intfreq; |
345 | pdev->dev.platform_data = pinfo; | 345 | pdev->dev.platform_data = pinfo; |
346 | ppc_sys_fixup_mem_resource(pdev, IMAP_ADDR); | 346 | ppc_sys_fixup_mem_resource(pdev, CPM_MAP_ADDR); |
347 | return NULL; | 347 | return NULL; |
348 | } | 348 | } |
349 | 349 | ||
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c index 0636aed7b827..8692d00c08c4 100644 --- a/arch/ppc/syslib/pq2_devices.c +++ b/arch/ppc/syslib/pq2_devices.c | |||
@@ -121,13 +121,13 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
121 | .num_resources = 3, | 121 | .num_resources = 3, |
122 | .resource = (struct resource[]) { | 122 | .resource = (struct resource[]) { |
123 | { | 123 | { |
124 | .name = "scc_mem", | 124 | .name = "regs", |
125 | .start = 0x11A00, | 125 | .start = 0x11A00, |
126 | .end = 0x11A1F, | 126 | .end = 0x11A1F, |
127 | .flags = IORESOURCE_MEM, | 127 | .flags = IORESOURCE_MEM, |
128 | }, | 128 | }, |
129 | { | 129 | { |
130 | .name = "scc_pram", | 130 | .name = "pram", |
131 | .start = 0x8000, | 131 | .start = 0x8000, |
132 | .end = 0x80ff, | 132 | .end = 0x80ff, |
133 | .flags = IORESOURCE_MEM, | 133 | .flags = IORESOURCE_MEM, |
@@ -145,13 +145,13 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
145 | .num_resources = 3, | 145 | .num_resources = 3, |
146 | .resource = (struct resource[]) { | 146 | .resource = (struct resource[]) { |
147 | { | 147 | { |
148 | .name = "scc_mem", | 148 | .name = "regs", |
149 | .start = 0x11A20, | 149 | .start = 0x11A20, |
150 | .end = 0x11A3F, | 150 | .end = 0x11A3F, |
151 | .flags = IORESOURCE_MEM, | 151 | .flags = IORESOURCE_MEM, |
152 | }, | 152 | }, |
153 | { | 153 | { |
154 | .name = "scc_pram", | 154 | .name = "pram", |
155 | .start = 0x8100, | 155 | .start = 0x8100, |
156 | .end = 0x81ff, | 156 | .end = 0x81ff, |
157 | .flags = IORESOURCE_MEM, | 157 | .flags = IORESOURCE_MEM, |
@@ -169,13 +169,13 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
169 | .num_resources = 3, | 169 | .num_resources = 3, |
170 | .resource = (struct resource[]) { | 170 | .resource = (struct resource[]) { |
171 | { | 171 | { |
172 | .name = "scc_mem", | 172 | .name = "regs", |
173 | .start = 0x11A40, | 173 | .start = 0x11A40, |
174 | .end = 0x11A5F, | 174 | .end = 0x11A5F, |
175 | .flags = IORESOURCE_MEM, | 175 | .flags = IORESOURCE_MEM, |
176 | }, | 176 | }, |
177 | { | 177 | { |
178 | .name = "scc_pram", | 178 | .name = "pram", |
179 | .start = 0x8200, | 179 | .start = 0x8200, |
180 | .end = 0x82ff, | 180 | .end = 0x82ff, |
181 | .flags = IORESOURCE_MEM, | 181 | .flags = IORESOURCE_MEM, |
@@ -193,13 +193,13 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
193 | .num_resources = 3, | 193 | .num_resources = 3, |
194 | .resource = (struct resource[]) { | 194 | .resource = (struct resource[]) { |
195 | { | 195 | { |
196 | .name = "scc_mem", | 196 | .name = "regs", |
197 | .start = 0x11A60, | 197 | .start = 0x11A60, |
198 | .end = 0x11A7F, | 198 | .end = 0x11A7F, |
199 | .flags = IORESOURCE_MEM, | 199 | .flags = IORESOURCE_MEM, |
200 | }, | 200 | }, |
201 | { | 201 | { |
202 | .name = "scc_pram", | 202 | .name = "pram", |
203 | .start = 0x8300, | 203 | .start = 0x8300, |
204 | .end = 0x83ff, | 204 | .end = 0x83ff, |
205 | .flags = IORESOURCE_MEM, | 205 | .flags = IORESOURCE_MEM, |
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index 433b0fa203e1..fee8948162b9 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -139,13 +139,13 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
139 | .ppc_sys_name = "8272", | 139 | .ppc_sys_name = "8272", |
140 | .mask = 0x0000ff00, | 140 | .mask = 0x0000ff00, |
141 | .value = 0x00000c00, | 141 | .value = 0x00000c00, |
142 | .num_devices = 11, | 142 | .num_devices = 12, |
143 | .device_list = (enum ppc_sys_devices[]) | 143 | .device_list = (enum ppc_sys_devices[]) |
144 | { | 144 | { |
145 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | 145 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, |
146 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, | 146 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4, |
147 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | 147 | MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, |
148 | MPC82xx_CPM_USB, MPC82xx_SEC1, | 148 | MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1, |
149 | }, | 149 | }, |
150 | }, | 150 | }, |
151 | /* below is a list of the 8280 family of processors */ | 151 | /* below is a list of the 8280 family of processors */ |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index ce19ad4e92ec..2a6c6efb6865 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -272,7 +272,7 @@ static inline void stop_hz_timer(void) | |||
272 | next = next_timer_interrupt(); | 272 | next = next_timer_interrupt(); |
273 | do { | 273 | do { |
274 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | 274 | seq = read_seqbegin_irqsave(&xtime_lock, flags); |
275 | timer = (__u64 next) - (__u64 jiffies) + jiffies_64; | 275 | timer = ((__u64) next) - ((__u64) jiffies) + jiffies_64; |
276 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | 276 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |
277 | todval = -1ULL; | 277 | todval = -1ULL; |
278 | /* Be careful about overflows. */ | 278 | /* Be careful about overflows. */ |
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index 3eadac5e171e..31c5892f5acc 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/version.h> | 11 | #include <linux/version.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/threads.h> | ||
13 | #include <asm/thread_info.h> | 14 | #include <asm/thread_info.h> |
14 | #include <asm/asi.h> | 15 | #include <asm/asi.h> |
15 | #include <asm/pstate.h> | 16 | #include <asm/pstate.h> |
@@ -493,6 +494,35 @@ tlb_fixup_done: | |||
493 | call prom_init | 494 | call prom_init |
494 | mov %l7, %o0 ! OpenPROM cif handler | 495 | mov %l7, %o0 ! OpenPROM cif handler |
495 | 496 | ||
497 | /* Initialize current_thread_info()->cpu as early as possible. | ||
498 | * In order to do that accurately we have to patch up the get_cpuid() | ||
499 | * assembler sequences. And that, in turn, requires that we know | ||
500 | * if we are on a Starfire box or not. While we're here, patch up | ||
501 | * the sun4v sequences as well. | ||
502 | */ | ||
503 | call check_if_starfire | ||
504 | nop | ||
505 | call per_cpu_patch | ||
506 | nop | ||
507 | call sun4v_patch | ||
508 | nop | ||
509 | |||
510 | #ifdef CONFIG_SMP | ||
511 | call hard_smp_processor_id | ||
512 | nop | ||
513 | cmp %o0, NR_CPUS | ||
514 | blu,pt %xcc, 1f | ||
515 | nop | ||
516 | call boot_cpu_id_too_large | ||
517 | nop | ||
518 | /* Not reached... */ | ||
519 | |||
520 | 1: | ||
521 | #else | ||
522 | mov 0, %o0 | ||
523 | #endif | ||
524 | stb %o0, [%g6 + TI_CPU] | ||
525 | |||
496 | /* Off we go.... */ | 526 | /* Off we go.... */ |
497 | call start_kernel | 527 | call start_kernel |
498 | nop | 528 | nop |
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 005167f82419..9cf1c88cd774 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -220,7 +220,7 @@ char reboot_command[COMMAND_LINE_SIZE]; | |||
220 | 220 | ||
221 | static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 }; | 221 | static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 }; |
222 | 222 | ||
223 | static void __init per_cpu_patch(void) | 223 | void __init per_cpu_patch(void) |
224 | { | 224 | { |
225 | struct cpuid_patch_entry *p; | 225 | struct cpuid_patch_entry *p; |
226 | unsigned long ver; | 226 | unsigned long ver; |
@@ -280,7 +280,7 @@ static void __init per_cpu_patch(void) | |||
280 | } | 280 | } |
281 | } | 281 | } |
282 | 282 | ||
283 | static void __init sun4v_patch(void) | 283 | void __init sun4v_patch(void) |
284 | { | 284 | { |
285 | struct sun4v_1insn_patch_entry *p1; | 285 | struct sun4v_1insn_patch_entry *p1; |
286 | struct sun4v_2insn_patch_entry *p2; | 286 | struct sun4v_2insn_patch_entry *p2; |
@@ -315,6 +315,15 @@ static void __init sun4v_patch(void) | |||
315 | } | 315 | } |
316 | } | 316 | } |
317 | 317 | ||
318 | #ifdef CONFIG_SMP | ||
319 | void __init boot_cpu_id_too_large(int cpu) | ||
320 | { | ||
321 | prom_printf("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n", | ||
322 | cpu, NR_CPUS); | ||
323 | prom_halt(); | ||
324 | } | ||
325 | #endif | ||
326 | |||
318 | void __init setup_arch(char **cmdline_p) | 327 | void __init setup_arch(char **cmdline_p) |
319 | { | 328 | { |
320 | /* Initialize PROM console and command line. */ | 329 | /* Initialize PROM console and command line. */ |
@@ -332,16 +341,6 @@ void __init setup_arch(char **cmdline_p) | |||
332 | conswitchp = &prom_con; | 341 | conswitchp = &prom_con; |
333 | #endif | 342 | #endif |
334 | 343 | ||
335 | /* Work out if we are starfire early on */ | ||
336 | check_if_starfire(); | ||
337 | |||
338 | /* Now we know enough to patch the get_cpuid sequences | ||
339 | * used by trap code. | ||
340 | */ | ||
341 | per_cpu_patch(); | ||
342 | |||
343 | sun4v_patch(); | ||
344 | |||
345 | boot_flags_init(*cmdline_p); | 344 | boot_flags_init(*cmdline_p); |
346 | 345 | ||
347 | idprom_init(); | 346 | idprom_init(); |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 90eaca3ec9a6..4e8cd79156e0 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -1264,7 +1264,6 @@ void __init smp_tick_init(void) | |||
1264 | boot_cpu_id = hard_smp_processor_id(); | 1264 | boot_cpu_id = hard_smp_processor_id(); |
1265 | current_tick_offset = timer_tick_offset; | 1265 | current_tick_offset = timer_tick_offset; |
1266 | 1266 | ||
1267 | cpu_set(boot_cpu_id, cpu_online_map); | ||
1268 | prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1; | 1267 | prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1; |
1269 | } | 1268 | } |
1270 | 1269 | ||
@@ -1345,18 +1344,6 @@ void __init smp_setup_cpu_possible_map(void) | |||
1345 | 1344 | ||
1346 | void __devinit smp_prepare_boot_cpu(void) | 1345 | void __devinit smp_prepare_boot_cpu(void) |
1347 | { | 1346 | { |
1348 | int cpu = hard_smp_processor_id(); | ||
1349 | |||
1350 | if (cpu >= NR_CPUS) { | ||
1351 | prom_printf("Serious problem, boot cpu id >= NR_CPUS\n"); | ||
1352 | prom_halt(); | ||
1353 | } | ||
1354 | |||
1355 | current_thread_info()->cpu = cpu; | ||
1356 | __local_per_cpu_offset = __per_cpu_offset(cpu); | ||
1357 | |||
1358 | cpu_set(smp_processor_id(), cpu_online_map); | ||
1359 | cpu_set(smp_processor_id(), phys_cpu_present_map); | ||
1360 | } | 1347 | } |
1361 | 1348 | ||
1362 | int __devinit __cpu_up(unsigned int cpu) | 1349 | int __devinit __cpu_up(unsigned int cpu) |
@@ -1433,4 +1420,7 @@ void __init setup_per_cpu_areas(void) | |||
1433 | 1420 | ||
1434 | for (i = 0; i < NR_CPUS; i++, ptr += size) | 1421 | for (i = 0; i < NR_CPUS; i++, ptr += size) |
1435 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); | 1422 | memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); |
1423 | |||
1424 | /* Setup %g5 for the boot cpu. */ | ||
1425 | __local_per_cpu_offset = __per_cpu_offset(smp_processor_id()); | ||
1436 | } | 1426 | } |
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/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index e776139afb20..926c4743d13b 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -339,7 +339,7 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, | |||
339 | struct mm_struct *mm = current->mm; | 339 | struct mm_struct *mm = current->mm; |
340 | int i, ret; | 340 | int i, ret; |
341 | 341 | ||
342 | stack_base = IA32_STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE; | 342 | stack_base = stack_top - MAX_ARG_PAGES * PAGE_SIZE; |
343 | mm->arg_start = bprm->p + stack_base; | 343 | mm->arg_start = bprm->p + stack_base; |
344 | 344 | ||
345 | bprm->p += stack_base; | 345 | bprm->p += stack_base; |
@@ -357,7 +357,7 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, | |||
357 | { | 357 | { |
358 | mpnt->vm_mm = mm; | 358 | mpnt->vm_mm = mm; |
359 | mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; | 359 | mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; |
360 | mpnt->vm_end = IA32_STACK_TOP; | 360 | mpnt->vm_end = stack_top; |
361 | if (executable_stack == EXSTACK_ENABLE_X) | 361 | if (executable_stack == EXSTACK_ENABLE_X) |
362 | mpnt->vm_flags = VM_STACK_FLAGS | VM_EXEC; | 362 | mpnt->vm_flags = VM_STACK_FLAGS | VM_EXEC; |
363 | else if (executable_stack == EXSTACK_DISABLE_X) | 363 | else if (executable_stack == EXSTACK_DISABLE_X) |
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 222b5b46d2b2..1ef6028f721e 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -149,7 +149,7 @@ unsigned long __init find_e820_area(unsigned long start, unsigned long end, unsi | |||
149 | addr = start; | 149 | addr = start; |
150 | if (addr > ei->addr + ei->size) | 150 | if (addr > ei->addr + ei->size) |
151 | continue; | 151 | continue; |
152 | while (bad_addr(&addr, size) && addr+size < ei->addr + ei->size) | 152 | while (bad_addr(&addr, size) && addr+size <= ei->addr+ei->size) |
153 | ; | 153 | ; |
154 | last = addr + size; | 154 | last = addr + size; |
155 | if (last > ei->addr + ei->size) | 155 | if (last > ei->addr + ei->size) |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index c946e4fe67a7..586b34c00c48 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -281,12 +281,7 @@ tracesys: | |||
281 | ja 1f | 281 | ja 1f |
282 | movq %r10,%rcx /* fixup for C */ | 282 | movq %r10,%rcx /* fixup for C */ |
283 | call *sys_call_table(,%rax,8) | 283 | call *sys_call_table(,%rax,8) |
284 | movq %rax,RAX-ARGOFFSET(%rsp) | 284 | 1: movq %rax,RAX-ARGOFFSET(%rsp) |
285 | 1: SAVE_REST | ||
286 | movq %rsp,%rdi | ||
287 | call syscall_trace_leave | ||
288 | RESTORE_TOP_OF_STACK %rbx | ||
289 | RESTORE_REST | ||
290 | /* Use IRET because user could have changed frame */ | 285 | /* Use IRET because user could have changed frame */ |
291 | jmp int_ret_from_sys_call | 286 | jmp int_ret_from_sys_call |
292 | CFI_ENDPROC | 287 | CFI_ENDPROC |
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index af035ede70cd..a9275c9557cf 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c | |||
@@ -54,6 +54,10 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) | |||
54 | else | 54 | else |
55 | #endif | 55 | #endif |
56 | node = numa_node_id(); | 56 | node = numa_node_id(); |
57 | |||
58 | if (node < first_node(node_online_map)) | ||
59 | node = first_node(node_online_map); | ||
60 | |||
57 | page = alloc_pages_node(node, gfp, order); | 61 | page = alloc_pages_node(node, gfp, order); |
58 | return page ? page_address(page) : NULL; | 62 | return page ? page_address(page) : NULL; |
59 | } | 63 | } |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 2480d3f08a47..82a7c9bfdfa0 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -631,10 +631,8 @@ static int __init pci_iommu_init(void) | |||
631 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); | 631 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); |
632 | if (end_pfn > MAX_DMA32_PFN) { | 632 | if (end_pfn > MAX_DMA32_PFN) { |
633 | printk(KERN_ERR "WARNING more than 4GB of memory " | 633 | printk(KERN_ERR "WARNING more than 4GB of memory " |
634 | "but IOMMU not compiled in.\n" | 634 | "but IOMMU not available.\n" |
635 | KERN_ERR "WARNING 32bit PCI may malfunction.\n" | 635 | KERN_ERR "WARNING 32bit PCI may malfunction.\n"); |
636 | KERN_ERR "You might want to enable " | ||
637 | "CONFIG_GART_IOMMU\n"); | ||
638 | } | 636 | } |
639 | return -1; | 637 | return -1; |
640 | } | 638 | } |
diff --git a/arch/x86_64/kernel/pmtimer.c b/arch/x86_64/kernel/pmtimer.c index b0444a415bd6..bf421ed26808 100644 --- a/arch/x86_64/kernel/pmtimer.c +++ b/arch/x86_64/kernel/pmtimer.c | |||
@@ -68,7 +68,7 @@ int pmtimer_mark_offset(void) | |||
68 | offset_delay = delta % (USEC_PER_SEC / HZ); | 68 | offset_delay = delta % (USEC_PER_SEC / HZ); |
69 | 69 | ||
70 | rdtscll(tsc); | 70 | rdtscll(tsc); |
71 | vxtime.last_tsc = tsc - offset_delay * cpu_khz; | 71 | vxtime.last_tsc = tsc - offset_delay * (u64)cpu_khz / 1000; |
72 | 72 | ||
73 | /* don't calculate delay for first run, | 73 | /* don't calculate delay for first run, |
74 | or if we've got less then a tick */ | 74 | or if we've got less then a tick */ |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index f0870bef24d1..655b9192eeb3 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -1051,7 +1051,7 @@ static void srat_detect_node(void) | |||
1051 | for now. */ | 1051 | for now. */ |
1052 | node = apicid_to_node[hard_smp_processor_id()]; | 1052 | node = apicid_to_node[hard_smp_processor_id()]; |
1053 | if (node == NUMA_NO_NODE) | 1053 | if (node == NUMA_NO_NODE) |
1054 | node = 0; | 1054 | node = first_node(node_online_map); |
1055 | numa_set_node(cpu, node); | 1055 | numa_set_node(cpu, node); |
1056 | 1056 | ||
1057 | if (acpi_numa > 0) | 1057 | if (acpi_numa > 0) |
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index e1513532df29..474df22c6ed2 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c | |||
@@ -399,8 +399,10 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
399 | /* First clean up the node list */ | 399 | /* First clean up the node list */ |
400 | for (i = 0; i < MAX_NUMNODES; i++) { | 400 | for (i = 0; i < MAX_NUMNODES; i++) { |
401 | cutoff_node(i, start, end); | 401 | cutoff_node(i, start, end); |
402 | if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) | 402 | if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) { |
403 | unparse_node(i); | 403 | unparse_node(i); |
404 | node_set_offline(i); | ||
405 | } | ||
404 | } | 406 | } |
405 | 407 | ||
406 | if (acpi_numa <= 0) | 408 | if (acpi_numa <= 0) |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 2540dfaa3e38..8e9d84825e1c 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -33,7 +33,7 @@ static int cfq_slice_idle = HZ / 70; | |||
33 | 33 | ||
34 | #define CFQ_KEY_ASYNC (0) | 34 | #define CFQ_KEY_ASYNC (0) |
35 | 35 | ||
36 | static DEFINE_RWLOCK(cfq_exit_lock); | 36 | static DEFINE_SPINLOCK(cfq_exit_lock); |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * for the hash of cfqq inside the cfqd | 39 | * for the hash of cfqq inside the cfqd |
@@ -133,6 +133,7 @@ struct cfq_data { | |||
133 | mempool_t *crq_pool; | 133 | mempool_t *crq_pool; |
134 | 134 | ||
135 | int rq_in_driver; | 135 | int rq_in_driver; |
136 | int hw_tag; | ||
136 | 137 | ||
137 | /* | 138 | /* |
138 | * schedule slice state info | 139 | * schedule slice state info |
@@ -500,10 +501,13 @@ static void cfq_resort_rr_list(struct cfq_queue *cfqq, int preempted) | |||
500 | 501 | ||
501 | /* | 502 | /* |
502 | * if queue was preempted, just add to front to be fair. busy_rr | 503 | * if queue was preempted, just add to front to be fair. busy_rr |
503 | * isn't sorted. | 504 | * isn't sorted, but insert at the back for fairness. |
504 | */ | 505 | */ |
505 | if (preempted || list == &cfqd->busy_rr) { | 506 | if (preempted || list == &cfqd->busy_rr) { |
506 | list_add(&cfqq->cfq_list, list); | 507 | if (preempted) |
508 | list = list->prev; | ||
509 | |||
510 | list_add_tail(&cfqq->cfq_list, list); | ||
507 | return; | 511 | return; |
508 | } | 512 | } |
509 | 513 | ||
@@ -664,6 +668,15 @@ static void cfq_activate_request(request_queue_t *q, struct request *rq) | |||
664 | struct cfq_data *cfqd = q->elevator->elevator_data; | 668 | struct cfq_data *cfqd = q->elevator->elevator_data; |
665 | 669 | ||
666 | cfqd->rq_in_driver++; | 670 | cfqd->rq_in_driver++; |
671 | |||
672 | /* | ||
673 | * If the depth is larger 1, it really could be queueing. But lets | ||
674 | * make the mark a little higher - idling could still be good for | ||
675 | * low queueing, and a low queueing number could also just indicate | ||
676 | * a SCSI mid layer like behaviour where limit+1 is often seen. | ||
677 | */ | ||
678 | if (!cfqd->hw_tag && cfqd->rq_in_driver > 4) | ||
679 | cfqd->hw_tag = 1; | ||
667 | } | 680 | } |
668 | 681 | ||
669 | static void cfq_deactivate_request(request_queue_t *q, struct request *rq) | 682 | static void cfq_deactivate_request(request_queue_t *q, struct request *rq) |
@@ -879,6 +892,13 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd) | |||
879 | cfqq = list_entry_cfqq(cfqd->cur_rr.next); | 892 | cfqq = list_entry_cfqq(cfqd->cur_rr.next); |
880 | 893 | ||
881 | /* | 894 | /* |
895 | * If no new queues are available, check if the busy list has some | ||
896 | * before falling back to idle io. | ||
897 | */ | ||
898 | if (!cfqq && !list_empty(&cfqd->busy_rr)) | ||
899 | cfqq = list_entry_cfqq(cfqd->busy_rr.next); | ||
900 | |||
901 | /* | ||
882 | * if we have idle queues and no rt or be queues had pending | 902 | * if we have idle queues and no rt or be queues had pending |
883 | * requests, either allow immediate service if the grace period | 903 | * requests, either allow immediate service if the grace period |
884 | * has passed or arm the idle grace timer | 904 | * has passed or arm the idle grace timer |
@@ -1284,7 +1304,7 @@ static void cfq_exit_io_context(struct io_context *ioc) | |||
1284 | /* | 1304 | /* |
1285 | * put the reference this task is holding to the various queues | 1305 | * put the reference this task is holding to the various queues |
1286 | */ | 1306 | */ |
1287 | read_lock_irqsave(&cfq_exit_lock, flags); | 1307 | spin_lock_irqsave(&cfq_exit_lock, flags); |
1288 | 1308 | ||
1289 | n = rb_first(&ioc->cic_root); | 1309 | n = rb_first(&ioc->cic_root); |
1290 | while (n != NULL) { | 1310 | while (n != NULL) { |
@@ -1294,7 +1314,7 @@ static void cfq_exit_io_context(struct io_context *ioc) | |||
1294 | n = rb_next(n); | 1314 | n = rb_next(n); |
1295 | } | 1315 | } |
1296 | 1316 | ||
1297 | read_unlock_irqrestore(&cfq_exit_lock, flags); | 1317 | spin_unlock_irqrestore(&cfq_exit_lock, flags); |
1298 | } | 1318 | } |
1299 | 1319 | ||
1300 | static struct cfq_io_context * | 1320 | static struct cfq_io_context * |
@@ -1400,17 +1420,17 @@ static int cfq_ioc_set_ioprio(struct io_context *ioc, unsigned int ioprio) | |||
1400 | struct cfq_io_context *cic; | 1420 | struct cfq_io_context *cic; |
1401 | struct rb_node *n; | 1421 | struct rb_node *n; |
1402 | 1422 | ||
1403 | write_lock(&cfq_exit_lock); | 1423 | spin_lock(&cfq_exit_lock); |
1404 | 1424 | ||
1405 | n = rb_first(&ioc->cic_root); | 1425 | n = rb_first(&ioc->cic_root); |
1406 | while (n != NULL) { | 1426 | while (n != NULL) { |
1407 | cic = rb_entry(n, struct cfq_io_context, rb_node); | 1427 | cic = rb_entry(n, struct cfq_io_context, rb_node); |
1408 | 1428 | ||
1409 | changed_ioprio(cic); | 1429 | changed_ioprio(cic); |
1410 | n = rb_next(n); | 1430 | n = rb_next(n); |
1411 | } | 1431 | } |
1412 | 1432 | ||
1413 | write_unlock(&cfq_exit_lock); | 1433 | spin_unlock(&cfq_exit_lock); |
1414 | 1434 | ||
1415 | return 0; | 1435 | return 0; |
1416 | } | 1436 | } |
@@ -1458,7 +1478,8 @@ retry: | |||
1458 | * set ->slice_left to allow preemption for a new process | 1478 | * set ->slice_left to allow preemption for a new process |
1459 | */ | 1479 | */ |
1460 | cfqq->slice_left = 2 * cfqd->cfq_slice_idle; | 1480 | cfqq->slice_left = 2 * cfqd->cfq_slice_idle; |
1461 | cfq_mark_cfqq_idle_window(cfqq); | 1481 | if (!cfqd->hw_tag) |
1482 | cfq_mark_cfqq_idle_window(cfqq); | ||
1462 | cfq_mark_cfqq_prio_changed(cfqq); | 1483 | cfq_mark_cfqq_prio_changed(cfqq); |
1463 | cfq_init_prio_data(cfqq); | 1484 | cfq_init_prio_data(cfqq); |
1464 | } | 1485 | } |
@@ -1475,9 +1496,10 @@ out: | |||
1475 | static void | 1496 | static void |
1476 | cfq_drop_dead_cic(struct io_context *ioc, struct cfq_io_context *cic) | 1497 | cfq_drop_dead_cic(struct io_context *ioc, struct cfq_io_context *cic) |
1477 | { | 1498 | { |
1478 | read_lock(&cfq_exit_lock); | 1499 | spin_lock(&cfq_exit_lock); |
1479 | rb_erase(&cic->rb_node, &ioc->cic_root); | 1500 | rb_erase(&cic->rb_node, &ioc->cic_root); |
1480 | read_unlock(&cfq_exit_lock); | 1501 | list_del_init(&cic->queue_list); |
1502 | spin_unlock(&cfq_exit_lock); | ||
1481 | kmem_cache_free(cfq_ioc_pool, cic); | 1503 | kmem_cache_free(cfq_ioc_pool, cic); |
1482 | atomic_dec(&ioc_count); | 1504 | atomic_dec(&ioc_count); |
1483 | } | 1505 | } |
@@ -1545,11 +1567,11 @@ restart: | |||
1545 | BUG(); | 1567 | BUG(); |
1546 | } | 1568 | } |
1547 | 1569 | ||
1548 | read_lock(&cfq_exit_lock); | 1570 | spin_lock(&cfq_exit_lock); |
1549 | rb_link_node(&cic->rb_node, parent, p); | 1571 | rb_link_node(&cic->rb_node, parent, p); |
1550 | rb_insert_color(&cic->rb_node, &ioc->cic_root); | 1572 | rb_insert_color(&cic->rb_node, &ioc->cic_root); |
1551 | list_add(&cic->queue_list, &cfqd->cic_list); | 1573 | list_add(&cic->queue_list, &cfqd->cic_list); |
1552 | read_unlock(&cfq_exit_lock); | 1574 | spin_unlock(&cfq_exit_lock); |
1553 | } | 1575 | } |
1554 | 1576 | ||
1555 | /* | 1577 | /* |
@@ -1648,7 +1670,7 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1648 | { | 1670 | { |
1649 | int enable_idle = cfq_cfqq_idle_window(cfqq); | 1671 | int enable_idle = cfq_cfqq_idle_window(cfqq); |
1650 | 1672 | ||
1651 | if (!cic->ioc->task || !cfqd->cfq_slice_idle) | 1673 | if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag) |
1652 | enable_idle = 0; | 1674 | enable_idle = 0; |
1653 | else if (sample_valid(cic->ttime_samples)) { | 1675 | else if (sample_valid(cic->ttime_samples)) { |
1654 | if (cic->ttime_mean > cfqd->cfq_slice_idle) | 1676 | if (cic->ttime_mean > cfqd->cfq_slice_idle) |
@@ -1739,14 +1761,24 @@ cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1739 | 1761 | ||
1740 | cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); | 1762 | cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); |
1741 | 1763 | ||
1764 | cic = crq->io_context; | ||
1765 | |||
1742 | /* | 1766 | /* |
1743 | * we never wait for an async request and we don't allow preemption | 1767 | * we never wait for an async request and we don't allow preemption |
1744 | * of an async request. so just return early | 1768 | * of an async request. so just return early |
1745 | */ | 1769 | */ |
1746 | if (!cfq_crq_is_sync(crq)) | 1770 | if (!cfq_crq_is_sync(crq)) { |
1771 | /* | ||
1772 | * sync process issued an async request, if it's waiting | ||
1773 | * then expire it and kick rq handling. | ||
1774 | */ | ||
1775 | if (cic == cfqd->active_cic && | ||
1776 | del_timer(&cfqd->idle_slice_timer)) { | ||
1777 | cfq_slice_expired(cfqd, 0); | ||
1778 | cfq_start_queueing(cfqd, cfqq); | ||
1779 | } | ||
1747 | return; | 1780 | return; |
1748 | 1781 | } | |
1749 | cic = crq->io_context; | ||
1750 | 1782 | ||
1751 | cfq_update_io_thinktime(cfqd, cic); | 1783 | cfq_update_io_thinktime(cfqd, cic); |
1752 | cfq_update_io_seektime(cfqd, cic, crq); | 1784 | cfq_update_io_seektime(cfqd, cic, crq); |
@@ -2164,10 +2196,9 @@ static void cfq_idle_class_timer(unsigned long data) | |||
2164 | * race with a non-idle queue, reset timer | 2196 | * race with a non-idle queue, reset timer |
2165 | */ | 2197 | */ |
2166 | end = cfqd->last_end_request + CFQ_IDLE_GRACE; | 2198 | end = cfqd->last_end_request + CFQ_IDLE_GRACE; |
2167 | if (!time_after_eq(jiffies, end)) { | 2199 | if (!time_after_eq(jiffies, end)) |
2168 | cfqd->idle_class_timer.expires = end; | 2200 | mod_timer(&cfqd->idle_class_timer, end); |
2169 | add_timer(&cfqd->idle_class_timer); | 2201 | else |
2170 | } else | ||
2171 | cfq_schedule_dispatch(cfqd); | 2202 | cfq_schedule_dispatch(cfqd); |
2172 | 2203 | ||
2173 | spin_unlock_irqrestore(cfqd->queue->queue_lock, flags); | 2204 | spin_unlock_irqrestore(cfqd->queue->queue_lock, flags); |
@@ -2187,7 +2218,7 @@ static void cfq_exit_queue(elevator_t *e) | |||
2187 | 2218 | ||
2188 | cfq_shutdown_timer_wq(cfqd); | 2219 | cfq_shutdown_timer_wq(cfqd); |
2189 | 2220 | ||
2190 | write_lock(&cfq_exit_lock); | 2221 | spin_lock(&cfq_exit_lock); |
2191 | spin_lock_irq(q->queue_lock); | 2222 | spin_lock_irq(q->queue_lock); |
2192 | 2223 | ||
2193 | if (cfqd->active_queue) | 2224 | if (cfqd->active_queue) |
@@ -2210,7 +2241,7 @@ static void cfq_exit_queue(elevator_t *e) | |||
2210 | } | 2241 | } |
2211 | 2242 | ||
2212 | spin_unlock_irq(q->queue_lock); | 2243 | spin_unlock_irq(q->queue_lock); |
2213 | write_unlock(&cfq_exit_lock); | 2244 | spin_unlock(&cfq_exit_lock); |
2214 | 2245 | ||
2215 | cfq_shutdown_timer_wq(cfqd); | 2246 | cfq_shutdown_timer_wq(cfqd); |
2216 | 2247 | ||
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 662209d3f42d..2a769cc6f5f9 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/vt_kern.h> | ||
12 | #include <linux/device.h> | 11 | #include <linux/device.h> |
13 | #include <linux/kallsyms.h> | 12 | #include <linux/kallsyms.h> |
14 | #include <linux/pm.h> | 13 | #include <linux/pm.h> |
@@ -66,6 +65,7 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
66 | return error; | 65 | return error; |
67 | } | 66 | } |
68 | 67 | ||
68 | |||
69 | /** | 69 | /** |
70 | * device_suspend - Save state and stop all devices in system. | 70 | * device_suspend - Save state and stop all devices in system. |
71 | * @state: Power state to put each device in. | 71 | * @state: Power state to put each device in. |
@@ -85,9 +85,6 @@ int device_suspend(pm_message_t state) | |||
85 | { | 85 | { |
86 | int error = 0; | 86 | int error = 0; |
87 | 87 | ||
88 | if (!is_console_suspend_safe()) | ||
89 | return -EINVAL; | ||
90 | |||
91 | down(&dpm_sem); | 88 | down(&dpm_sem); |
92 | down(&dpm_list_sem); | 89 | down(&dpm_list_sem); |
93 | while (!list_empty(&dpm_active) && error == 0) { | 90 | while (!list_empty(&dpm_active) && error == 0) { |
diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig index 0b9cf9c59a21..7c88c060a9e6 100644 --- a/drivers/char/agp/Kconfig +++ b/drivers/char/agp/Kconfig | |||
@@ -86,7 +86,7 @@ config AGP_NVIDIA | |||
86 | 86 | ||
87 | config AGP_SIS | 87 | config AGP_SIS |
88 | tristate "SiS chipset support" | 88 | tristate "SiS chipset support" |
89 | depends on AGP && X86_32 | 89 | depends on AGP |
90 | help | 90 | help |
91 | This option gives you AGP support for the GLX component of | 91 | This option gives you AGP support for the GLX component of |
92 | X on Silicon Integrated Systems [SiS] chipsets. | 92 | X on Silicon Integrated Systems [SiS] chipsets. |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 36517d4d1ad9..ac3c33a2e37d 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -617,6 +617,9 @@ static int agp_amd64_resume(struct pci_dev *pdev) | |||
617 | pci_set_power_state(pdev, PCI_D0); | 617 | pci_set_power_state(pdev, PCI_D0); |
618 | pci_restore_state(pdev); | 618 | pci_restore_state(pdev); |
619 | 619 | ||
620 | if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) | ||
621 | nforce3_agp_init(pdev); | ||
622 | |||
620 | return amd_8151_configure(); | 623 | return amd_8151_configure(); |
621 | } | 624 | } |
622 | 625 | ||
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index 97b0a890ba7f..b8ec25d17478 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c | |||
@@ -345,6 +345,12 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata = | |||
345 | .chipset_name = "PT880", | 345 | .chipset_name = "PT880", |
346 | }, | 346 | }, |
347 | 347 | ||
348 | /* PT880 Ultra */ | ||
349 | { | ||
350 | .device_id = PCI_DEVICE_ID_VIA_PT880ULTRA, | ||
351 | .chipset_name = "PT880 Ultra", | ||
352 | }, | ||
353 | |||
348 | /* PT890 */ | 354 | /* PT890 */ |
349 | { | 355 | { |
350 | .device_id = PCI_DEVICE_ID_VIA_8783_0, | 356 | .device_id = PCI_DEVICE_ID_VIA_8783_0, |
@@ -511,6 +517,7 @@ static struct pci_device_id agp_via_pci_table[] = { | |||
511 | ID(PCI_DEVICE_ID_VIA_8763_0), | 517 | ID(PCI_DEVICE_ID_VIA_8763_0), |
512 | ID(PCI_DEVICE_ID_VIA_8378_0), | 518 | ID(PCI_DEVICE_ID_VIA_8378_0), |
513 | ID(PCI_DEVICE_ID_VIA_PT880), | 519 | ID(PCI_DEVICE_ID_VIA_PT880), |
520 | ID(PCI_DEVICE_ID_VIA_PT880ULTRA), | ||
514 | ID(PCI_DEVICE_ID_VIA_8783_0), | 521 | ID(PCI_DEVICE_ID_VIA_8783_0), |
515 | ID(PCI_DEVICE_ID_VIA_PX8X0_0), | 522 | ID(PCI_DEVICE_ID_VIA_PX8X0_0), |
516 | ID(PCI_DEVICE_ID_VIA_3269_0), | 523 | ID(PCI_DEVICE_ID_VIA_3269_0), |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index b36eef0e9d19..02a7dd7a8a55 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -1184,20 +1184,20 @@ static void port_outl(struct si_sm_io *io, unsigned int offset, | |||
1184 | static void port_cleanup(struct smi_info *info) | 1184 | static void port_cleanup(struct smi_info *info) |
1185 | { | 1185 | { |
1186 | unsigned int addr = info->io.addr_data; | 1186 | unsigned int addr = info->io.addr_data; |
1187 | int mapsize; | 1187 | int idx; |
1188 | 1188 | ||
1189 | if (addr) { | 1189 | if (addr) { |
1190 | mapsize = ((info->io_size * info->io.regspacing) | 1190 | for (idx = 0; idx < info->io_size; idx++) { |
1191 | - (info->io.regspacing - info->io.regsize)); | 1191 | release_region(addr + idx * info->io.regspacing, |
1192 | 1192 | info->io.regsize); | |
1193 | release_region (addr, mapsize); | 1193 | } |
1194 | } | 1194 | } |
1195 | } | 1195 | } |
1196 | 1196 | ||
1197 | static int port_setup(struct smi_info *info) | 1197 | static int port_setup(struct smi_info *info) |
1198 | { | 1198 | { |
1199 | unsigned int addr = info->io.addr_data; | 1199 | unsigned int addr = info->io.addr_data; |
1200 | int mapsize; | 1200 | int idx; |
1201 | 1201 | ||
1202 | if (!addr) | 1202 | if (!addr) |
1203 | return -ENODEV; | 1203 | return -ENODEV; |
@@ -1225,16 +1225,22 @@ static int port_setup(struct smi_info *info) | |||
1225 | return -EINVAL; | 1225 | return -EINVAL; |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | /* Calculate the total amount of memory to claim. This is an | 1228 | /* Some BIOSes reserve disjoint I/O regions in their ACPI |
1229 | * unusual looking calculation, but it avoids claiming any | 1229 | * tables. This causes problems when trying to register the |
1230 | * more memory than it has to. It will claim everything | 1230 | * entire I/O region. Therefore we must register each I/O |
1231 | * between the first address to the end of the last full | 1231 | * port separately. |
1232 | * register. */ | 1232 | */ |
1233 | mapsize = ((info->io_size * info->io.regspacing) | 1233 | for (idx = 0; idx < info->io_size; idx++) { |
1234 | - (info->io.regspacing - info->io.regsize)); | 1234 | if (request_region(addr + idx * info->io.regspacing, |
1235 | 1235 | info->io.regsize, DEVICE_NAME) == NULL) { | |
1236 | if (request_region(addr, mapsize, DEVICE_NAME) == NULL) | 1236 | /* Undo allocations */ |
1237 | return -EIO; | 1237 | while (idx--) { |
1238 | release_region(addr + idx * info->io.regspacing, | ||
1239 | info->io.regsize); | ||
1240 | } | ||
1241 | return -EIO; | ||
1242 | } | ||
1243 | } | ||
1238 | return 0; | 1244 | return 0; |
1239 | } | 1245 | } |
1240 | 1246 | ||
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/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index e45f0d3d12de..a611972024e6 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c | |||
@@ -105,6 +105,12 @@ static const char* tcpa_event_type_strings[] = { | |||
105 | "Non-Host Info" | 105 | "Non-Host Info" |
106 | }; | 106 | }; |
107 | 107 | ||
108 | struct tcpa_pc_event { | ||
109 | u32 event_id; | ||
110 | u32 event_size; | ||
111 | u8 event_data[0]; | ||
112 | }; | ||
113 | |||
108 | enum tcpa_pc_event_ids { | 114 | enum tcpa_pc_event_ids { |
109 | SMBIOS = 1, | 115 | SMBIOS = 1, |
110 | BIS_CERT, | 116 | BIS_CERT, |
@@ -114,14 +120,15 @@ enum tcpa_pc_event_ids { | |||
114 | NVRAM, | 120 | NVRAM, |
115 | OPTION_ROM_EXEC, | 121 | OPTION_ROM_EXEC, |
116 | OPTION_ROM_CONFIG, | 122 | OPTION_ROM_CONFIG, |
117 | OPTION_ROM_MICROCODE, | 123 | OPTION_ROM_MICROCODE = 10, |
118 | S_CRTM_VERSION, | 124 | S_CRTM_VERSION, |
119 | S_CRTM_CONTENTS, | 125 | S_CRTM_CONTENTS, |
120 | POST_CONTENTS, | 126 | POST_CONTENTS, |
127 | HOST_TABLE_OF_DEVICES, | ||
121 | }; | 128 | }; |
122 | 129 | ||
123 | static const char* tcpa_pc_event_id_strings[] = { | 130 | static const char* tcpa_pc_event_id_strings[] = { |
124 | "" | 131 | "", |
125 | "SMBIOS", | 132 | "SMBIOS", |
126 | "BIS Certificate", | 133 | "BIS Certificate", |
127 | "POST BIOS ", | 134 | "POST BIOS ", |
@@ -130,11 +137,12 @@ static const char* tcpa_pc_event_id_strings[] = { | |||
130 | "NVRAM", | 137 | "NVRAM", |
131 | "Option ROM", | 138 | "Option ROM", |
132 | "Option ROM config", | 139 | "Option ROM config", |
133 | "Option ROM microcode", | 140 | "", |
141 | "Option ROM microcode ", | ||
134 | "S-CRTM Version", | 142 | "S-CRTM Version", |
135 | "S-CRTM Contents", | 143 | "S-CRTM Contents ", |
136 | "S-CRTM POST Contents", | 144 | "POST Contents ", |
137 | "POST Contents", | 145 | "Table of Devices", |
138 | }; | 146 | }; |
139 | 147 | ||
140 | /* returns pointer to start of pos. entry of tcg log */ | 148 | /* returns pointer to start of pos. entry of tcg log */ |
@@ -206,7 +214,7 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
206 | const char *name = ""; | 214 | const char *name = ""; |
207 | char data[40] = ""; | 215 | char data[40] = ""; |
208 | int i, n_len = 0, d_len = 0; | 216 | int i, n_len = 0, d_len = 0; |
209 | u32 event_id; | 217 | struct tcpa_pc_event *pc_event; |
210 | 218 | ||
211 | switch(event->event_type) { | 219 | switch(event->event_type) { |
212 | case PREBOOT: | 220 | case PREBOOT: |
@@ -235,31 +243,32 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
235 | } | 243 | } |
236 | break; | 244 | break; |
237 | case EVENT_TAG: | 245 | case EVENT_TAG: |
238 | event_id = be32_to_cpu(*((u32 *)event_entry)); | 246 | pc_event = (struct tcpa_pc_event *)event_entry; |
239 | 247 | ||
240 | /* ToDo Row data -> Base64 */ | 248 | /* ToDo Row data -> Base64 */ |
241 | 249 | ||
242 | switch (event_id) { | 250 | switch (pc_event->event_id) { |
243 | case SMBIOS: | 251 | case SMBIOS: |
244 | case BIS_CERT: | 252 | case BIS_CERT: |
245 | case CMOS: | 253 | case CMOS: |
246 | case NVRAM: | 254 | case NVRAM: |
247 | case OPTION_ROM_EXEC: | 255 | case OPTION_ROM_EXEC: |
248 | case OPTION_ROM_CONFIG: | 256 | case OPTION_ROM_CONFIG: |
249 | case OPTION_ROM_MICROCODE: | ||
250 | case S_CRTM_VERSION: | 257 | case S_CRTM_VERSION: |
251 | case S_CRTM_CONTENTS: | 258 | name = tcpa_pc_event_id_strings[pc_event->event_id]; |
252 | case POST_CONTENTS: | ||
253 | name = tcpa_pc_event_id_strings[event_id]; | ||
254 | n_len = strlen(name); | 259 | n_len = strlen(name); |
255 | break; | 260 | break; |
261 | /* hash data */ | ||
256 | case POST_BIOS_ROM: | 262 | case POST_BIOS_ROM: |
257 | case ESCD: | 263 | case ESCD: |
258 | name = tcpa_pc_event_id_strings[event_id]; | 264 | case OPTION_ROM_MICROCODE: |
265 | case S_CRTM_CONTENTS: | ||
266 | case POST_CONTENTS: | ||
267 | name = tcpa_pc_event_id_strings[pc_event->event_id]; | ||
259 | n_len = strlen(name); | 268 | n_len = strlen(name); |
260 | for (i = 0; i < 20; i++) | 269 | for (i = 0; i < 20; i++) |
261 | d_len += sprintf(data, "%02x", | 270 | d_len += sprintf(&data[2*i], "%02x", |
262 | event_entry[8 + i]); | 271 | pc_event->event_data[i]); |
263 | break; | 272 | break; |
264 | default: | 273 | default: |
265 | break; | 274 | break; |
@@ -275,53 +284,13 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
275 | 284 | ||
276 | static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) | 285 | static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) |
277 | { | 286 | { |
287 | struct tcpa_event *event = v; | ||
288 | char *data = v; | ||
289 | int i; | ||
278 | 290 | ||
279 | char *eventname; | 291 | for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++) |
280 | char data[4]; | ||
281 | u32 help; | ||
282 | int i, len; | ||
283 | struct tcpa_event *event = (struct tcpa_event *) v; | ||
284 | unsigned char *event_entry = | ||
285 | (unsigned char *) (v + sizeof(struct tcpa_event)); | ||
286 | |||
287 | eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL); | ||
288 | if (!eventname) { | ||
289 | printk(KERN_ERR "%s: ERROR - No Memory for event name\n ", | ||
290 | __func__); | ||
291 | return -ENOMEM; | ||
292 | } | ||
293 | |||
294 | /* 1st: PCR used is in little-endian format (4 bytes) */ | ||
295 | help = le32_to_cpu(event->pcr_index); | ||
296 | memcpy(data, &help, 4); | ||
297 | for (i = 0; i < 4; i++) | ||
298 | seq_putc(m, data[i]); | ||
299 | |||
300 | /* 2nd: SHA1 (20 bytes) */ | ||
301 | for (i = 0; i < 20; i++) | ||
302 | seq_putc(m, event->pcr_value[i]); | ||
303 | |||
304 | /* 3rd: event type identifier (4 bytes) */ | ||
305 | help = le32_to_cpu(event->event_type); | ||
306 | memcpy(data, &help, 4); | ||
307 | for (i = 0; i < 4; i++) | ||
308 | seq_putc(m, data[i]); | 292 | seq_putc(m, data[i]); |
309 | 293 | ||
310 | len = 0; | ||
311 | |||
312 | len += get_event_name(eventname, event, event_entry); | ||
313 | |||
314 | /* 4th: filename <= 255 + \'0' delimiter */ | ||
315 | if (len > TCG_EVENT_NAME_LEN_MAX) | ||
316 | len = TCG_EVENT_NAME_LEN_MAX; | ||
317 | |||
318 | for (i = 0; i < len; i++) | ||
319 | seq_putc(m, eventname[i]); | ||
320 | |||
321 | /* 5th: delimiter */ | ||
322 | seq_putc(m, '\0'); | ||
323 | |||
324 | kfree(eventname); | ||
325 | return 0; | 294 | return 0; |
326 | } | 295 | } |
327 | 296 | ||
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index f621168f38ae..8ea70625f7ea 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -457,10 +457,6 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, | |||
457 | } | 457 | } |
458 | 458 | ||
459 | vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); | 459 | vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); |
460 | if ((vendor & 0xFFFF) == 0xFFFF) { | ||
461 | rc = -ENODEV; | ||
462 | goto out_err; | ||
463 | } | ||
464 | 460 | ||
465 | /* Default timeouts */ | 461 | /* Default timeouts */ |
466 | chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); | 462 | chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index acc5d47844eb..6c94879e0b99 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -3238,14 +3238,6 @@ void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org) | |||
3238 | } | 3238 | } |
3239 | } | 3239 | } |
3240 | 3240 | ||
3241 | int is_console_suspend_safe(void) | ||
3242 | { | ||
3243 | /* It is unsafe to suspend devices while X has control of the | ||
3244 | * hardware. Make sure we are running on a kernel-controlled console. | ||
3245 | */ | ||
3246 | return vc_cons[fg_console].d->vc_mode == KD_TEXT; | ||
3247 | } | ||
3248 | |||
3249 | /* | 3241 | /* |
3250 | * Visible symbols for modules | 3242 | * Visible symbols for modules |
3251 | */ | 3243 | */ |
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index a140e4536a4e..766cc969c4d0 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
@@ -491,7 +491,7 @@ static struct pci_device_id divil_pci[] = { | |||
491 | 491 | ||
492 | #define MSR_LBAR_SMB 0x5140000B | 492 | #define MSR_LBAR_SMB 0x5140000B |
493 | 493 | ||
494 | static int scx200_add_cs553x(void) | 494 | static __init int scx200_add_cs553x(void) |
495 | { | 495 | { |
496 | u32 low, hi; | 496 | u32 low, hi; |
497 | u32 smb_base; | 497 | u32 smb_base; |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 43b96e298363..27c9eb989a9a 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -345,17 +345,17 @@ sgiioc4_resetproc(ide_drive_t * drive) | |||
345 | static u8 | 345 | static u8 |
346 | sgiioc4_INB(unsigned long port) | 346 | sgiioc4_INB(unsigned long port) |
347 | { | 347 | { |
348 | u8 reg = (u8) inb(port); | 348 | u8 reg = (u8) readb((void __iomem *) port); |
349 | 349 | ||
350 | if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */ | 350 | if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */ |
351 | if (reg & 0x51) { /* Not busy...check for interrupt */ | 351 | if (reg & 0x51) { /* Not busy...check for interrupt */ |
352 | unsigned long other_ir = port - 0x110; | 352 | unsigned long other_ir = port - 0x110; |
353 | unsigned int intr_reg = (u32) inl(other_ir); | 353 | unsigned int intr_reg = (u32) readl((void __iomem *) other_ir); |
354 | 354 | ||
355 | /* Clear the Interrupt, Error bits on the IOC4 */ | 355 | /* Clear the Interrupt, Error bits on the IOC4 */ |
356 | if (intr_reg & 0x03) { | 356 | if (intr_reg & 0x03) { |
357 | outl(0x03, other_ir); | 357 | writel(0x03, (void __iomem *) other_ir); |
358 | intr_reg = (u32) inl(other_ir); | 358 | intr_reg = (u32) readl((void __iomem *) other_ir); |
359 | } | 359 | } |
360 | } | 360 | } |
361 | } | 361 | } |
@@ -606,6 +606,12 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
606 | hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; | 606 | hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; |
607 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; | 607 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; |
608 | hwif->ide_dma_timeout = &__ide_dma_timeout; | 608 | hwif->ide_dma_timeout = &__ide_dma_timeout; |
609 | |||
610 | /* | ||
611 | * The IOC4 uses MMIO rather than Port IO. | ||
612 | * It also needs special workarounds for INB. | ||
613 | */ | ||
614 | default_hwif_mmiops(hwif); | ||
609 | hwif->INB = &sgiioc4_INB; | 615 | hwif->INB = &sgiioc4_INB; |
610 | } | 616 | } |
611 | 617 | ||
@@ -743,6 +749,6 @@ ioc4_ide_exit(void) | |||
743 | module_init(ioc4_ide_init); | 749 | module_init(ioc4_ide_init); |
744 | module_exit(ioc4_ide_exit); | 750 | module_exit(ioc4_ide_exit); |
745 | 751 | ||
746 | MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)"); | 752 | MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon"); |
747 | MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); | 753 | MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); |
748 | MODULE_LICENSE("GPL"); | 754 | MODULE_LICENSE("GPL"); |
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/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c index 1ea433291fa7..b292fefa3b41 100644 --- a/drivers/infiniband/hw/mthca/mthca_srq.c +++ b/drivers/infiniband/hw/mthca/mthca_srq.c | |||
@@ -490,26 +490,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, | |||
490 | 490 | ||
491 | first_ind = srq->first_free; | 491 | first_ind = srq->first_free; |
492 | 492 | ||
493 | for (nreq = 0; wr; ++nreq, wr = wr->next) { | 493 | for (nreq = 0; wr; wr = wr->next) { |
494 | if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) { | ||
495 | nreq = 0; | ||
496 | |||
497 | doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift); | ||
498 | doorbell[1] = cpu_to_be32(srq->srqn << 8); | ||
499 | |||
500 | /* | ||
501 | * Make sure that descriptors are written | ||
502 | * before doorbell is rung. | ||
503 | */ | ||
504 | wmb(); | ||
505 | |||
506 | mthca_write64(doorbell, | ||
507 | dev->kar + MTHCA_RECEIVE_DOORBELL, | ||
508 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | ||
509 | |||
510 | first_ind = srq->first_free; | ||
511 | } | ||
512 | |||
513 | ind = srq->first_free; | 494 | ind = srq->first_free; |
514 | 495 | ||
515 | if (ind < 0) { | 496 | if (ind < 0) { |
@@ -569,6 +550,26 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, | |||
569 | 550 | ||
570 | srq->wrid[ind] = wr->wr_id; | 551 | srq->wrid[ind] = wr->wr_id; |
571 | srq->first_free = next_ind; | 552 | srq->first_free = next_ind; |
553 | |||
554 | ++nreq; | ||
555 | if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) { | ||
556 | nreq = 0; | ||
557 | |||
558 | doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift); | ||
559 | doorbell[1] = cpu_to_be32(srq->srqn << 8); | ||
560 | |||
561 | /* | ||
562 | * Make sure that descriptors are written | ||
563 | * before doorbell is rung. | ||
564 | */ | ||
565 | wmb(); | ||
566 | |||
567 | mthca_write64(doorbell, | ||
568 | dev->kar + MTHCA_RECEIVE_DOORBELL, | ||
569 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | ||
570 | |||
571 | first_ind = srq->first_free; | ||
572 | } | ||
572 | } | 573 | } |
573 | 574 | ||
574 | if (likely(nreq)) { | 575 | if (likely(nreq)) { |
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/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index 2b2ec1057dee..95c0de7964a0 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c | |||
@@ -589,7 +589,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
589 | struct sw *sw; | 589 | struct sw *sw; |
590 | struct input_dev *input_dev; | 590 | struct input_dev *input_dev; |
591 | int i, j, k, l; | 591 | int i, j, k, l; |
592 | int err; | 592 | int err = 0; |
593 | unsigned char *buf = NULL; /* [SW_LENGTH] */ | 593 | unsigned char *buf = NULL; /* [SW_LENGTH] */ |
594 | unsigned char *idbuf = NULL; /* [SW_LENGTH] */ | 594 | unsigned char *idbuf = NULL; /* [SW_LENGTH] */ |
595 | unsigned char m = 1; | 595 | unsigned char m = 1; |
@@ -776,7 +776,10 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
776 | goto fail4; | 776 | goto fail4; |
777 | } | 777 | } |
778 | 778 | ||
779 | return 0; | 779 | out: kfree(buf); |
780 | kfree(idbuf); | ||
781 | |||
782 | return err; | ||
780 | 783 | ||
781 | fail4: input_free_device(sw->dev[i]); | 784 | fail4: input_free_device(sw->dev[i]); |
782 | fail3: while (--i >= 0) | 785 | fail3: while (--i >= 0) |
@@ -784,9 +787,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
784 | fail2: gameport_close(gameport); | 787 | fail2: gameport_close(gameport); |
785 | fail1: gameport_set_drvdata(gameport, NULL); | 788 | fail1: gameport_set_drvdata(gameport, NULL); |
786 | kfree(sw); | 789 | kfree(sw); |
787 | kfree(buf); | 790 | goto out; |
788 | kfree(idbuf); | ||
789 | return err; | ||
790 | } | 791 | } |
791 | 792 | ||
792 | static void sw_disconnect(struct gameport *gameport) | 793 | static void sw_disconnect(struct gameport *gameport) |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 96c6bf77248a..1f0e720267d7 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -245,9 +245,9 @@ static void corgikbd_hinge_timer(unsigned long data) | |||
245 | if (hinge_count >= HINGE_STABLE_COUNT) { | 245 | if (hinge_count >= HINGE_STABLE_COUNT) { |
246 | spin_lock_irqsave(&corgikbd_data->lock, flags); | 246 | spin_lock_irqsave(&corgikbd_data->lock, flags); |
247 | 247 | ||
248 | input_report_switch(corgikbd_data->input, SW_0, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); | 248 | input_report_switch(corgikbd_data->input, SW_LID, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); |
249 | input_report_switch(corgikbd_data->input, SW_1, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); | 249 | input_report_switch(corgikbd_data->input, SW_TABLET_MODE, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); |
250 | input_report_switch(corgikbd_data->input, SW_2, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); | 250 | input_report_switch(corgikbd_data->input, SW_HEADPHONE_INSERT, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); |
251 | input_sync(corgikbd_data->input); | 251 | input_sync(corgikbd_data->input); |
252 | 252 | ||
253 | spin_unlock_irqrestore(&corgikbd_data->lock, flags); | 253 | spin_unlock_irqrestore(&corgikbd_data->lock, flags); |
@@ -340,9 +340,9 @@ static int __init corgikbd_probe(struct platform_device *pdev) | |||
340 | for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) | 340 | for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) |
341 | set_bit(corgikbd->keycode[i], input_dev->keybit); | 341 | set_bit(corgikbd->keycode[i], input_dev->keybit); |
342 | clear_bit(0, input_dev->keybit); | 342 | clear_bit(0, input_dev->keybit); |
343 | set_bit(SW_0, input_dev->swbit); | 343 | set_bit(SW_LID, input_dev->swbit); |
344 | set_bit(SW_1, input_dev->swbit); | 344 | set_bit(SW_TABLET_MODE, input_dev->swbit); |
345 | set_bit(SW_2, input_dev->swbit); | 345 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); |
346 | 346 | ||
347 | input_register_device(corgikbd->input); | 347 | input_register_device(corgikbd->input); |
348 | 348 | ||
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 1d238a9d52d6..c5d03fb77bcb 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -299,9 +299,9 @@ static void spitzkbd_hinge_timer(unsigned long data) | |||
299 | if (hinge_count >= HINGE_STABLE_COUNT) { | 299 | if (hinge_count >= HINGE_STABLE_COUNT) { |
300 | spin_lock_irqsave(&spitzkbd_data->lock, flags); | 300 | spin_lock_irqsave(&spitzkbd_data->lock, flags); |
301 | 301 | ||
302 | input_report_switch(spitzkbd_data->input, SW_0, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); | 302 | input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); |
303 | input_report_switch(spitzkbd_data->input, SW_1, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); | 303 | input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); |
304 | input_report_switch(spitzkbd_data->input, SW_2, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); | 304 | input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); |
305 | input_sync(spitzkbd_data->input); | 305 | input_sync(spitzkbd_data->input); |
306 | 306 | ||
307 | spin_unlock_irqrestore(&spitzkbd_data->lock, flags); | 307 | spin_unlock_irqrestore(&spitzkbd_data->lock, flags); |
@@ -398,9 +398,9 @@ static int __init spitzkbd_probe(struct platform_device *dev) | |||
398 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) | 398 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) |
399 | set_bit(spitzkbd->keycode[i], input_dev->keybit); | 399 | set_bit(spitzkbd->keycode[i], input_dev->keybit); |
400 | clear_bit(0, input_dev->keybit); | 400 | clear_bit(0, input_dev->keybit); |
401 | set_bit(SW_0, input_dev->swbit); | 401 | set_bit(SW_LID, input_dev->swbit); |
402 | set_bit(SW_1, input_dev->swbit); | 402 | set_bit(SW_TABLET_MODE, input_dev->swbit); |
403 | set_bit(SW_2, input_dev->swbit); | 403 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); |
404 | 404 | ||
405 | input_register_device(input_dev); | 405 | input_register_device(input_dev); |
406 | 406 | ||
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 36cd2e07fce8..e4e5be111c96 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -318,6 +318,16 @@ static struct key_entry keymap_acer_travelmate_240[] = { | |||
318 | { KE_END, 0 } | 318 | { KE_END, 0 } |
319 | }; | 319 | }; |
320 | 320 | ||
321 | static struct key_entry keymap_aopen_1559as[] = { | ||
322 | { KE_KEY, 0x01, KEY_HELP }, | ||
323 | { KE_KEY, 0x06, KEY_PROG3 }, | ||
324 | { KE_KEY, 0x11, KEY_PROG1 }, | ||
325 | { KE_KEY, 0x12, KEY_PROG2 }, | ||
326 | { KE_WIFI, 0x30, 0 }, | ||
327 | { KE_KEY, 0x31, KEY_MAIL }, | ||
328 | { KE_KEY, 0x36, KEY_WWW }, | ||
329 | }; | ||
330 | |||
321 | /* | 331 | /* |
322 | * If your machine is not here (which is currently rather likely), please send | 332 | * If your machine is not here (which is currently rather likely), please send |
323 | * a list of buttons and their key codes (reported when loading this module | 333 | * a list of buttons and their key codes (reported when loading this module |
@@ -369,6 +379,15 @@ static struct dmi_system_id dmi_ids[] = { | |||
369 | }, | 379 | }, |
370 | .driver_data = keymap_acer_travelmate_240 | 380 | .driver_data = keymap_acer_travelmate_240 |
371 | }, | 381 | }, |
382 | { | ||
383 | .callback = dmi_matched, | ||
384 | .ident = "AOpen 1559AS", | ||
385 | .matches = { | ||
386 | DMI_MATCH(DMI_PRODUCT_NAME, "E2U"), | ||
387 | DMI_MATCH(DMI_BOARD_NAME, "E2U"), | ||
388 | }, | ||
389 | .driver_data = keymap_aopen_1559as | ||
390 | }, | ||
372 | { NULL, } | 391 | { NULL, } |
373 | }; | 392 | }; |
374 | 393 | ||
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 2141501e9f2e..a0e2e797c6d5 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -100,8 +100,8 @@ static void alps_process_packet(struct psmouse *psmouse, struct pt_regs *regs) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | if (priv->i->flags & ALPS_OLDPROTO) { | 102 | if (priv->i->flags & ALPS_OLDPROTO) { |
103 | left = packet[2] & 0x08; | 103 | left = packet[2] & 0x10; |
104 | right = packet[2] & 0x10; | 104 | right = packet[2] & 0x08; |
105 | middle = 0; | 105 | middle = 0; |
106 | x = packet[1] | ((packet[0] & 0x07) << 7); | 106 | x = packet[1] | ((packet[0] & 0x07) << 7); |
107 | y = packet[4] | ((packet[3] & 0x07) << 7); | 107 | y = packet[4] | ((packet[3] & 0x07) << 7); |
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 5ccc3ef3b89e..c14395ba7980 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -22,12 +22,36 @@ | |||
22 | 22 | ||
23 | static struct dmi_system_id lifebook_dmi_table[] = { | 23 | static struct dmi_system_id lifebook_dmi_table[] = { |
24 | { | 24 | { |
25 | .ident = "LifeBook B", | ||
26 | .matches = { | ||
27 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B Series"), | ||
28 | }, | ||
29 | }, | ||
30 | { | ||
25 | .ident = "Lifebook B", | 31 | .ident = "Lifebook B", |
26 | .matches = { | 32 | .matches = { |
27 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), | 33 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), |
28 | }, | 34 | }, |
29 | }, | 35 | }, |
30 | { | 36 | { |
37 | .ident = "Lifebook B213x/B2150", | ||
38 | .matches = { | ||
39 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B2131/B2133/B2150"), | ||
40 | }, | ||
41 | }, | ||
42 | { | ||
43 | .ident = "Zephyr", | ||
44 | .matches = { | ||
45 | DMI_MATCH(DMI_PRODUCT_NAME, "ZEPHYR"), | ||
46 | }, | ||
47 | }, | ||
48 | { | ||
49 | .ident = "CF-18", | ||
50 | .matches = { | ||
51 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), | ||
52 | }, | ||
53 | }, | ||
54 | { | ||
31 | .ident = "Lifebook B142", | 55 | .ident = "Lifebook B142", |
32 | .matches = { | 56 | .matches = { |
33 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), | 57 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), |
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 40333d61093c..2f0d28840810 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #define PS2PP_KIND_WHEEL 1 | 19 | #define PS2PP_KIND_WHEEL 1 |
20 | #define PS2PP_KIND_MX 2 | 20 | #define PS2PP_KIND_MX 2 |
21 | #define PS2PP_KIND_TP3 3 | 21 | #define PS2PP_KIND_TP3 3 |
22 | #define PS2PP_KIND_TRACKMAN 4 | ||
22 | 23 | ||
23 | /* Logitech mouse features */ | 24 | /* Logitech mouse features */ |
24 | #define PS2PP_WHEEL 0x01 | 25 | #define PS2PP_WHEEL 0x01 |
@@ -223,6 +224,7 @@ static struct ps2pp_info *get_model_info(unsigned char model) | |||
223 | { 73, 0, PS2PP_SIDE_BTN }, | 224 | { 73, 0, PS2PP_SIDE_BTN }, |
224 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 225 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
225 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 226 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
227 | { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ | ||
226 | { 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL }, | 228 | { 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL }, |
227 | { 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 229 | { 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
228 | { 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 230 | { 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
@@ -298,6 +300,10 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_inf | |||
298 | psmouse->name = "TouchPad 3"; | 300 | psmouse->name = "TouchPad 3"; |
299 | break; | 301 | break; |
300 | 302 | ||
303 | case PS2PP_KIND_TRACKMAN: | ||
304 | psmouse->name = "TrackMan"; | ||
305 | break; | ||
306 | |||
301 | default: | 307 | default: |
302 | /* | 308 | /* |
303 | * Set name to "Mouse" only when using PS2++, | 309 | * Set name to "Mouse" only when using PS2++, |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 1494175ac6fe..161afddd0f44 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -36,13 +36,10 @@ | |||
36 | 36 | ||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * This code has been tested on an ads7846 / N770 device. | 39 | * This code has been heavily tested on a Nokia 770, and lightly |
40 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). | ||
40 | * Support for ads7843 and ads7845 has only been stubbed in. | 41 | * Support for ads7843 and ads7845 has only been stubbed in. |
41 | * | 42 | * |
42 | * Not yet done: How accurate are the temperature and voltage | ||
43 | * readings? (System-specific calibration should support | ||
44 | * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.) | ||
45 | * | ||
46 | * IRQ handling needs a workaround because of a shortcoming in handling | 43 | * IRQ handling needs a workaround because of a shortcoming in handling |
47 | * edge triggered IRQs on some platforms like the OMAP1/2. These | 44 | * edge triggered IRQs on some platforms like the OMAP1/2. These |
48 | * platforms don't handle the ARM lazy IRQ disabling properly, thus we | 45 | * platforms don't handle the ARM lazy IRQ disabling properly, thus we |
@@ -248,10 +245,13 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
248 | 245 | ||
249 | if (req->msg.status) | 246 | if (req->msg.status) |
250 | status = req->msg.status; | 247 | status = req->msg.status; |
248 | |||
249 | /* on-wire is a must-ignore bit, a BE12 value, then padding */ | ||
251 | sample = be16_to_cpu(req->sample); | 250 | sample = be16_to_cpu(req->sample); |
252 | sample = sample >> 4; | 251 | sample = sample >> 3; |
253 | kfree(req); | 252 | sample &= 0x0fff; |
254 | 253 | ||
254 | kfree(req); | ||
255 | return status ? status : sample; | 255 | return status ? status : sample; |
256 | } | 256 | } |
257 | 257 | ||
@@ -336,13 +336,13 @@ static void ads7846_rx(void *ads) | |||
336 | u16 x, y, z1, z2; | 336 | u16 x, y, z1, z2; |
337 | unsigned long flags; | 337 | unsigned long flags; |
338 | 338 | ||
339 | /* adjust: 12 bit samples (left aligned), built from | 339 | /* adjust: on-wire is a must-ignore bit, a BE12 value, then padding; |
340 | * two 8 bit values writen msb-first. | 340 | * built from two 8 bit values written msb-first. |
341 | */ | 341 | */ |
342 | x = be16_to_cpu(ts->tc.x) >> 4; | 342 | x = (be16_to_cpu(ts->tc.x) >> 3) & 0x0fff; |
343 | y = be16_to_cpu(ts->tc.y) >> 4; | 343 | y = (be16_to_cpu(ts->tc.y) >> 3) & 0x0fff; |
344 | z1 = be16_to_cpu(ts->tc.z1) >> 4; | 344 | z1 = (be16_to_cpu(ts->tc.z1) >> 3) & 0x0fff; |
345 | z2 = be16_to_cpu(ts->tc.z2) >> 4; | 345 | z2 = (be16_to_cpu(ts->tc.z2) >> 3) & 0x0fff; |
346 | 346 | ||
347 | /* range filtering */ | 347 | /* range filtering */ |
348 | if (x == MAX_12BIT) | 348 | if (x == MAX_12BIT) |
@@ -420,7 +420,7 @@ static void ads7846_debounce(void *ads) | |||
420 | 420 | ||
421 | m = &ts->msg[ts->msg_idx]; | 421 | m = &ts->msg[ts->msg_idx]; |
422 | t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list); | 422 | t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list); |
423 | val = (*(u16 *)t->rx_buf) >> 3; | 423 | val = (be16_to_cpu(*(__be16 *)t->rx_buf) >> 3) & 0x0fff; |
424 | if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) { | 424 | if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) { |
425 | /* Repeat it, if this was the first read or the read | 425 | /* Repeat it, if this was the first read or the read |
426 | * wasn't consistent enough. */ | 426 | * wasn't consistent enough. */ |
@@ -469,7 +469,7 @@ static void ads7846_timer(unsigned long handle) | |||
469 | spin_lock_irq(&ts->lock); | 469 | spin_lock_irq(&ts->lock); |
470 | 470 | ||
471 | if (unlikely(ts->msg_idx && !ts->pendown)) { | 471 | if (unlikely(ts->msg_idx && !ts->pendown)) { |
472 | /* measurment cycle ended */ | 472 | /* measurement cycle ended */ |
473 | if (!device_suspended(&ts->spi->dev)) { | 473 | if (!device_suspended(&ts->spi->dev)) { |
474 | ts->irq_disabled = 0; | 474 | ts->irq_disabled = 0; |
475 | enable_irq(ts->spi->irq); | 475 | enable_irq(ts->spi->irq); |
@@ -495,11 +495,10 @@ static irqreturn_t ads7846_irq(int irq, void *handle, struct pt_regs *regs) | |||
495 | spin_lock_irqsave(&ts->lock, flags); | 495 | spin_lock_irqsave(&ts->lock, flags); |
496 | if (likely(ts->get_pendown_state())) { | 496 | if (likely(ts->get_pendown_state())) { |
497 | if (!ts->irq_disabled) { | 497 | if (!ts->irq_disabled) { |
498 | /* REVISIT irq logic for many ARM chips has cloned a | 498 | /* The ARM do_simple_IRQ() dispatcher doesn't act |
499 | * bug wherein disabling an irq in its handler won't | 499 | * like the other dispatchers: it will report IRQs |
500 | * work;(it's disabled lazily, and too late to work. | 500 | * even after they've been disabled. We work around |
501 | * until all their irq logic is fixed, we must shadow | 501 | * that here. (The "generic irq" framework may help...) |
502 | * that state here. | ||
503 | */ | 502 | */ |
504 | ts->irq_disabled = 1; | 503 | ts->irq_disabled = 1; |
505 | disable_irq(ts->spi->irq); | 504 | disable_irq(ts->spi->irq); |
@@ -609,16 +608,20 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
609 | return -EINVAL; | 608 | return -EINVAL; |
610 | } | 609 | } |
611 | 610 | ||
611 | /* REVISIT when the irq can be triggered active-low, or if for some | ||
612 | * reason the touchscreen isn't hooked up, we don't need to access | ||
613 | * the pendown state. | ||
614 | */ | ||
612 | if (pdata->get_pendown_state == NULL) { | 615 | if (pdata->get_pendown_state == NULL) { |
613 | dev_dbg(&spi->dev, "no get_pendown_state function?\n"); | 616 | dev_dbg(&spi->dev, "no get_pendown_state function?\n"); |
614 | return -EINVAL; | 617 | return -EINVAL; |
615 | } | 618 | } |
616 | 619 | ||
617 | /* We'd set the wordsize to 12 bits ... except that some controllers | 620 | /* We'd set TX wordsize 8 bits and RX wordsize to 13 bits ... except |
618 | * will then treat the 8 bit command words as 12 bits (and drop the | 621 | * that even if the hardware can do that, the SPI controller driver |
619 | * four MSBs of the 12 bit result). Result: inputs must be shifted | 622 | * may not. So we stick to very-portable 8 bit words, both RX and TX. |
620 | * to discard the four garbage LSBs. | ||
621 | */ | 623 | */ |
624 | spi->bits_per_word = 8; | ||
622 | 625 | ||
623 | ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL); | 626 | ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL); |
624 | input_dev = input_allocate_device(); | 627 | input_dev = input_allocate_device(); |
@@ -772,7 +775,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
772 | 775 | ||
773 | if (request_irq(spi->irq, ads7846_irq, | 776 | if (request_irq(spi->irq, ads7846_irq, |
774 | SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, | 777 | SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, |
775 | spi->dev.bus_id, ts)) { | 778 | spi->dev.driver->name, ts)) { |
776 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); | 779 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); |
777 | err = -EBUSY; | 780 | err = -EBUSY; |
778 | goto err_free_mem; | 781 | goto err_free_mem; |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 3ca3cfb03a7e..f19b874753a9 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -167,6 +167,15 @@ void md_new_event(mddev_t *mddev) | |||
167 | } | 167 | } |
168 | EXPORT_SYMBOL_GPL(md_new_event); | 168 | EXPORT_SYMBOL_GPL(md_new_event); |
169 | 169 | ||
170 | /* Alternate version that can be called from interrupts | ||
171 | * when calling sysfs_notify isn't needed. | ||
172 | */ | ||
173 | void md_new_event_inintr(mddev_t *mddev) | ||
174 | { | ||
175 | atomic_inc(&md_event_count); | ||
176 | wake_up(&md_event_waiters); | ||
177 | } | ||
178 | |||
170 | /* | 179 | /* |
171 | * Enables to iterate over all existing md arrays | 180 | * Enables to iterate over all existing md arrays |
172 | * all_mddevs_lock protects this list. | 181 | * all_mddevs_lock protects this list. |
@@ -4149,7 +4158,7 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev) | |||
4149 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | 4158 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
4150 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 4159 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
4151 | md_wakeup_thread(mddev->thread); | 4160 | md_wakeup_thread(mddev->thread); |
4152 | md_new_event(mddev); | 4161 | md_new_event_inintr(mddev); |
4153 | } | 4162 | } |
4154 | 4163 | ||
4155 | /* seq_file implementation /proc/mdstat */ | 4164 | /* seq_file implementation /proc/mdstat */ |
@@ -5028,8 +5037,10 @@ static int md_notify_reboot(struct notifier_block *this, | |||
5028 | printk(KERN_INFO "md: stopping all md devices.\n"); | 5037 | printk(KERN_INFO "md: stopping all md devices.\n"); |
5029 | 5038 | ||
5030 | ITERATE_MDDEV(mddev,tmp) | 5039 | ITERATE_MDDEV(mddev,tmp) |
5031 | if (mddev_trylock(mddev)) | 5040 | if (mddev_trylock(mddev)) { |
5032 | do_md_stop (mddev, 1); | 5041 | do_md_stop (mddev, 1); |
5042 | mddev_unlock(mddev); | ||
5043 | } | ||
5033 | /* | 5044 | /* |
5034 | * certain more exotic SCSI devices are known to be | 5045 | * certain more exotic SCSI devices are known to be |
5035 | * volatile wrt too early system reboots. While the | 5046 | * volatile wrt too early system reboots. While the |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 9080853fe283..a30084076ac8 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1605,6 +1605,21 @@ mpt_resume(struct pci_dev *pdev) | |||
1605 | } | 1605 | } |
1606 | #endif | 1606 | #endif |
1607 | 1607 | ||
1608 | static int | ||
1609 | mpt_signal_reset(int index, MPT_ADAPTER *ioc, int reset_phase) | ||
1610 | { | ||
1611 | if ((MptDriverClass[index] == MPTSPI_DRIVER && | ||
1612 | ioc->bus_type != SPI) || | ||
1613 | (MptDriverClass[index] == MPTFC_DRIVER && | ||
1614 | ioc->bus_type != FC) || | ||
1615 | (MptDriverClass[index] == MPTSAS_DRIVER && | ||
1616 | ioc->bus_type != SAS)) | ||
1617 | /* make sure we only call the relevant reset handler | ||
1618 | * for the bus */ | ||
1619 | return 0; | ||
1620 | return (MptResetHandlers[index])(ioc, reset_phase); | ||
1621 | } | ||
1622 | |||
1608 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1623 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
1609 | /* | 1624 | /* |
1610 | * mpt_do_ioc_recovery - Initialize or recover MPT adapter. | 1625 | * mpt_do_ioc_recovery - Initialize or recover MPT adapter. |
@@ -1885,14 +1900,14 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) | |||
1885 | if ((ret == 0) && MptResetHandlers[ii]) { | 1900 | if ((ret == 0) && MptResetHandlers[ii]) { |
1886 | dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", | 1901 | dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", |
1887 | ioc->name, ii)); | 1902 | ioc->name, ii)); |
1888 | rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); | 1903 | rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET); |
1889 | handlers++; | 1904 | handlers++; |
1890 | } | 1905 | } |
1891 | 1906 | ||
1892 | if (alt_ioc_ready && MptResetHandlers[ii]) { | 1907 | if (alt_ioc_ready && MptResetHandlers[ii]) { |
1893 | drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", | 1908 | drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", |
1894 | ioc->name, ioc->alt_ioc->name, ii)); | 1909 | ioc->name, ioc->alt_ioc->name, ii)); |
1895 | rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); | 1910 | rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET); |
1896 | handlers++; | 1911 | handlers++; |
1897 | } | 1912 | } |
1898 | } | 1913 | } |
@@ -3267,11 +3282,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) | |||
3267 | if (MptResetHandlers[ii]) { | 3282 | if (MptResetHandlers[ii]) { |
3268 | dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", | 3283 | dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", |
3269 | ioc->name, ii)); | 3284 | ioc->name, ii)); |
3270 | r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET); | 3285 | r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET); |
3271 | if (ioc->alt_ioc) { | 3286 | if (ioc->alt_ioc) { |
3272 | dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", | 3287 | dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", |
3273 | ioc->name, ioc->alt_ioc->name, ii)); | 3288 | ioc->name, ioc->alt_ioc->name, ii)); |
3274 | r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET); | 3289 | r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET); |
3275 | } | 3290 | } |
3276 | } | 3291 | } |
3277 | } | 3292 | } |
@@ -5706,11 +5721,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag) | |||
5706 | if (MptResetHandlers[ii]) { | 5721 | if (MptResetHandlers[ii]) { |
5707 | dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", | 5722 | dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", |
5708 | ioc->name, ii)); | 5723 | ioc->name, ii)); |
5709 | r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET); | 5724 | r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET); |
5710 | if (ioc->alt_ioc) { | 5725 | if (ioc->alt_ioc) { |
5711 | dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", | 5726 | dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", |
5712 | ioc->name, ioc->alt_ioc->name, ii)); | 5727 | ioc->name, ioc->alt_ioc->name, ii)); |
5713 | r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET); | 5728 | r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET); |
5714 | } | 5729 | } |
5715 | } | 5730 | } |
5716 | } | 5731 | } |
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 003b077c2324..45bcf098e762 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig | |||
@@ -84,7 +84,7 @@ config MMC_WBSD | |||
84 | 84 | ||
85 | config MMC_AU1X | 85 | config MMC_AU1X |
86 | tristate "Alchemy AU1XX0 MMC Card Interface support" | 86 | tristate "Alchemy AU1XX0 MMC Card Interface support" |
87 | depends on SOC_AU1X00 && MMC | 87 | depends on MMC && SOC_AU1200 |
88 | help | 88 | help |
89 | This selects the AMD Alchemy(R) Multimedia card interface. | 89 | This selects the AMD Alchemy(R) Multimedia card interface. |
90 | If you have a Alchemy platform with a MMC slot, say Y or M here. | 90 | If you have a Alchemy platform with a MMC slot, say Y or M here. |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index c99e87838f92..ed15fcaedaf9 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -220,6 +220,7 @@ static void e1000_restore_vlan(struct e1000_adapter *adapter); | |||
220 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); | 220 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); |
221 | static int e1000_resume(struct pci_dev *pdev); | 221 | static int e1000_resume(struct pci_dev *pdev); |
222 | #endif | 222 | #endif |
223 | static void e1000_shutdown(struct pci_dev *pdev); | ||
223 | 224 | ||
224 | #ifdef CONFIG_NET_POLL_CONTROLLER | 225 | #ifdef CONFIG_NET_POLL_CONTROLLER |
225 | /* for netdump / net console */ | 226 | /* for netdump / net console */ |
@@ -235,8 +236,9 @@ static struct pci_driver e1000_driver = { | |||
235 | /* Power Managment Hooks */ | 236 | /* Power Managment Hooks */ |
236 | #ifdef CONFIG_PM | 237 | #ifdef CONFIG_PM |
237 | .suspend = e1000_suspend, | 238 | .suspend = e1000_suspend, |
238 | .resume = e1000_resume | 239 | .resume = e1000_resume, |
239 | #endif | 240 | #endif |
241 | .shutdown = e1000_shutdown | ||
240 | }; | 242 | }; |
241 | 243 | ||
242 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); | 244 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); |
@@ -4611,6 +4613,12 @@ e1000_resume(struct pci_dev *pdev) | |||
4611 | return 0; | 4613 | return 0; |
4612 | } | 4614 | } |
4613 | #endif | 4615 | #endif |
4616 | |||
4617 | static void e1000_shutdown(struct pci_dev *pdev) | ||
4618 | { | ||
4619 | e1000_suspend(pdev, PMSG_SUSPEND); | ||
4620 | } | ||
4621 | |||
4614 | #ifdef CONFIG_NET_POLL_CONTROLLER | 4622 | #ifdef CONFIG_NET_POLL_CONTROLLER |
4615 | /* | 4623 | /* |
4616 | * Polling 'interrupt' - used by things like netconsole to send skbs | 4624 | * Polling 'interrupt' - used by things like netconsole to send skbs |
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/irda/Kconfig b/drivers/net/irda/Kconfig index 5e6d00752990..cff8598aa800 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig | |||
@@ -33,7 +33,7 @@ config DONGLE | |||
33 | 33 | ||
34 | config ESI_DONGLE | 34 | config ESI_DONGLE |
35 | tristate "ESI JetEye PC dongle" | 35 | tristate "ESI JetEye PC dongle" |
36 | depends on DONGLE && IRDA | 36 | depends on IRTTY_SIR && DONGLE && IRDA |
37 | help | 37 | help |
38 | Say Y here if you want to build support for the Extended Systems | 38 | Say Y here if you want to build support for the Extended Systems |
39 | JetEye PC dongle. To compile it as a module, choose M here. The ESI | 39 | JetEye PC dongle. To compile it as a module, choose M here. The ESI |
@@ -44,7 +44,7 @@ config ESI_DONGLE | |||
44 | 44 | ||
45 | config ACTISYS_DONGLE | 45 | config ACTISYS_DONGLE |
46 | tristate "ACTiSYS IR-220L and IR220L+ dongle" | 46 | tristate "ACTiSYS IR-220L and IR220L+ dongle" |
47 | depends on DONGLE && IRDA | 47 | depends on IRTTY_SIR && DONGLE && IRDA |
48 | help | 48 | help |
49 | Say Y here if you want to build support for the ACTiSYS IR-220L and | 49 | Say Y here if you want to build support for the ACTiSYS IR-220L and |
50 | IR220L+ dongles. To compile it as a module, choose M here. The | 50 | IR220L+ dongles. To compile it as a module, choose M here. The |
@@ -55,7 +55,7 @@ config ACTISYS_DONGLE | |||
55 | 55 | ||
56 | config TEKRAM_DONGLE | 56 | config TEKRAM_DONGLE |
57 | tristate "Tekram IrMate 210B dongle" | 57 | tristate "Tekram IrMate 210B dongle" |
58 | depends on DONGLE && IRDA | 58 | depends on IRTTY_SIR && DONGLE && IRDA |
59 | help | 59 | help |
60 | Say Y here if you want to build support for the Tekram IrMate 210B | 60 | Say Y here if you want to build support for the Tekram IrMate 210B |
61 | dongle. To compile it as a module, choose M here. The Tekram dongle | 61 | dongle. To compile it as a module, choose M here. The Tekram dongle |
@@ -66,7 +66,7 @@ config TEKRAM_DONGLE | |||
66 | 66 | ||
67 | config TOIM3232_DONGLE | 67 | config TOIM3232_DONGLE |
68 | tristate "TOIM3232 IrDa dongle" | 68 | tristate "TOIM3232 IrDa dongle" |
69 | depends on DONGLE && IRDA | 69 | depends on IRTTY_SIR && DONGLE && IRDA |
70 | help | 70 | help |
71 | Say Y here if you want to build support for the Vishay/Temic | 71 | Say Y here if you want to build support for the Vishay/Temic |
72 | TOIM3232 and TOIM4232 based dongles. | 72 | TOIM3232 and TOIM4232 based dongles. |
@@ -74,7 +74,7 @@ config TOIM3232_DONGLE | |||
74 | 74 | ||
75 | config LITELINK_DONGLE | 75 | config LITELINK_DONGLE |
76 | tristate "Parallax LiteLink dongle" | 76 | tristate "Parallax LiteLink dongle" |
77 | depends on DONGLE && IRDA | 77 | depends on IRTTY_SIR && DONGLE && IRDA |
78 | help | 78 | help |
79 | Say Y here if you want to build support for the Parallax Litelink | 79 | Say Y here if you want to build support for the Parallax Litelink |
80 | dongle. To compile it as a module, choose M here. The Parallax | 80 | dongle. To compile it as a module, choose M here. The Parallax |
@@ -85,7 +85,7 @@ config LITELINK_DONGLE | |||
85 | 85 | ||
86 | config MA600_DONGLE | 86 | config MA600_DONGLE |
87 | tristate "Mobile Action MA600 dongle" | 87 | tristate "Mobile Action MA600 dongle" |
88 | depends on DONGLE && IRDA && EXPERIMENTAL | 88 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
89 | help | 89 | help |
90 | Say Y here if you want to build support for the Mobile Action MA600 | 90 | Say Y here if you want to build support for the Mobile Action MA600 |
91 | dongle. To compile it as a module, choose M here. The MA600 dongle | 91 | dongle. To compile it as a module, choose M here. The MA600 dongle |
@@ -98,7 +98,7 @@ config MA600_DONGLE | |||
98 | 98 | ||
99 | config GIRBIL_DONGLE | 99 | config GIRBIL_DONGLE |
100 | tristate "Greenwich GIrBIL dongle" | 100 | tristate "Greenwich GIrBIL dongle" |
101 | depends on DONGLE && IRDA && EXPERIMENTAL | 101 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
102 | help | 102 | help |
103 | Say Y here if you want to build support for the Greenwich GIrBIL | 103 | Say Y here if you want to build support for the Greenwich GIrBIL |
104 | dongle. If you want to compile it as a module, choose M here. | 104 | dongle. If you want to compile it as a module, choose M here. |
@@ -109,7 +109,7 @@ config GIRBIL_DONGLE | |||
109 | 109 | ||
110 | config MCP2120_DONGLE | 110 | config MCP2120_DONGLE |
111 | tristate "Microchip MCP2120" | 111 | tristate "Microchip MCP2120" |
112 | depends on DONGLE && IRDA && EXPERIMENTAL | 112 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
113 | help | 113 | help |
114 | Say Y here if you want to build support for the Microchip MCP2120 | 114 | Say Y here if you want to build support for the Microchip MCP2120 |
115 | dongle. If you want to compile it as a module, choose M here. | 115 | dongle. If you want to compile it as a module, choose M here. |
@@ -123,7 +123,7 @@ config MCP2120_DONGLE | |||
123 | 123 | ||
124 | config OLD_BELKIN_DONGLE | 124 | config OLD_BELKIN_DONGLE |
125 | tristate "Old Belkin dongle" | 125 | tristate "Old Belkin dongle" |
126 | depends on DONGLE && IRDA && EXPERIMENTAL | 126 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
127 | help | 127 | help |
128 | Say Y here if you want to build support for the Adaptec Airport 1000 | 128 | Say Y here if you want to build support for the Adaptec Airport 1000 |
129 | and 2000 dongles. If you want to compile it as a module, choose | 129 | and 2000 dongles. If you want to compile it as a module, choose |
@@ -132,7 +132,7 @@ config OLD_BELKIN_DONGLE | |||
132 | 132 | ||
133 | config ACT200L_DONGLE | 133 | config ACT200L_DONGLE |
134 | tristate "ACTiSYS IR-200L dongle" | 134 | tristate "ACTiSYS IR-200L dongle" |
135 | depends on DONGLE && IRDA && EXPERIMENTAL | 135 | depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL |
136 | help | 136 | help |
137 | Say Y here if you want to build support for the ACTiSYS IR-200L | 137 | Say Y here if you want to build support for the ACTiSYS IR-200L |
138 | dongle. If you want to compile it as a module, choose M here. | 138 | dongle. If you want to compile it as a module, choose M here. |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 66e74f740261..bf58db29e2ed 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -107,7 +107,7 @@ static int init_netconsole(void) | |||
107 | 107 | ||
108 | if(!configured) { | 108 | if(!configured) { |
109 | printk("netconsole: not configured, aborting\n"); | 109 | printk("netconsole: not configured, aborting\n"); |
110 | return -EINVAL; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | if(netpoll_setup(&np)) | 113 | if(netpoll_setup(&np)) |
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/net/pcnet32.c b/drivers/net/pcnet32.c index 07c31f19c6ba..fc08c4af506c 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -1774,8 +1774,6 @@ static int pcnet32_open(struct net_device *dev) | |||
1774 | lp->rx_dma_addr[i] = 0; | 1774 | lp->rx_dma_addr[i] = 0; |
1775 | } | 1775 | } |
1776 | 1776 | ||
1777 | pcnet32_free_ring(dev); | ||
1778 | |||
1779 | /* | 1777 | /* |
1780 | * Switch back to 16bit mode to avoid problems with dumb | 1778 | * Switch back to 16bit mode to avoid problems with dumb |
1781 | * DOS packet driver after a warm reboot | 1779 | * DOS packet driver after a warm reboot |
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 475dc930380f..0d101a18026a 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -861,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb) | |||
861 | * give dev_queue_xmit something it can free. | 861 | * give dev_queue_xmit something it can free. |
862 | */ | 862 | */ |
863 | skb2 = skb_clone(skb, GFP_ATOMIC); | 863 | skb2 = skb_clone(skb, GFP_ATOMIC); |
864 | |||
865 | if (skb2 == NULL) | ||
866 | goto abort; | ||
864 | } | 867 | } |
865 | 868 | ||
866 | ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); | 869 | ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); |
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index 0e1ac338cac1..bed6823d9809 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1838,7 +1838,7 @@ struct net_device * __init arlan_probe(int unit) | |||
1838 | } | 1838 | } |
1839 | 1839 | ||
1840 | #ifdef MODULE | 1840 | #ifdef MODULE |
1841 | int init_module(void) | 1841 | int __init init_module(void) |
1842 | { | 1842 | { |
1843 | int i = 0; | 1843 | int i = 0; |
1844 | 1844 | ||
@@ -1860,7 +1860,7 @@ int init_module(void) | |||
1860 | } | 1860 | } |
1861 | 1861 | ||
1862 | 1862 | ||
1863 | void cleanup_module(void) | 1863 | void __exit cleanup_module(void) |
1864 | { | 1864 | { |
1865 | int i = 0; | 1865 | int i = 0; |
1866 | struct net_device *dev; | 1866 | struct net_device *dev; |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index ff192e96268a..dade4b903579 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -4306,7 +4306,7 @@ out: | |||
4306 | * Insertion of the module | 4306 | * Insertion of the module |
4307 | * I'm now quite proud of the multi-device support. | 4307 | * I'm now quite proud of the multi-device support. |
4308 | */ | 4308 | */ |
4309 | int init_module(void) | 4309 | int __init init_module(void) |
4310 | { | 4310 | { |
4311 | int ret = -EIO; /* Return error if no cards found */ | 4311 | int ret = -EIO; /* Return error if no cards found */ |
4312 | int i; | 4312 | int i; |
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/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index af9f212314b3..fe986af884f8 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -1486,13 +1486,13 @@ ch_action_iofatal(fsm_instance * fi, int event, void *arg) | |||
1486 | } | 1486 | } |
1487 | } | 1487 | } |
1488 | 1488 | ||
1489 | static void | 1489 | static void |
1490 | ch_action_reinit(fsm_instance *fi, int event, void *arg) | 1490 | ch_action_reinit(fsm_instance *fi, int event, void *arg) |
1491 | { | 1491 | { |
1492 | struct channel *ch = (struct channel *)arg; | 1492 | struct channel *ch = (struct channel *)arg; |
1493 | struct net_device *dev = ch->netdev; | 1493 | struct net_device *dev = ch->netdev; |
1494 | struct ctc_priv *privptr = dev->priv; | 1494 | struct ctc_priv *privptr = dev->priv; |
1495 | 1495 | ||
1496 | DBF_TEXT(trace, 4, __FUNCTION__); | 1496 | DBF_TEXT(trace, 4, __FUNCTION__); |
1497 | ch_action_iofatal(fi, event, arg); | 1497 | ch_action_iofatal(fi, event, arg); |
1498 | fsm_addtimer(&privptr->restart_timer, 1000, DEV_EVENT_RESTART, dev); | 1498 | fsm_addtimer(&privptr->restart_timer, 1000, DEV_EVENT_RESTART, dev); |
@@ -1624,7 +1624,7 @@ less_than(char *id1, char *id2) | |||
1624 | } | 1624 | } |
1625 | dev1 = simple_strtoul(id1, &id1, 16); | 1625 | dev1 = simple_strtoul(id1, &id1, 16); |
1626 | dev2 = simple_strtoul(id2, &id2, 16); | 1626 | dev2 = simple_strtoul(id2, &id2, 16); |
1627 | 1627 | ||
1628 | return (dev1 < dev2); | 1628 | return (dev1 < dev2); |
1629 | } | 1629 | } |
1630 | 1630 | ||
@@ -1895,7 +1895,7 @@ ctc_irq_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1895 | irb->scsw.dstat); | 1895 | irb->scsw.dstat); |
1896 | return; | 1896 | return; |
1897 | } | 1897 | } |
1898 | 1898 | ||
1899 | priv = ((struct ccwgroup_device *)cdev->dev.driver_data) | 1899 | priv = ((struct ccwgroup_device *)cdev->dev.driver_data) |
1900 | ->dev.driver_data; | 1900 | ->dev.driver_data; |
1901 | 1901 | ||
@@ -1909,7 +1909,7 @@ ctc_irq_handler(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1909 | "device %s\n", cdev->dev.bus_id); | 1909 | "device %s\n", cdev->dev.bus_id); |
1910 | return; | 1910 | return; |
1911 | } | 1911 | } |
1912 | 1912 | ||
1913 | dev = (struct net_device *) (ch->netdev); | 1913 | dev = (struct net_device *) (ch->netdev); |
1914 | if (dev == NULL) { | 1914 | if (dev == NULL) { |
1915 | ctc_pr_crit("ctc: ctc_irq_handler dev=NULL bus_id=%s, ch=0x%p\n", | 1915 | ctc_pr_crit("ctc: ctc_irq_handler dev=NULL bus_id=%s, ch=0x%p\n", |
@@ -2008,12 +2008,12 @@ dev_action_stop(fsm_instance * fi, int event, void *arg) | |||
2008 | fsm_event(ch->fsm, CH_EVENT_STOP, ch); | 2008 | fsm_event(ch->fsm, CH_EVENT_STOP, ch); |
2009 | } | 2009 | } |
2010 | } | 2010 | } |
2011 | static void | 2011 | static void |
2012 | dev_action_restart(fsm_instance *fi, int event, void *arg) | 2012 | dev_action_restart(fsm_instance *fi, int event, void *arg) |
2013 | { | 2013 | { |
2014 | struct net_device *dev = (struct net_device *)arg; | 2014 | struct net_device *dev = (struct net_device *)arg; |
2015 | struct ctc_priv *privptr = dev->priv; | 2015 | struct ctc_priv *privptr = dev->priv; |
2016 | 2016 | ||
2017 | DBF_TEXT(trace, 3, __FUNCTION__); | 2017 | DBF_TEXT(trace, 3, __FUNCTION__); |
2018 | ctc_pr_debug("%s: Restarting\n", dev->name); | 2018 | ctc_pr_debug("%s: Restarting\n", dev->name); |
2019 | dev_action_stop(fi, event, arg); | 2019 | dev_action_stop(fi, event, arg); |
@@ -2193,7 +2193,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2193 | 2193 | ||
2194 | DBF_TEXT(trace, 5, __FUNCTION__); | 2194 | DBF_TEXT(trace, 5, __FUNCTION__); |
2195 | /* we need to acquire the lock for testing the state | 2195 | /* we need to acquire the lock for testing the state |
2196 | * otherwise we can have an IRQ changing the state to | 2196 | * otherwise we can have an IRQ changing the state to |
2197 | * TXIDLE after the test but before acquiring the lock. | 2197 | * TXIDLE after the test but before acquiring the lock. |
2198 | */ | 2198 | */ |
2199 | spin_lock_irqsave(&ch->collect_lock, saveflags); | 2199 | spin_lock_irqsave(&ch->collect_lock, saveflags); |
@@ -2393,7 +2393,7 @@ ctc_tx(struct sk_buff *skb, struct net_device * dev) | |||
2393 | 2393 | ||
2394 | /** | 2394 | /** |
2395 | * If channels are not running, try to restart them | 2395 | * If channels are not running, try to restart them |
2396 | * and throw away packet. | 2396 | * and throw away packet. |
2397 | */ | 2397 | */ |
2398 | if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { | 2398 | if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { |
2399 | fsm_event(privptr->fsm, DEV_EVENT_START, dev); | 2399 | fsm_event(privptr->fsm, DEV_EVENT_START, dev); |
@@ -2738,7 +2738,7 @@ ctc_remove_files(struct device *dev) | |||
2738 | /** | 2738 | /** |
2739 | * Add ctc specific attributes. | 2739 | * Add ctc specific attributes. |
2740 | * Add ctc private data. | 2740 | * Add ctc private data. |
2741 | * | 2741 | * |
2742 | * @param cgdev pointer to ccwgroup_device just added | 2742 | * @param cgdev pointer to ccwgroup_device just added |
2743 | * | 2743 | * |
2744 | * @returns 0 on success, !0 on failure. | 2744 | * @returns 0 on success, !0 on failure. |
@@ -2869,7 +2869,7 @@ ctc_new_device(struct ccwgroup_device *cgdev) | |||
2869 | DBF_TEXT(setup, 3, buffer); | 2869 | DBF_TEXT(setup, 3, buffer); |
2870 | 2870 | ||
2871 | type = get_channel_type(&cgdev->cdev[0]->id); | 2871 | type = get_channel_type(&cgdev->cdev[0]->id); |
2872 | 2872 | ||
2873 | snprintf(read_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[0]->dev.bus_id); | 2873 | snprintf(read_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[0]->dev.bus_id); |
2874 | snprintf(write_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[1]->dev.bus_id); | 2874 | snprintf(write_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[1]->dev.bus_id); |
2875 | 2875 | ||
@@ -2907,7 +2907,7 @@ ctc_new_device(struct ccwgroup_device *cgdev) | |||
2907 | channel_get(type, direction == READ ? read_id : write_id, | 2907 | channel_get(type, direction == READ ? read_id : write_id, |
2908 | direction); | 2908 | direction); |
2909 | if (privptr->channel[direction] == NULL) { | 2909 | if (privptr->channel[direction] == NULL) { |
2910 | if (direction == WRITE) | 2910 | if (direction == WRITE) |
2911 | channel_free(privptr->channel[READ]); | 2911 | channel_free(privptr->channel[READ]); |
2912 | 2912 | ||
2913 | ctc_free_netdevice(dev, 1); | 2913 | ctc_free_netdevice(dev, 1); |
@@ -2955,7 +2955,7 @@ ctc_shutdown_device(struct ccwgroup_device *cgdev) | |||
2955 | { | 2955 | { |
2956 | struct ctc_priv *priv; | 2956 | struct ctc_priv *priv; |
2957 | struct net_device *ndev; | 2957 | struct net_device *ndev; |
2958 | 2958 | ||
2959 | DBF_TEXT(setup, 3, __FUNCTION__); | 2959 | DBF_TEXT(setup, 3, __FUNCTION__); |
2960 | pr_debug("%s() called\n", __FUNCTION__); | 2960 | pr_debug("%s() called\n", __FUNCTION__); |
2961 | 2961 | ||
diff --git a/drivers/s390/net/ctctty.c b/drivers/s390/net/ctctty.c index 5cdcdbf92962..af54d1de07bf 100644 --- a/drivers/s390/net/ctctty.c +++ b/drivers/s390/net/ctctty.c | |||
@@ -130,7 +130,7 @@ ctc_tty_readmodem(ctc_tty_info *info) | |||
130 | if ((tty = info->tty)) { | 130 | if ((tty = info->tty)) { |
131 | if (info->mcr & UART_MCR_RTS) { | 131 | if (info->mcr & UART_MCR_RTS) { |
132 | struct sk_buff *skb; | 132 | struct sk_buff *skb; |
133 | 133 | ||
134 | if ((skb = skb_dequeue(&info->rx_queue))) { | 134 | if ((skb = skb_dequeue(&info->rx_queue))) { |
135 | int len = skb->len; | 135 | int len = skb->len; |
136 | tty_insert_flip_string(tty, skb->data, len); | 136 | tty_insert_flip_string(tty, skb->data, len); |
@@ -328,7 +328,7 @@ ctc_tty_inject(ctc_tty_info *info, char c) | |||
328 | { | 328 | { |
329 | int skb_res; | 329 | int skb_res; |
330 | struct sk_buff *skb; | 330 | struct sk_buff *skb; |
331 | 331 | ||
332 | DBF_TEXT(trace, 4, __FUNCTION__); | 332 | DBF_TEXT(trace, 4, __FUNCTION__); |
333 | if (ctc_tty_shuttingdown) | 333 | if (ctc_tty_shuttingdown) |
334 | return; | 334 | return; |
@@ -497,7 +497,7 @@ ctc_tty_write(struct tty_struct *tty, const u_char * buf, int count) | |||
497 | c = (count < CTC_TTY_XMIT_SIZE) ? count : CTC_TTY_XMIT_SIZE; | 497 | c = (count < CTC_TTY_XMIT_SIZE) ? count : CTC_TTY_XMIT_SIZE; |
498 | if (c <= 0) | 498 | if (c <= 0) |
499 | break; | 499 | break; |
500 | 500 | ||
501 | skb_res = info->netdev->hard_header_len + sizeof(info->mcr) + | 501 | skb_res = info->netdev->hard_header_len + sizeof(info->mcr) + |
502 | + sizeof(__u32); | 502 | + sizeof(__u32); |
503 | skb = dev_alloc_skb(skb_res + c); | 503 | skb = dev_alloc_skb(skb_res + c); |
@@ -828,7 +828,7 @@ ctc_tty_block_til_ready(struct tty_struct *tty, struct file *filp, ctc_tty_info | |||
828 | if (tty_hung_up_p(filp) || | 828 | if (tty_hung_up_p(filp) || |
829 | (info->flags & CTC_ASYNC_CLOSING)) { | 829 | (info->flags & CTC_ASYNC_CLOSING)) { |
830 | if (info->flags & CTC_ASYNC_CLOSING) | 830 | if (info->flags & CTC_ASYNC_CLOSING) |
831 | wait_event(info->close_wait, | 831 | wait_event(info->close_wait, |
832 | !(info->flags & CTC_ASYNC_CLOSING)); | 832 | !(info->flags & CTC_ASYNC_CLOSING)); |
833 | #ifdef MODEM_DO_RESTART | 833 | #ifdef MODEM_DO_RESTART |
834 | if (info->flags & CTC_ASYNC_HUP_NOTIFY) | 834 | if (info->flags & CTC_ASYNC_HUP_NOTIFY) |
@@ -1247,7 +1247,7 @@ ctc_tty_unregister_netdev(struct net_device *dev) { | |||
1247 | void | 1247 | void |
1248 | ctc_tty_cleanup(void) { | 1248 | ctc_tty_cleanup(void) { |
1249 | unsigned long saveflags; | 1249 | unsigned long saveflags; |
1250 | 1250 | ||
1251 | DBF_TEXT(trace, 2, __FUNCTION__); | 1251 | DBF_TEXT(trace, 2, __FUNCTION__); |
1252 | spin_lock_irqsave(&ctc_tty_lock, saveflags); | 1252 | spin_lock_irqsave(&ctc_tty_lock, saveflags); |
1253 | ctc_tty_shuttingdown = 1; | 1253 | ctc_tty_shuttingdown = 1; |
diff --git a/drivers/s390/net/cu3088.c b/drivers/s390/net/cu3088.c index b12533104c1f..e965f03a7291 100644 --- a/drivers/s390/net/cu3088.c +++ b/drivers/s390/net/cu3088.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
@@ -77,7 +77,7 @@ group_write(struct device_driver *drv, const char *buf, size_t count) | |||
77 | int len; | 77 | int len; |
78 | 78 | ||
79 | if (!(end = strchr(start, delim[i]))) | 79 | if (!(end = strchr(start, delim[i]))) |
80 | return count; | 80 | return -EINVAL; |
81 | len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start + 1); | 81 | len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start + 1); |
82 | strlcpy (bus_ids[i], start, len); | 82 | strlcpy (bus_ids[i], start, len); |
83 | argv[i] = bus_ids[i]; | 83 | argv[i] = bus_ids[i]; |
@@ -94,7 +94,7 @@ static DRIVER_ATTR(group, 0200, NULL, group_write); | |||
94 | 94 | ||
95 | /* Register-unregister for ctc&lcs */ | 95 | /* Register-unregister for ctc&lcs */ |
96 | int | 96 | int |
97 | register_cu3088_discipline(struct ccwgroup_driver *dcp) | 97 | register_cu3088_discipline(struct ccwgroup_driver *dcp) |
98 | { | 98 | { |
99 | int rc; | 99 | int rc; |
100 | 100 | ||
@@ -109,7 +109,7 @@ register_cu3088_discipline(struct ccwgroup_driver *dcp) | |||
109 | rc = driver_create_file(&dcp->driver, &driver_attr_group); | 109 | rc = driver_create_file(&dcp->driver, &driver_attr_group); |
110 | if (rc) | 110 | if (rc) |
111 | ccwgroup_driver_unregister(dcp); | 111 | ccwgroup_driver_unregister(dcp); |
112 | 112 | ||
113 | return rc; | 113 | return rc; |
114 | 114 | ||
115 | } | 115 | } |
@@ -137,7 +137,7 @@ static int __init | |||
137 | cu3088_init (void) | 137 | cu3088_init (void) |
138 | { | 138 | { |
139 | int rc; | 139 | int rc; |
140 | 140 | ||
141 | cu3088_root_dev = s390_root_dev_register("cu3088"); | 141 | cu3088_root_dev = s390_root_dev_register("cu3088"); |
142 | if (IS_ERR(cu3088_root_dev)) | 142 | if (IS_ERR(cu3088_root_dev)) |
143 | return PTR_ERR(cu3088_root_dev); | 143 | return PTR_ERR(cu3088_root_dev); |
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index 6190be9dca99..e0c7deb98831 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * IUCV network driver | 2 | * IUCV network driver |
3 | * | 3 | * |
4 | * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation | 4 | * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation |
@@ -28,7 +28,7 @@ | |||
28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /* #define DEBUG */ | 32 | /* #define DEBUG */ |
33 | 33 | ||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
@@ -81,7 +81,7 @@ iucv_bus_match (struct device *dev, struct device_driver *drv) | |||
81 | struct bus_type iucv_bus = { | 81 | struct bus_type iucv_bus = { |
82 | .name = "iucv", | 82 | .name = "iucv", |
83 | .match = iucv_bus_match, | 83 | .match = iucv_bus_match, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | struct device *iucv_root; | 86 | struct device *iucv_root; |
87 | 87 | ||
@@ -297,7 +297,7 @@ MODULE_LICENSE("GPL"); | |||
297 | /* | 297 | /* |
298 | * Debugging stuff | 298 | * Debugging stuff |
299 | *******************************************************************************/ | 299 | *******************************************************************************/ |
300 | 300 | ||
301 | 301 | ||
302 | #ifdef DEBUG | 302 | #ifdef DEBUG |
303 | static int debuglevel = 0; | 303 | static int debuglevel = 0; |
@@ -344,7 +344,7 @@ do { \ | |||
344 | /* | 344 | /* |
345 | * Internal functions | 345 | * Internal functions |
346 | *******************************************************************************/ | 346 | *******************************************************************************/ |
347 | 347 | ||
348 | /** | 348 | /** |
349 | * print start banner | 349 | * print start banner |
350 | */ | 350 | */ |
@@ -810,7 +810,7 @@ iucv_register_program (__u8 pgmname[16], | |||
810 | sizeof (new_handler->id.userid)); | 810 | sizeof (new_handler->id.userid)); |
811 | EBC_TOUPPER (new_handler->id.userid, | 811 | EBC_TOUPPER (new_handler->id.userid, |
812 | sizeof (new_handler->id.userid)); | 812 | sizeof (new_handler->id.userid)); |
813 | 813 | ||
814 | if (pgmmask) { | 814 | if (pgmmask) { |
815 | memcpy (new_handler->id.mask, pgmmask, | 815 | memcpy (new_handler->id.mask, pgmmask, |
816 | sizeof (new_handler->id.mask)); | 816 | sizeof (new_handler->id.mask)); |
@@ -1229,7 +1229,7 @@ iucv_purge (__u16 pathid, __u32 msgid, __u32 srccls, __u32 *audit) | |||
1229 | /* parm->ipaudit has only 3 bytes */ | 1229 | /* parm->ipaudit has only 3 bytes */ |
1230 | *audit >>= 8; | 1230 | *audit >>= 8; |
1231 | } | 1231 | } |
1232 | 1232 | ||
1233 | release_param(parm); | 1233 | release_param(parm); |
1234 | 1234 | ||
1235 | iucv_debug(1, "b2f0_result = %ld", b2f0_result); | 1235 | iucv_debug(1, "b2f0_result = %ld", b2f0_result); |
@@ -2330,14 +2330,14 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2330 | temp_buff1[j] &= (h->id.mask)[j]; | 2330 | temp_buff1[j] &= (h->id.mask)[j]; |
2331 | temp_buff2[j] &= (h->id.mask)[j]; | 2331 | temp_buff2[j] &= (h->id.mask)[j]; |
2332 | } | 2332 | } |
2333 | 2333 | ||
2334 | iucv_dumpit("temp_buff1:", | 2334 | iucv_dumpit("temp_buff1:", |
2335 | temp_buff1, sizeof(temp_buff1)); | 2335 | temp_buff1, sizeof(temp_buff1)); |
2336 | iucv_dumpit("temp_buff2", | 2336 | iucv_dumpit("temp_buff2", |
2337 | temp_buff2, sizeof(temp_buff2)); | 2337 | temp_buff2, sizeof(temp_buff2)); |
2338 | 2338 | ||
2339 | if (!memcmp (temp_buff1, temp_buff2, 24)) { | 2339 | if (!memcmp (temp_buff1, temp_buff2, 24)) { |
2340 | 2340 | ||
2341 | iucv_debug(2, | 2341 | iucv_debug(2, |
2342 | "found a matching handler"); | 2342 | "found a matching handler"); |
2343 | break; | 2343 | break; |
@@ -2368,7 +2368,7 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2368 | } else | 2368 | } else |
2369 | iucv_sever(int_buf->ippathid, no_listener); | 2369 | iucv_sever(int_buf->ippathid, no_listener); |
2370 | break; | 2370 | break; |
2371 | 2371 | ||
2372 | case 0x02: /*connection complete */ | 2372 | case 0x02: /*connection complete */ |
2373 | if (messagesDisabled) { | 2373 | if (messagesDisabled) { |
2374 | iucv_setmask(~0); | 2374 | iucv_setmask(~0); |
@@ -2387,7 +2387,7 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2387 | } else | 2387 | } else |
2388 | iucv_sever(int_buf->ippathid, no_listener); | 2388 | iucv_sever(int_buf->ippathid, no_listener); |
2389 | break; | 2389 | break; |
2390 | 2390 | ||
2391 | case 0x03: /* connection severed */ | 2391 | case 0x03: /* connection severed */ |
2392 | if (messagesDisabled) { | 2392 | if (messagesDisabled) { |
2393 | iucv_setmask(~0); | 2393 | iucv_setmask(~0); |
@@ -2398,13 +2398,13 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2398 | interrupt->ConnectionSevered( | 2398 | interrupt->ConnectionSevered( |
2399 | (iucv_ConnectionSevered *)int_buf, | 2399 | (iucv_ConnectionSevered *)int_buf, |
2400 | h->pgm_data); | 2400 | h->pgm_data); |
2401 | 2401 | ||
2402 | else | 2402 | else |
2403 | iucv_sever (int_buf->ippathid, no_listener); | 2403 | iucv_sever (int_buf->ippathid, no_listener); |
2404 | } else | 2404 | } else |
2405 | iucv_sever(int_buf->ippathid, no_listener); | 2405 | iucv_sever(int_buf->ippathid, no_listener); |
2406 | break; | 2406 | break; |
2407 | 2407 | ||
2408 | case 0x04: /* connection quiesced */ | 2408 | case 0x04: /* connection quiesced */ |
2409 | if (messagesDisabled) { | 2409 | if (messagesDisabled) { |
2410 | iucv_setmask(~0); | 2410 | iucv_setmask(~0); |
@@ -2420,7 +2420,7 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2420 | "ConnectionQuiesced not called"); | 2420 | "ConnectionQuiesced not called"); |
2421 | } | 2421 | } |
2422 | break; | 2422 | break; |
2423 | 2423 | ||
2424 | case 0x05: /* connection resumed */ | 2424 | case 0x05: /* connection resumed */ |
2425 | if (messagesDisabled) { | 2425 | if (messagesDisabled) { |
2426 | iucv_setmask(~0); | 2426 | iucv_setmask(~0); |
@@ -2436,7 +2436,7 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2436 | "ConnectionResumed not called"); | 2436 | "ConnectionResumed not called"); |
2437 | } | 2437 | } |
2438 | break; | 2438 | break; |
2439 | 2439 | ||
2440 | case 0x06: /* priority message complete */ | 2440 | case 0x06: /* priority message complete */ |
2441 | case 0x07: /* nonpriority message complete */ | 2441 | case 0x07: /* nonpriority message complete */ |
2442 | if (h) { | 2442 | if (h) { |
@@ -2449,7 +2449,7 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2449 | "MessageComplete not called"); | 2449 | "MessageComplete not called"); |
2450 | } | 2450 | } |
2451 | break; | 2451 | break; |
2452 | 2452 | ||
2453 | case 0x08: /* priority message pending */ | 2453 | case 0x08: /* priority message pending */ |
2454 | case 0x09: /* nonpriority message pending */ | 2454 | case 0x09: /* nonpriority message pending */ |
2455 | if (h) { | 2455 | if (h) { |
@@ -2467,7 +2467,7 @@ iucv_do_int(iucv_GeneralInterrupt * int_buf) | |||
2467 | __FUNCTION__); | 2467 | __FUNCTION__); |
2468 | break; | 2468 | break; |
2469 | } /* end switch */ | 2469 | } /* end switch */ |
2470 | 2470 | ||
2471 | iucv_debug(2, "exiting pathid %d, type %02X", | 2471 | iucv_debug(2, "exiting pathid %d, type %02X", |
2472 | int_buf->ippathid, int_buf->iptype); | 2472 | int_buf->ippathid, int_buf->iptype); |
2473 | 2473 | ||
diff --git a/drivers/s390/net/iucv.h b/drivers/s390/net/iucv.h index 0c4644d3d2f3..5b6b1b7241c9 100644 --- a/drivers/s390/net/iucv.h +++ b/drivers/s390/net/iucv.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * S390 version | 5 | * S390 version |
6 | * Copyright (C) 2000 IBM Corporation | 6 | * Copyright (C) 2000 IBM Corporation |
7 | * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com) | 7 | * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com) |
8 | * Xenia Tkatschow (xenia@us.ibm.com) | 8 | * Xenia Tkatschow (xenia@us.ibm.com) |
9 | * | 9 | * |
10 | * | 10 | * |
@@ -16,17 +16,17 @@ | |||
16 | * CP Programming Services book, also available on the web | 16 | * CP Programming Services book, also available on the web |
17 | * thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 | 17 | * thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 |
18 | * | 18 | * |
19 | * Definition of Return Codes | 19 | * Definition of Return Codes |
20 | * -All positive return codes including zero are reflected back | 20 | * -All positive return codes including zero are reflected back |
21 | * from CP except for iucv_register_program. The definition of each | 21 | * from CP except for iucv_register_program. The definition of each |
22 | * return code can be found in CP Programming Services book. | 22 | * return code can be found in CP Programming Services book. |
23 | * Also available on the web thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 | 23 | * Also available on the web thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 |
24 | * - Return Code of: | 24 | * - Return Code of: |
25 | * (-EINVAL) Invalid value | 25 | * (-EINVAL) Invalid value |
26 | * (-ENOMEM) storage allocation failed | 26 | * (-ENOMEM) storage allocation failed |
27 | * pgmask defined in iucv_register_program will be set depending on input | 27 | * pgmask defined in iucv_register_program will be set depending on input |
28 | * paramters. | 28 | * paramters. |
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
@@ -124,13 +124,13 @@ iucv_hex_dump(unsigned char *buf, size_t len) | |||
124 | #define iucv_handle_t void * | 124 | #define iucv_handle_t void * |
125 | 125 | ||
126 | /* flags1: | 126 | /* flags1: |
127 | * All flags are defined in the field IPFLAGS1 of each function | 127 | * All flags are defined in the field IPFLAGS1 of each function |
128 | * and can be found in CP Programming Services. | 128 | * and can be found in CP Programming Services. |
129 | * IPLOCAL - Indicates the connect can only be satisfied on the | 129 | * IPLOCAL - Indicates the connect can only be satisfied on the |
130 | * local system | 130 | * local system |
131 | * IPPRTY - Indicates a priority message | 131 | * IPPRTY - Indicates a priority message |
132 | * IPQUSCE - Indicates you do not want to receive messages on a | 132 | * IPQUSCE - Indicates you do not want to receive messages on a |
133 | * path until an iucv_resume is issued | 133 | * path until an iucv_resume is issued |
134 | * IPRMDATA - Indicates that the message is in the parameter list | 134 | * IPRMDATA - Indicates that the message is in the parameter list |
135 | */ | 135 | */ |
136 | #define IPLOCAL 0x01 | 136 | #define IPLOCAL 0x01 |
@@ -154,14 +154,14 @@ iucv_hex_dump(unsigned char *buf, size_t len) | |||
154 | #define AllInterrupts 0xf8 | 154 | #define AllInterrupts 0xf8 |
155 | /* | 155 | /* |
156 | * Mapping of external interrupt buffers should be used with the corresponding | 156 | * Mapping of external interrupt buffers should be used with the corresponding |
157 | * interrupt types. | 157 | * interrupt types. |
158 | * Names: iucv_ConnectionPending -> connection pending | 158 | * Names: iucv_ConnectionPending -> connection pending |
159 | * iucv_ConnectionComplete -> connection complete | 159 | * iucv_ConnectionComplete -> connection complete |
160 | * iucv_ConnectionSevered -> connection severed | 160 | * iucv_ConnectionSevered -> connection severed |
161 | * iucv_ConnectionQuiesced -> connection quiesced | 161 | * iucv_ConnectionQuiesced -> connection quiesced |
162 | * iucv_ConnectionResumed -> connection resumed | 162 | * iucv_ConnectionResumed -> connection resumed |
163 | * iucv_MessagePending -> message pending | 163 | * iucv_MessagePending -> message pending |
164 | * iucv_MessageComplete -> message complete | 164 | * iucv_MessageComplete -> message complete |
165 | */ | 165 | */ |
166 | typedef struct { | 166 | typedef struct { |
167 | u16 ippathid; | 167 | u16 ippathid; |
@@ -260,16 +260,16 @@ typedef struct { | |||
260 | uchar res2[3]; | 260 | uchar res2[3]; |
261 | } iucv_MessageComplete; | 261 | } iucv_MessageComplete; |
262 | 262 | ||
263 | /* | 263 | /* |
264 | * iucv_interrupt_ops_t: Is a vector of functions that handle | 264 | * iucv_interrupt_ops_t: Is a vector of functions that handle |
265 | * IUCV interrupts. | 265 | * IUCV interrupts. |
266 | * Parameter list: | 266 | * Parameter list: |
267 | * eib - is a pointer to a 40-byte area described | 267 | * eib - is a pointer to a 40-byte area described |
268 | * with one of the structures above. | 268 | * with one of the structures above. |
269 | * pgm_data - this data is strictly for the | 269 | * pgm_data - this data is strictly for the |
270 | * interrupt handler that is passed by | 270 | * interrupt handler that is passed by |
271 | * the application. This may be an address | 271 | * the application. This may be an address |
272 | * or token. | 272 | * or token. |
273 | */ | 273 | */ |
274 | typedef struct { | 274 | typedef struct { |
275 | void (*ConnectionPending) (iucv_ConnectionPending * eib, | 275 | void (*ConnectionPending) (iucv_ConnectionPending * eib, |
@@ -287,8 +287,8 @@ typedef struct { | |||
287 | } iucv_interrupt_ops_t; | 287 | } iucv_interrupt_ops_t; |
288 | 288 | ||
289 | /* | 289 | /* |
290 | *iucv_array_t : Defines buffer array. | 290 | *iucv_array_t : Defines buffer array. |
291 | * Inside the array may be 31- bit addresses and 31-bit lengths. | 291 | * Inside the array may be 31- bit addresses and 31-bit lengths. |
292 | */ | 292 | */ |
293 | typedef struct { | 293 | typedef struct { |
294 | u32 address; | 294 | u32 address; |
@@ -299,19 +299,19 @@ extern struct bus_type iucv_bus; | |||
299 | extern struct device *iucv_root; | 299 | extern struct device *iucv_root; |
300 | 300 | ||
301 | /* -prototypes- */ | 301 | /* -prototypes- */ |
302 | /* | 302 | /* |
303 | * Name: iucv_register_program | 303 | * Name: iucv_register_program |
304 | * Purpose: Registers an application with IUCV | 304 | * Purpose: Registers an application with IUCV |
305 | * Input: prmname - user identification | 305 | * Input: prmname - user identification |
306 | * userid - machine identification | 306 | * userid - machine identification |
307 | * pgmmask - indicates which bits in the prmname and userid combined will be | 307 | * pgmmask - indicates which bits in the prmname and userid combined will be |
308 | * used to determine who is given control | 308 | * used to determine who is given control |
309 | * ops - address of vector of interrupt handlers | 309 | * ops - address of vector of interrupt handlers |
310 | * pgm_data- application data passed to interrupt handlers | 310 | * pgm_data- application data passed to interrupt handlers |
311 | * Output: NA | 311 | * Output: NA |
312 | * Return: address of handler | 312 | * Return: address of handler |
313 | * (0) - Error occurred, registration not completed. | 313 | * (0) - Error occurred, registration not completed. |
314 | * NOTE: Exact cause of failure will be recorded in syslog. | 314 | * NOTE: Exact cause of failure will be recorded in syslog. |
315 | */ | 315 | */ |
316 | iucv_handle_t iucv_register_program (uchar pgmname[16], | 316 | iucv_handle_t iucv_register_program (uchar pgmname[16], |
317 | uchar userid[8], | 317 | uchar userid[8], |
@@ -319,13 +319,13 @@ iucv_handle_t iucv_register_program (uchar pgmname[16], | |||
319 | iucv_interrupt_ops_t * ops, | 319 | iucv_interrupt_ops_t * ops, |
320 | void *pgm_data); | 320 | void *pgm_data); |
321 | 321 | ||
322 | /* | 322 | /* |
323 | * Name: iucv_unregister_program | 323 | * Name: iucv_unregister_program |
324 | * Purpose: Unregister application with IUCV | 324 | * Purpose: Unregister application with IUCV |
325 | * Input: address of handler | 325 | * Input: address of handler |
326 | * Output: NA | 326 | * Output: NA |
327 | * Return: (0) - Normal return | 327 | * Return: (0) - Normal return |
328 | * (-EINVAL) - Internal error, wild pointer | 328 | * (-EINVAL) - Internal error, wild pointer |
329 | */ | 329 | */ |
330 | int iucv_unregister_program (iucv_handle_t handle); | 330 | int iucv_unregister_program (iucv_handle_t handle); |
331 | 331 | ||
@@ -333,7 +333,7 @@ int iucv_unregister_program (iucv_handle_t handle); | |||
333 | * Name: iucv_accept | 333 | * Name: iucv_accept |
334 | * Purpose: This function is issued after the user receives a Connection Pending external | 334 | * Purpose: This function is issued after the user receives a Connection Pending external |
335 | * interrupt and now wishes to complete the IUCV communication path. | 335 | * interrupt and now wishes to complete the IUCV communication path. |
336 | * Input: pathid - u16 , Path identification number | 336 | * Input: pathid - u16 , Path identification number |
337 | * msglim_reqstd - u16, The number of outstanding messages requested. | 337 | * msglim_reqstd - u16, The number of outstanding messages requested. |
338 | * user_data - uchar[16], Data specified by the iucv_connect function. | 338 | * user_data - uchar[16], Data specified by the iucv_connect function. |
339 | * flags1 - int, Contains options for this path. | 339 | * flags1 - int, Contains options for this path. |
@@ -358,34 +358,34 @@ int iucv_accept (u16 pathid, | |||
358 | void *pgm_data, int *flags1_out, u16 * msglim); | 358 | void *pgm_data, int *flags1_out, u16 * msglim); |
359 | 359 | ||
360 | /* | 360 | /* |
361 | * Name: iucv_connect | 361 | * Name: iucv_connect |
362 | * Purpose: This function establishes an IUCV path. Although the connect may complete | 362 | * Purpose: This function establishes an IUCV path. Although the connect may complete |
363 | * successfully, you are not able to use the path until you receive an IUCV | 363 | * successfully, you are not able to use the path until you receive an IUCV |
364 | * Connection Complete external interrupt. | 364 | * Connection Complete external interrupt. |
365 | * Input: pathid - u16 *, Path identification number | 365 | * Input: pathid - u16 *, Path identification number |
366 | * msglim_reqstd - u16, Number of outstanding messages requested | 366 | * msglim_reqstd - u16, Number of outstanding messages requested |
367 | * user_data - uchar[16], 16-byte user data | 367 | * user_data - uchar[16], 16-byte user data |
368 | * userid - uchar[8], User identification | 368 | * userid - uchar[8], User identification |
369 | * system_name - uchar[8], 8-byte identifying the system name | 369 | * system_name - uchar[8], 8-byte identifying the system name |
370 | * flags1 - int, Contains options for this path. | 370 | * flags1 - int, Contains options for this path. |
371 | * -IPPRTY - 0x20, Specifies if you want to send priority message. | 371 | * -IPPRTY - 0x20, Specifies if you want to send priority message. |
372 | * -IPRMDATA - 0x80, Specifies whether your program can handle a message | 372 | * -IPRMDATA - 0x80, Specifies whether your program can handle a message |
373 | * in the parameter list. | 373 | * in the parameter list. |
374 | * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being | 374 | * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being |
375 | * established. | 375 | * established. |
376 | * -IPLOCAL - 0X01, Allows an application to force the partner to be on | 376 | * -IPLOCAL - 0X01, Allows an application to force the partner to be on |
377 | * the local system. If local is specified then target class cannot be | 377 | * the local system. If local is specified then target class cannot be |
378 | * specified. | 378 | * specified. |
379 | * flags1_out - int * Contains information about the path | 379 | * flags1_out - int * Contains information about the path |
380 | * - IPPRTY - 0x20, Indicates you may send priority messages. | 380 | * - IPPRTY - 0x20, Indicates you may send priority messages. |
381 | * msglim - * u16, Number of outstanding messages | 381 | * msglim - * u16, Number of outstanding messages |
382 | * handle - iucv_handle_t, Address of handler | 382 | * handle - iucv_handle_t, Address of handler |
383 | * pgm_data - void *, Application data passed to interrupt handlers | 383 | * pgm_data - void *, Application data passed to interrupt handlers |
384 | * Output: return code from CP IUCV call | 384 | * Output: return code from CP IUCV call |
385 | * rc - return code from iucv_declare_buffer | 385 | * rc - return code from iucv_declare_buffer |
386 | * -EINVAL - Invalid handle passed by application | 386 | * -EINVAL - Invalid handle passed by application |
387 | * -EINVAL - Pathid address is NULL | 387 | * -EINVAL - Pathid address is NULL |
388 | * add_pathid_result - Return code from internal function add_pathid | 388 | * add_pathid_result - Return code from internal function add_pathid |
389 | */ | 389 | */ |
390 | int | 390 | int |
391 | iucv_connect (u16 * pathid, | 391 | iucv_connect (u16 * pathid, |
@@ -397,16 +397,16 @@ int | |||
397 | int *flags1_out, | 397 | int *flags1_out, |
398 | u16 * msglim, iucv_handle_t handle, void *pgm_data); | 398 | u16 * msglim, iucv_handle_t handle, void *pgm_data); |
399 | 399 | ||
400 | /* | 400 | /* |
401 | * Name: iucv_purge | 401 | * Name: iucv_purge |
402 | * Purpose: This function cancels a message that you have sent. | 402 | * Purpose: This function cancels a message that you have sent. |
403 | * Input: pathid - Path identification number. | 403 | * Input: pathid - Path identification number. |
404 | * msgid - Specifies the message ID of the message to be purged. | 404 | * msgid - Specifies the message ID of the message to be purged. |
405 | * srccls - Specifies the source message class. | 405 | * srccls - Specifies the source message class. |
406 | * Output: audit - Contains information about asynchronous error | 406 | * Output: audit - Contains information about asynchronous error |
407 | * that may have affected the normal completion | 407 | * that may have affected the normal completion |
408 | * of this message. | 408 | * of this message. |
409 | * Return: Return code from CP IUCV call. | 409 | * Return: Return code from CP IUCV call. |
410 | */ | 410 | */ |
411 | int iucv_purge (u16 pathid, u32 msgid, u32 srccls, __u32 *audit); | 411 | int iucv_purge (u16 pathid, u32 msgid, u32 srccls, __u32 *audit); |
412 | /* | 412 | /* |
@@ -426,38 +426,38 @@ ulong iucv_query_maxconn (void); | |||
426 | */ | 426 | */ |
427 | ulong iucv_query_bufsize (void); | 427 | ulong iucv_query_bufsize (void); |
428 | 428 | ||
429 | /* | 429 | /* |
430 | * Name: iucv_quiesce | 430 | * Name: iucv_quiesce |
431 | * Purpose: This function temporarily suspends incoming messages on an | 431 | * Purpose: This function temporarily suspends incoming messages on an |
432 | * IUCV path. You can later reactivate the path by invoking | 432 | * IUCV path. You can later reactivate the path by invoking |
433 | * the iucv_resume function. | 433 | * the iucv_resume function. |
434 | * Input: pathid - Path identification number | 434 | * Input: pathid - Path identification number |
435 | * user_data - 16-bytes of user data | 435 | * user_data - 16-bytes of user data |
436 | * Output: NA | 436 | * Output: NA |
437 | * Return: Return code from CP IUCV call. | 437 | * Return: Return code from CP IUCV call. |
438 | */ | 438 | */ |
439 | int iucv_quiesce (u16 pathid, uchar user_data[16]); | 439 | int iucv_quiesce (u16 pathid, uchar user_data[16]); |
440 | 440 | ||
441 | /* | 441 | /* |
442 | * Name: iucv_receive | 442 | * Name: iucv_receive |
443 | * Purpose: This function receives messages that are being sent to you | 443 | * Purpose: This function receives messages that are being sent to you |
444 | * over established paths. Data will be returned in buffer for length of | 444 | * over established paths. Data will be returned in buffer for length of |
445 | * buflen. | 445 | * buflen. |
446 | * Input: | 446 | * Input: |
447 | * pathid - Path identification number. | 447 | * pathid - Path identification number. |
448 | * buffer - Address of buffer to receive. | 448 | * buffer - Address of buffer to receive. |
449 | * buflen - Length of buffer to receive. | 449 | * buflen - Length of buffer to receive. |
450 | * msgid - Specifies the message ID. | 450 | * msgid - Specifies the message ID. |
451 | * trgcls - Specifies target class. | 451 | * trgcls - Specifies target class. |
452 | * Output: | 452 | * Output: |
453 | * flags1_out: int *, Contains information about this path. | 453 | * flags1_out: int *, Contains information about this path. |
454 | * IPNORPY - 0x10 Specifies this is a one-way message and no reply is | 454 | * IPNORPY - 0x10 Specifies this is a one-way message and no reply is |
455 | * expected. | 455 | * expected. |
456 | * IPPRTY - 0x20 Specifies if you want to send priority message. | 456 | * IPPRTY - 0x20 Specifies if you want to send priority message. |
457 | * IPRMDATA - 0x80 specifies the data is contained in the parameter list | 457 | * IPRMDATA - 0x80 specifies the data is contained in the parameter list |
458 | * residual_buffer - address of buffer updated by the number | 458 | * residual_buffer - address of buffer updated by the number |
459 | * of bytes you have received. | 459 | * of bytes you have received. |
460 | * residual_length - | 460 | * residual_length - |
461 | * Contains one of the following values, if the receive buffer is: | 461 | * Contains one of the following values, if the receive buffer is: |
462 | * The same length as the message, this field is zero. | 462 | * The same length as the message, this field is zero. |
463 | * Longer than the message, this field contains the number of | 463 | * Longer than the message, this field contains the number of |
@@ -466,8 +466,8 @@ int iucv_quiesce (u16 pathid, uchar user_data[16]); | |||
466 | * count (that is, the number of bytes remaining in the | 466 | * count (that is, the number of bytes remaining in the |
467 | * message that does not fit into the buffer. In this | 467 | * message that does not fit into the buffer. In this |
468 | * case b2f0_result = 5. | 468 | * case b2f0_result = 5. |
469 | * Return: Return code from CP IUCV call. | 469 | * Return: Return code from CP IUCV call. |
470 | * (-EINVAL) - buffer address is pointing to NULL | 470 | * (-EINVAL) - buffer address is pointing to NULL |
471 | */ | 471 | */ |
472 | int iucv_receive (u16 pathid, | 472 | int iucv_receive (u16 pathid, |
473 | u32 msgid, | 473 | u32 msgid, |
@@ -477,16 +477,16 @@ int iucv_receive (u16 pathid, | |||
477 | int *flags1_out, | 477 | int *flags1_out, |
478 | ulong * residual_buffer, ulong * residual_length); | 478 | ulong * residual_buffer, ulong * residual_length); |
479 | 479 | ||
480 | /* | 480 | /* |
481 | * Name: iucv_receive_array | 481 | * Name: iucv_receive_array |
482 | * Purpose: This function receives messages that are being sent to you | 482 | * Purpose: This function receives messages that are being sent to you |
483 | * over established paths. Data will be returned in first buffer for | 483 | * over established paths. Data will be returned in first buffer for |
484 | * length of first buffer. | 484 | * length of first buffer. |
485 | * Input: pathid - Path identification number. | 485 | * Input: pathid - Path identification number. |
486 | * msgid - specifies the message ID. | 486 | * msgid - specifies the message ID. |
487 | * trgcls - Specifies target class. | 487 | * trgcls - Specifies target class. |
488 | * buffer - Address of array of buffers. | 488 | * buffer - Address of array of buffers. |
489 | * buflen - Total length of buffers. | 489 | * buflen - Total length of buffers. |
490 | * Output: | 490 | * Output: |
491 | * flags1_out: int *, Contains information about this path. | 491 | * flags1_out: int *, Contains information about this path. |
492 | * IPNORPY - 0x10 Specifies this is a one-way message and no reply is | 492 | * IPNORPY - 0x10 Specifies this is a one-way message and no reply is |
@@ -504,8 +504,8 @@ int iucv_receive (u16 pathid, | |||
504 | * count (that is, the number of bytes remaining in the | 504 | * count (that is, the number of bytes remaining in the |
505 | * message that does not fit into the buffer. In this | 505 | * message that does not fit into the buffer. In this |
506 | * case b2f0_result = 5. | 506 | * case b2f0_result = 5. |
507 | * Return: Return code from CP IUCV call. | 507 | * Return: Return code from CP IUCV call. |
508 | * (-EINVAL) - Buffer address is NULL. | 508 | * (-EINVAL) - Buffer address is NULL. |
509 | */ | 509 | */ |
510 | int iucv_receive_array (u16 pathid, | 510 | int iucv_receive_array (u16 pathid, |
511 | u32 msgid, | 511 | u32 msgid, |
@@ -515,44 +515,44 @@ int iucv_receive_array (u16 pathid, | |||
515 | int *flags1_out, | 515 | int *flags1_out, |
516 | ulong * residual_buffer, ulong * residual_length); | 516 | ulong * residual_buffer, ulong * residual_length); |
517 | 517 | ||
518 | /* | 518 | /* |
519 | * Name: iucv_reject | 519 | * Name: iucv_reject |
520 | * Purpose: The reject function refuses a specified message. Between the | 520 | * Purpose: The reject function refuses a specified message. Between the |
521 | * time you are notified of a message and the time that you | 521 | * time you are notified of a message and the time that you |
522 | * complete the message, the message may be rejected. | 522 | * complete the message, the message may be rejected. |
523 | * Input: pathid - Path identification number. | 523 | * Input: pathid - Path identification number. |
524 | * msgid - Specifies the message ID. | 524 | * msgid - Specifies the message ID. |
525 | * trgcls - Specifies target class. | 525 | * trgcls - Specifies target class. |
526 | * Output: NA | 526 | * Output: NA |
527 | * Return: Return code from CP IUCV call. | 527 | * Return: Return code from CP IUCV call. |
528 | */ | 528 | */ |
529 | int iucv_reject (u16 pathid, u32 msgid, u32 trgcls); | 529 | int iucv_reject (u16 pathid, u32 msgid, u32 trgcls); |
530 | 530 | ||
531 | /* | 531 | /* |
532 | * Name: iucv_reply | 532 | * Name: iucv_reply |
533 | * Purpose: This function responds to the two-way messages that you | 533 | * Purpose: This function responds to the two-way messages that you |
534 | * receive. You must identify completely the message to | 534 | * receive. You must identify completely the message to |
535 | * which you wish to reply. ie, pathid, msgid, and trgcls. | 535 | * which you wish to reply. ie, pathid, msgid, and trgcls. |
536 | * Input: pathid - Path identification number. | 536 | * Input: pathid - Path identification number. |
537 | * msgid - Specifies the message ID. | 537 | * msgid - Specifies the message ID. |
538 | * trgcls - Specifies target class. | 538 | * trgcls - Specifies target class. |
539 | * flags1 - Option for path. | 539 | * flags1 - Option for path. |
540 | * IPPRTY- 0x20, Specifies if you want to send priority message. | 540 | * IPPRTY- 0x20, Specifies if you want to send priority message. |
541 | * buffer - Address of reply buffer. | 541 | * buffer - Address of reply buffer. |
542 | * buflen - Length of reply buffer. | 542 | * buflen - Length of reply buffer. |
543 | * Output: residual_buffer - Address of buffer updated by the number | 543 | * Output: residual_buffer - Address of buffer updated by the number |
544 | * of bytes you have moved. | 544 | * of bytes you have moved. |
545 | * residual_length - Contains one of the following values: | 545 | * residual_length - Contains one of the following values: |
546 | * If the answer buffer is the same length as the reply, this field | 546 | * If the answer buffer is the same length as the reply, this field |
547 | * contains zero. | 547 | * contains zero. |
548 | * If the answer buffer is longer than the reply, this field contains | 548 | * If the answer buffer is longer than the reply, this field contains |
549 | * the number of bytes remaining in the buffer. | 549 | * the number of bytes remaining in the buffer. |
550 | * If the answer buffer is shorter than the reply, this field contains | 550 | * If the answer buffer is shorter than the reply, this field contains |
551 | * a residual count (that is, the number of bytes remianing in the | 551 | * a residual count (that is, the number of bytes remianing in the |
552 | * reply that does not fit into the buffer. In this | 552 | * reply that does not fit into the buffer. In this |
553 | * case b2f0_result = 5. | 553 | * case b2f0_result = 5. |
554 | * Return: Return code from CP IUCV call. | 554 | * Return: Return code from CP IUCV call. |
555 | * (-EINVAL) - Buffer address is NULL. | 555 | * (-EINVAL) - Buffer address is NULL. |
556 | */ | 556 | */ |
557 | int iucv_reply (u16 pathid, | 557 | int iucv_reply (u16 pathid, |
558 | u32 msgid, | 558 | u32 msgid, |
@@ -561,20 +561,20 @@ int iucv_reply (u16 pathid, | |||
561 | void *buffer, ulong buflen, ulong * residual_buffer, | 561 | void *buffer, ulong buflen, ulong * residual_buffer, |
562 | ulong * residual_length); | 562 | ulong * residual_length); |
563 | 563 | ||
564 | /* | 564 | /* |
565 | * Name: iucv_reply_array | 565 | * Name: iucv_reply_array |
566 | * Purpose: This function responds to the two-way messages that you | 566 | * Purpose: This function responds to the two-way messages that you |
567 | * receive. You must identify completely the message to | 567 | * receive. You must identify completely the message to |
568 | * which you wish to reply. ie, pathid, msgid, and trgcls. | 568 | * which you wish to reply. ie, pathid, msgid, and trgcls. |
569 | * The array identifies a list of addresses and lengths of | 569 | * The array identifies a list of addresses and lengths of |
570 | * discontiguous buffers that contains the reply data. | 570 | * discontiguous buffers that contains the reply data. |
571 | * Input: pathid - Path identification number | 571 | * Input: pathid - Path identification number |
572 | * msgid - Specifies the message ID. | 572 | * msgid - Specifies the message ID. |
573 | * trgcls - Specifies target class. | 573 | * trgcls - Specifies target class. |
574 | * flags1 - Option for path. | 574 | * flags1 - Option for path. |
575 | * IPPRTY- 0x20, Specifies if you want to send priority message. | 575 | * IPPRTY- 0x20, Specifies if you want to send priority message. |
576 | * buffer - Address of array of reply buffers. | 576 | * buffer - Address of array of reply buffers. |
577 | * buflen - Total length of reply buffers. | 577 | * buflen - Total length of reply buffers. |
578 | * Output: residual_buffer - Address of buffer which IUCV is currently working on. | 578 | * Output: residual_buffer - Address of buffer which IUCV is currently working on. |
579 | * residual_length - Contains one of the following values: | 579 | * residual_length - Contains one of the following values: |
580 | * If the answer buffer is the same length as the reply, this field | 580 | * If the answer buffer is the same length as the reply, this field |
@@ -585,8 +585,8 @@ int iucv_reply (u16 pathid, | |||
585 | * a residual count (that is, the number of bytes remianing in the | 585 | * a residual count (that is, the number of bytes remianing in the |
586 | * reply that does not fit into the buffer. In this | 586 | * reply that does not fit into the buffer. In this |
587 | * case b2f0_result = 5. | 587 | * case b2f0_result = 5. |
588 | * Return: Return code from CP IUCV call. | 588 | * Return: Return code from CP IUCV call. |
589 | * (-EINVAL) - Buffer address is NULL. | 589 | * (-EINVAL) - Buffer address is NULL. |
590 | */ | 590 | */ |
591 | int iucv_reply_array (u16 pathid, | 591 | int iucv_reply_array (u16 pathid, |
592 | u32 msgid, | 592 | u32 msgid, |
@@ -596,77 +596,77 @@ int iucv_reply_array (u16 pathid, | |||
596 | ulong buflen, ulong * residual_address, | 596 | ulong buflen, ulong * residual_address, |
597 | ulong * residual_length); | 597 | ulong * residual_length); |
598 | 598 | ||
599 | /* | 599 | /* |
600 | * Name: iucv_reply_prmmsg | 600 | * Name: iucv_reply_prmmsg |
601 | * Purpose: This function responds to the two-way messages that you | 601 | * Purpose: This function responds to the two-way messages that you |
602 | * receive. You must identify completely the message to | 602 | * receive. You must identify completely the message to |
603 | * which you wish to reply. ie, pathid, msgid, and trgcls. | 603 | * which you wish to reply. ie, pathid, msgid, and trgcls. |
604 | * Prmmsg signifies the data is moved into the | 604 | * Prmmsg signifies the data is moved into the |
605 | * parameter list. | 605 | * parameter list. |
606 | * Input: pathid - Path identification number. | 606 | * Input: pathid - Path identification number. |
607 | * msgid - Specifies the message ID. | 607 | * msgid - Specifies the message ID. |
608 | * trgcls - Specifies target class. | 608 | * trgcls - Specifies target class. |
609 | * flags1 - Option for path. | 609 | * flags1 - Option for path. |
610 | * IPPRTY- 0x20 Specifies if you want to send priority message. | 610 | * IPPRTY- 0x20 Specifies if you want to send priority message. |
611 | * prmmsg - 8-bytes of data to be placed into the parameter. | 611 | * prmmsg - 8-bytes of data to be placed into the parameter. |
612 | * list. | 612 | * list. |
613 | * Output: NA | 613 | * Output: NA |
614 | * Return: Return code from CP IUCV call. | 614 | * Return: Return code from CP IUCV call. |
615 | */ | 615 | */ |
616 | int iucv_reply_prmmsg (u16 pathid, | 616 | int iucv_reply_prmmsg (u16 pathid, |
617 | u32 msgid, u32 trgcls, int flags1, uchar prmmsg[8]); | 617 | u32 msgid, u32 trgcls, int flags1, uchar prmmsg[8]); |
618 | 618 | ||
619 | /* | 619 | /* |
620 | * Name: iucv_resume | 620 | * Name: iucv_resume |
621 | * Purpose: This function restores communications over a quiesced path | 621 | * Purpose: This function restores communications over a quiesced path |
622 | * Input: pathid - Path identification number. | 622 | * Input: pathid - Path identification number. |
623 | * user_data - 16-bytes of user data. | 623 | * user_data - 16-bytes of user data. |
624 | * Output: NA | 624 | * Output: NA |
625 | * Return: Return code from CP IUCV call. | 625 | * Return: Return code from CP IUCV call. |
626 | */ | 626 | */ |
627 | int iucv_resume (u16 pathid, uchar user_data[16]); | 627 | int iucv_resume (u16 pathid, uchar user_data[16]); |
628 | 628 | ||
629 | /* | 629 | /* |
630 | * Name: iucv_send | 630 | * Name: iucv_send |
631 | * Purpose: This function transmits data to another application. | 631 | * Purpose: This function transmits data to another application. |
632 | * Data to be transmitted is in a buffer and this is a | 632 | * Data to be transmitted is in a buffer and this is a |
633 | * one-way message and the receiver will not reply to the | 633 | * one-way message and the receiver will not reply to the |
634 | * message. | 634 | * message. |
635 | * Input: pathid - Path identification number. | 635 | * Input: pathid - Path identification number. |
636 | * trgcls - Specifies target class. | 636 | * trgcls - Specifies target class. |
637 | * srccls - Specifies the source message class. | 637 | * srccls - Specifies the source message class. |
638 | * msgtag - Specifies a tag to be associated with the message. | 638 | * msgtag - Specifies a tag to be associated with the message. |
639 | * flags1 - Option for path. | 639 | * flags1 - Option for path. |
640 | * IPPRTY- 0x20 Specifies if you want to send priority message. | 640 | * IPPRTY- 0x20 Specifies if you want to send priority message. |
641 | * buffer - Address of send buffer. | 641 | * buffer - Address of send buffer. |
642 | * buflen - Length of send buffer. | 642 | * buflen - Length of send buffer. |
643 | * Output: msgid - Specifies the message ID. | 643 | * Output: msgid - Specifies the message ID. |
644 | * Return: Return code from CP IUCV call. | 644 | * Return: Return code from CP IUCV call. |
645 | * (-EINVAL) - Buffer address is NULL. | 645 | * (-EINVAL) - Buffer address is NULL. |
646 | */ | 646 | */ |
647 | int iucv_send (u16 pathid, | 647 | int iucv_send (u16 pathid, |
648 | u32 * msgid, | 648 | u32 * msgid, |
649 | u32 trgcls, | 649 | u32 trgcls, |
650 | u32 srccls, u32 msgtag, int flags1, void *buffer, ulong buflen); | 650 | u32 srccls, u32 msgtag, int flags1, void *buffer, ulong buflen); |
651 | 651 | ||
652 | /* | 652 | /* |
653 | * Name: iucv_send_array | 653 | * Name: iucv_send_array |
654 | * Purpose: This function transmits data to another application. | 654 | * Purpose: This function transmits data to another application. |
655 | * The contents of buffer is the address of the array of | 655 | * The contents of buffer is the address of the array of |
656 | * addresses and lengths of discontiguous buffers that hold | 656 | * addresses and lengths of discontiguous buffers that hold |
657 | * the message text. This is a one-way message and the | 657 | * the message text. This is a one-way message and the |
658 | * receiver will not reply to the message. | 658 | * receiver will not reply to the message. |
659 | * Input: pathid - Path identification number. | 659 | * Input: pathid - Path identification number. |
660 | * trgcls - Specifies target class. | 660 | * trgcls - Specifies target class. |
661 | * srccls - Specifies the source message class. | 661 | * srccls - Specifies the source message class. |
662 | * msgtag - Specifies a tag to be associated witht the message. | 662 | * msgtag - Specifies a tag to be associated witht the message. |
663 | * flags1 - Option for path. | 663 | * flags1 - Option for path. |
664 | * IPPRTY- specifies if you want to send priority message. | 664 | * IPPRTY- specifies if you want to send priority message. |
665 | * buffer - Address of array of send buffers. | 665 | * buffer - Address of array of send buffers. |
666 | * buflen - Total length of send buffers. | 666 | * buflen - Total length of send buffers. |
667 | * Output: msgid - Specifies the message ID. | 667 | * Output: msgid - Specifies the message ID. |
668 | * Return: Return code from CP IUCV call. | 668 | * Return: Return code from CP IUCV call. |
669 | * (-EINVAL) - Buffer address is NULL. | 669 | * (-EINVAL) - Buffer address is NULL. |
670 | */ | 670 | */ |
671 | int iucv_send_array (u16 pathid, | 671 | int iucv_send_array (u16 pathid, |
672 | u32 * msgid, | 672 | u32 * msgid, |
@@ -675,48 +675,48 @@ int iucv_send_array (u16 pathid, | |||
675 | u32 msgtag, | 675 | u32 msgtag, |
676 | int flags1, iucv_array_t * buffer, ulong buflen); | 676 | int flags1, iucv_array_t * buffer, ulong buflen); |
677 | 677 | ||
678 | /* | 678 | /* |
679 | * Name: iucv_send_prmmsg | 679 | * Name: iucv_send_prmmsg |
680 | * Purpose: This function transmits data to another application. | 680 | * Purpose: This function transmits data to another application. |
681 | * Prmmsg specifies that the 8-bytes of data are to be moved | 681 | * Prmmsg specifies that the 8-bytes of data are to be moved |
682 | * into the parameter list. This is a one-way message and the | 682 | * into the parameter list. This is a one-way message and the |
683 | * receiver will not reply to the message. | 683 | * receiver will not reply to the message. |
684 | * Input: pathid - Path identification number. | 684 | * Input: pathid - Path identification number. |
685 | * trgcls - Specifies target class. | 685 | * trgcls - Specifies target class. |
686 | * srccls - Specifies the source message class. | 686 | * srccls - Specifies the source message class. |
687 | * msgtag - Specifies a tag to be associated with the message. | 687 | * msgtag - Specifies a tag to be associated with the message. |
688 | * flags1 - Option for path. | 688 | * flags1 - Option for path. |
689 | * IPPRTY- 0x20 specifies if you want to send priority message. | 689 | * IPPRTY- 0x20 specifies if you want to send priority message. |
690 | * prmmsg - 8-bytes of data to be placed into parameter list. | 690 | * prmmsg - 8-bytes of data to be placed into parameter list. |
691 | * Output: msgid - Specifies the message ID. | 691 | * Output: msgid - Specifies the message ID. |
692 | * Return: Return code from CP IUCV call. | 692 | * Return: Return code from CP IUCV call. |
693 | */ | 693 | */ |
694 | int iucv_send_prmmsg (u16 pathid, | 694 | int iucv_send_prmmsg (u16 pathid, |
695 | u32 * msgid, | 695 | u32 * msgid, |
696 | u32 trgcls, | 696 | u32 trgcls, |
697 | u32 srccls, u32 msgtag, int flags1, uchar prmmsg[8]); | 697 | u32 srccls, u32 msgtag, int flags1, uchar prmmsg[8]); |
698 | 698 | ||
699 | /* | 699 | /* |
700 | * Name: iucv_send2way | 700 | * Name: iucv_send2way |
701 | * Purpose: This function transmits data to another application. | 701 | * Purpose: This function transmits data to another application. |
702 | * Data to be transmitted is in a buffer. The receiver | 702 | * Data to be transmitted is in a buffer. The receiver |
703 | * of the send is expected to reply to the message and | 703 | * of the send is expected to reply to the message and |
704 | * a buffer is provided into which IUCV moves the reply | 704 | * a buffer is provided into which IUCV moves the reply |
705 | * to this message. | 705 | * to this message. |
706 | * Input: pathid - Path identification number. | 706 | * Input: pathid - Path identification number. |
707 | * trgcls - Specifies target class. | 707 | * trgcls - Specifies target class. |
708 | * srccls - Specifies the source message class. | 708 | * srccls - Specifies the source message class. |
709 | * msgtag - Specifies a tag associated with the message. | 709 | * msgtag - Specifies a tag associated with the message. |
710 | * flags1 - Option for path. | 710 | * flags1 - Option for path. |
711 | * IPPRTY- 0x20 Specifies if you want to send priority message. | 711 | * IPPRTY- 0x20 Specifies if you want to send priority message. |
712 | * buffer - Address of send buffer. | 712 | * buffer - Address of send buffer. |
713 | * buflen - Length of send buffer. | 713 | * buflen - Length of send buffer. |
714 | * ansbuf - Address of buffer into which IUCV moves the reply of | 714 | * ansbuf - Address of buffer into which IUCV moves the reply of |
715 | * this message. | 715 | * this message. |
716 | * anslen - Address of length of buffer. | 716 | * anslen - Address of length of buffer. |
717 | * Output: msgid - Specifies the message ID. | 717 | * Output: msgid - Specifies the message ID. |
718 | * Return: Return code from CP IUCV call. | 718 | * Return: Return code from CP IUCV call. |
719 | * (-EINVAL) - Buffer or ansbuf address is NULL. | 719 | * (-EINVAL) - Buffer or ansbuf address is NULL. |
720 | */ | 720 | */ |
721 | int iucv_send2way (u16 pathid, | 721 | int iucv_send2way (u16 pathid, |
722 | u32 * msgid, | 722 | u32 * msgid, |
@@ -726,28 +726,28 @@ int iucv_send2way (u16 pathid, | |||
726 | int flags1, | 726 | int flags1, |
727 | void *buffer, ulong buflen, void *ansbuf, ulong anslen); | 727 | void *buffer, ulong buflen, void *ansbuf, ulong anslen); |
728 | 728 | ||
729 | /* | 729 | /* |
730 | * Name: iucv_send2way_array | 730 | * Name: iucv_send2way_array |
731 | * Purpose: This function transmits data to another application. | 731 | * Purpose: This function transmits data to another application. |
732 | * The contents of buffer is the address of the array of | 732 | * The contents of buffer is the address of the array of |
733 | * addresses and lengths of discontiguous buffers that hold | 733 | * addresses and lengths of discontiguous buffers that hold |
734 | * the message text. The receiver of the send is expected to | 734 | * the message text. The receiver of the send is expected to |
735 | * reply to the message and a buffer is provided into which | 735 | * reply to the message and a buffer is provided into which |
736 | * IUCV moves the reply to this message. | 736 | * IUCV moves the reply to this message. |
737 | * Input: pathid - Path identification number. | 737 | * Input: pathid - Path identification number. |
738 | * trgcls - Specifies target class. | 738 | * trgcls - Specifies target class. |
739 | * srccls - Specifies the source message class. | 739 | * srccls - Specifies the source message class. |
740 | * msgtag - Specifies a tag to be associated with the message. | 740 | * msgtag - Specifies a tag to be associated with the message. |
741 | * flags1 - Option for path. | 741 | * flags1 - Option for path. |
742 | * IPPRTY- 0x20 Specifies if you want to send priority message. | 742 | * IPPRTY- 0x20 Specifies if you want to send priority message. |
743 | * buffer - Sddress of array of send buffers. | 743 | * buffer - Sddress of array of send buffers. |
744 | * buflen - Total length of send buffers. | 744 | * buflen - Total length of send buffers. |
745 | * ansbuf - Address of array of buffer into which IUCV moves the reply | 745 | * ansbuf - Address of array of buffer into which IUCV moves the reply |
746 | * of this message. | 746 | * of this message. |
747 | * anslen - Address of length reply buffers. | 747 | * anslen - Address of length reply buffers. |
748 | * Output: msgid - Specifies the message ID. | 748 | * Output: msgid - Specifies the message ID. |
749 | * Return: Return code from CP IUCV call. | 749 | * Return: Return code from CP IUCV call. |
750 | * (-EINVAL) - Buffer address is NULL. | 750 | * (-EINVAL) - Buffer address is NULL. |
751 | */ | 751 | */ |
752 | int iucv_send2way_array (u16 pathid, | 752 | int iucv_send2way_array (u16 pathid, |
753 | u32 * msgid, | 753 | u32 * msgid, |
@@ -758,27 +758,27 @@ int iucv_send2way_array (u16 pathid, | |||
758 | iucv_array_t * buffer, | 758 | iucv_array_t * buffer, |
759 | ulong buflen, iucv_array_t * ansbuf, ulong anslen); | 759 | ulong buflen, iucv_array_t * ansbuf, ulong anslen); |
760 | 760 | ||
761 | /* | 761 | /* |
762 | * Name: iucv_send2way_prmmsg | 762 | * Name: iucv_send2way_prmmsg |
763 | * Purpose: This function transmits data to another application. | 763 | * Purpose: This function transmits data to another application. |
764 | * Prmmsg specifies that the 8-bytes of data are to be moved | 764 | * Prmmsg specifies that the 8-bytes of data are to be moved |
765 | * into the parameter list. This is a two-way message and the | 765 | * into the parameter list. This is a two-way message and the |
766 | * receiver of the message is expected to reply. A buffer | 766 | * receiver of the message is expected to reply. A buffer |
767 | * is provided into which IUCV moves the reply to this | 767 | * is provided into which IUCV moves the reply to this |
768 | * message. | 768 | * message. |
769 | * Input: pathid - Rath identification number. | 769 | * Input: pathid - Rath identification number. |
770 | * trgcls - Specifies target class. | 770 | * trgcls - Specifies target class. |
771 | * srccls - Specifies the source message class. | 771 | * srccls - Specifies the source message class. |
772 | * msgtag - Specifies a tag to be associated with the message. | 772 | * msgtag - Specifies a tag to be associated with the message. |
773 | * flags1 - Option for path. | 773 | * flags1 - Option for path. |
774 | * IPPRTY- 0x20 Specifies if you want to send priority message. | 774 | * IPPRTY- 0x20 Specifies if you want to send priority message. |
775 | * prmmsg - 8-bytes of data to be placed in parameter list. | 775 | * prmmsg - 8-bytes of data to be placed in parameter list. |
776 | * ansbuf - Address of buffer into which IUCV moves the reply of | 776 | * ansbuf - Address of buffer into which IUCV moves the reply of |
777 | * this message. | 777 | * this message. |
778 | * anslen - Address of length of buffer. | 778 | * anslen - Address of length of buffer. |
779 | * Output: msgid - Specifies the message ID. | 779 | * Output: msgid - Specifies the message ID. |
780 | * Return: Return code from CP IUCV call. | 780 | * Return: Return code from CP IUCV call. |
781 | * (-EINVAL) - Buffer address is NULL. | 781 | * (-EINVAL) - Buffer address is NULL. |
782 | */ | 782 | */ |
783 | int iucv_send2way_prmmsg (u16 pathid, | 783 | int iucv_send2way_prmmsg (u16 pathid, |
784 | u32 * msgid, | 784 | u32 * msgid, |
@@ -788,29 +788,29 @@ int iucv_send2way_prmmsg (u16 pathid, | |||
788 | ulong flags1, | 788 | ulong flags1, |
789 | uchar prmmsg[8], void *ansbuf, ulong anslen); | 789 | uchar prmmsg[8], void *ansbuf, ulong anslen); |
790 | 790 | ||
791 | /* | 791 | /* |
792 | * Name: iucv_send2way_prmmsg_array | 792 | * Name: iucv_send2way_prmmsg_array |
793 | * Purpose: This function transmits data to another application. | 793 | * Purpose: This function transmits data to another application. |
794 | * Prmmsg specifies that the 8-bytes of data are to be moved | 794 | * Prmmsg specifies that the 8-bytes of data are to be moved |
795 | * into the parameter list. This is a two-way message and the | 795 | * into the parameter list. This is a two-way message and the |
796 | * receiver of the message is expected to reply. A buffer | 796 | * receiver of the message is expected to reply. A buffer |
797 | * is provided into which IUCV moves the reply to this | 797 | * is provided into which IUCV moves the reply to this |
798 | * message. The contents of ansbuf is the address of the | 798 | * message. The contents of ansbuf is the address of the |
799 | * array of addresses and lengths of discontiguous buffers | 799 | * array of addresses and lengths of discontiguous buffers |
800 | * that contain the reply. | 800 | * that contain the reply. |
801 | * Input: pathid - Path identification number. | 801 | * Input: pathid - Path identification number. |
802 | * trgcls - Specifies target class. | 802 | * trgcls - Specifies target class. |
803 | * srccls - Specifies the source message class. | 803 | * srccls - Specifies the source message class. |
804 | * msgtag - Specifies a tag to be associated with the message. | 804 | * msgtag - Specifies a tag to be associated with the message. |
805 | * flags1 - Option for path. | 805 | * flags1 - Option for path. |
806 | * IPPRTY- 0x20 specifies if you want to send priority message. | 806 | * IPPRTY- 0x20 specifies if you want to send priority message. |
807 | * prmmsg - 8-bytes of data to be placed into the parameter list. | 807 | * prmmsg - 8-bytes of data to be placed into the parameter list. |
808 | * ansbuf - Address of array of buffer into which IUCV moves the reply | 808 | * ansbuf - Address of array of buffer into which IUCV moves the reply |
809 | * of this message. | 809 | * of this message. |
810 | * anslen - Address of length of reply buffers. | 810 | * anslen - Address of length of reply buffers. |
811 | * Output: msgid - Specifies the message ID. | 811 | * Output: msgid - Specifies the message ID. |
812 | * Return: Return code from CP IUCV call. | 812 | * Return: Return code from CP IUCV call. |
813 | * (-EINVAL) - Ansbuf address is NULL. | 813 | * (-EINVAL) - Ansbuf address is NULL. |
814 | */ | 814 | */ |
815 | int iucv_send2way_prmmsg_array (u16 pathid, | 815 | int iucv_send2way_prmmsg_array (u16 pathid, |
816 | u32 * msgid, | 816 | u32 * msgid, |
@@ -821,29 +821,29 @@ int iucv_send2way_prmmsg_array (u16 pathid, | |||
821 | uchar prmmsg[8], | 821 | uchar prmmsg[8], |
822 | iucv_array_t * ansbuf, ulong anslen); | 822 | iucv_array_t * ansbuf, ulong anslen); |
823 | 823 | ||
824 | /* | 824 | /* |
825 | * Name: iucv_setmask | 825 | * Name: iucv_setmask |
826 | * Purpose: This function enables or disables the following IUCV | 826 | * Purpose: This function enables or disables the following IUCV |
827 | * external interruptions: Nonpriority and priority message | 827 | * external interruptions: Nonpriority and priority message |
828 | * interrupts, nonpriority and priority reply interrupts. | 828 | * interrupts, nonpriority and priority reply interrupts. |
829 | * Input: SetMaskFlag - options for interrupts | 829 | * Input: SetMaskFlag - options for interrupts |
830 | * 0x80 - Nonpriority_MessagePendingInterruptsFlag | 830 | * 0x80 - Nonpriority_MessagePendingInterruptsFlag |
831 | * 0x40 - Priority_MessagePendingInterruptsFlag | 831 | * 0x40 - Priority_MessagePendingInterruptsFlag |
832 | * 0x20 - Nonpriority_MessageCompletionInterruptsFlag | 832 | * 0x20 - Nonpriority_MessageCompletionInterruptsFlag |
833 | * 0x10 - Priority_MessageCompletionInterruptsFlag | 833 | * 0x10 - Priority_MessageCompletionInterruptsFlag |
834 | * 0x08 - IUCVControlInterruptsFlag | 834 | * 0x08 - IUCVControlInterruptsFlag |
835 | * Output: NA | 835 | * Output: NA |
836 | * Return: Return code from CP IUCV call. | 836 | * Return: Return code from CP IUCV call. |
837 | */ | 837 | */ |
838 | int iucv_setmask (int SetMaskFlag); | 838 | int iucv_setmask (int SetMaskFlag); |
839 | 839 | ||
840 | /* | 840 | /* |
841 | * Name: iucv_sever | 841 | * Name: iucv_sever |
842 | * Purpose: This function terminates an IUCV path. | 842 | * Purpose: This function terminates an IUCV path. |
843 | * Input: pathid - Path identification number. | 843 | * Input: pathid - Path identification number. |
844 | * user_data - 16-bytes of user data. | 844 | * user_data - 16-bytes of user data. |
845 | * Output: NA | 845 | * Output: NA |
846 | * Return: Return code from CP IUCV call. | 846 | * Return: Return code from CP IUCV call. |
847 | * (-EINVAL) - Interal error, wild pointer. | 847 | * (-EINVAL) - Interal error, wild pointer. |
848 | */ | 848 | */ |
849 | int iucv_sever (u16 pathid, uchar user_data[16]); | 849 | int iucv_sever (u16 pathid, uchar user_data[16]); |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index e65da921a827..f94419b334f7 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -68,6 +68,7 @@ static void lcs_tasklet(unsigned long); | |||
68 | static void lcs_start_kernel_thread(struct lcs_card *card); | 68 | static void lcs_start_kernel_thread(struct lcs_card *card); |
69 | static void lcs_get_frames_cb(struct lcs_channel *, struct lcs_buffer *); | 69 | static void lcs_get_frames_cb(struct lcs_channel *, struct lcs_buffer *); |
70 | static int lcs_send_delipm(struct lcs_card *, struct lcs_ipm_list *); | 70 | static int lcs_send_delipm(struct lcs_card *, struct lcs_ipm_list *); |
71 | static int lcs_recovery(void *ptr); | ||
71 | 72 | ||
72 | /** | 73 | /** |
73 | * Debug Facility Stuff | 74 | * Debug Facility Stuff |
@@ -429,12 +430,6 @@ lcs_setup_card(struct lcs_card *card) | |||
429 | card->tx_buffer = NULL; | 430 | card->tx_buffer = NULL; |
430 | card->tx_emitted = 0; | 431 | card->tx_emitted = 0; |
431 | 432 | ||
432 | /* Initialize kernel thread task used for LGW commands. */ | ||
433 | INIT_WORK(&card->kernel_thread_starter, | ||
434 | (void *)lcs_start_kernel_thread,card); | ||
435 | card->thread_start_mask = 0; | ||
436 | card->thread_allowed_mask = 0; | ||
437 | card->thread_running_mask = 0; | ||
438 | init_waitqueue_head(&card->wait_q); | 433 | init_waitqueue_head(&card->wait_q); |
439 | spin_lock_init(&card->lock); | 434 | spin_lock_init(&card->lock); |
440 | spin_lock_init(&card->ipm_lock); | 435 | spin_lock_init(&card->ipm_lock); |
@@ -675,8 +670,9 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
675 | int index, rc; | 670 | int index, rc; |
676 | 671 | ||
677 | LCS_DBF_TEXT(5, trace, "rdybuff"); | 672 | LCS_DBF_TEXT(5, trace, "rdybuff"); |
678 | BUG_ON(buffer->state != BUF_STATE_LOCKED && | 673 | if (buffer->state != BUF_STATE_LOCKED && |
679 | buffer->state != BUF_STATE_PROCESSED); | 674 | buffer->state != BUF_STATE_PROCESSED) |
675 | BUG(); | ||
680 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); | 676 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
681 | buffer->state = BUF_STATE_READY; | 677 | buffer->state = BUF_STATE_READY; |
682 | index = buffer - channel->iob; | 678 | index = buffer - channel->iob; |
@@ -700,7 +696,8 @@ __lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
700 | int index, prev, next; | 696 | int index, prev, next; |
701 | 697 | ||
702 | LCS_DBF_TEXT(5, trace, "prcsbuff"); | 698 | LCS_DBF_TEXT(5, trace, "prcsbuff"); |
703 | BUG_ON(buffer->state != BUF_STATE_READY); | 699 | if (buffer->state != BUF_STATE_READY) |
700 | BUG(); | ||
704 | buffer->state = BUF_STATE_PROCESSED; | 701 | buffer->state = BUF_STATE_PROCESSED; |
705 | index = buffer - channel->iob; | 702 | index = buffer - channel->iob; |
706 | prev = (index - 1) & (LCS_NUM_BUFFS - 1); | 703 | prev = (index - 1) & (LCS_NUM_BUFFS - 1); |
@@ -732,8 +729,9 @@ lcs_release_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
732 | unsigned long flags; | 729 | unsigned long flags; |
733 | 730 | ||
734 | LCS_DBF_TEXT(5, trace, "relbuff"); | 731 | LCS_DBF_TEXT(5, trace, "relbuff"); |
735 | BUG_ON(buffer->state != BUF_STATE_LOCKED && | 732 | if (buffer->state != BUF_STATE_LOCKED && |
736 | buffer->state != BUF_STATE_PROCESSED); | 733 | buffer->state != BUF_STATE_PROCESSED) |
734 | BUG(); | ||
737 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); | 735 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
738 | buffer->state = BUF_STATE_EMPTY; | 736 | buffer->state = BUF_STATE_EMPTY; |
739 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); | 737 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |
@@ -1147,8 +1145,6 @@ list_modified: | |||
1147 | list_add_tail(&ipm->list, &card->ipm_list); | 1145 | list_add_tail(&ipm->list, &card->ipm_list); |
1148 | } | 1146 | } |
1149 | spin_unlock_irqrestore(&card->ipm_lock, flags); | 1147 | spin_unlock_irqrestore(&card->ipm_lock, flags); |
1150 | if (card->state == DEV_STATE_UP) | ||
1151 | netif_wake_queue(card->dev); | ||
1152 | } | 1148 | } |
1153 | 1149 | ||
1154 | /** | 1150 | /** |
@@ -1231,17 +1227,17 @@ lcs_set_mc_addresses(struct lcs_card *card, struct in_device *in4_dev) | |||
1231 | if (ipm != NULL) | 1227 | if (ipm != NULL) |
1232 | continue; /* Address already in list. */ | 1228 | continue; /* Address already in list. */ |
1233 | ipm = (struct lcs_ipm_list *) | 1229 | ipm = (struct lcs_ipm_list *) |
1234 | kmalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC); | 1230 | kzalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC); |
1235 | if (ipm == NULL) { | 1231 | if (ipm == NULL) { |
1236 | PRINT_INFO("Not enough memory to add " | 1232 | PRINT_INFO("Not enough memory to add " |
1237 | "new multicast entry!\n"); | 1233 | "new multicast entry!\n"); |
1238 | break; | 1234 | break; |
1239 | } | 1235 | } |
1240 | memset(ipm, 0, sizeof(struct lcs_ipm_list)); | ||
1241 | memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH); | 1236 | memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH); |
1242 | ipm->ipm.ip_addr = im4->multiaddr; | 1237 | ipm->ipm.ip_addr = im4->multiaddr; |
1243 | ipm->ipm_state = LCS_IPM_STATE_SET_REQUIRED; | 1238 | ipm->ipm_state = LCS_IPM_STATE_SET_REQUIRED; |
1244 | spin_lock_irqsave(&card->ipm_lock, flags); | 1239 | spin_lock_irqsave(&card->ipm_lock, flags); |
1240 | LCS_DBF_HEX(2,trace,&ipm->ipm.ip_addr,4); | ||
1245 | list_add(&ipm->list, &card->ipm_list); | 1241 | list_add(&ipm->list, &card->ipm_list); |
1246 | spin_unlock_irqrestore(&card->ipm_lock, flags); | 1242 | spin_unlock_irqrestore(&card->ipm_lock, flags); |
1247 | } | 1243 | } |
@@ -1269,7 +1265,15 @@ lcs_register_mc_addresses(void *data) | |||
1269 | read_unlock(&in4_dev->mc_list_lock); | 1265 | read_unlock(&in4_dev->mc_list_lock); |
1270 | in_dev_put(in4_dev); | 1266 | in_dev_put(in4_dev); |
1271 | 1267 | ||
1268 | netif_carrier_off(card->dev); | ||
1269 | netif_tx_disable(card->dev); | ||
1270 | wait_event(card->write.wait_q, | ||
1271 | (card->write.state != CH_STATE_RUNNING)); | ||
1272 | lcs_fix_multicast_list(card); | 1272 | lcs_fix_multicast_list(card); |
1273 | if (card->state == DEV_STATE_UP) { | ||
1274 | netif_carrier_on(card->dev); | ||
1275 | netif_wake_queue(card->dev); | ||
1276 | } | ||
1273 | out: | 1277 | out: |
1274 | lcs_clear_thread_running_bit(card, LCS_SET_MC_THREAD); | 1278 | lcs_clear_thread_running_bit(card, LCS_SET_MC_THREAD); |
1275 | return 0; | 1279 | return 0; |
@@ -1286,7 +1290,7 @@ lcs_set_multicast_list(struct net_device *dev) | |||
1286 | LCS_DBF_TEXT(4, trace, "setmulti"); | 1290 | LCS_DBF_TEXT(4, trace, "setmulti"); |
1287 | card = (struct lcs_card *) dev->priv; | 1291 | card = (struct lcs_card *) dev->priv; |
1288 | 1292 | ||
1289 | if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) | 1293 | if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) |
1290 | schedule_work(&card->kernel_thread_starter); | 1294 | schedule_work(&card->kernel_thread_starter); |
1291 | } | 1295 | } |
1292 | 1296 | ||
@@ -1318,6 +1322,53 @@ lcs_check_irb_error(struct ccw_device *cdev, struct irb *irb) | |||
1318 | return PTR_ERR(irb); | 1322 | return PTR_ERR(irb); |
1319 | } | 1323 | } |
1320 | 1324 | ||
1325 | static int | ||
1326 | lcs_get_problem(struct ccw_device *cdev, struct irb *irb) | ||
1327 | { | ||
1328 | int dstat, cstat; | ||
1329 | char *sense; | ||
1330 | |||
1331 | sense = (char *) irb->ecw; | ||
1332 | cstat = irb->scsw.cstat; | ||
1333 | dstat = irb->scsw.dstat; | ||
1334 | |||
1335 | if (cstat & (SCHN_STAT_CHN_CTRL_CHK | SCHN_STAT_INTF_CTRL_CHK | | ||
1336 | SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK | | ||
1337 | SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) { | ||
1338 | LCS_DBF_TEXT(2, trace, "CGENCHK"); | ||
1339 | return 1; | ||
1340 | } | ||
1341 | if (dstat & DEV_STAT_UNIT_CHECK) { | ||
1342 | if (sense[LCS_SENSE_BYTE_1] & | ||
1343 | LCS_SENSE_RESETTING_EVENT) { | ||
1344 | LCS_DBF_TEXT(2, trace, "REVIND"); | ||
1345 | return 1; | ||
1346 | } | ||
1347 | if (sense[LCS_SENSE_BYTE_0] & | ||
1348 | LCS_SENSE_CMD_REJECT) { | ||
1349 | LCS_DBF_TEXT(2, trace, "CMDREJ"); | ||
1350 | return 0; | ||
1351 | } | ||
1352 | if ((!sense[LCS_SENSE_BYTE_0]) && | ||
1353 | (!sense[LCS_SENSE_BYTE_1]) && | ||
1354 | (!sense[LCS_SENSE_BYTE_2]) && | ||
1355 | (!sense[LCS_SENSE_BYTE_3])) { | ||
1356 | LCS_DBF_TEXT(2, trace, "ZEROSEN"); | ||
1357 | return 0; | ||
1358 | } | ||
1359 | LCS_DBF_TEXT(2, trace, "DGENCHK"); | ||
1360 | return 1; | ||
1361 | } | ||
1362 | return 0; | ||
1363 | } | ||
1364 | |||
1365 | void | ||
1366 | lcs_schedule_recovery(struct lcs_card *card) | ||
1367 | { | ||
1368 | LCS_DBF_TEXT(2, trace, "startrec"); | ||
1369 | if (!lcs_set_thread_start_bit(card, LCS_RECOVERY_THREAD)) | ||
1370 | schedule_work(&card->kernel_thread_starter); | ||
1371 | } | ||
1321 | 1372 | ||
1322 | /** | 1373 | /** |
1323 | * IRQ Handler for LCS channels | 1374 | * IRQ Handler for LCS channels |
@@ -1327,7 +1378,8 @@ lcs_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1327 | { | 1378 | { |
1328 | struct lcs_card *card; | 1379 | struct lcs_card *card; |
1329 | struct lcs_channel *channel; | 1380 | struct lcs_channel *channel; |
1330 | int index; | 1381 | int rc, index; |
1382 | int cstat, dstat; | ||
1331 | 1383 | ||
1332 | if (lcs_check_irb_error(cdev, irb)) | 1384 | if (lcs_check_irb_error(cdev, irb)) |
1333 | return; | 1385 | return; |
@@ -1338,14 +1390,27 @@ lcs_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1338 | else | 1390 | else |
1339 | channel = &card->write; | 1391 | channel = &card->write; |
1340 | 1392 | ||
1393 | cstat = irb->scsw.cstat; | ||
1394 | dstat = irb->scsw.dstat; | ||
1341 | LCS_DBF_TEXT_(5, trace, "Rint%s",cdev->dev.bus_id); | 1395 | LCS_DBF_TEXT_(5, trace, "Rint%s",cdev->dev.bus_id); |
1342 | LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.cstat, irb->scsw.dstat); | 1396 | LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.cstat, irb->scsw.dstat); |
1343 | LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.fctl, irb->scsw.actl); | 1397 | LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.fctl, irb->scsw.actl); |
1344 | 1398 | ||
1399 | /* Check for channel and device errors presented */ | ||
1400 | rc = lcs_get_problem(cdev, irb); | ||
1401 | if (rc || (dstat & DEV_STAT_UNIT_EXCEP)) { | ||
1402 | PRINT_WARN("check on device %s, dstat=0x%X, cstat=0x%X \n", | ||
1403 | cdev->dev.bus_id, dstat, cstat); | ||
1404 | if (rc) { | ||
1405 | lcs_schedule_recovery(card); | ||
1406 | wake_up(&card->wait_q); | ||
1407 | return; | ||
1408 | } | ||
1409 | } | ||
1345 | /* How far in the ccw chain have we processed? */ | 1410 | /* How far in the ccw chain have we processed? */ |
1346 | if ((channel->state != CH_STATE_INIT) && | 1411 | if ((channel->state != CH_STATE_INIT) && |
1347 | (irb->scsw.fctl & SCSW_FCTL_START_FUNC)) { | 1412 | (irb->scsw.fctl & SCSW_FCTL_START_FUNC)) { |
1348 | index = (struct ccw1 *) __va((addr_t) irb->scsw.cpa) | 1413 | index = (struct ccw1 *) __va((addr_t) irb->scsw.cpa) |
1349 | - channel->ccws; | 1414 | - channel->ccws; |
1350 | if ((irb->scsw.actl & SCSW_ACTL_SUSPENDED) || | 1415 | if ((irb->scsw.actl & SCSW_ACTL_SUSPENDED) || |
1351 | (irb->scsw.cstat & SCHN_STAT_PCI)) | 1416 | (irb->scsw.cstat & SCHN_STAT_PCI)) |
@@ -1367,7 +1432,6 @@ lcs_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1367 | else if (irb->scsw.actl & SCSW_ACTL_SUSPENDED) | 1432 | else if (irb->scsw.actl & SCSW_ACTL_SUSPENDED) |
1368 | /* CCW execution stopped on a suspend bit. */ | 1433 | /* CCW execution stopped on a suspend bit. */ |
1369 | channel->state = CH_STATE_SUSPENDED; | 1434 | channel->state = CH_STATE_SUSPENDED; |
1370 | |||
1371 | if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) { | 1435 | if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) { |
1372 | if (irb->scsw.cc != 0) { | 1436 | if (irb->scsw.cc != 0) { |
1373 | ccw_device_halt(channel->ccwdev, (addr_t) channel); | 1437 | ccw_device_halt(channel->ccwdev, (addr_t) channel); |
@@ -1376,7 +1440,6 @@ lcs_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1376 | /* The channel has been stopped by halt_IO. */ | 1440 | /* The channel has been stopped by halt_IO. */ |
1377 | channel->state = CH_STATE_HALTED; | 1441 | channel->state = CH_STATE_HALTED; |
1378 | } | 1442 | } |
1379 | |||
1380 | if (irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) { | 1443 | if (irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) { |
1381 | channel->state = CH_STATE_CLEARED; | 1444 | channel->state = CH_STATE_CLEARED; |
1382 | } | 1445 | } |
@@ -1452,7 +1515,7 @@ lcs_txbuffer_cb(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
1452 | lcs_release_buffer(channel, buffer); | 1515 | lcs_release_buffer(channel, buffer); |
1453 | card = (struct lcs_card *) | 1516 | card = (struct lcs_card *) |
1454 | ((char *) channel - offsetof(struct lcs_card, write)); | 1517 | ((char *) channel - offsetof(struct lcs_card, write)); |
1455 | if (netif_queue_stopped(card->dev)) | 1518 | if (netif_queue_stopped(card->dev) && netif_carrier_ok(card->dev)) |
1456 | netif_wake_queue(card->dev); | 1519 | netif_wake_queue(card->dev); |
1457 | spin_lock(&card->lock); | 1520 | spin_lock(&card->lock); |
1458 | card->tx_emitted--; | 1521 | card->tx_emitted--; |
@@ -1488,6 +1551,10 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, | |||
1488 | card->stats.tx_carrier_errors++; | 1551 | card->stats.tx_carrier_errors++; |
1489 | return 0; | 1552 | return 0; |
1490 | } | 1553 | } |
1554 | if (skb->protocol == htons(ETH_P_IPV6)) { | ||
1555 | dev_kfree_skb(skb); | ||
1556 | return 0; | ||
1557 | } | ||
1491 | netif_stop_queue(card->dev); | 1558 | netif_stop_queue(card->dev); |
1492 | spin_lock(&card->lock); | 1559 | spin_lock(&card->lock); |
1493 | if (card->tx_buffer != NULL && | 1560 | if (card->tx_buffer != NULL && |
@@ -1633,30 +1700,6 @@ lcs_detect(struct lcs_card *card) | |||
1633 | } | 1700 | } |
1634 | 1701 | ||
1635 | /** | 1702 | /** |
1636 | * reset card | ||
1637 | */ | ||
1638 | static int | ||
1639 | lcs_resetcard(struct lcs_card *card) | ||
1640 | { | ||
1641 | int retries; | ||
1642 | |||
1643 | LCS_DBF_TEXT(2, trace, "rescard"); | ||
1644 | for (retries = 0; retries < 10; retries++) { | ||
1645 | if (lcs_detect(card) == 0) { | ||
1646 | netif_wake_queue(card->dev); | ||
1647 | card->state = DEV_STATE_UP; | ||
1648 | PRINT_INFO("LCS device %s successfully restarted!\n", | ||
1649 | card->dev->name); | ||
1650 | return 0; | ||
1651 | } | ||
1652 | msleep(3000); | ||
1653 | } | ||
1654 | PRINT_ERR("Error in Reseting LCS card!\n"); | ||
1655 | return -EIO; | ||
1656 | } | ||
1657 | |||
1658 | |||
1659 | /** | ||
1660 | * LCS Stop card | 1703 | * LCS Stop card |
1661 | */ | 1704 | */ |
1662 | static int | 1705 | static int |
@@ -1680,126 +1723,18 @@ lcs_stopcard(struct lcs_card *card) | |||
1680 | } | 1723 | } |
1681 | 1724 | ||
1682 | /** | 1725 | /** |
1683 | * LGW initiated commands | ||
1684 | */ | ||
1685 | static int | ||
1686 | lcs_lgw_startlan_thread(void *data) | ||
1687 | { | ||
1688 | struct lcs_card *card; | ||
1689 | |||
1690 | card = (struct lcs_card *) data; | ||
1691 | daemonize("lgwstpln"); | ||
1692 | |||
1693 | if (!lcs_do_run_thread(card, LCS_STARTLAN_THREAD)) | ||
1694 | return 0; | ||
1695 | LCS_DBF_TEXT(4, trace, "lgwstpln"); | ||
1696 | if (card->dev) | ||
1697 | netif_stop_queue(card->dev); | ||
1698 | if (lcs_startlan(card) == 0) { | ||
1699 | netif_wake_queue(card->dev); | ||
1700 | card->state = DEV_STATE_UP; | ||
1701 | PRINT_INFO("LCS Startlan for device %s succeeded!\n", | ||
1702 | card->dev->name); | ||
1703 | |||
1704 | } else | ||
1705 | PRINT_ERR("LCS Startlan for device %s failed!\n", | ||
1706 | card->dev->name); | ||
1707 | lcs_clear_thread_running_bit(card, LCS_STARTLAN_THREAD); | ||
1708 | return 0; | ||
1709 | } | ||
1710 | |||
1711 | /** | ||
1712 | * Send startup command initiated by Lan Gateway | ||
1713 | */ | ||
1714 | static int | ||
1715 | lcs_lgw_startup_thread(void *data) | ||
1716 | { | ||
1717 | int rc; | ||
1718 | |||
1719 | struct lcs_card *card; | ||
1720 | |||
1721 | card = (struct lcs_card *) data; | ||
1722 | daemonize("lgwstaln"); | ||
1723 | |||
1724 | if (!lcs_do_run_thread(card, LCS_STARTUP_THREAD)) | ||
1725 | return 0; | ||
1726 | LCS_DBF_TEXT(4, trace, "lgwstaln"); | ||
1727 | if (card->dev) | ||
1728 | netif_stop_queue(card->dev); | ||
1729 | rc = lcs_send_startup(card, LCS_INITIATOR_LGW); | ||
1730 | if (rc != 0) { | ||
1731 | PRINT_ERR("Startup for LCS device %s initiated " \ | ||
1732 | "by LGW failed!\nReseting card ...\n", | ||
1733 | card->dev->name); | ||
1734 | /* do a card reset */ | ||
1735 | rc = lcs_resetcard(card); | ||
1736 | if (rc == 0) | ||
1737 | goto Done; | ||
1738 | } | ||
1739 | rc = lcs_startlan(card); | ||
1740 | if (rc == 0) { | ||
1741 | netif_wake_queue(card->dev); | ||
1742 | card->state = DEV_STATE_UP; | ||
1743 | } | ||
1744 | Done: | ||
1745 | if (rc == 0) | ||
1746 | PRINT_INFO("LCS Startup for device %s succeeded!\n", | ||
1747 | card->dev->name); | ||
1748 | else | ||
1749 | PRINT_ERR("LCS Startup for device %s failed!\n", | ||
1750 | card->dev->name); | ||
1751 | lcs_clear_thread_running_bit(card, LCS_STARTUP_THREAD); | ||
1752 | return 0; | ||
1753 | } | ||
1754 | |||
1755 | |||
1756 | /** | ||
1757 | * send stoplan command initiated by Lan Gateway | ||
1758 | */ | ||
1759 | static int | ||
1760 | lcs_lgw_stoplan_thread(void *data) | ||
1761 | { | ||
1762 | struct lcs_card *card; | ||
1763 | int rc; | ||
1764 | |||
1765 | card = (struct lcs_card *) data; | ||
1766 | daemonize("lgwstop"); | ||
1767 | |||
1768 | if (!lcs_do_run_thread(card, LCS_STOPLAN_THREAD)) | ||
1769 | return 0; | ||
1770 | LCS_DBF_TEXT(4, trace, "lgwstop"); | ||
1771 | if (card->dev) | ||
1772 | netif_stop_queue(card->dev); | ||
1773 | if (lcs_send_stoplan(card, LCS_INITIATOR_LGW) == 0) | ||
1774 | PRINT_INFO("Stoplan for %s initiated by LGW succeeded!\n", | ||
1775 | card->dev->name); | ||
1776 | else | ||
1777 | PRINT_ERR("Stoplan %s initiated by LGW failed!\n", | ||
1778 | card->dev->name); | ||
1779 | /*Try to reset the card, stop it on failure */ | ||
1780 | rc = lcs_resetcard(card); | ||
1781 | if (rc != 0) | ||
1782 | rc = lcs_stopcard(card); | ||
1783 | lcs_clear_thread_running_bit(card, LCS_STOPLAN_THREAD); | ||
1784 | return rc; | ||
1785 | } | ||
1786 | |||
1787 | /** | ||
1788 | * Kernel Thread helper functions for LGW initiated commands | 1726 | * Kernel Thread helper functions for LGW initiated commands |
1789 | */ | 1727 | */ |
1790 | static void | 1728 | static void |
1791 | lcs_start_kernel_thread(struct lcs_card *card) | 1729 | lcs_start_kernel_thread(struct lcs_card *card) |
1792 | { | 1730 | { |
1793 | LCS_DBF_TEXT(5, trace, "krnthrd"); | 1731 | LCS_DBF_TEXT(5, trace, "krnthrd"); |
1794 | if (lcs_do_start_thread(card, LCS_STARTUP_THREAD)) | 1732 | if (lcs_do_start_thread(card, LCS_RECOVERY_THREAD)) |
1795 | kernel_thread(lcs_lgw_startup_thread, (void *) card, SIGCHLD); | 1733 | kernel_thread(lcs_recovery, (void *) card, SIGCHLD); |
1796 | if (lcs_do_start_thread(card, LCS_STARTLAN_THREAD)) | ||
1797 | kernel_thread(lcs_lgw_startlan_thread, (void *) card, SIGCHLD); | ||
1798 | if (lcs_do_start_thread(card, LCS_STOPLAN_THREAD)) | ||
1799 | kernel_thread(lcs_lgw_stoplan_thread, (void *) card, SIGCHLD); | ||
1800 | #ifdef CONFIG_IP_MULTICAST | 1734 | #ifdef CONFIG_IP_MULTICAST |
1801 | if (lcs_do_start_thread(card, LCS_SET_MC_THREAD)) | 1735 | if (lcs_do_start_thread(card, LCS_SET_MC_THREAD)) |
1802 | kernel_thread(lcs_register_mc_addresses, (void *) card, SIGCHLD); | 1736 | kernel_thread(lcs_register_mc_addresses, |
1737 | (void *) card, SIGCHLD); | ||
1803 | #endif | 1738 | #endif |
1804 | } | 1739 | } |
1805 | 1740 | ||
@@ -1813,19 +1748,14 @@ lcs_get_control(struct lcs_card *card, struct lcs_cmd *cmd) | |||
1813 | if (cmd->initiator == LCS_INITIATOR_LGW) { | 1748 | if (cmd->initiator == LCS_INITIATOR_LGW) { |
1814 | switch(cmd->cmd_code) { | 1749 | switch(cmd->cmd_code) { |
1815 | case LCS_CMD_STARTUP: | 1750 | case LCS_CMD_STARTUP: |
1816 | if (!lcs_set_thread_start_bit(card, | ||
1817 | LCS_STARTUP_THREAD)) | ||
1818 | schedule_work(&card->kernel_thread_starter); | ||
1819 | break; | ||
1820 | case LCS_CMD_STARTLAN: | 1751 | case LCS_CMD_STARTLAN: |
1821 | if (!lcs_set_thread_start_bit(card, | 1752 | lcs_schedule_recovery(card); |
1822 | LCS_STARTLAN_THREAD)) | ||
1823 | schedule_work(&card->kernel_thread_starter); | ||
1824 | break; | 1753 | break; |
1825 | case LCS_CMD_STOPLAN: | 1754 | case LCS_CMD_STOPLAN: |
1826 | if (!lcs_set_thread_start_bit(card, | 1755 | PRINT_WARN("Stoplan for %s initiated by LGW.\n", |
1827 | LCS_STOPLAN_THREAD)) | 1756 | card->dev->name); |
1828 | schedule_work(&card->kernel_thread_starter); | 1757 | if (card->dev) |
1758 | netif_carrier_off(card->dev); | ||
1829 | break; | 1759 | break; |
1830 | default: | 1760 | default: |
1831 | PRINT_INFO("UNRECOGNIZED LGW COMMAND\n"); | 1761 | PRINT_INFO("UNRECOGNIZED LGW COMMAND\n"); |
@@ -1941,8 +1871,11 @@ lcs_stop_device(struct net_device *dev) | |||
1941 | 1871 | ||
1942 | LCS_DBF_TEXT(2, trace, "stopdev"); | 1872 | LCS_DBF_TEXT(2, trace, "stopdev"); |
1943 | card = (struct lcs_card *) dev->priv; | 1873 | card = (struct lcs_card *) dev->priv; |
1944 | netif_stop_queue(dev); | 1874 | netif_carrier_off(dev); |
1875 | netif_tx_disable(dev); | ||
1945 | dev->flags &= ~IFF_UP; | 1876 | dev->flags &= ~IFF_UP; |
1877 | wait_event(card->write.wait_q, | ||
1878 | (card->write.state != CH_STATE_RUNNING)); | ||
1946 | rc = lcs_stopcard(card); | 1879 | rc = lcs_stopcard(card); |
1947 | if (rc) | 1880 | if (rc) |
1948 | PRINT_ERR("Try it again!\n "); | 1881 | PRINT_ERR("Try it again!\n "); |
@@ -1968,6 +1901,7 @@ lcs_open_device(struct net_device *dev) | |||
1968 | 1901 | ||
1969 | } else { | 1902 | } else { |
1970 | dev->flags |= IFF_UP; | 1903 | dev->flags |= IFF_UP; |
1904 | netif_carrier_on(dev); | ||
1971 | netif_wake_queue(dev); | 1905 | netif_wake_queue(dev); |
1972 | card->state = DEV_STATE_UP; | 1906 | card->state = DEV_STATE_UP; |
1973 | } | 1907 | } |
@@ -2059,10 +1993,31 @@ lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char | |||
2059 | 1993 | ||
2060 | DEVICE_ATTR(lancmd_timeout, 0644, lcs_timeout_show, lcs_timeout_store); | 1994 | DEVICE_ATTR(lancmd_timeout, 0644, lcs_timeout_show, lcs_timeout_store); |
2061 | 1995 | ||
1996 | static ssize_t | ||
1997 | lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, | ||
1998 | const char *buf, size_t count) | ||
1999 | { | ||
2000 | struct lcs_card *card = dev->driver_data; | ||
2001 | char *tmp; | ||
2002 | int i; | ||
2003 | |||
2004 | if (!card) | ||
2005 | return -EINVAL; | ||
2006 | if (card->state != DEV_STATE_UP) | ||
2007 | return -EPERM; | ||
2008 | i = simple_strtoul(buf, &tmp, 16); | ||
2009 | if (i == 1) | ||
2010 | lcs_schedule_recovery(card); | ||
2011 | return count; | ||
2012 | } | ||
2013 | |||
2014 | static DEVICE_ATTR(recover, 0200, NULL, lcs_dev_recover_store); | ||
2015 | |||
2062 | static struct attribute * lcs_attrs[] = { | 2016 | static struct attribute * lcs_attrs[] = { |
2063 | &dev_attr_portno.attr, | 2017 | &dev_attr_portno.attr, |
2064 | &dev_attr_type.attr, | 2018 | &dev_attr_type.attr, |
2065 | &dev_attr_lancmd_timeout.attr, | 2019 | &dev_attr_lancmd_timeout.attr, |
2020 | &dev_attr_recover.attr, | ||
2066 | NULL, | 2021 | NULL, |
2067 | }; | 2022 | }; |
2068 | 2023 | ||
@@ -2099,6 +2054,12 @@ lcs_probe_device(struct ccwgroup_device *ccwgdev) | |||
2099 | ccwgdev->dev.driver_data = card; | 2054 | ccwgdev->dev.driver_data = card; |
2100 | ccwgdev->cdev[0]->handler = lcs_irq; | 2055 | ccwgdev->cdev[0]->handler = lcs_irq; |
2101 | ccwgdev->cdev[1]->handler = lcs_irq; | 2056 | ccwgdev->cdev[1]->handler = lcs_irq; |
2057 | card->gdev = ccwgdev; | ||
2058 | INIT_WORK(&card->kernel_thread_starter, | ||
2059 | (void *) lcs_start_kernel_thread, card); | ||
2060 | card->thread_start_mask = 0; | ||
2061 | card->thread_allowed_mask = 0; | ||
2062 | card->thread_running_mask = 0; | ||
2102 | return 0; | 2063 | return 0; |
2103 | } | 2064 | } |
2104 | 2065 | ||
@@ -2200,6 +2161,7 @@ netdev_out: | |||
2200 | if (recover_state == DEV_STATE_RECOVER) { | 2161 | if (recover_state == DEV_STATE_RECOVER) { |
2201 | lcs_set_multicast_list(card->dev); | 2162 | lcs_set_multicast_list(card->dev); |
2202 | card->dev->flags |= IFF_UP; | 2163 | card->dev->flags |= IFF_UP; |
2164 | netif_carrier_on(card->dev); | ||
2203 | netif_wake_queue(card->dev); | 2165 | netif_wake_queue(card->dev); |
2204 | card->state = DEV_STATE_UP; | 2166 | card->state = DEV_STATE_UP; |
2205 | } else { | 2167 | } else { |
@@ -2229,7 +2191,7 @@ out: | |||
2229 | * lcs_shutdown_device, called when setting the group device offline. | 2191 | * lcs_shutdown_device, called when setting the group device offline. |
2230 | */ | 2192 | */ |
2231 | static int | 2193 | static int |
2232 | lcs_shutdown_device(struct ccwgroup_device *ccwgdev) | 2194 | __lcs_shutdown_device(struct ccwgroup_device *ccwgdev, int recovery_mode) |
2233 | { | 2195 | { |
2234 | struct lcs_card *card; | 2196 | struct lcs_card *card; |
2235 | enum lcs_dev_states recover_state; | 2197 | enum lcs_dev_states recover_state; |
@@ -2239,9 +2201,11 @@ lcs_shutdown_device(struct ccwgroup_device *ccwgdev) | |||
2239 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2201 | card = (struct lcs_card *)ccwgdev->dev.driver_data; |
2240 | if (!card) | 2202 | if (!card) |
2241 | return -ENODEV; | 2203 | return -ENODEV; |
2242 | lcs_set_allowed_threads(card, 0); | 2204 | if (recovery_mode == 0) { |
2243 | if (lcs_wait_for_threads(card, LCS_SET_MC_THREAD)) | 2205 | lcs_set_allowed_threads(card, 0); |
2244 | return -ERESTARTSYS; | 2206 | if (lcs_wait_for_threads(card, LCS_SET_MC_THREAD)) |
2207 | return -ERESTARTSYS; | ||
2208 | } | ||
2245 | LCS_DBF_HEX(3, setup, &card, sizeof(void*)); | 2209 | LCS_DBF_HEX(3, setup, &card, sizeof(void*)); |
2246 | recover_state = card->state; | 2210 | recover_state = card->state; |
2247 | 2211 | ||
@@ -2256,6 +2220,43 @@ lcs_shutdown_device(struct ccwgroup_device *ccwgdev) | |||
2256 | return 0; | 2220 | return 0; |
2257 | } | 2221 | } |
2258 | 2222 | ||
2223 | static int | ||
2224 | lcs_shutdown_device(struct ccwgroup_device *ccwgdev) | ||
2225 | { | ||
2226 | return __lcs_shutdown_device(ccwgdev, 0); | ||
2227 | } | ||
2228 | |||
2229 | /** | ||
2230 | * drive lcs recovery after startup and startlan initiated by Lan Gateway | ||
2231 | */ | ||
2232 | static int | ||
2233 | lcs_recovery(void *ptr) | ||
2234 | { | ||
2235 | struct lcs_card *card; | ||
2236 | struct ccwgroup_device *gdev; | ||
2237 | int rc; | ||
2238 | |||
2239 | card = (struct lcs_card *) ptr; | ||
2240 | daemonize("lcs_recover"); | ||
2241 | |||
2242 | LCS_DBF_TEXT(4, trace, "recover1"); | ||
2243 | if (!lcs_do_run_thread(card, LCS_RECOVERY_THREAD)) | ||
2244 | return 0; | ||
2245 | LCS_DBF_TEXT(4, trace, "recover2"); | ||
2246 | gdev = card->gdev; | ||
2247 | PRINT_WARN("Recovery of device %s started...\n", gdev->dev.bus_id); | ||
2248 | rc = __lcs_shutdown_device(gdev, 1); | ||
2249 | rc = lcs_new_device(gdev); | ||
2250 | if (!rc) | ||
2251 | PRINT_INFO("Device %s successfully recovered!\n", | ||
2252 | card->dev->name); | ||
2253 | else | ||
2254 | PRINT_INFO("Device %s could not be recovered!\n", | ||
2255 | card->dev->name); | ||
2256 | lcs_clear_thread_running_bit(card, LCS_RECOVERY_THREAD); | ||
2257 | return 0; | ||
2258 | } | ||
2259 | |||
2259 | /** | 2260 | /** |
2260 | * lcs_remove_device, free buffers and card | 2261 | * lcs_remove_device, free buffers and card |
2261 | */ | 2262 | */ |
diff --git a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h index 2fad5e40c2e4..93143932983b 100644 --- a/drivers/s390/net/lcs.h +++ b/drivers/s390/net/lcs.h | |||
@@ -73,13 +73,17 @@ do { \ | |||
73 | /** | 73 | /** |
74 | * LCS sense byte definitions | 74 | * LCS sense byte definitions |
75 | */ | 75 | */ |
76 | #define LCS_SENSE_BYTE_0 0 | ||
77 | #define LCS_SENSE_BYTE_1 1 | ||
78 | #define LCS_SENSE_BYTE_2 2 | ||
79 | #define LCS_SENSE_BYTE_3 3 | ||
76 | #define LCS_SENSE_INTERFACE_DISCONNECT 0x01 | 80 | #define LCS_SENSE_INTERFACE_DISCONNECT 0x01 |
77 | #define LCS_SENSE_EQUIPMENT_CHECK 0x10 | 81 | #define LCS_SENSE_EQUIPMENT_CHECK 0x10 |
78 | #define LCS_SENSE_BUS_OUT_CHECK 0x20 | 82 | #define LCS_SENSE_BUS_OUT_CHECK 0x20 |
79 | #define LCS_SENSE_INTERVENTION_REQUIRED 0x40 | 83 | #define LCS_SENSE_INTERVENTION_REQUIRED 0x40 |
80 | #define LCS_SENSE_CMD_REJECT 0x80 | 84 | #define LCS_SENSE_CMD_REJECT 0x80 |
81 | #define LCS_SENSE_RESETTING_EVENT 0x0080 | 85 | #define LCS_SENSE_RESETTING_EVENT 0x80 |
82 | #define LCS_SENSE_DEVICE_ONLINE 0x0020 | 86 | #define LCS_SENSE_DEVICE_ONLINE 0x20 |
83 | 87 | ||
84 | /** | 88 | /** |
85 | * LCS packet type definitions | 89 | * LCS packet type definitions |
@@ -152,10 +156,9 @@ enum lcs_dev_states { | |||
152 | 156 | ||
153 | enum lcs_threads { | 157 | enum lcs_threads { |
154 | LCS_SET_MC_THREAD = 1, | 158 | LCS_SET_MC_THREAD = 1, |
155 | LCS_STARTLAN_THREAD = 2, | 159 | LCS_RECOVERY_THREAD = 2, |
156 | LCS_STOPLAN_THREAD = 4, | ||
157 | LCS_STARTUP_THREAD = 8, | ||
158 | }; | 160 | }; |
161 | |||
159 | /** | 162 | /** |
160 | * LCS struct declarations | 163 | * LCS struct declarations |
161 | */ | 164 | */ |
@@ -286,6 +289,7 @@ struct lcs_card { | |||
286 | struct net_device_stats stats; | 289 | struct net_device_stats stats; |
287 | unsigned short (*lan_type_trans)(struct sk_buff *skb, | 290 | unsigned short (*lan_type_trans)(struct sk_buff *skb, |
288 | struct net_device *dev); | 291 | struct net_device *dev); |
292 | struct ccwgroup_device *gdev; | ||
289 | struct lcs_channel read; | 293 | struct lcs_channel read; |
290 | struct lcs_channel write; | 294 | struct lcs_channel write; |
291 | struct lcs_buffer *tx_buffer; | 295 | struct lcs_buffer *tx_buffer; |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 260a93c8c442..b452cc1afd55 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -30,7 +30,7 @@ | |||
30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #undef DEBUG | 34 | #undef DEBUG |
35 | 35 | ||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
@@ -65,7 +65,7 @@ MODULE_AUTHOR | |||
65 | ("(C) 2001 IBM Corporation by Fritz Elfert (felfert@millenux.com)"); | 65 | ("(C) 2001 IBM Corporation by Fritz Elfert (felfert@millenux.com)"); |
66 | MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver"); | 66 | MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver"); |
67 | 67 | ||
68 | 68 | ||
69 | #define PRINTK_HEADER " iucv: " /* for debugging */ | 69 | #define PRINTK_HEADER " iucv: " /* for debugging */ |
70 | 70 | ||
71 | static struct device_driver netiucv_driver = { | 71 | static struct device_driver netiucv_driver = { |
@@ -202,7 +202,7 @@ netiucv_printname(char *name) | |||
202 | *p = '\0'; | 202 | *p = '\0'; |
203 | return tmp; | 203 | return tmp; |
204 | } | 204 | } |
205 | 205 | ||
206 | /** | 206 | /** |
207 | * States of the interface statemachine. | 207 | * States of the interface statemachine. |
208 | */ | 208 | */ |
@@ -244,7 +244,7 @@ static const char *dev_event_names[] = { | |||
244 | "Connection up", | 244 | "Connection up", |
245 | "Connection down", | 245 | "Connection down", |
246 | }; | 246 | }; |
247 | 247 | ||
248 | /** | 248 | /** |
249 | * Events of the connection statemachine | 249 | * Events of the connection statemachine |
250 | */ | 250 | */ |
@@ -364,7 +364,7 @@ static const char *conn_state_names[] = { | |||
364 | "Connect error", | 364 | "Connect error", |
365 | }; | 365 | }; |
366 | 366 | ||
367 | 367 | ||
368 | /** | 368 | /** |
369 | * Debug Facility Stuff | 369 | * Debug Facility Stuff |
370 | */ | 370 | */ |
@@ -516,7 +516,7 @@ static void | |||
516 | fsm_action_nop(fsm_instance *fi, int event, void *arg) | 516 | fsm_action_nop(fsm_instance *fi, int event, void *arg) |
517 | { | 517 | { |
518 | } | 518 | } |
519 | 519 | ||
520 | /** | 520 | /** |
521 | * Actions of the connection statemachine | 521 | * Actions of the connection statemachine |
522 | *****************************************************************************/ | 522 | *****************************************************************************/ |
@@ -993,7 +993,7 @@ static const fsm_node conn_fsm[] = { | |||
993 | 993 | ||
994 | static const int CONN_FSM_LEN = sizeof(conn_fsm) / sizeof(fsm_node); | 994 | static const int CONN_FSM_LEN = sizeof(conn_fsm) / sizeof(fsm_node); |
995 | 995 | ||
996 | 996 | ||
997 | /** | 997 | /** |
998 | * Actions for interface - statemachine. | 998 | * Actions for interface - statemachine. |
999 | *****************************************************************************/ | 999 | *****************************************************************************/ |
@@ -1182,7 +1182,7 @@ netiucv_transmit_skb(struct iucv_connection *conn, struct sk_buff *skb) { | |||
1182 | 1182 | ||
1183 | fsm_newstate(conn->fsm, CONN_STATE_TX); | 1183 | fsm_newstate(conn->fsm, CONN_STATE_TX); |
1184 | conn->prof.send_stamp = xtime; | 1184 | conn->prof.send_stamp = xtime; |
1185 | 1185 | ||
1186 | rc = iucv_send(conn->pathid, NULL, 0, 0, 1 /* single_flag */, | 1186 | rc = iucv_send(conn->pathid, NULL, 0, 0, 1 /* single_flag */, |
1187 | 0, nskb->data, nskb->len); | 1187 | 0, nskb->data, nskb->len); |
1188 | /* Shut up, gcc! nskb is always below 2G. */ | 1188 | /* Shut up, gcc! nskb is always below 2G. */ |
@@ -1220,7 +1220,7 @@ netiucv_transmit_skb(struct iucv_connection *conn, struct sk_buff *skb) { | |||
1220 | 1220 | ||
1221 | return rc; | 1221 | return rc; |
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | /** | 1224 | /** |
1225 | * Interface API for upper network layers | 1225 | * Interface API for upper network layers |
1226 | *****************************************************************************/ | 1226 | *****************************************************************************/ |
@@ -1291,7 +1291,7 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev) | |||
1291 | 1291 | ||
1292 | /** | 1292 | /** |
1293 | * If connection is not running, try to restart it | 1293 | * If connection is not running, try to restart it |
1294 | * and throw away packet. | 1294 | * and throw away packet. |
1295 | */ | 1295 | */ |
1296 | if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { | 1296 | if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { |
1297 | fsm_event(privptr->fsm, DEV_EVENT_START, dev); | 1297 | fsm_event(privptr->fsm, DEV_EVENT_START, dev); |
@@ -1538,7 +1538,7 @@ static ssize_t | |||
1538 | maxcq_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1538 | maxcq_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1539 | { | 1539 | { |
1540 | struct netiucv_priv *priv = dev->driver_data; | 1540 | struct netiucv_priv *priv = dev->driver_data; |
1541 | 1541 | ||
1542 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1542 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); |
1543 | priv->conn->prof.maxcqueue = 0; | 1543 | priv->conn->prof.maxcqueue = 0; |
1544 | return count; | 1544 | return count; |
@@ -1559,7 +1559,7 @@ static ssize_t | |||
1559 | sdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1559 | sdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1560 | { | 1560 | { |
1561 | struct netiucv_priv *priv = dev->driver_data; | 1561 | struct netiucv_priv *priv = dev->driver_data; |
1562 | 1562 | ||
1563 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1563 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); |
1564 | priv->conn->prof.doios_single = 0; | 1564 | priv->conn->prof.doios_single = 0; |
1565 | return count; | 1565 | return count; |
@@ -1580,7 +1580,7 @@ static ssize_t | |||
1580 | mdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1580 | mdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1581 | { | 1581 | { |
1582 | struct netiucv_priv *priv = dev->driver_data; | 1582 | struct netiucv_priv *priv = dev->driver_data; |
1583 | 1583 | ||
1584 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); | 1584 | IUCV_DBF_TEXT(trace, 5, __FUNCTION__); |
1585 | priv->conn->prof.doios_multi = 0; | 1585 | priv->conn->prof.doios_multi = 0; |
1586 | return count; | 1586 | return count; |
@@ -1601,7 +1601,7 @@ static ssize_t | |||
1601 | txlen_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1601 | txlen_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1602 | { | 1602 | { |
1603 | struct netiucv_priv *priv = dev->driver_data; | 1603 | struct netiucv_priv *priv = dev->driver_data; |
1604 | 1604 | ||
1605 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1605 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); |
1606 | priv->conn->prof.txlen = 0; | 1606 | priv->conn->prof.txlen = 0; |
1607 | return count; | 1607 | return count; |
@@ -1622,7 +1622,7 @@ static ssize_t | |||
1622 | txtime_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 1622 | txtime_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
1623 | { | 1623 | { |
1624 | struct netiucv_priv *priv = dev->driver_data; | 1624 | struct netiucv_priv *priv = dev->driver_data; |
1625 | 1625 | ||
1626 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); | 1626 | IUCV_DBF_TEXT(trace, 4, __FUNCTION__); |
1627 | priv->conn->prof.tx_time = 0; | 1627 | priv->conn->prof.tx_time = 0; |
1628 | return count; | 1628 | return count; |
@@ -2000,7 +2000,7 @@ conn_write(struct device_driver *drv, const char *buf, size_t count) | |||
2000 | } | 2000 | } |
2001 | 2001 | ||
2002 | PRINT_INFO("%s: '%s'\n", dev->name, netiucv_printname(username)); | 2002 | PRINT_INFO("%s: '%s'\n", dev->name, netiucv_printname(username)); |
2003 | 2003 | ||
2004 | return count; | 2004 | return count; |
2005 | 2005 | ||
2006 | out_free_ndev: | 2006 | out_free_ndev: |
@@ -2099,7 +2099,7 @@ static int __init | |||
2099 | netiucv_init(void) | 2099 | netiucv_init(void) |
2100 | { | 2100 | { |
2101 | int ret; | 2101 | int ret; |
2102 | 2102 | ||
2103 | ret = iucv_register_dbf_views(); | 2103 | ret = iucv_register_dbf_views(); |
2104 | if (ret) { | 2104 | if (ret) { |
2105 | PRINT_WARN("netiucv_init failed, " | 2105 | PRINT_WARN("netiucv_init failed, " |
@@ -2128,7 +2128,7 @@ netiucv_init(void) | |||
2128 | } | 2128 | } |
2129 | return ret; | 2129 | return ret; |
2130 | } | 2130 | } |
2131 | 2131 | ||
2132 | module_init(netiucv_init); | 2132 | module_init(netiucv_init); |
2133 | module_exit(netiucv_exit); | 2133 | module_exit(netiucv_exit); |
2134 | MODULE_LICENSE("GPL"); | 2134 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 4df0fcd7b10b..619f4a0c7160 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h | |||
@@ -376,7 +376,7 @@ struct qeth_hdr_osn { | |||
376 | __u8 reserved3[18]; | 376 | __u8 reserved3[18]; |
377 | __u32 ccid; | 377 | __u32 ccid; |
378 | } __attribute__ ((packed)); | 378 | } __attribute__ ((packed)); |
379 | 379 | ||
380 | struct qeth_hdr { | 380 | struct qeth_hdr { |
381 | union { | 381 | union { |
382 | struct qeth_hdr_layer2 l2; | 382 | struct qeth_hdr_layer2 l2; |
@@ -825,7 +825,7 @@ struct qeth_card { | |||
825 | int use_hard_stop; | 825 | int use_hard_stop; |
826 | int (*orig_hard_header)(struct sk_buff *,struct net_device *, | 826 | int (*orig_hard_header)(struct sk_buff *,struct net_device *, |
827 | unsigned short,void *,void *,unsigned); | 827 | unsigned short,void *,void *,unsigned); |
828 | struct qeth_osn_info osn_info; | 828 | struct qeth_osn_info osn_info; |
829 | }; | 829 | }; |
830 | 830 | ||
831 | struct qeth_card_list_struct { | 831 | struct qeth_card_list_struct { |
@@ -944,7 +944,7 @@ qeth_get_netdev_flags(struct qeth_card *card) | |||
944 | return 0; | 944 | return 0; |
945 | switch (card->info.type) { | 945 | switch (card->info.type) { |
946 | case QETH_CARD_TYPE_IQD: | 946 | case QETH_CARD_TYPE_IQD: |
947 | case QETH_CARD_TYPE_OSN: | 947 | case QETH_CARD_TYPE_OSN: |
948 | return IFF_NOARP; | 948 | return IFF_NOARP; |
949 | #ifdef CONFIG_QETH_IPV6 | 949 | #ifdef CONFIG_QETH_IPV6 |
950 | default: | 950 | default: |
@@ -981,7 +981,7 @@ static inline int | |||
981 | qeth_get_max_mtu_for_card(int cardtype) | 981 | qeth_get_max_mtu_for_card(int cardtype) |
982 | { | 982 | { |
983 | switch (cardtype) { | 983 | switch (cardtype) { |
984 | 984 | ||
985 | case QETH_CARD_TYPE_UNKNOWN: | 985 | case QETH_CARD_TYPE_UNKNOWN: |
986 | case QETH_CARD_TYPE_OSAE: | 986 | case QETH_CARD_TYPE_OSAE: |
987 | case QETH_CARD_TYPE_OSN: | 987 | case QETH_CARD_TYPE_OSN: |
@@ -1097,9 +1097,9 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr) | |||
1097 | int count = 0, rc = 0; | 1097 | int count = 0, rc = 0; |
1098 | int in[4]; | 1098 | int in[4]; |
1099 | 1099 | ||
1100 | rc = sscanf(buf, "%d.%d.%d.%d%n", | 1100 | rc = sscanf(buf, "%d.%d.%d.%d%n", |
1101 | &in[0], &in[1], &in[2], &in[3], &count); | 1101 | &in[0], &in[1], &in[2], &in[3], &count); |
1102 | if (rc != 4 || count) | 1102 | if (rc != 4 || count<=0) |
1103 | return -EINVAL; | 1103 | return -EINVAL; |
1104 | for (count = 0; count < 4; count++) { | 1104 | for (count = 0; count < 4; count++) { |
1105 | if (in[count] > 255) | 1105 | if (in[count] > 255) |
@@ -1131,7 +1131,7 @@ qeth_string_to_ipaddr6(const char *buf, __u8 *addr) | |||
1131 | 1131 | ||
1132 | cnt = out = found = save_cnt = num2 = 0; | 1132 | cnt = out = found = save_cnt = num2 = 0; |
1133 | end = start = (char *) buf; | 1133 | end = start = (char *) buf; |
1134 | in = (__u16 *) addr; | 1134 | in = (__u16 *) addr; |
1135 | memset(in, 0, 16); | 1135 | memset(in, 0, 16); |
1136 | while (end) { | 1136 | while (end) { |
1137 | end = strchr(end,':'); | 1137 | end = strchr(end,':'); |
@@ -1139,7 +1139,7 @@ qeth_string_to_ipaddr6(const char *buf, __u8 *addr) | |||
1139 | end = (char *)buf + (strlen(buf)); | 1139 | end = (char *)buf + (strlen(buf)); |
1140 | out = 1; | 1140 | out = 1; |
1141 | } | 1141 | } |
1142 | if ((end - start)) { | 1142 | if ((end - start)) { |
1143 | memset(num, 0, 5); | 1143 | memset(num, 0, 5); |
1144 | memcpy(num, start, end - start); | 1144 | memcpy(num, start, end - start); |
1145 | if (!qeth_isxdigit(num)) | 1145 | if (!qeth_isxdigit(num)) |
@@ -1241,5 +1241,5 @@ qeth_osn_register(unsigned char *read_dev_no, | |||
1241 | 1241 | ||
1242 | extern void | 1242 | extern void |
1243 | qeth_osn_deregister(struct net_device *); | 1243 | qeth_osn_deregister(struct net_device *); |
1244 | 1244 | ||
1245 | #endif /* __QETH_H__ */ | 1245 | #endif /* __QETH_H__ */ |
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 44e226f211e7..0bab60a20309 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -81,7 +81,7 @@ void | |||
81 | qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf) | 81 | qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf) |
82 | { | 82 | { |
83 | struct qeth_eddp_context_reference *ref; | 83 | struct qeth_eddp_context_reference *ref; |
84 | 84 | ||
85 | QETH_DBF_TEXT(trace, 6, "eddprctx"); | 85 | QETH_DBF_TEXT(trace, 6, "eddprctx"); |
86 | while (!list_empty(&buf->ctx_list)){ | 86 | while (!list_empty(&buf->ctx_list)){ |
87 | ref = list_entry(buf->ctx_list.next, | 87 | ref = list_entry(buf->ctx_list.next, |
@@ -135,7 +135,7 @@ qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, | |||
135 | "buffer!\n"); | 135 | "buffer!\n"); |
136 | goto out; | 136 | goto out; |
137 | } | 137 | } |
138 | } | 138 | } |
139 | /* check if the whole next skb fits into current buffer */ | 139 | /* check if the whole next skb fits into current buffer */ |
140 | if ((QETH_MAX_BUFFER_ELEMENTS(queue->card) - | 140 | if ((QETH_MAX_BUFFER_ELEMENTS(queue->card) - |
141 | buf->next_element_to_fill) | 141 | buf->next_element_to_fill) |
@@ -148,7 +148,7 @@ qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, | |||
148 | * and increment ctx's refcnt */ | 148 | * and increment ctx's refcnt */ |
149 | must_refcnt = 1; | 149 | must_refcnt = 1; |
150 | continue; | 150 | continue; |
151 | } | 151 | } |
152 | if (must_refcnt){ | 152 | if (must_refcnt){ |
153 | must_refcnt = 0; | 153 | must_refcnt = 0; |
154 | if (qeth_eddp_buf_ref_context(buf, ctx)){ | 154 | if (qeth_eddp_buf_ref_context(buf, ctx)){ |
@@ -266,7 +266,7 @@ qeth_eddp_copy_data_tcp(char *dst, struct qeth_eddp_data *eddp, int len, | |||
266 | int left_in_frag; | 266 | int left_in_frag; |
267 | int copy_len; | 267 | int copy_len; |
268 | u8 *src; | 268 | u8 *src; |
269 | 269 | ||
270 | QETH_DBF_TEXT(trace, 5, "eddpcdtc"); | 270 | QETH_DBF_TEXT(trace, 5, "eddpcdtc"); |
271 | if (skb_shinfo(eddp->skb)->nr_frags == 0) { | 271 | if (skb_shinfo(eddp->skb)->nr_frags == 0) { |
272 | memcpy(dst, eddp->skb->data + eddp->skb_offset, len); | 272 | memcpy(dst, eddp->skb->data + eddp->skb_offset, len); |
@@ -408,7 +408,7 @@ __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
408 | struct tcphdr *tcph; | 408 | struct tcphdr *tcph; |
409 | int data_len; | 409 | int data_len; |
410 | u32 hcsum; | 410 | u32 hcsum; |
411 | 411 | ||
412 | QETH_DBF_TEXT(trace, 5, "eddpftcp"); | 412 | QETH_DBF_TEXT(trace, 5, "eddpftcp"); |
413 | eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; | 413 | eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; |
414 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { | 414 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { |
@@ -465,13 +465,13 @@ __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
465 | eddp->th.tcp.h.seq += data_len; | 465 | eddp->th.tcp.h.seq += data_len; |
466 | } | 466 | } |
467 | } | 467 | } |
468 | 468 | ||
469 | static inline int | 469 | static inline int |
470 | qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | 470 | qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, |
471 | struct sk_buff *skb, struct qeth_hdr *qhdr) | 471 | struct sk_buff *skb, struct qeth_hdr *qhdr) |
472 | { | 472 | { |
473 | struct qeth_eddp_data *eddp = NULL; | 473 | struct qeth_eddp_data *eddp = NULL; |
474 | 474 | ||
475 | QETH_DBF_TEXT(trace, 5, "eddpficx"); | 475 | QETH_DBF_TEXT(trace, 5, "eddpficx"); |
476 | /* create our segmentation headers and copy original headers */ | 476 | /* create our segmentation headers and copy original headers */ |
477 | if (skb->protocol == ETH_P_IP) | 477 | if (skb->protocol == ETH_P_IP) |
@@ -512,7 +512,7 @@ qeth_eddp_calc_num_pages(struct qeth_eddp_context *ctx, struct sk_buff *skb, | |||
512 | int hdr_len) | 512 | int hdr_len) |
513 | { | 513 | { |
514 | int skbs_per_page; | 514 | int skbs_per_page; |
515 | 515 | ||
516 | QETH_DBF_TEXT(trace, 5, "eddpcanp"); | 516 | QETH_DBF_TEXT(trace, 5, "eddpcanp"); |
517 | /* can we put multiple skbs in one page? */ | 517 | /* can we put multiple skbs in one page? */ |
518 | skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->tso_size + hdr_len); | 518 | skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->tso_size + hdr_len); |
@@ -588,7 +588,7 @@ qeth_eddp_create_context_tcp(struct qeth_card *card, struct sk_buff *skb, | |||
588 | struct qeth_hdr *qhdr) | 588 | struct qeth_hdr *qhdr) |
589 | { | 589 | { |
590 | struct qeth_eddp_context *ctx = NULL; | 590 | struct qeth_eddp_context *ctx = NULL; |
591 | 591 | ||
592 | QETH_DBF_TEXT(trace, 5, "creddpct"); | 592 | QETH_DBF_TEXT(trace, 5, "creddpct"); |
593 | if (skb->protocol == ETH_P_IP) | 593 | if (skb->protocol == ETH_P_IP) |
594 | ctx = qeth_eddp_create_context_generic(card, skb, | 594 | ctx = qeth_eddp_create_context_generic(card, skb, |
diff --git a/drivers/s390/net/qeth_fs.h b/drivers/s390/net/qeth_fs.h index e422b41c656e..61faf05517d6 100644 --- a/drivers/s390/net/qeth_fs.h +++ b/drivers/s390/net/qeth_fs.h | |||
@@ -42,7 +42,7 @@ qeth_create_device_attributes_osn(struct device *dev); | |||
42 | 42 | ||
43 | extern void | 43 | extern void |
44 | qeth_remove_device_attributes_osn(struct device *dev); | 44 | qeth_remove_device_attributes_osn(struct device *dev); |
45 | 45 | ||
46 | extern int | 46 | extern int |
47 | qeth_create_driver_attributes(void); | 47 | qeth_create_driver_attributes(void); |
48 | 48 | ||
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index cb14642d97aa..9e671a48cd2f 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -513,7 +513,7 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) | |||
513 | 513 | ||
514 | QETH_DBF_TEXT(setup, 3, "setoffl"); | 514 | QETH_DBF_TEXT(setup, 3, "setoffl"); |
515 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); | 515 | QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); |
516 | 516 | ||
517 | if (card->dev && netif_carrier_ok(card->dev)) | 517 | if (card->dev && netif_carrier_ok(card->dev)) |
518 | netif_carrier_off(card->dev); | 518 | netif_carrier_off(card->dev); |
519 | recover_flag = card->state; | 519 | recover_flag = card->state; |
@@ -604,13 +604,13 @@ __qeth_ref_ip_on_card(struct qeth_card *card, struct qeth_ipaddr *todo, | |||
604 | list_for_each_entry(addr, &card->ip_list, entry) { | 604 | list_for_each_entry(addr, &card->ip_list, entry) { |
605 | if (card->options.layer2) { | 605 | if (card->options.layer2) { |
606 | if ((addr->type == todo->type) && | 606 | if ((addr->type == todo->type) && |
607 | (memcmp(&addr->mac, &todo->mac, | 607 | (memcmp(&addr->mac, &todo->mac, |
608 | OSA_ADDR_LEN) == 0)) { | 608 | OSA_ADDR_LEN) == 0)) { |
609 | found = 1; | 609 | found = 1; |
610 | break; | 610 | break; |
611 | } | 611 | } |
612 | continue; | 612 | continue; |
613 | } | 613 | } |
614 | if ((addr->proto == QETH_PROT_IPV4) && | 614 | if ((addr->proto == QETH_PROT_IPV4) && |
615 | (todo->proto == QETH_PROT_IPV4) && | 615 | (todo->proto == QETH_PROT_IPV4) && |
616 | (addr->type == todo->type) && | 616 | (addr->type == todo->type) && |
@@ -694,13 +694,13 @@ __qeth_insert_ip_todo(struct qeth_card *card, struct qeth_ipaddr *addr, int add) | |||
694 | if (card->options.layer2) { | 694 | if (card->options.layer2) { |
695 | if ((tmp->type == addr->type) && | 695 | if ((tmp->type == addr->type) && |
696 | (tmp->is_multicast == addr->is_multicast) && | 696 | (tmp->is_multicast == addr->is_multicast) && |
697 | (memcmp(&tmp->mac, &addr->mac, | 697 | (memcmp(&tmp->mac, &addr->mac, |
698 | OSA_ADDR_LEN) == 0)) { | 698 | OSA_ADDR_LEN) == 0)) { |
699 | found = 1; | 699 | found = 1; |
700 | break; | 700 | break; |
701 | } | 701 | } |
702 | continue; | 702 | continue; |
703 | } | 703 | } |
704 | if ((tmp->proto == QETH_PROT_IPV4) && | 704 | if ((tmp->proto == QETH_PROT_IPV4) && |
705 | (addr->proto == QETH_PROT_IPV4) && | 705 | (addr->proto == QETH_PROT_IPV4) && |
706 | (tmp->type == addr->type) && | 706 | (tmp->type == addr->type) && |
@@ -1173,7 +1173,7 @@ qeth_determine_card_type(struct qeth_card *card) | |||
1173 | "due to hardware limitations!\n"); | 1173 | "due to hardware limitations!\n"); |
1174 | card->qdio.no_out_queues = 1; | 1174 | card->qdio.no_out_queues = 1; |
1175 | card->qdio.default_out_queue = 0; | 1175 | card->qdio.default_out_queue = 0; |
1176 | } | 1176 | } |
1177 | return 0; | 1177 | return 0; |
1178 | } | 1178 | } |
1179 | i++; | 1179 | i++; |
@@ -1198,7 +1198,7 @@ qeth_probe_device(struct ccwgroup_device *gdev) | |||
1198 | return -ENODEV; | 1198 | return -ENODEV; |
1199 | 1199 | ||
1200 | QETH_DBF_TEXT_(setup, 2, "%s", gdev->dev.bus_id); | 1200 | QETH_DBF_TEXT_(setup, 2, "%s", gdev->dev.bus_id); |
1201 | 1201 | ||
1202 | card = qeth_alloc_card(); | 1202 | card = qeth_alloc_card(); |
1203 | if (!card) { | 1203 | if (!card) { |
1204 | put_device(dev); | 1204 | put_device(dev); |
@@ -1220,7 +1220,7 @@ qeth_probe_device(struct ccwgroup_device *gdev) | |||
1220 | put_device(dev); | 1220 | put_device(dev); |
1221 | qeth_free_card(card); | 1221 | qeth_free_card(card); |
1222 | return rc; | 1222 | return rc; |
1223 | } | 1223 | } |
1224 | if ((rc = qeth_setup_card(card))){ | 1224 | if ((rc = qeth_setup_card(card))){ |
1225 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); | 1225 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); |
1226 | put_device(dev); | 1226 | put_device(dev); |
@@ -1843,7 +1843,7 @@ struct qeth_cmd_buffer *iob) | |||
1843 | &card->seqno.pdu_hdr_ack, QETH_SEQ_NO_LENGTH); | 1843 | &card->seqno.pdu_hdr_ack, QETH_SEQ_NO_LENGTH); |
1844 | QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); | 1844 | QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); |
1845 | } | 1845 | } |
1846 | 1846 | ||
1847 | static int | 1847 | static int |
1848 | qeth_send_control_data(struct qeth_card *card, int len, | 1848 | qeth_send_control_data(struct qeth_card *card, int len, |
1849 | struct qeth_cmd_buffer *iob, | 1849 | struct qeth_cmd_buffer *iob, |
@@ -1937,7 +1937,7 @@ qeth_osn_send_control_data(struct qeth_card *card, int len, | |||
1937 | wake_up(&card->wait_q); | 1937 | wake_up(&card->wait_q); |
1938 | } | 1938 | } |
1939 | return rc; | 1939 | return rc; |
1940 | } | 1940 | } |
1941 | 1941 | ||
1942 | static inline void | 1942 | static inline void |
1943 | qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | 1943 | qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, |
@@ -1966,7 +1966,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | |||
1966 | memcpy(QETH_IPA_PDU_LEN_PDU3(iob->data), &s2, 2); | 1966 | memcpy(QETH_IPA_PDU_LEN_PDU3(iob->data), &s2, 2); |
1967 | return qeth_osn_send_control_data(card, s1, iob); | 1967 | return qeth_osn_send_control_data(card, s1, iob); |
1968 | } | 1968 | } |
1969 | 1969 | ||
1970 | static int | 1970 | static int |
1971 | qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | 1971 | qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, |
1972 | int (*reply_cb) | 1972 | int (*reply_cb) |
@@ -2579,7 +2579,7 @@ qeth_process_inbound_buffer(struct qeth_card *card, | |||
2579 | skb->dev = card->dev; | 2579 | skb->dev = card->dev; |
2580 | if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) | 2580 | if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) |
2581 | vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); | 2581 | vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); |
2582 | else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) | 2582 | else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) |
2583 | qeth_rebuild_skb(card, skb, hdr); | 2583 | qeth_rebuild_skb(card, skb, hdr); |
2584 | else { /*in case of OSN*/ | 2584 | else { /*in case of OSN*/ |
2585 | skb_push(skb, sizeof(struct qeth_hdr)); | 2585 | skb_push(skb, sizeof(struct qeth_hdr)); |
@@ -2763,7 +2763,7 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, | |||
2763 | index = i % QDIO_MAX_BUFFERS_PER_Q; | 2763 | index = i % QDIO_MAX_BUFFERS_PER_Q; |
2764 | buffer = &card->qdio.in_q->bufs[index]; | 2764 | buffer = &card->qdio.in_q->bufs[index]; |
2765 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && | 2765 | if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && |
2766 | qeth_check_qdio_errors(buffer->buffer, | 2766 | qeth_check_qdio_errors(buffer->buffer, |
2767 | qdio_err, siga_err,"qinerr"))) | 2767 | qdio_err, siga_err,"qinerr"))) |
2768 | qeth_process_inbound_buffer(card, buffer, index); | 2768 | qeth_process_inbound_buffer(card, buffer, index); |
2769 | /* clear buffer and give back to hardware */ | 2769 | /* clear buffer and give back to hardware */ |
@@ -3187,7 +3187,7 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) | |||
3187 | if (card->qdio.state == QETH_QDIO_ALLOCATED) | 3187 | if (card->qdio.state == QETH_QDIO_ALLOCATED) |
3188 | return 0; | 3188 | return 0; |
3189 | 3189 | ||
3190 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), | 3190 | card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), |
3191 | GFP_KERNEL|GFP_DMA); | 3191 | GFP_KERNEL|GFP_DMA); |
3192 | if (!card->qdio.in_q) | 3192 | if (!card->qdio.in_q) |
3193 | return - ENOMEM; | 3193 | return - ENOMEM; |
@@ -3476,7 +3476,7 @@ qeth_halt_channels(struct qeth_card *card) | |||
3476 | rc3 = qeth_halt_channel(&card->data); | 3476 | rc3 = qeth_halt_channel(&card->data); |
3477 | if (rc1) | 3477 | if (rc1) |
3478 | return rc1; | 3478 | return rc1; |
3479 | if (rc2) | 3479 | if (rc2) |
3480 | return rc2; | 3480 | return rc2; |
3481 | return rc3; | 3481 | return rc3; |
3482 | } | 3482 | } |
@@ -3491,7 +3491,7 @@ qeth_clear_channels(struct qeth_card *card) | |||
3491 | rc3 = qeth_clear_channel(&card->data); | 3491 | rc3 = qeth_clear_channel(&card->data); |
3492 | if (rc1) | 3492 | if (rc1) |
3493 | return rc1; | 3493 | return rc1; |
3494 | if (rc2) | 3494 | if (rc2) |
3495 | return rc2; | 3495 | return rc2; |
3496 | return rc3; | 3496 | return rc3; |
3497 | } | 3497 | } |
@@ -3798,10 +3798,10 @@ qeth_open(struct net_device *dev) | |||
3798 | QETH_DBF_TEXT(trace,4,"nomacadr"); | 3798 | QETH_DBF_TEXT(trace,4,"nomacadr"); |
3799 | return -EPERM; | 3799 | return -EPERM; |
3800 | } | 3800 | } |
3801 | card->dev->flags |= IFF_UP; | ||
3802 | netif_start_queue(dev); | ||
3803 | card->data.state = CH_STATE_UP; | 3801 | card->data.state = CH_STATE_UP; |
3804 | card->state = CARD_STATE_UP; | 3802 | card->state = CARD_STATE_UP; |
3803 | card->dev->flags |= IFF_UP; | ||
3804 | netif_start_queue(dev); | ||
3805 | 3805 | ||
3806 | if (!card->lan_online && netif_carrier_ok(dev)) | 3806 | if (!card->lan_online && netif_carrier_ok(dev)) |
3807 | netif_carrier_off(dev); | 3807 | netif_carrier_off(dev); |
@@ -3817,7 +3817,7 @@ qeth_stop(struct net_device *dev) | |||
3817 | 3817 | ||
3818 | card = (struct qeth_card *) dev->priv; | 3818 | card = (struct qeth_card *) dev->priv; |
3819 | 3819 | ||
3820 | netif_stop_queue(dev); | 3820 | netif_tx_disable(dev); |
3821 | card->dev->flags &= ~IFF_UP; | 3821 | card->dev->flags &= ~IFF_UP; |
3822 | if (card->state == CARD_STATE_UP) | 3822 | if (card->state == CARD_STATE_UP) |
3823 | card->state = CARD_STATE_SOFTSETUP; | 3823 | card->state = CARD_STATE_SOFTSETUP; |
@@ -3958,7 +3958,7 @@ qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, | |||
3958 | #endif | 3958 | #endif |
3959 | *hdr = (struct qeth_hdr *) | 3959 | *hdr = (struct qeth_hdr *) |
3960 | qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); | 3960 | qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); |
3961 | if (hdr == NULL) | 3961 | if (*hdr == NULL) |
3962 | return -EINVAL; | 3962 | return -EINVAL; |
3963 | return 0; | 3963 | return 0; |
3964 | } | 3964 | } |
@@ -4098,7 +4098,7 @@ qeth_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
4098 | } | 4098 | } |
4099 | } else { /* passthrough */ | 4099 | } else { /* passthrough */ |
4100 | if((skb->dev->type == ARPHRD_IEEE802_TR) && | 4100 | if((skb->dev->type == ARPHRD_IEEE802_TR) && |
4101 | !memcmp(skb->data + sizeof(struct qeth_hdr) + | 4101 | !memcmp(skb->data + sizeof(struct qeth_hdr) + |
4102 | sizeof(__u16), skb->dev->broadcast, 6)) { | 4102 | sizeof(__u16), skb->dev->broadcast, 6)) { |
4103 | hdr->hdr.l3.flags = QETH_CAST_BROADCAST | | 4103 | hdr->hdr.l3.flags = QETH_CAST_BROADCAST | |
4104 | QETH_HDR_PASSTHRU; | 4104 | QETH_HDR_PASSTHRU; |
@@ -4385,7 +4385,7 @@ out: | |||
4385 | } | 4385 | } |
4386 | 4386 | ||
4387 | static inline int | 4387 | static inline int |
4388 | qeth_get_elements_no(struct qeth_card *card, void *hdr, | 4388 | qeth_get_elements_no(struct qeth_card *card, void *hdr, |
4389 | struct sk_buff *skb, int elems) | 4389 | struct sk_buff *skb, int elems) |
4390 | { | 4390 | { |
4391 | int elements_needed = 0; | 4391 | int elements_needed = 0; |
@@ -4416,6 +4416,8 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4416 | enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; | 4416 | enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; |
4417 | struct qeth_eddp_context *ctx = NULL; | 4417 | struct qeth_eddp_context *ctx = NULL; |
4418 | int tx_bytes = skb->len; | 4418 | int tx_bytes = skb->len; |
4419 | unsigned short nr_frags = skb_shinfo(skb)->nr_frags; | ||
4420 | unsigned short tso_size = skb_shinfo(skb)->tso_size; | ||
4419 | int rc; | 4421 | int rc; |
4420 | 4422 | ||
4421 | QETH_DBF_TEXT(trace, 6, "sendpkt"); | 4423 | QETH_DBF_TEXT(trace, 6, "sendpkt"); |
@@ -4441,7 +4443,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4441 | return 0; | 4443 | return 0; |
4442 | } | 4444 | } |
4443 | cast_type = qeth_get_cast_type(card, skb); | 4445 | cast_type = qeth_get_cast_type(card, skb); |
4444 | if ((cast_type == RTN_BROADCAST) && | 4446 | if ((cast_type == RTN_BROADCAST) && |
4445 | (card->info.broadcast_capable == 0)){ | 4447 | (card->info.broadcast_capable == 0)){ |
4446 | card->stats.tx_dropped++; | 4448 | card->stats.tx_dropped++; |
4447 | card->stats.tx_errors++; | 4449 | card->stats.tx_errors++; |
@@ -4463,7 +4465,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4463 | card->stats.tx_errors++; | 4465 | card->stats.tx_errors++; |
4464 | dev_kfree_skb_any(skb); | 4466 | dev_kfree_skb_any(skb); |
4465 | return NETDEV_TX_OK; | 4467 | return NETDEV_TX_OK; |
4466 | } | 4468 | } |
4467 | elements_needed++; | 4469 | elements_needed++; |
4468 | } else { | 4470 | } else { |
4469 | if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { | 4471 | if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { |
@@ -4498,16 +4500,16 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4498 | card->stats.tx_packets++; | 4500 | card->stats.tx_packets++; |
4499 | card->stats.tx_bytes += tx_bytes; | 4501 | card->stats.tx_bytes += tx_bytes; |
4500 | #ifdef CONFIG_QETH_PERF_STATS | 4502 | #ifdef CONFIG_QETH_PERF_STATS |
4501 | if (skb_shinfo(skb)->tso_size && | 4503 | if (tso_size && |
4502 | !(large_send == QETH_LARGE_SEND_NO)) { | 4504 | !(large_send == QETH_LARGE_SEND_NO)) { |
4503 | card->perf_stats.large_send_bytes += skb->len; | 4505 | card->perf_stats.large_send_bytes += tx_bytes; |
4504 | card->perf_stats.large_send_cnt++; | 4506 | card->perf_stats.large_send_cnt++; |
4505 | } | 4507 | } |
4506 | if (skb_shinfo(skb)->nr_frags > 0){ | 4508 | if (nr_frags > 0){ |
4507 | card->perf_stats.sg_skbs_sent++; | 4509 | card->perf_stats.sg_skbs_sent++; |
4508 | /* nr_frags + skb->data */ | 4510 | /* nr_frags + skb->data */ |
4509 | card->perf_stats.sg_frags_sent += | 4511 | card->perf_stats.sg_frags_sent += |
4510 | skb_shinfo(skb)->nr_frags + 1; | 4512 | nr_frags + 1; |
4511 | } | 4513 | } |
4512 | #endif /* CONFIG_QETH_PERF_STATS */ | 4514 | #endif /* CONFIG_QETH_PERF_STATS */ |
4513 | } | 4515 | } |
@@ -5373,7 +5375,7 @@ qeth_layer2_send_setdelvlan_cb(struct qeth_card *card, | |||
5373 | cmd = (struct qeth_ipa_cmd *) data; | 5375 | cmd = (struct qeth_ipa_cmd *) data; |
5374 | if (cmd->hdr.return_code) { | 5376 | if (cmd->hdr.return_code) { |
5375 | PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " | 5377 | PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " |
5376 | "Continuing\n",cmd->data.setdelvlan.vlan_id, | 5378 | "Continuing\n",cmd->data.setdelvlan.vlan_id, |
5377 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); | 5379 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); |
5378 | QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command); | 5380 | QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command); |
5379 | QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); | 5381 | QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); |
@@ -5393,7 +5395,7 @@ qeth_layer2_send_setdelvlan(struct qeth_card *card, __u16 i, | |||
5393 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); | 5395 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); |
5394 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 5396 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
5395 | cmd->data.setdelvlan.vlan_id = i; | 5397 | cmd->data.setdelvlan.vlan_id = i; |
5396 | return qeth_send_ipa_cmd(card, iob, | 5398 | return qeth_send_ipa_cmd(card, iob, |
5397 | qeth_layer2_send_setdelvlan_cb, NULL); | 5399 | qeth_layer2_send_setdelvlan_cb, NULL); |
5398 | } | 5400 | } |
5399 | 5401 | ||
@@ -5457,7 +5459,7 @@ qeth_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
5457 | * Examine hardware response to SET_PROMISC_MODE | 5459 | * Examine hardware response to SET_PROMISC_MODE |
5458 | */ | 5460 | */ |
5459 | static int | 5461 | static int |
5460 | qeth_setadp_promisc_mode_cb(struct qeth_card *card, | 5462 | qeth_setadp_promisc_mode_cb(struct qeth_card *card, |
5461 | struct qeth_reply *reply, | 5463 | struct qeth_reply *reply, |
5462 | unsigned long data) | 5464 | unsigned long data) |
5463 | { | 5465 | { |
@@ -5468,10 +5470,10 @@ qeth_setadp_promisc_mode_cb(struct qeth_card *card, | |||
5468 | 5470 | ||
5469 | cmd = (struct qeth_ipa_cmd *) data; | 5471 | cmd = (struct qeth_ipa_cmd *) data; |
5470 | setparms = &(cmd->data.setadapterparms); | 5472 | setparms = &(cmd->data.setadapterparms); |
5471 | 5473 | ||
5472 | qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); | 5474 | qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); |
5473 | if (cmd->hdr.return_code) { | 5475 | if (cmd->hdr.return_code) { |
5474 | QETH_DBF_TEXT_(trace,4,"prmrc%2.2x",cmd->hdr.return_code); | 5476 | QETH_DBF_TEXT_(trace,4,"prmrc%2.2x",cmd->hdr.return_code); |
5475 | setparms->data.mode = SET_PROMISC_MODE_OFF; | 5477 | setparms->data.mode = SET_PROMISC_MODE_OFF; |
5476 | } | 5478 | } |
5477 | card->info.promisc_mode = setparms->data.mode; | 5479 | card->info.promisc_mode = setparms->data.mode; |
@@ -5517,7 +5519,7 @@ qeth_set_multicast_list(struct net_device *dev) | |||
5517 | 5519 | ||
5518 | if (card->info.type == QETH_CARD_TYPE_OSN) | 5520 | if (card->info.type == QETH_CARD_TYPE_OSN) |
5519 | return ; | 5521 | return ; |
5520 | 5522 | ||
5521 | QETH_DBF_TEXT(trace, 3, "setmulti"); | 5523 | QETH_DBF_TEXT(trace, 3, "setmulti"); |
5522 | qeth_delete_mc_addresses(card); | 5524 | qeth_delete_mc_addresses(card); |
5523 | if (card->options.layer2) { | 5525 | if (card->options.layer2) { |
@@ -5575,7 +5577,7 @@ qeth_osn_assist(struct net_device *dev, | |||
5575 | struct qeth_cmd_buffer *iob; | 5577 | struct qeth_cmd_buffer *iob; |
5576 | struct qeth_card *card; | 5578 | struct qeth_card *card; |
5577 | int rc; | 5579 | int rc; |
5578 | 5580 | ||
5579 | QETH_DBF_TEXT(trace, 2, "osnsdmc"); | 5581 | QETH_DBF_TEXT(trace, 2, "osnsdmc"); |
5580 | if (!dev) | 5582 | if (!dev) |
5581 | return -ENODEV; | 5583 | return -ENODEV; |
@@ -5654,7 +5656,7 @@ qeth_osn_deregister(struct net_device * dev) | |||
5654 | card->osn_info.data_cb = NULL; | 5656 | card->osn_info.data_cb = NULL; |
5655 | return; | 5657 | return; |
5656 | } | 5658 | } |
5657 | 5659 | ||
5658 | static void | 5660 | static void |
5659 | qeth_delete_mc_addresses(struct qeth_card *card) | 5661 | qeth_delete_mc_addresses(struct qeth_card *card) |
5660 | { | 5662 | { |
@@ -5818,7 +5820,7 @@ qeth_add_multicast_ipv6(struct qeth_card *card) | |||
5818 | struct inet6_dev *in6_dev; | 5820 | struct inet6_dev *in6_dev; |
5819 | 5821 | ||
5820 | QETH_DBF_TEXT(trace,4,"chkmcv6"); | 5822 | QETH_DBF_TEXT(trace,4,"chkmcv6"); |
5821 | if (!qeth_is_supported(card, IPA_IPV6)) | 5823 | if (!qeth_is_supported(card, IPA_IPV6)) |
5822 | return ; | 5824 | return ; |
5823 | in6_dev = in6_dev_get(card->dev); | 5825 | in6_dev = in6_dev_get(card->dev); |
5824 | if (in6_dev == NULL) | 5826 | if (in6_dev == NULL) |
@@ -6359,12 +6361,9 @@ qeth_netdev_init(struct net_device *dev) | |||
6359 | dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; | 6361 | dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; |
6360 | dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; | 6362 | dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; |
6361 | #endif | 6363 | #endif |
6362 | dev->hard_header = card->orig_hard_header; | ||
6363 | if (qeth_get_netdev_flags(card) & IFF_NOARP) { | 6364 | if (qeth_get_netdev_flags(card) & IFF_NOARP) { |
6364 | dev->rebuild_header = NULL; | 6365 | dev->rebuild_header = NULL; |
6365 | dev->hard_header = NULL; | 6366 | dev->hard_header = NULL; |
6366 | if (card->options.fake_ll) | ||
6367 | dev->hard_header = qeth_fake_header; | ||
6368 | dev->header_cache_update = NULL; | 6367 | dev->header_cache_update = NULL; |
6369 | dev->hard_header_cache = NULL; | 6368 | dev->hard_header_cache = NULL; |
6370 | } | 6369 | } |
@@ -6373,6 +6372,9 @@ qeth_netdev_init(struct net_device *dev) | |||
6373 | if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD)) | 6372 | if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD)) |
6374 | card->dev->dev_id = card->info.unique_id & 0xffff; | 6373 | card->dev->dev_id = card->info.unique_id & 0xffff; |
6375 | #endif | 6374 | #endif |
6375 | if (card->options.fake_ll && | ||
6376 | (qeth_get_netdev_flags(card) & IFF_NOARP)) | ||
6377 | dev->hard_header = qeth_fake_header; | ||
6376 | dev->hard_header_parse = NULL; | 6378 | dev->hard_header_parse = NULL; |
6377 | dev->set_mac_address = qeth_layer2_set_mac_address; | 6379 | dev->set_mac_address = qeth_layer2_set_mac_address; |
6378 | dev->flags |= qeth_get_netdev_flags(card); | 6380 | dev->flags |= qeth_get_netdev_flags(card); |
@@ -6477,6 +6479,9 @@ retry: | |||
6477 | /*network device will be recovered*/ | 6479 | /*network device will be recovered*/ |
6478 | if (card->dev) { | 6480 | if (card->dev) { |
6479 | card->dev->hard_header = card->orig_hard_header; | 6481 | card->dev->hard_header = card->orig_hard_header; |
6482 | if (card->options.fake_ll && | ||
6483 | (qeth_get_netdev_flags(card) & IFF_NOARP)) | ||
6484 | card->dev->hard_header = qeth_fake_header; | ||
6480 | return 0; | 6485 | return 0; |
6481 | } | 6486 | } |
6482 | /* at first set_online allocate netdev */ | 6487 | /* at first set_online allocate netdev */ |
@@ -6584,7 +6589,7 @@ qeth_setadpparms_change_macaddr_cb(struct qeth_card *card, | |||
6584 | 6589 | ||
6585 | cmd = (struct qeth_ipa_cmd *) data; | 6590 | cmd = (struct qeth_ipa_cmd *) data; |
6586 | if (!card->options.layer2 || card->info.guestlan || | 6591 | if (!card->options.layer2 || card->info.guestlan || |
6587 | !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { | 6592 | !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { |
6588 | memcpy(card->dev->dev_addr, | 6593 | memcpy(card->dev->dev_addr, |
6589 | &cmd->data.setadapterparms.data.change_addr.addr, | 6594 | &cmd->data.setadapterparms.data.change_addr.addr, |
6590 | OSA_ADDR_LEN); | 6595 | OSA_ADDR_LEN); |
@@ -7031,14 +7036,12 @@ qeth_softsetup_ipv6(struct qeth_card *card) | |||
7031 | 7036 | ||
7032 | QETH_DBF_TEXT(trace,3,"softipv6"); | 7037 | QETH_DBF_TEXT(trace,3,"softipv6"); |
7033 | 7038 | ||
7034 | netif_stop_queue(card->dev); | ||
7035 | rc = qeth_send_startlan(card, QETH_PROT_IPV6); | 7039 | rc = qeth_send_startlan(card, QETH_PROT_IPV6); |
7036 | if (rc) { | 7040 | if (rc) { |
7037 | PRINT_ERR("IPv6 startlan failed on %s\n", | 7041 | PRINT_ERR("IPv6 startlan failed on %s\n", |
7038 | QETH_CARD_IFNAME(card)); | 7042 | QETH_CARD_IFNAME(card)); |
7039 | return rc; | 7043 | return rc; |
7040 | } | 7044 | } |
7041 | netif_wake_queue(card->dev); | ||
7042 | rc = qeth_query_ipassists(card,QETH_PROT_IPV6); | 7045 | rc = qeth_query_ipassists(card,QETH_PROT_IPV6); |
7043 | if (rc) { | 7046 | if (rc) { |
7044 | PRINT_ERR("IPv6 query ipassist failed on %s\n", | 7047 | PRINT_ERR("IPv6 query ipassist failed on %s\n", |
@@ -7352,7 +7355,8 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type) | |||
7352 | card->options.large_send = type; | 7355 | card->options.large_send = type; |
7353 | return 0; | 7356 | return 0; |
7354 | } | 7357 | } |
7355 | netif_stop_queue(card->dev); | 7358 | if (card->state == CARD_STATE_UP) |
7359 | netif_tx_disable(card->dev); | ||
7356 | card->options.large_send = type; | 7360 | card->options.large_send = type; |
7357 | switch (card->options.large_send) { | 7361 | switch (card->options.large_send) { |
7358 | case QETH_LARGE_SEND_EDDP: | 7362 | case QETH_LARGE_SEND_EDDP: |
@@ -7374,7 +7378,8 @@ qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type) | |||
7374 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); | 7378 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); |
7375 | break; | 7379 | break; |
7376 | } | 7380 | } |
7377 | netif_wake_queue(card->dev); | 7381 | if (card->state == CARD_STATE_UP) |
7382 | netif_wake_queue(card->dev); | ||
7378 | return rc; | 7383 | return rc; |
7379 | } | 7384 | } |
7380 | 7385 | ||
@@ -7427,7 +7432,7 @@ qeth_softsetup_card(struct qeth_card *card) | |||
7427 | if ((rc = qeth_setrouting_v6(card))) | 7432 | if ((rc = qeth_setrouting_v6(card))) |
7428 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); | 7433 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); |
7429 | out: | 7434 | out: |
7430 | netif_stop_queue(card->dev); | 7435 | netif_tx_disable(card->dev); |
7431 | return 0; | 7436 | return 0; |
7432 | } | 7437 | } |
7433 | 7438 | ||
@@ -7567,7 +7572,7 @@ qeth_stop_card(struct qeth_card *card, int recovery_mode) | |||
7567 | if (card->read.state == CH_STATE_UP && | 7572 | if (card->read.state == CH_STATE_UP && |
7568 | card->write.state == CH_STATE_UP && | 7573 | card->write.state == CH_STATE_UP && |
7569 | (card->state == CARD_STATE_UP)) { | 7574 | (card->state == CARD_STATE_UP)) { |
7570 | if (recovery_mode && | 7575 | if (recovery_mode && |
7571 | card->info.type != QETH_CARD_TYPE_OSN) { | 7576 | card->info.type != QETH_CARD_TYPE_OSN) { |
7572 | qeth_stop(card->dev); | 7577 | qeth_stop(card->dev); |
7573 | } else { | 7578 | } else { |
@@ -7736,10 +7741,8 @@ static int | |||
7736 | qeth_register_netdev(struct qeth_card *card) | 7741 | qeth_register_netdev(struct qeth_card *card) |
7737 | { | 7742 | { |
7738 | QETH_DBF_TEXT(setup, 3, "regnetd"); | 7743 | QETH_DBF_TEXT(setup, 3, "regnetd"); |
7739 | if (card->dev->reg_state != NETREG_UNINITIALIZED) { | 7744 | if (card->dev->reg_state != NETREG_UNINITIALIZED) |
7740 | qeth_netdev_init(card->dev); | ||
7741 | return 0; | 7745 | return 0; |
7742 | } | ||
7743 | /* sysfs magic */ | 7746 | /* sysfs magic */ |
7744 | SET_NETDEV_DEV(card->dev, &card->gdev->dev); | 7747 | SET_NETDEV_DEV(card->dev, &card->gdev->dev); |
7745 | return register_netdev(card->dev); | 7748 | return register_netdev(card->dev); |
@@ -7750,7 +7753,7 @@ qeth_start_again(struct qeth_card *card, int recovery_mode) | |||
7750 | { | 7753 | { |
7751 | QETH_DBF_TEXT(setup ,2, "startag"); | 7754 | QETH_DBF_TEXT(setup ,2, "startag"); |
7752 | 7755 | ||
7753 | if (recovery_mode && | 7756 | if (recovery_mode && |
7754 | card->info.type != QETH_CARD_TYPE_OSN) { | 7757 | card->info.type != QETH_CARD_TYPE_OSN) { |
7755 | qeth_open(card->dev); | 7758 | qeth_open(card->dev); |
7756 | } else { | 7759 | } else { |
diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h index 011c41041029..0477c47471c5 100644 --- a/drivers/s390/net/qeth_mpc.h +++ b/drivers/s390/net/qeth_mpc.h | |||
@@ -445,7 +445,7 @@ enum qeth_ipa_arp_return_codes { | |||
445 | /* Helper functions */ | 445 | /* Helper functions */ |
446 | #define IS_IPA_REPLY(cmd) ((cmd->hdr.initiator == IPA_CMD_INITIATOR_HOST) || \ | 446 | #define IS_IPA_REPLY(cmd) ((cmd->hdr.initiator == IPA_CMD_INITIATOR_HOST) || \ |
447 | (cmd->hdr.initiator == IPA_CMD_INITIATOR_OSA_REPLY)) | 447 | (cmd->hdr.initiator == IPA_CMD_INITIATOR_OSA_REPLY)) |
448 | 448 | ||
449 | /*****************************************************************************/ | 449 | /*****************************************************************************/ |
450 | /* END OF IP Assist related definitions */ | 450 | /* END OF IP Assist related definitions */ |
451 | /*****************************************************************************/ | 451 | /*****************************************************************************/ |
@@ -490,7 +490,7 @@ extern unsigned char ULP_ENABLE[]; | |||
490 | /* Layer 2 defintions */ | 490 | /* Layer 2 defintions */ |
491 | #define QETH_PROT_LAYER2 0x08 | 491 | #define QETH_PROT_LAYER2 0x08 |
492 | #define QETH_PROT_TCPIP 0x03 | 492 | #define QETH_PROT_TCPIP 0x03 |
493 | #define QETH_PROT_OSN2 0x0a | 493 | #define QETH_PROT_OSN2 0x0a |
494 | #define QETH_ULP_ENABLE_PROT_TYPE(buffer) (buffer+0x50) | 494 | #define QETH_ULP_ENABLE_PROT_TYPE(buffer) (buffer+0x50) |
495 | #define QETH_IPA_CMD_PROT_TYPE(buffer) (buffer+0x19) | 495 | #define QETH_IPA_CMD_PROT_TYPE(buffer) (buffer+0x19) |
496 | 496 | ||
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index 360d782c7ada..66f2da14e6e3 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c | |||
@@ -36,7 +36,7 @@ qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) | |||
36 | { | 36 | { |
37 | struct device *dev = NULL; | 37 | struct device *dev = NULL; |
38 | loff_t nr = 0; | 38 | loff_t nr = 0; |
39 | 39 | ||
40 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); | 40 | down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); |
41 | if (*offset == 0) | 41 | if (*offset == 0) |
42 | return SEQ_START_TOKEN; | 42 | return SEQ_START_TOKEN; |
@@ -60,8 +60,8 @@ static void * | |||
60 | qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) | 60 | qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) |
61 | { | 61 | { |
62 | struct device *prev, *next; | 62 | struct device *prev, *next; |
63 | 63 | ||
64 | if (it == SEQ_START_TOKEN) | 64 | if (it == SEQ_START_TOKEN) |
65 | prev = NULL; | 65 | prev = NULL; |
66 | else | 66 | else |
67 | prev = (struct device *) it; | 67 | prev = (struct device *) it; |
@@ -180,7 +180,7 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it) | |||
180 | struct device *device; | 180 | struct device *device; |
181 | struct qeth_card *card; | 181 | struct qeth_card *card; |
182 | 182 | ||
183 | 183 | ||
184 | if (it == SEQ_START_TOKEN) | 184 | if (it == SEQ_START_TOKEN) |
185 | return 0; | 185 | return 0; |
186 | 186 | ||
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index 882d419e4160..185a9cfbcbdc 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c | |||
@@ -785,7 +785,7 @@ qeth_dev_large_send_store(struct device *dev, struct device_attribute *attr, con | |||
785 | } | 785 | } |
786 | if (card->options.large_send == type) | 786 | if (card->options.large_send == type) |
787 | return count; | 787 | return count; |
788 | if ((rc = qeth_set_large_send(card, type))) | 788 | if ((rc = qeth_set_large_send(card, type))) |
789 | return rc; | 789 | return rc; |
790 | return count; | 790 | return count; |
791 | } | 791 | } |
@@ -1682,7 +1682,7 @@ qeth_create_device_attributes(struct device *dev) | |||
1682 | if (card->info.type == QETH_CARD_TYPE_OSN) | 1682 | if (card->info.type == QETH_CARD_TYPE_OSN) |
1683 | return sysfs_create_group(&dev->kobj, | 1683 | return sysfs_create_group(&dev->kobj, |
1684 | &qeth_osn_device_attr_group); | 1684 | &qeth_osn_device_attr_group); |
1685 | 1685 | ||
1686 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_attr_group))) | 1686 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_attr_group))) |
1687 | return ret; | 1687 | return ret; |
1688 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group))){ | 1688 | if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group))){ |
@@ -1713,7 +1713,7 @@ qeth_remove_device_attributes(struct device *dev) | |||
1713 | if (card->info.type == QETH_CARD_TYPE_OSN) | 1713 | if (card->info.type == QETH_CARD_TYPE_OSN) |
1714 | return sysfs_remove_group(&dev->kobj, | 1714 | return sysfs_remove_group(&dev->kobj, |
1715 | &qeth_osn_device_attr_group); | 1715 | &qeth_osn_device_attr_group); |
1716 | 1716 | ||
1717 | sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); | 1717 | sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); |
1718 | sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); | 1718 | sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); |
1719 | sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); | 1719 | sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); |
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index 1286ddea450b..24ef40ca9562 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h | |||
@@ -117,11 +117,11 @@ __qeth_fill_buffer_frag(struct sk_buff *skb, struct qdio_buffer *buffer, | |||
117 | int fragno; | 117 | int fragno; |
118 | unsigned long addr; | 118 | unsigned long addr; |
119 | int element, cnt, dlen; | 119 | int element, cnt, dlen; |
120 | 120 | ||
121 | fragno = skb_shinfo(skb)->nr_frags; | 121 | fragno = skb_shinfo(skb)->nr_frags; |
122 | element = *next_element_to_fill; | 122 | element = *next_element_to_fill; |
123 | dlen = 0; | 123 | dlen = 0; |
124 | 124 | ||
125 | if (is_tso) | 125 | if (is_tso) |
126 | buffer->element[element].flags = | 126 | buffer->element[element].flags = |
127 | SBAL_FLAGS_MIDDLE_FRAG; | 127 | SBAL_FLAGS_MIDDLE_FRAG; |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index fa476e7e0a48..b046ffa22101 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -4297,6 +4297,7 @@ static int ata_start_drive(struct ata_port *ap, struct ata_device *dev) | |||
4297 | int ata_device_resume(struct ata_port *ap, struct ata_device *dev) | 4297 | int ata_device_resume(struct ata_port *ap, struct ata_device *dev) |
4298 | { | 4298 | { |
4299 | if (ap->flags & ATA_FLAG_SUSPENDED) { | 4299 | if (ap->flags & ATA_FLAG_SUSPENDED) { |
4300 | ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000); | ||
4300 | ap->flags &= ~ATA_FLAG_SUSPENDED; | 4301 | ap->flags &= ~ATA_FLAG_SUSPENDED; |
4301 | ata_set_mode(ap); | 4302 | ata_set_mode(ap); |
4302 | } | 4303 | } |
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index fee843fab1c7..108910f512e4 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c | |||
@@ -982,6 +982,12 @@ static int device_check(ppa_struct *dev) | |||
982 | return -ENODEV; | 982 | return -ENODEV; |
983 | } | 983 | } |
984 | 984 | ||
985 | static int ppa_adjust_queue(struct scsi_device *device) | ||
986 | { | ||
987 | blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH); | ||
988 | return 0; | ||
989 | } | ||
990 | |||
985 | static struct scsi_host_template ppa_template = { | 991 | static struct scsi_host_template ppa_template = { |
986 | .module = THIS_MODULE, | 992 | .module = THIS_MODULE, |
987 | .proc_name = "ppa", | 993 | .proc_name = "ppa", |
@@ -997,6 +1003,7 @@ static struct scsi_host_template ppa_template = { | |||
997 | .cmd_per_lun = 1, | 1003 | .cmd_per_lun = 1, |
998 | .use_clustering = ENABLE_CLUSTERING, | 1004 | .use_clustering = ENABLE_CLUSTERING, |
999 | .can_queue = 1, | 1005 | .can_queue = 1, |
1006 | .slave_alloc = ppa_adjust_queue, | ||
1000 | }; | 1007 | }; |
1001 | 1008 | ||
1002 | /*************************************************************************** | 1009 | /*************************************************************************** |
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/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 941c1e15c899..62f8cb7b3d2b 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c | |||
@@ -165,6 +165,7 @@ static struct { | |||
165 | {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, | 165 | {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, |
166 | {"HP", "C1557A", NULL, BLIST_FORCELUN}, | 166 | {"HP", "C1557A", NULL, BLIST_FORCELUN}, |
167 | {"HP", "C3323-300", "4269", BLIST_NOTQ}, | 167 | {"HP", "C3323-300", "4269", BLIST_NOTQ}, |
168 | {"HP", "C5713A", NULL, BLIST_NOREPORTLUN}, | ||
168 | {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, | 169 | {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, |
169 | {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, | 170 | {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, |
170 | {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, | 171 | {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 764a8b375ead..faee4757c03a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, | |||
367 | int nsegs, unsigned bufflen, gfp_t gfp) | 367 | int nsegs, unsigned bufflen, gfp_t gfp) |
368 | { | 368 | { |
369 | struct request_queue *q = rq->q; | 369 | struct request_queue *q = rq->q; |
370 | int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT; | 370 | int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT; |
371 | unsigned int data_len = 0, len, bytes, off; | 371 | unsigned int data_len = 0, len, bytes, off; |
372 | struct page *page; | 372 | struct page *page; |
373 | struct bio *bio = NULL; | 373 | struct bio *bio = NULL; |
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 8b6d65e21bae..f3b16066387c 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -955,7 +955,8 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, | |||
955 | list_for_each_entry(rphy, &sas_host->rphy_list, list) { | 955 | list_for_each_entry(rphy, &sas_host->rphy_list, list) { |
956 | struct sas_phy *parent = dev_to_phy(rphy->dev.parent); | 956 | struct sas_phy *parent = dev_to_phy(rphy->dev.parent); |
957 | 957 | ||
958 | if (rphy->scsi_target_id == -1) | 958 | if (rphy->identify.device_type != SAS_END_DEVICE || |
959 | rphy->scsi_target_id == -1) | ||
959 | continue; | 960 | continue; |
960 | 961 | ||
961 | if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && | 962 | if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && |
@@ -977,7 +978,6 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, | |||
977 | #define SETUP_TEMPLATE(attrb, field, perm, test) \ | 978 | #define SETUP_TEMPLATE(attrb, field, perm, test) \ |
978 | i->private_##attrb[count] = class_device_attr_##field; \ | 979 | i->private_##attrb[count] = class_device_attr_##field; \ |
979 | i->private_##attrb[count].attr.mode = perm; \ | 980 | i->private_##attrb[count].attr.mode = perm; \ |
980 | i->private_##attrb[count].store = NULL; \ | ||
981 | i->attrb[count] = &i->private_##attrb[count]; \ | 981 | i->attrb[count] = &i->private_##attrb[count]; \ |
982 | if (test) \ | 982 | if (test) \ |
983 | count++ | 983 | count++ |
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 969f94900431..5cba59ad7dc5 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -1164,14 +1164,16 @@ static int __init cpm_uart_console_setup(struct console *co, char *options) | |||
1164 | struct fs_uart_platform_info *pdata; | 1164 | struct fs_uart_platform_info *pdata; |
1165 | struct platform_device* pdev = early_uart_get_pdev(co->index); | 1165 | struct platform_device* pdev = early_uart_get_pdev(co->index); |
1166 | 1166 | ||
1167 | port = | ||
1168 | (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]]; | ||
1169 | pinfo = (struct uart_cpm_port *)port; | ||
1170 | if (!pdev) { | 1167 | if (!pdev) { |
1171 | pr_info("cpm_uart: console: compat mode\n"); | 1168 | pr_info("cpm_uart: console: compat mode\n"); |
1172 | /* compatibility - will be cleaned up */ | 1169 | /* compatibility - will be cleaned up */ |
1173 | cpm_uart_init_portdesc(); | 1170 | cpm_uart_init_portdesc(); |
1171 | } | ||
1174 | 1172 | ||
1173 | port = | ||
1174 | (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]]; | ||
1175 | pinfo = (struct uart_cpm_port *)port; | ||
1176 | if (!pdev) { | ||
1175 | if (pinfo->set_lineif) | 1177 | if (pinfo->set_lineif) |
1176 | pinfo->set_lineif(pinfo); | 1178 | pinfo->set_lineif(pinfo); |
1177 | } else { | 1179 | } else { |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index 4b2de08f46d0..cdba128250a9 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c | |||
@@ -213,7 +213,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con) | |||
213 | L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); | 213 | L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); |
214 | if (is_con) { | 214 | if (is_con) { |
215 | mem_addr = alloc_bootmem(memsz); | 215 | mem_addr = alloc_bootmem(memsz); |
216 | dma_addr = mem_addr; | 216 | dma_addr = virt_to_bus(mem_addr); |
217 | } | 217 | } |
218 | else | 218 | else |
219 | mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr, | 219 | mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr, |
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 9de4b5a04d70..5fc14563ee3a 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -405,7 +405,7 @@ static int s3c24xx_spi_remove(struct platform_device *dev) | |||
405 | 405 | ||
406 | static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) | 406 | static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) |
407 | { | 407 | { |
408 | struct s3c24xx_spi *hw = platform_get_drvdata(dev); | 408 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); |
409 | 409 | ||
410 | clk_disable(hw->clk); | 410 | clk_disable(hw->clk); |
411 | return 0; | 411 | return 0; |
@@ -413,7 +413,7 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) | |||
413 | 413 | ||
414 | static int s3c24xx_spi_resume(struct platform_device *pdev) | 414 | static int s3c24xx_spi_resume(struct platform_device *pdev) |
415 | { | 415 | { |
416 | struct s3c24xx_spi *hw = platform_get_drvdata(dev); | 416 | struct s3c24xx_spi *hw = platform_get_drvdata(pdev); |
417 | 417 | ||
418 | clk_enable(hw->clk); | 418 | clk_enable(hw->clk); |
419 | return 0; | 419 | return 0; |
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index 3d04b2def0f1..789450bb0bc9 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
@@ -214,10 +214,13 @@ int au1100fb_setmode(struct au1100fb_device *fbdev) | |||
214 | */ | 214 | */ |
215 | int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi) | 215 | int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi) |
216 | { | 216 | { |
217 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | 217 | struct au1100fb_device *fbdev; |
218 | u32 *palette = fbdev->regs->lcd_pallettebase; | 218 | u32 *palette; |
219 | u32 value; | 219 | u32 value; |
220 | 220 | ||
221 | fbdev = to_au1100fb_device(fbi); | ||
222 | palette = fbdev->regs->lcd_pallettebase; | ||
223 | |||
221 | if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1)) | 224 | if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1)) |
222 | return -EINVAL; | 225 | return -EINVAL; |
223 | 226 | ||
@@ -316,9 +319,11 @@ int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi) | |||
316 | */ | 319 | */ |
317 | int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) | 320 | int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) |
318 | { | 321 | { |
319 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | 322 | struct au1100fb_device *fbdev; |
320 | int dy; | 323 | int dy; |
321 | 324 | ||
325 | fbdev = to_au1100fb_device(fbi); | ||
326 | |||
322 | print_dbg("fb_pan_display %p %p", var, fbi); | 327 | print_dbg("fb_pan_display %p %p", var, fbi); |
323 | 328 | ||
324 | if (!var || !fbdev) { | 329 | if (!var || !fbdev) { |
@@ -382,10 +387,12 @@ void au1100fb_fb_rotate(struct fb_info *fbi, int angle) | |||
382 | */ | 387 | */ |
383 | int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) | 388 | int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) |
384 | { | 389 | { |
385 | struct au1100fb_device *fbdev = to_au1100fb_device(fbi); | 390 | struct au1100fb_device *fbdev; |
386 | unsigned int len; | 391 | unsigned int len; |
387 | unsigned long start=0, off; | 392 | unsigned long start=0, off; |
388 | 393 | ||
394 | fbdev = to_au1100fb_device(fbi); | ||
395 | |||
389 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { | 396 | if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { |
390 | return -EINVAL; | 397 | return -EINVAL; |
391 | } | 398 | } |
@@ -467,7 +474,7 @@ int au1100fb_drv_probe(struct device *dev) | |||
467 | 474 | ||
468 | if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, | 475 | if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, |
469 | DRIVER_NAME)) { | 476 | DRIVER_NAME)) { |
470 | print_err("fail to lock memory region at 0x%08x", | 477 | print_err("fail to lock memory region at 0x%08lx", |
471 | au1100fb_fix.mmio_start); | 478 | au1100fb_fix.mmio_start); |
472 | return -EBUSY; | 479 | return -EBUSY; |
473 | } | 480 | } |
@@ -595,13 +602,13 @@ int au1100fb_drv_remove(struct device *dev) | |||
595 | return 0; | 602 | return 0; |
596 | } | 603 | } |
597 | 604 | ||
598 | int au1100fb_drv_suspend(struct device *dev, u32 state, u32 level) | 605 | int au1100fb_drv_suspend(struct device *dev, pm_message_t state) |
599 | { | 606 | { |
600 | /* TODO */ | 607 | /* TODO */ |
601 | return 0; | 608 | return 0; |
602 | } | 609 | } |
603 | 610 | ||
604 | int au1100fb_drv_resume(struct device *dev, u32 level) | 611 | int au1100fb_drv_resume(struct device *dev) |
605 | { | 612 | { |
606 | /* TODO */ | 613 | /* TODO */ |
607 | return 0; | 614 | return 0; |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index ca020719d20b..953eb8c171d6 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -2631,7 +2631,7 @@ static int fbcon_scrolldelta(struct vc_data *vc, int lines) | |||
2631 | scr_memcpyw((u16 *) q, (u16 *) p, | 2631 | scr_memcpyw((u16 *) q, (u16 *) p, |
2632 | vc->vc_size_row); | 2632 | vc->vc_size_row); |
2633 | } | 2633 | } |
2634 | softback_in = p; | 2634 | softback_in = softback_curr = p; |
2635 | update_region(vc, vc->vc_origin, | 2635 | update_region(vc, vc->vc_origin, |
2636 | logo_lines * vc->vc_cols); | 2636 | logo_lines * vc->vc_cols); |
2637 | } | 2637 | } |
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c index 743e7ad26acc..f85421bf7cb5 100644 --- a/drivers/video/maxinefb.c +++ b/drivers/video/maxinefb.c | |||
@@ -55,7 +55,7 @@ static struct fb_var_screeninfo maxinefb_defined = { | |||
55 | }; | 55 | }; |
56 | 56 | ||
57 | static struct fb_fix_screeninfo maxinefb_fix = { | 57 | static struct fb_fix_screeninfo maxinefb_fix = { |
58 | .id = "Maxine onboard graphics 1024x768x8", | 58 | .id = "Maxine", |
59 | .smem_len = (1024*768), | 59 | .smem_len = (1024*768), |
60 | .type = FB_TYPE_PACKED_PIXELS, | 60 | .type = FB_TYPE_PACKED_PIXELS, |
61 | .visual = FB_VISUAL_PSEUDOCOLOR, | 61 | .visual = FB_VISUAL_PSEUDOCOLOR, |
@@ -107,8 +107,6 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
107 | 107 | ||
108 | static struct fb_ops maxinefb_ops = { | 108 | static struct fb_ops maxinefb_ops = { |
109 | .owner = THIS_MODULE, | 109 | .owner = THIS_MODULE, |
110 | .fb_get_fix = gen_get_fix, | ||
111 | .fb_get_var = gen_get_var, | ||
112 | .fb_setcolreg = maxinefb_setcolreg, | 110 | .fb_setcolreg = maxinefb_setcolreg, |
113 | .fb_fillrect = cfb_fillrect, | 111 | .fb_fillrect = cfb_fillrect, |
114 | .fb_copyarea = cfb_copyarea, | 112 | .fb_copyarea = cfb_copyarea, |
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index d4c2d636c479..a42143ca0169 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
@@ -416,10 +416,9 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
416 | return retval; | 416 | return retval; |
417 | } | 417 | } |
418 | 418 | ||
419 | retval = -EIO; | ||
420 | bh = affs_bread(sb, old_dentry->d_inode->i_ino); | 419 | bh = affs_bread(sb, old_dentry->d_inode->i_ino); |
421 | if (!bh) | 420 | if (!bh) |
422 | goto done; | 421 | return -EIO; |
423 | 422 | ||
424 | /* Remove header from its parent directory. */ | 423 | /* Remove header from its parent directory. */ |
425 | affs_lock_dir(old_dir); | 424 | affs_lock_dir(old_dir); |
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 1a27ecb46c9a..7271bb0257f6 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -1,3 +1,10 @@ | |||
1 | Version 1.43 | ||
2 | ------------ | ||
3 | POSIX locking to servers which support CIFS POSIX Extensions | ||
4 | (disabled by default controlled by proc/fs/cifs/Experimental). | ||
5 | Handle conversion of long share names (especially Asian languages) | ||
6 | to Unicode during mount. | ||
7 | |||
1 | Version 1.42 | 8 | Version 1.42 |
2 | ------------ | 9 | ------------ |
3 | Fix slow oplock break when mounted to different servers at the same time and | 10 | Fix slow oplock break when mounted to different servers at the same time and |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 4e829dc672a6..c98755dca868 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -99,5 +99,5 @@ extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); | |||
99 | extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); | 99 | extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); |
100 | extern int cifs_ioctl (struct inode * inode, struct file * filep, | 100 | extern int cifs_ioctl (struct inode * inode, struct file * filep, |
101 | unsigned int command, unsigned long arg); | 101 | unsigned int command, unsigned long arg); |
102 | #define CIFS_VERSION "1.42" | 102 | #define CIFS_VERSION "1.43" |
103 | #endif /* _CIFSFS_H */ | 103 | #endif /* _CIFSFS_H */ |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 2879ba343ca7..310ea2f0e0bf 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -267,7 +267,7 @@ extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
267 | const int waitFlag); | 267 | const int waitFlag); |
268 | extern int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | 268 | extern int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, |
269 | const __u16 smb_file_id, const int get_flag, | 269 | const __u16 smb_file_id, const int get_flag, |
270 | const __u64 len, const __u64 offset, | 270 | const __u64 len, struct file_lock *, |
271 | const __u16 lock_type, const int waitFlag); | 271 | const __u16 lock_type, const int waitFlag); |
272 | extern int CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon); | 272 | extern int CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon); |
273 | extern int CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses); | 273 | extern int CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses); |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index fd36892eda55..925881e00ff2 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -1355,7 +1355,8 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1355 | int | 1355 | int |
1356 | CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | 1356 | CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, |
1357 | const __u16 smb_file_id, const int get_flag, const __u64 len, | 1357 | const __u16 smb_file_id, const int get_flag, const __u64 len, |
1358 | const __u64 lkoffset, const __u16 lock_type, const int waitFlag) | 1358 | struct file_lock *pLockData, const __u16 lock_type, |
1359 | const int waitFlag) | ||
1359 | { | 1360 | { |
1360 | struct smb_com_transaction2_sfi_req *pSMB = NULL; | 1361 | struct smb_com_transaction2_sfi_req *pSMB = NULL; |
1361 | struct smb_com_transaction2_sfi_rsp *pSMBr = NULL; | 1362 | struct smb_com_transaction2_sfi_rsp *pSMBr = NULL; |
@@ -1366,6 +1367,10 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1366 | __u16 params, param_offset, offset, byte_count, count; | 1367 | __u16 params, param_offset, offset, byte_count, count; |
1367 | 1368 | ||
1368 | cFYI(1, ("Posix Lock")); | 1369 | cFYI(1, ("Posix Lock")); |
1370 | |||
1371 | if(pLockData == NULL) | ||
1372 | return EINVAL; | ||
1373 | |||
1369 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); | 1374 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
1370 | 1375 | ||
1371 | if (rc) | 1376 | if (rc) |
@@ -1404,10 +1409,10 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1404 | 1409 | ||
1405 | parm_data->lock_type = cpu_to_le16(lock_type); | 1410 | parm_data->lock_type = cpu_to_le16(lock_type); |
1406 | if(waitFlag) | 1411 | if(waitFlag) |
1407 | parm_data->lock_flags = 1; | 1412 | parm_data->lock_flags = cpu_to_le16(1); |
1408 | parm_data->pid = cpu_to_le32(current->tgid); | 1413 | parm_data->pid = cpu_to_le32(current->tgid); |
1409 | parm_data->start = lkoffset; | 1414 | parm_data->start = cpu_to_le64(pLockData->fl_start); |
1410 | parm_data->length = len; /* normalize negative numbers */ | 1415 | parm_data->length = cpu_to_le64(len); /* normalize negative numbers */ |
1411 | 1416 | ||
1412 | pSMB->DataOffset = cpu_to_le16(offset); | 1417 | pSMB->DataOffset = cpu_to_le16(offset); |
1413 | pSMB->Fid = smb_file_id; | 1418 | pSMB->Fid = smb_file_id; |
@@ -1419,8 +1424,33 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1419 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 1424 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
1420 | if (rc) { | 1425 | if (rc) { |
1421 | cFYI(1, ("Send error in Posix Lock = %d", rc)); | 1426 | cFYI(1, ("Send error in Posix Lock = %d", rc)); |
1422 | } | 1427 | } else if (get_flag) { |
1428 | /* lock structure can be returned on get */ | ||
1429 | __u16 data_offset; | ||
1430 | __u16 data_count; | ||
1431 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | ||
1423 | 1432 | ||
1433 | if (rc || (pSMBr->ByteCount < sizeof(struct cifs_posix_lock))) { | ||
1434 | rc = -EIO; /* bad smb */ | ||
1435 | goto plk_err_exit; | ||
1436 | } | ||
1437 | if(pLockData == NULL) { | ||
1438 | rc = -EINVAL; | ||
1439 | goto plk_err_exit; | ||
1440 | } | ||
1441 | data_offset = le16_to_cpu(pSMBr->t2.DataOffset); | ||
1442 | data_count = le16_to_cpu(pSMBr->t2.DataCount); | ||
1443 | if(data_count < sizeof(struct cifs_posix_lock)) { | ||
1444 | rc = -EIO; | ||
1445 | goto plk_err_exit; | ||
1446 | } | ||
1447 | parm_data = (struct cifs_posix_lock *) | ||
1448 | ((char *)&pSMBr->hdr.Protocol + data_offset); | ||
1449 | if(parm_data->lock_type == cpu_to_le16(CIFS_UNLCK)) | ||
1450 | pLockData->fl_type = F_UNLCK; | ||
1451 | } | ||
1452 | |||
1453 | plk_err_exit: | ||
1424 | if (pSMB) | 1454 | if (pSMB) |
1425 | cifs_small_buf_release(pSMB); | 1455 | cifs_small_buf_release(pSMB); |
1426 | 1456 | ||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d2ec806a4f32..bae1479318d1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2148,6 +2148,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2148 | /* We look for obvious messed up bcc or strings in response so we do not go off | 2148 | /* We look for obvious messed up bcc or strings in response so we do not go off |
2149 | the end since (at least) WIN2K and Windows XP have a major bug in not null | 2149 | the end since (at least) WIN2K and Windows XP have a major bug in not null |
2150 | terminating last Unicode string in response */ | 2150 | terminating last Unicode string in response */ |
2151 | if(ses->serverOS) | ||
2152 | kfree(ses->serverOS); | ||
2151 | ses->serverOS = kzalloc(2 * (len + 1), GFP_KERNEL); | 2153 | ses->serverOS = kzalloc(2 * (len + 1), GFP_KERNEL); |
2152 | if(ses->serverOS == NULL) | 2154 | if(ses->serverOS == NULL) |
2153 | goto sesssetup_nomem; | 2155 | goto sesssetup_nomem; |
@@ -2160,6 +2162,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2160 | if (remaining_words > 0) { | 2162 | if (remaining_words > 0) { |
2161 | len = UniStrnlen((wchar_t *)bcc_ptr, | 2163 | len = UniStrnlen((wchar_t *)bcc_ptr, |
2162 | remaining_words-1); | 2164 | remaining_words-1); |
2165 | if(ses->serverNOS) | ||
2166 | kfree(ses->serverNOS); | ||
2163 | ses->serverNOS = kzalloc(2 * (len + 1),GFP_KERNEL); | 2167 | ses->serverNOS = kzalloc(2 * (len + 1),GFP_KERNEL); |
2164 | if(ses->serverNOS == NULL) | 2168 | if(ses->serverNOS == NULL) |
2165 | goto sesssetup_nomem; | 2169 | goto sesssetup_nomem; |
@@ -2177,6 +2181,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2177 | if (remaining_words > 0) { | 2181 | if (remaining_words > 0) { |
2178 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); | 2182 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); |
2179 | /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ | 2183 | /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ |
2184 | if(ses->serverDomain) | ||
2185 | kfree(ses->serverDomain); | ||
2180 | ses->serverDomain = | 2186 | ses->serverDomain = |
2181 | kzalloc(2*(len+1),GFP_KERNEL); | 2187 | kzalloc(2*(len+1),GFP_KERNEL); |
2182 | if(ses->serverDomain == NULL) | 2188 | if(ses->serverDomain == NULL) |
@@ -2187,15 +2193,22 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2187 | ses->serverDomain[2*len] = 0; | 2193 | ses->serverDomain[2*len] = 0; |
2188 | ses->serverDomain[1+(2*len)] = 0; | 2194 | ses->serverDomain[1+(2*len)] = 0; |
2189 | } /* else no more room so create dummy domain string */ | 2195 | } /* else no more room so create dummy domain string */ |
2190 | else | 2196 | else { |
2197 | if(ses->serverDomain) | ||
2198 | kfree(ses->serverDomain); | ||
2191 | ses->serverDomain = | 2199 | ses->serverDomain = |
2192 | kzalloc(2, GFP_KERNEL); | 2200 | kzalloc(2, GFP_KERNEL); |
2201 | } | ||
2193 | } else { /* no room so create dummy domain and NOS string */ | 2202 | } else { /* no room so create dummy domain and NOS string */ |
2194 | /* if these kcallocs fail not much we | 2203 | /* if these kcallocs fail not much we |
2195 | can do, but better to not fail the | 2204 | can do, but better to not fail the |
2196 | sesssetup itself */ | 2205 | sesssetup itself */ |
2206 | if(ses->serverDomain) | ||
2207 | kfree(ses->serverDomain); | ||
2197 | ses->serverDomain = | 2208 | ses->serverDomain = |
2198 | kzalloc(2, GFP_KERNEL); | 2209 | kzalloc(2, GFP_KERNEL); |
2210 | if(ses->serverNOS) | ||
2211 | kfree(ses->serverNOS); | ||
2199 | ses->serverNOS = | 2212 | ses->serverNOS = |
2200 | kzalloc(2, GFP_KERNEL); | 2213 | kzalloc(2, GFP_KERNEL); |
2201 | } | 2214 | } |
@@ -2204,6 +2217,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2204 | if (((long) bcc_ptr + len) - (long) | 2217 | if (((long) bcc_ptr + len) - (long) |
2205 | pByteArea(smb_buffer_response) | 2218 | pByteArea(smb_buffer_response) |
2206 | <= BCC(smb_buffer_response)) { | 2219 | <= BCC(smb_buffer_response)) { |
2220 | if(ses->serverOS) | ||
2221 | kfree(ses->serverOS); | ||
2207 | ses->serverOS = kzalloc(len + 1,GFP_KERNEL); | 2222 | ses->serverOS = kzalloc(len + 1,GFP_KERNEL); |
2208 | if(ses->serverOS == NULL) | 2223 | if(ses->serverOS == NULL) |
2209 | goto sesssetup_nomem; | 2224 | goto sesssetup_nomem; |
@@ -2214,6 +2229,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2214 | bcc_ptr++; | 2229 | bcc_ptr++; |
2215 | 2230 | ||
2216 | len = strnlen(bcc_ptr, 1024); | 2231 | len = strnlen(bcc_ptr, 1024); |
2232 | if(ses->serverNOS) | ||
2233 | kfree(ses->serverNOS); | ||
2217 | ses->serverNOS = kzalloc(len + 1,GFP_KERNEL); | 2234 | ses->serverNOS = kzalloc(len + 1,GFP_KERNEL); |
2218 | if(ses->serverNOS == NULL) | 2235 | if(ses->serverNOS == NULL) |
2219 | goto sesssetup_nomem; | 2236 | goto sesssetup_nomem; |
@@ -2223,6 +2240,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2223 | bcc_ptr++; | 2240 | bcc_ptr++; |
2224 | 2241 | ||
2225 | len = strnlen(bcc_ptr, 1024); | 2242 | len = strnlen(bcc_ptr, 1024); |
2243 | if(ses->serverDomain) | ||
2244 | kfree(ses->serverDomain); | ||
2226 | ses->serverDomain = kzalloc(len + 1,GFP_KERNEL); | 2245 | ses->serverDomain = kzalloc(len + 1,GFP_KERNEL); |
2227 | if(ses->serverDomain == NULL) | 2246 | if(ses->serverDomain == NULL) |
2228 | goto sesssetup_nomem; | 2247 | goto sesssetup_nomem; |
@@ -2427,6 +2446,8 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2427 | /* We look for obvious messed up bcc or strings in response so we do not go off | 2446 | /* We look for obvious messed up bcc or strings in response so we do not go off |
2428 | the end since (at least) WIN2K and Windows XP have a major bug in not null | 2447 | the end since (at least) WIN2K and Windows XP have a major bug in not null |
2429 | terminating last Unicode string in response */ | 2448 | terminating last Unicode string in response */ |
2449 | if(ses->serverOS) | ||
2450 | kfree(ses->serverOS); | ||
2430 | ses->serverOS = | 2451 | ses->serverOS = |
2431 | kzalloc(2 * (len + 1), GFP_KERNEL); | 2452 | kzalloc(2 * (len + 1), GFP_KERNEL); |
2432 | cifs_strfromUCS_le(ses->serverOS, | 2453 | cifs_strfromUCS_le(ses->serverOS, |
@@ -2441,6 +2462,8 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2441 | len = UniStrnlen((wchar_t *)bcc_ptr, | 2462 | len = UniStrnlen((wchar_t *)bcc_ptr, |
2442 | remaining_words | 2463 | remaining_words |
2443 | - 1); | 2464 | - 1); |
2465 | if(ses->serverNOS) | ||
2466 | kfree(ses->serverNOS); | ||
2444 | ses->serverNOS = | 2467 | ses->serverNOS = |
2445 | kzalloc(2 * (len + 1), | 2468 | kzalloc(2 * (len + 1), |
2446 | GFP_KERNEL); | 2469 | GFP_KERNEL); |
@@ -2454,7 +2477,9 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2454 | remaining_words -= len + 1; | 2477 | remaining_words -= len + 1; |
2455 | if (remaining_words > 0) { | 2478 | if (remaining_words > 0) { |
2456 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); | 2479 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); |
2457 | /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ | 2480 | /* last string not null terminated (e.g.Windows XP/2000) */ |
2481 | if(ses->serverDomain) | ||
2482 | kfree(ses->serverDomain); | ||
2458 | ses->serverDomain = kzalloc(2*(len+1),GFP_KERNEL); | 2483 | ses->serverDomain = kzalloc(2*(len+1),GFP_KERNEL); |
2459 | cifs_strfromUCS_le(ses->serverDomain, | 2484 | cifs_strfromUCS_le(ses->serverDomain, |
2460 | (__le16 *)bcc_ptr, | 2485 | (__le16 *)bcc_ptr, |
@@ -2463,11 +2488,18 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2463 | ses->serverDomain[2*len] = 0; | 2488 | ses->serverDomain[2*len] = 0; |
2464 | ses->serverDomain[1+(2*len)] = 0; | 2489 | ses->serverDomain[1+(2*len)] = 0; |
2465 | } /* else no more room so create dummy domain string */ | 2490 | } /* else no more room so create dummy domain string */ |
2466 | else | 2491 | else { |
2492 | if(ses->serverDomain) | ||
2493 | kfree(ses->serverDomain); | ||
2467 | ses->serverDomain = | 2494 | ses->serverDomain = |
2468 | kzalloc(2,GFP_KERNEL); | 2495 | kzalloc(2,GFP_KERNEL); |
2469 | } else { /* no room so create dummy domain and NOS string */ | 2496 | } |
2497 | } else {/* no room use dummy domain&NOS */ | ||
2498 | if(ses->serverDomain) | ||
2499 | kfree(ses->serverDomain); | ||
2470 | ses->serverDomain = kzalloc(2, GFP_KERNEL); | 2500 | ses->serverDomain = kzalloc(2, GFP_KERNEL); |
2501 | if(ses->serverNOS) | ||
2502 | kfree(ses->serverNOS); | ||
2471 | ses->serverNOS = kzalloc(2, GFP_KERNEL); | 2503 | ses->serverNOS = kzalloc(2, GFP_KERNEL); |
2472 | } | 2504 | } |
2473 | } else { /* ASCII */ | 2505 | } else { /* ASCII */ |
@@ -2476,6 +2508,8 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2476 | if (((long) bcc_ptr + len) - (long) | 2508 | if (((long) bcc_ptr + len) - (long) |
2477 | pByteArea(smb_buffer_response) | 2509 | pByteArea(smb_buffer_response) |
2478 | <= BCC(smb_buffer_response)) { | 2510 | <= BCC(smb_buffer_response)) { |
2511 | if(ses->serverOS) | ||
2512 | kfree(ses->serverOS); | ||
2479 | ses->serverOS = kzalloc(len + 1, GFP_KERNEL); | 2513 | ses->serverOS = kzalloc(len + 1, GFP_KERNEL); |
2480 | strncpy(ses->serverOS, bcc_ptr, len); | 2514 | strncpy(ses->serverOS, bcc_ptr, len); |
2481 | 2515 | ||
@@ -2484,6 +2518,8 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2484 | bcc_ptr++; | 2518 | bcc_ptr++; |
2485 | 2519 | ||
2486 | len = strnlen(bcc_ptr, 1024); | 2520 | len = strnlen(bcc_ptr, 1024); |
2521 | if(ses->serverNOS) | ||
2522 | kfree(ses->serverNOS); | ||
2487 | ses->serverNOS = kzalloc(len + 1,GFP_KERNEL); | 2523 | ses->serverNOS = kzalloc(len + 1,GFP_KERNEL); |
2488 | strncpy(ses->serverNOS, bcc_ptr, len); | 2524 | strncpy(ses->serverNOS, bcc_ptr, len); |
2489 | bcc_ptr += len; | 2525 | bcc_ptr += len; |
@@ -2491,6 +2527,8 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2491 | bcc_ptr++; | 2527 | bcc_ptr++; |
2492 | 2528 | ||
2493 | len = strnlen(bcc_ptr, 1024); | 2529 | len = strnlen(bcc_ptr, 1024); |
2530 | if(ses->serverDomain) | ||
2531 | kfree(ses->serverDomain); | ||
2494 | ses->serverDomain = kzalloc(len + 1, GFP_KERNEL); | 2532 | ses->serverDomain = kzalloc(len + 1, GFP_KERNEL); |
2495 | strncpy(ses->serverDomain, bcc_ptr, len); | 2533 | strncpy(ses->serverDomain, bcc_ptr, len); |
2496 | bcc_ptr += len; | 2534 | bcc_ptr += len; |
@@ -2728,6 +2766,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2728 | /* We look for obvious messed up bcc or strings in response so we do not go off | 2766 | /* We look for obvious messed up bcc or strings in response so we do not go off |
2729 | the end since (at least) WIN2K and Windows XP have a major bug in not null | 2767 | the end since (at least) WIN2K and Windows XP have a major bug in not null |
2730 | terminating last Unicode string in response */ | 2768 | terminating last Unicode string in response */ |
2769 | if(ses->serverOS) | ||
2770 | kfree(ses->serverOS); | ||
2731 | ses->serverOS = | 2771 | ses->serverOS = |
2732 | kzalloc(2 * (len + 1), GFP_KERNEL); | 2772 | kzalloc(2 * (len + 1), GFP_KERNEL); |
2733 | cifs_strfromUCS_le(ses->serverOS, | 2773 | cifs_strfromUCS_le(ses->serverOS, |
@@ -2743,6 +2783,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2743 | bcc_ptr, | 2783 | bcc_ptr, |
2744 | remaining_words | 2784 | remaining_words |
2745 | - 1); | 2785 | - 1); |
2786 | if(ses->serverNOS) | ||
2787 | kfree(ses->serverNOS); | ||
2746 | ses->serverNOS = | 2788 | ses->serverNOS = |
2747 | kzalloc(2 * (len + 1), | 2789 | kzalloc(2 * (len + 1), |
2748 | GFP_KERNEL); | 2790 | GFP_KERNEL); |
@@ -2760,6 +2802,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2760 | if (remaining_words > 0) { | 2802 | if (remaining_words > 0) { |
2761 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); | 2803 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); |
2762 | /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ | 2804 | /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ |
2805 | if(ses->serverDomain) | ||
2806 | kfree(ses->serverDomain); | ||
2763 | ses->serverDomain = | 2807 | ses->serverDomain = |
2764 | kzalloc(2 * | 2808 | kzalloc(2 * |
2765 | (len + | 2809 | (len + |
@@ -2777,13 +2821,20 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2777 | [1 + (2 * len)] | 2821 | [1 + (2 * len)] |
2778 | = 0; | 2822 | = 0; |
2779 | } /* else no more room so create dummy domain string */ | 2823 | } /* else no more room so create dummy domain string */ |
2780 | else | 2824 | else { |
2825 | if(ses->serverDomain) | ||
2826 | kfree(ses->serverDomain); | ||
2781 | ses->serverDomain = | 2827 | ses->serverDomain = |
2782 | kzalloc(2, | 2828 | kzalloc(2, |
2783 | GFP_KERNEL); | 2829 | GFP_KERNEL); |
2830 | } | ||
2784 | } else { /* no room so create dummy domain and NOS string */ | 2831 | } else { /* no room so create dummy domain and NOS string */ |
2832 | if(ses->serverDomain); | ||
2833 | kfree(ses->serverDomain); | ||
2785 | ses->serverDomain = | 2834 | ses->serverDomain = |
2786 | kzalloc(2, GFP_KERNEL); | 2835 | kzalloc(2, GFP_KERNEL); |
2836 | if(ses->serverNOS) | ||
2837 | kfree(ses->serverNOS); | ||
2787 | ses->serverNOS = | 2838 | ses->serverNOS = |
2788 | kzalloc(2, GFP_KERNEL); | 2839 | kzalloc(2, GFP_KERNEL); |
2789 | } | 2840 | } |
@@ -2792,6 +2843,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2792 | if (((long) bcc_ptr + len) - (long) | 2843 | if (((long) bcc_ptr + len) - (long) |
2793 | pByteArea(smb_buffer_response) | 2844 | pByteArea(smb_buffer_response) |
2794 | <= BCC(smb_buffer_response)) { | 2845 | <= BCC(smb_buffer_response)) { |
2846 | if(ses->serverOS) | ||
2847 | kfree(ses->serverOS); | ||
2795 | ses->serverOS = | 2848 | ses->serverOS = |
2796 | kzalloc(len + 1, | 2849 | kzalloc(len + 1, |
2797 | GFP_KERNEL); | 2850 | GFP_KERNEL); |
@@ -2803,6 +2856,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2803 | bcc_ptr++; | 2856 | bcc_ptr++; |
2804 | 2857 | ||
2805 | len = strnlen(bcc_ptr, 1024); | 2858 | len = strnlen(bcc_ptr, 1024); |
2859 | if(ses->serverNOS) | ||
2860 | kfree(ses->serverNOS); | ||
2806 | ses->serverNOS = | 2861 | ses->serverNOS = |
2807 | kzalloc(len + 1, | 2862 | kzalloc(len + 1, |
2808 | GFP_KERNEL); | 2863 | GFP_KERNEL); |
@@ -2812,6 +2867,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2812 | bcc_ptr++; | 2867 | bcc_ptr++; |
2813 | 2868 | ||
2814 | len = strnlen(bcc_ptr, 1024); | 2869 | len = strnlen(bcc_ptr, 1024); |
2870 | if(ses->serverDomain) | ||
2871 | kfree(ses->serverDomain); | ||
2815 | ses->serverDomain = | 2872 | ses->serverDomain = |
2816 | kzalloc(len + 1, | 2873 | kzalloc(len + 1, |
2817 | GFP_KERNEL); | 2874 | GFP_KERNEL); |
@@ -3116,6 +3173,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3116 | /* We look for obvious messed up bcc or strings in response so we do not go off | 3173 | /* We look for obvious messed up bcc or strings in response so we do not go off |
3117 | the end since (at least) WIN2K and Windows XP have a major bug in not null | 3174 | the end since (at least) WIN2K and Windows XP have a major bug in not null |
3118 | terminating last Unicode string in response */ | 3175 | terminating last Unicode string in response */ |
3176 | if(ses->serverOS) | ||
3177 | kfree(ses->serverOS); | ||
3119 | ses->serverOS = | 3178 | ses->serverOS = |
3120 | kzalloc(2 * (len + 1), GFP_KERNEL); | 3179 | kzalloc(2 * (len + 1), GFP_KERNEL); |
3121 | cifs_strfromUCS_le(ses->serverOS, | 3180 | cifs_strfromUCS_le(ses->serverOS, |
@@ -3131,6 +3190,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3131 | bcc_ptr, | 3190 | bcc_ptr, |
3132 | remaining_words | 3191 | remaining_words |
3133 | - 1); | 3192 | - 1); |
3193 | if(ses->serverNOS) | ||
3194 | kfree(ses->serverNOS); | ||
3134 | ses->serverNOS = | 3195 | ses->serverNOS = |
3135 | kzalloc(2 * (len + 1), | 3196 | kzalloc(2 * (len + 1), |
3136 | GFP_KERNEL); | 3197 | GFP_KERNEL); |
@@ -3147,6 +3208,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3147 | if (remaining_words > 0) { | 3208 | if (remaining_words > 0) { |
3148 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); | 3209 | len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); |
3149 | /* last string not always null terminated (e.g. for Windows XP & 2000) */ | 3210 | /* last string not always null terminated (e.g. for Windows XP & 2000) */ |
3211 | if(ses->serverDomain) | ||
3212 | kfree(ses->serverDomain); | ||
3150 | ses->serverDomain = | 3213 | ses->serverDomain = |
3151 | kzalloc(2 * | 3214 | kzalloc(2 * |
3152 | (len + | 3215 | (len + |
@@ -3172,10 +3235,17 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3172 | len)] | 3235 | len)] |
3173 | = 0; | 3236 | = 0; |
3174 | } /* else no more room so create dummy domain string */ | 3237 | } /* else no more room so create dummy domain string */ |
3175 | else | 3238 | else { |
3239 | if(ses->serverDomain) | ||
3240 | kfree(ses->serverDomain); | ||
3176 | ses->serverDomain = kzalloc(2,GFP_KERNEL); | 3241 | ses->serverDomain = kzalloc(2,GFP_KERNEL); |
3242 | } | ||
3177 | } else { /* no room so create dummy domain and NOS string */ | 3243 | } else { /* no room so create dummy domain and NOS string */ |
3244 | if(ses->serverDomain) | ||
3245 | kfree(ses->serverDomain); | ||
3178 | ses->serverDomain = kzalloc(2, GFP_KERNEL); | 3246 | ses->serverDomain = kzalloc(2, GFP_KERNEL); |
3247 | if(ses->serverNOS) | ||
3248 | kfree(ses->serverNOS); | ||
3179 | ses->serverNOS = kzalloc(2, GFP_KERNEL); | 3249 | ses->serverNOS = kzalloc(2, GFP_KERNEL); |
3180 | } | 3250 | } |
3181 | } else { /* ASCII */ | 3251 | } else { /* ASCII */ |
@@ -3183,6 +3253,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3183 | if (((long) bcc_ptr + len) - | 3253 | if (((long) bcc_ptr + len) - |
3184 | (long) pByteArea(smb_buffer_response) | 3254 | (long) pByteArea(smb_buffer_response) |
3185 | <= BCC(smb_buffer_response)) { | 3255 | <= BCC(smb_buffer_response)) { |
3256 | if(ses->serverOS) | ||
3257 | kfree(ses->serverOS); | ||
3186 | ses->serverOS = kzalloc(len + 1,GFP_KERNEL); | 3258 | ses->serverOS = kzalloc(len + 1,GFP_KERNEL); |
3187 | strncpy(ses->serverOS,bcc_ptr, len); | 3259 | strncpy(ses->serverOS,bcc_ptr, len); |
3188 | 3260 | ||
@@ -3191,6 +3263,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3191 | bcc_ptr++; | 3263 | bcc_ptr++; |
3192 | 3264 | ||
3193 | len = strnlen(bcc_ptr, 1024); | 3265 | len = strnlen(bcc_ptr, 1024); |
3266 | if(ses->serverNOS) | ||
3267 | kfree(ses->serverNOS); | ||
3194 | ses->serverNOS = kzalloc(len+1,GFP_KERNEL); | 3268 | ses->serverNOS = kzalloc(len+1,GFP_KERNEL); |
3195 | strncpy(ses->serverNOS, bcc_ptr, len); | 3269 | strncpy(ses->serverNOS, bcc_ptr, len); |
3196 | bcc_ptr += len; | 3270 | bcc_ptr += len; |
@@ -3198,6 +3272,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3198 | bcc_ptr++; | 3272 | bcc_ptr++; |
3199 | 3273 | ||
3200 | len = strnlen(bcc_ptr, 1024); | 3274 | len = strnlen(bcc_ptr, 1024); |
3275 | if(ses->serverDomain) | ||
3276 | kfree(ses->serverDomain); | ||
3201 | ses->serverDomain = kzalloc(len+1,GFP_KERNEL); | 3277 | ses->serverDomain = kzalloc(len+1,GFP_KERNEL); |
3202 | strncpy(ses->serverDomain, bcc_ptr, len); | 3278 | strncpy(ses->serverDomain, bcc_ptr, len); |
3203 | bcc_ptr += len; | 3279 | bcc_ptr += len; |
@@ -3282,7 +3358,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
3282 | bcc_ptr++; /* align */ | 3358 | bcc_ptr++; /* align */ |
3283 | } | 3359 | } |
3284 | 3360 | ||
3285 | if(ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | 3361 | if(ses->server->secMode & |
3362 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | ||
3286 | smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; | 3363 | smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; |
3287 | 3364 | ||
3288 | if (ses->capabilities & CAP_STATUS32) { | 3365 | if (ses->capabilities & CAP_STATUS32) { |
@@ -3294,8 +3371,10 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
3294 | if (ses->capabilities & CAP_UNICODE) { | 3371 | if (ses->capabilities & CAP_UNICODE) { |
3295 | smb_buffer->Flags2 |= SMBFLG2_UNICODE; | 3372 | smb_buffer->Flags2 |= SMBFLG2_UNICODE; |
3296 | length = | 3373 | length = |
3297 | cifs_strtoUCS((__le16 *) bcc_ptr, tree, 100, nls_codepage); | 3374 | cifs_strtoUCS((__le16 *) bcc_ptr, tree, |
3298 | bcc_ptr += 2 * length; /* convert num of 16 bit words to bytes */ | 3375 | 6 /* max utf8 char length in bytes */ * |
3376 | (/* server len*/ + 256 /* share len */), nls_codepage); | ||
3377 | bcc_ptr += 2 * length; /* convert num 16 bit words to bytes */ | ||
3299 | bcc_ptr += 2; /* skip trailing null */ | 3378 | bcc_ptr += 2; /* skip trailing null */ |
3300 | } else { /* ASCII */ | 3379 | } else { /* ASCII */ |
3301 | strcpy(bcc_ptr, tree); | 3380 | strcpy(bcc_ptr, tree); |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index e152bf6afa60..e2b4ce1dad66 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -84,6 +84,8 @@ static inline int cifs_get_disposition(unsigned int flags) | |||
84 | return FILE_OVERWRITE_IF; | 84 | return FILE_OVERWRITE_IF; |
85 | else if ((flags & O_CREAT) == O_CREAT) | 85 | else if ((flags & O_CREAT) == O_CREAT) |
86 | return FILE_OPEN_IF; | 86 | return FILE_OPEN_IF; |
87 | else if ((flags & O_TRUNC) == O_TRUNC) | ||
88 | return FILE_OVERWRITE; | ||
87 | else | 89 | else |
88 | return FILE_OPEN; | 90 | return FILE_OPEN; |
89 | } | 91 | } |
@@ -656,7 +658,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
656 | else | 658 | else |
657 | posix_lock_type = CIFS_WRLCK; | 659 | posix_lock_type = CIFS_WRLCK; |
658 | rc = CIFSSMBPosixLock(xid, pTcon, netfid, 1 /* get */, | 660 | rc = CIFSSMBPosixLock(xid, pTcon, netfid, 1 /* get */, |
659 | length, pfLock->fl_start, | 661 | length, pfLock, |
660 | posix_lock_type, wait_flag); | 662 | posix_lock_type, wait_flag); |
661 | FreeXid(xid); | 663 | FreeXid(xid); |
662 | return rc; | 664 | return rc; |
@@ -704,7 +706,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
704 | return -EOPNOTSUPP; | 706 | return -EOPNOTSUPP; |
705 | } | 707 | } |
706 | rc = CIFSSMBPosixLock(xid, pTcon, netfid, 0 /* set */, | 708 | rc = CIFSSMBPosixLock(xid, pTcon, netfid, 0 /* set */, |
707 | length, pfLock->fl_start, | 709 | length, pfLock, |
708 | posix_lock_type, wait_flag); | 710 | posix_lock_type, wait_flag); |
709 | } else | 711 | } else |
710 | rc = CIFSSMBLock(xid, pTcon, netfid, length, pfLock->fl_start, | 712 | rc = CIFSSMBLock(xid, pTcon, netfid, length, pfLock->fl_start, |
@@ -904,8 +906,10 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
904 | if (rc != 0) | 906 | if (rc != 0) |
905 | break; | 907 | break; |
906 | } | 908 | } |
907 | if(experimEnabled || (pTcon->ses->server->secMode & | 909 | if(experimEnabled || (pTcon->ses->server && |
908 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0) { | 910 | ((pTcon->ses->server->secMode & |
911 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | ||
912 | == 0))) { | ||
909 | struct kvec iov[2]; | 913 | struct kvec iov[2]; |
910 | unsigned int len; | 914 | unsigned int len; |
911 | 915 | ||
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 8aac5334680d..34b39e9a1e5a 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c | |||
@@ -767,7 +767,6 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input) | |||
767 | if (input->group != sbi->s_groups_count) { | 767 | if (input->group != sbi->s_groups_count) { |
768 | ext3_warning(sb, __FUNCTION__, | 768 | ext3_warning(sb, __FUNCTION__, |
769 | "multiple resizers run on filesystem!"); | 769 | "multiple resizers run on filesystem!"); |
770 | unlock_super(sb); | ||
771 | err = -EBUSY; | 770 | err = -EBUSY; |
772 | goto exit_journal; | 771 | goto exit_journal; |
773 | } | 772 | } |
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-alpha/termbits.h b/include/asm-alpha/termbits.h index f4837fa29420..5541101b58ae 100644 --- a/include/asm-alpha/termbits.h +++ b/include/asm-alpha/termbits.h | |||
@@ -148,6 +148,7 @@ struct termios { | |||
148 | #define HUPCL 00040000 | 148 | #define HUPCL 00040000 |
149 | 149 | ||
150 | #define CLOCAL 00100000 | 150 | #define CLOCAL 00100000 |
151 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
151 | #define CRTSCTS 020000000000 /* flow control */ | 152 | #define CRTSCTS 020000000000 /* flow control */ |
152 | 153 | ||
153 | /* c_lflag bits */ | 154 | /* c_lflag bits */ |
diff --git a/include/asm-arm/arch-ixp23xx/memory.h b/include/asm-arm/arch-ixp23xx/memory.h index 6e19f46d54d1..c85fc06a043c 100644 --- a/include/asm-arm/arch-ixp23xx/memory.h +++ b/include/asm-arm/arch-ixp23xx/memory.h | |||
@@ -49,7 +49,7 @@ static inline int __ixp23xx_arch_is_coherent(void) | |||
49 | { | 49 | { |
50 | extern unsigned int processor_id; | 50 | extern unsigned int processor_id; |
51 | 51 | ||
52 | if (((processor_id & 15) >= 2) || machine_is_roadrunner()) | 52 | if (((processor_id & 15) >= 4) || machine_is_roadrunner()) |
53 | return 1; | 53 | return 1; |
54 | 54 | ||
55 | return 0; | 55 | return 0; |
diff --git a/include/asm-arm/arch-l7200/serial_l7200.h b/include/asm-arm/arch-l7200/serial_l7200.h index 238c595d97ea..b1008a9d23e5 100644 --- a/include/asm-arm/arch-l7200/serial_l7200.h +++ b/include/asm-arm/arch-l7200/serial_l7200.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define UARTDR 0x00 /* Tx/Rx data */ | 28 | #define UARTDR 0x00 /* Tx/Rx data */ |
29 | #define RXSTAT 0x04 /* Rx status */ | 29 | #define RXSTAT 0x04 /* Rx status */ |
30 | #define H_UBRLCR 0x08 /* mode register high */ | 30 | #define H_UBRLCR 0x08 /* mode register high */ |
31 | #define M_UBRLCR 0x0C /* mode reg mid (MSB of buad)*/ | 31 | #define M_UBRLCR 0x0C /* mode reg mid (MSB of baud)*/ |
32 | #define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/ | 32 | #define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/ |
33 | #define UARTCON 0x14 /* control register */ | 33 | #define UARTCON 0x14 /* control register */ |
34 | #define UARTFLG 0x18 /* flag register */ | 34 | #define UARTFLG 0x18 /* flag register */ |
diff --git a/include/asm-arm/arch-l7200/uncompress.h b/include/asm-arm/arch-l7200/uncompress.h index 9fcd40aee3e3..04be2a088639 100644 --- a/include/asm-arm/arch-l7200/uncompress.h +++ b/include/asm-arm/arch-l7200/uncompress.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Changelog: | 6 | * Changelog: |
7 | * 05-01-2000 SJH Created | 7 | * 05-01-2000 SJH Created |
8 | * 05-13-2000 SJH Filled in function bodies | 8 | * 05-13-2000 SJH Filled in function bodies |
9 | * 07-26-2000 SJH Removed hard coded buad rate | 9 | * 07-26-2000 SJH Removed hard coded baud rate |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <asm/hardware.h> | 12 | #include <asm/hardware.h> |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 95b3abf4851b..7c9568d30307 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -127,6 +127,12 @@ static inline int cpu_is_xsc3(void) | |||
127 | } | 127 | } |
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | #if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3) | ||
131 | #define cpu_is_xscale() 0 | ||
132 | #else | ||
133 | #define cpu_is_xscale() 1 | ||
134 | #endif | ||
135 | |||
130 | #define set_cr(x) \ | 136 | #define set_cr(x) \ |
131 | __asm__ __volatile__( \ | 137 | __asm__ __volatile__( \ |
132 | "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ | 138 | "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 358e4d309ceb..c2059a3a0621 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -159,17 +159,8 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
159 | #define lazy_mmu_prot_update(pte) do { } while (0) | 159 | #define lazy_mmu_prot_update(pte) do { } while (0) |
160 | #endif | 160 | #endif |
161 | 161 | ||
162 | #ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE | 162 | #ifndef __HAVE_ARCH_MOVE_PTE |
163 | #define move_pte(pte, prot, old_addr, new_addr) (pte) | 163 | #define move_pte(pte, prot, old_addr, new_addr) (pte) |
164 | #else | ||
165 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
166 | ({ \ | ||
167 | pte_t newpte = (pte); \ | ||
168 | if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ | ||
169 | pte_page(pte) == ZERO_PAGE(old_addr)) \ | ||
170 | newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ | ||
171 | newpte; \ | ||
172 | }) | ||
173 | #endif | 164 | #endif |
174 | 165 | ||
175 | /* | 166 | /* |
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/cpu.h b/include/asm-mips/cpu.h index 818b9a97e214..dff2a0a52f8f 100644 --- a/include/asm-mips/cpu.h +++ b/include/asm-mips/cpu.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #define PRID_IMP_R4300 0x0b00 | 51 | #define PRID_IMP_R4300 0x0b00 |
52 | #define PRID_IMP_VR41XX 0x0c00 | 52 | #define PRID_IMP_VR41XX 0x0c00 |
53 | #define PRID_IMP_R12000 0x0e00 | 53 | #define PRID_IMP_R12000 0x0e00 |
54 | #define PRID_IMP_R14000 0x0f00 | ||
54 | #define PRID_IMP_R8000 0x1000 | 55 | #define PRID_IMP_R8000 0x1000 |
55 | #define PRID_IMP_PR4450 0x1200 | 56 | #define PRID_IMP_PR4450 0x1200 |
56 | #define PRID_IMP_R4600 0x2000 | 57 | #define PRID_IMP_R4600 0x2000 |
@@ -87,6 +88,7 @@ | |||
87 | #define PRID_IMP_24K 0x9300 | 88 | #define PRID_IMP_24K 0x9300 |
88 | #define PRID_IMP_34K 0x9500 | 89 | #define PRID_IMP_34K 0x9500 |
89 | #define PRID_IMP_24KE 0x9600 | 90 | #define PRID_IMP_24KE 0x9600 |
91 | #define PRID_IMP_74K 0x9700 | ||
90 | 92 | ||
91 | /* | 93 | /* |
92 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE | 94 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE |
@@ -196,7 +198,9 @@ | |||
196 | #define CPU_34K 60 | 198 | #define CPU_34K 60 |
197 | #define CPU_PR4450 61 | 199 | #define CPU_PR4450 61 |
198 | #define CPU_SB1A 62 | 200 | #define CPU_SB1A 62 |
199 | #define CPU_LAST 62 | 201 | #define CPU_74K 63 |
202 | #define CPU_R14000 64 | ||
203 | #define CPU_LAST 64 | ||
200 | 204 | ||
201 | /* | 205 | /* |
202 | * ISA Level encodings | 206 | * ISA Level encodings |
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/futex.h b/include/asm-mips/futex.h index a554089991f2..12d118f1bc9c 100644 --- a/include/asm-mips/futex.h +++ b/include/asm-mips/futex.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/futex.h> | 7 | #include <linux/futex.h> |
8 | #include <asm/errno.h> | 8 | #include <asm/errno.h> |
9 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
10 | #include <asm/war.h> | ||
10 | 11 | ||
11 | #ifdef CONFIG_SMP | 12 | #ifdef CONFIG_SMP |
12 | #define __FUTEX_SMP_SYNC " sync \n" | 13 | #define __FUTEX_SMP_SYNC " sync \n" |
@@ -16,30 +17,58 @@ | |||
16 | 17 | ||
17 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 18 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
18 | { \ | 19 | { \ |
19 | __asm__ __volatile__( \ | 20 | if (cpu_has_llsc && R10000_LLSC_WAR) { \ |
20 | " .set push \n" \ | 21 | __asm__ __volatile__( \ |
21 | " .set noat \n" \ | 22 | " .set push \n" \ |
22 | " .set mips3 \n" \ | 23 | " .set noat \n" \ |
23 | "1: ll %1, (%3) # __futex_atomic_op1 \n" \ | 24 | " .set mips3 \n" \ |
24 | " .set mips0 \n" \ | 25 | "1: ll %1, (%3) # __futex_atomic_op \n" \ |
25 | " " insn " \n" \ | 26 | " .set mips0 \n" \ |
26 | " .set mips3 \n" \ | 27 | " " insn " \n" \ |
27 | "2: sc $1, (%3) \n" \ | 28 | " .set mips3 \n" \ |
28 | " beqzl $1, 1b \n" \ | 29 | "2: sc $1, (%3) \n" \ |
29 | __FUTEX_SMP_SYNC \ | 30 | " beqzl $1, 1b \n" \ |
30 | "3: \n" \ | 31 | __FUTEX_SMP_SYNC \ |
31 | " .set pop \n" \ | 32 | "3: \n" \ |
32 | " .set mips0 \n" \ | 33 | " .set pop \n" \ |
33 | " .section .fixup,\"ax\" \n" \ | 34 | " .set mips0 \n" \ |
34 | "4: li %0, %5 \n" \ | 35 | " .section .fixup,\"ax\" \n" \ |
35 | " j 2b \n" \ | 36 | "4: li %0, %5 \n" \ |
36 | " .previous \n" \ | 37 | " j 2b \n" \ |
37 | " .section __ex_table,\"a\" \n" \ | 38 | " .previous \n" \ |
38 | " "__UA_ADDR "\t1b, 4b \n" \ | 39 | " .section __ex_table,\"a\" \n" \ |
39 | " "__UA_ADDR "\t2b, 4b \n" \ | 40 | " "__UA_ADDR "\t1b, 4b \n" \ |
40 | " .previous \n" \ | 41 | " "__UA_ADDR "\t2b, 4b \n" \ |
41 | : "=r" (ret), "=r" (oldval) \ | 42 | " .previous \n" \ |
42 | : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ | 43 | : "=r" (ret), "=r" (oldval) \ |
44 | : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ | ||
45 | } else if (cpu_has_llsc) { \ | ||
46 | __asm__ __volatile__( \ | ||
47 | " .set push \n" \ | ||
48 | " .set noat \n" \ | ||
49 | " .set mips3 \n" \ | ||
50 | "1: ll %1, (%3) # __futex_atomic_op \n" \ | ||
51 | " .set mips0 \n" \ | ||
52 | " " insn " \n" \ | ||
53 | " .set mips3 \n" \ | ||
54 | "2: sc $1, (%3) \n" \ | ||
55 | " beqz $1, 1b \n" \ | ||
56 | __FUTEX_SMP_SYNC \ | ||
57 | "3: \n" \ | ||
58 | " .set pop \n" \ | ||
59 | " .set mips0 \n" \ | ||
60 | " .section .fixup,\"ax\" \n" \ | ||
61 | "4: li %0, %5 \n" \ | ||
62 | " j 2b \n" \ | ||
63 | " .previous \n" \ | ||
64 | " .section __ex_table,\"a\" \n" \ | ||
65 | " "__UA_ADDR "\t1b, 4b \n" \ | ||
66 | " "__UA_ADDR "\t2b, 4b \n" \ | ||
67 | " .previous \n" \ | ||
68 | : "=r" (ret), "=r" (oldval) \ | ||
69 | : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ | ||
70 | } else \ | ||
71 | ret = -ENOSYS; \ | ||
43 | } | 72 | } |
44 | 73 | ||
45 | static inline int | 74 | static inline int |
@@ -102,7 +131,69 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
102 | static inline int | 131 | static inline int |
103 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | 132 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) |
104 | { | 133 | { |
105 | return -ENOSYS; | 134 | int retval; |
135 | |||
136 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
137 | return -EFAULT; | ||
138 | |||
139 | if (cpu_has_llsc && R10000_LLSC_WAR) { | ||
140 | __asm__ __volatile__( | ||
141 | "# futex_atomic_cmpxchg_inatomic \n" | ||
142 | " .set push \n" | ||
143 | " .set noat \n" | ||
144 | " .set mips3 \n" | ||
145 | "1: ll %0, %2 \n" | ||
146 | " bne %0, %z3, 3f \n" | ||
147 | " .set mips0 \n" | ||
148 | " move $1, %z4 \n" | ||
149 | " .set mips3 \n" | ||
150 | "2: sc $1, %1 \n" | ||
151 | " beqzl $1, 1b \n" | ||
152 | __FUTEX_SMP_SYNC | ||
153 | "3: \n" | ||
154 | " .set pop \n" | ||
155 | " .section .fixup,\"ax\" \n" | ||
156 | "4: li %0, %5 \n" | ||
157 | " j 3b \n" | ||
158 | " .previous \n" | ||
159 | " .section __ex_table,\"a\" \n" | ||
160 | " "__UA_ADDR "\t1b, 4b \n" | ||
161 | " "__UA_ADDR "\t2b, 4b \n" | ||
162 | " .previous \n" | ||
163 | : "=&r" (retval), "=R" (*uaddr) | ||
164 | : "R" (*uaddr), "Jr" (oldval), "Jr" (newval), "i" (-EFAULT) | ||
165 | : "memory"); | ||
166 | } else if (cpu_has_llsc) { | ||
167 | __asm__ __volatile__( | ||
168 | "# futex_atomic_cmpxchg_inatomic \n" | ||
169 | " .set push \n" | ||
170 | " .set noat \n" | ||
171 | " .set mips3 \n" | ||
172 | "1: ll %0, %2 \n" | ||
173 | " bne %0, %z3, 3f \n" | ||
174 | " .set mips0 \n" | ||
175 | " move $1, %z4 \n" | ||
176 | " .set mips3 \n" | ||
177 | "2: sc $1, %1 \n" | ||
178 | " beqz $1, 1b \n" | ||
179 | __FUTEX_SMP_SYNC | ||
180 | "3: \n" | ||
181 | " .set pop \n" | ||
182 | " .section .fixup,\"ax\" \n" | ||
183 | "4: li %0, %5 \n" | ||
184 | " j 3b \n" | ||
185 | " .previous \n" | ||
186 | " .section __ex_table,\"a\" \n" | ||
187 | " "__UA_ADDR "\t1b, 4b \n" | ||
188 | " "__UA_ADDR "\t2b, 4b \n" | ||
189 | " .previous \n" | ||
190 | : "=&r" (retval), "=R" (*uaddr) | ||
191 | : "R" (*uaddr), "Jr" (oldval), "Jr" (newval), "i" (-EFAULT) | ||
192 | : "memory"); | ||
193 | } else | ||
194 | return -ENOSYS; | ||
195 | |||
196 | return retval; | ||
106 | } | 197 | } |
107 | 198 | ||
108 | #endif | 199 | #endif |
diff --git a/include/asm-mips/inst.h b/include/asm-mips/inst.h index e0745f4ff624..1ed8d0f62577 100644 --- a/include/asm-mips/inst.h +++ b/include/asm-mips/inst.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 1996, 2000 by Ralf Baechle | 8 | * Copyright (C) 1996, 2000 by Ralf Baechle |
9 | * Copyright (C) 2006 by Thiemo Seufer | ||
9 | */ | 10 | */ |
10 | #ifndef _ASM_INST_H | 11 | #ifndef _ASM_INST_H |
11 | #define _ASM_INST_H | 12 | #define _ASM_INST_H |
@@ -21,14 +22,14 @@ enum major_op { | |||
21 | cop0_op, cop1_op, cop2_op, cop1x_op, | 22 | cop0_op, cop1_op, cop2_op, cop1x_op, |
22 | beql_op, bnel_op, blezl_op, bgtzl_op, | 23 | beql_op, bnel_op, blezl_op, bgtzl_op, |
23 | daddi_op, daddiu_op, ldl_op, ldr_op, | 24 | daddi_op, daddiu_op, ldl_op, ldr_op, |
24 | major_1c_op, jalx_op, major_1e_op, major_1f_op, | 25 | spec2_op, jalx_op, mdmx_op, spec3_op, |
25 | lb_op, lh_op, lwl_op, lw_op, | 26 | lb_op, lh_op, lwl_op, lw_op, |
26 | lbu_op, lhu_op, lwr_op, lwu_op, | 27 | lbu_op, lhu_op, lwr_op, lwu_op, |
27 | sb_op, sh_op, swl_op, sw_op, | 28 | sb_op, sh_op, swl_op, sw_op, |
28 | sdl_op, sdr_op, swr_op, cache_op, | 29 | sdl_op, sdr_op, swr_op, cache_op, |
29 | ll_op, lwc1_op, lwc2_op, pref_op, | 30 | ll_op, lwc1_op, lwc2_op, pref_op, |
30 | lld_op, ldc1_op, ldc2_op, ld_op, | 31 | lld_op, ldc1_op, ldc2_op, ld_op, |
31 | sc_op, swc1_op, swc2_op, rdhwr_op, | 32 | sc_op, swc1_op, swc2_op, major_3b_op, |
32 | scd_op, sdc1_op, sdc2_op, sd_op | 33 | scd_op, sdc1_op, sdc2_op, sd_op |
33 | }; | 34 | }; |
34 | 35 | ||
@@ -37,7 +38,7 @@ enum major_op { | |||
37 | */ | 38 | */ |
38 | enum spec_op { | 39 | enum spec_op { |
39 | sll_op, movc_op, srl_op, sra_op, | 40 | sll_op, movc_op, srl_op, sra_op, |
40 | sllv_op, srlv_op, srav_op, spec1_unused_op, /* Opcode 0x07 is unused */ | 41 | sllv_op, pmon_op, srlv_op, srav_op, |
41 | jr_op, jalr_op, movz_op, movn_op, | 42 | jr_op, jalr_op, movz_op, movn_op, |
42 | syscall_op, break_op, spim_op, sync_op, | 43 | syscall_op, break_op, spim_op, sync_op, |
43 | mfhi_op, mthi_op, mflo_op, mtlo_op, | 44 | mfhi_op, mthi_op, mflo_op, mtlo_op, |
@@ -55,6 +56,28 @@ enum spec_op { | |||
55 | }; | 56 | }; |
56 | 57 | ||
57 | /* | 58 | /* |
59 | * func field of spec2 opcode. | ||
60 | */ | ||
61 | enum spec2_op { | ||
62 | madd_op, maddu_op, mul_op, spec2_3_unused_op, | ||
63 | msub_op, msubu_op, /* more unused ops */ | ||
64 | clz_op = 0x20, clo_op, | ||
65 | dclz_op = 0x24, dclo_op, | ||
66 | sdbpp_op = 0x3f | ||
67 | }; | ||
68 | |||
69 | /* | ||
70 | * func field of spec3 opcode. | ||
71 | */ | ||
72 | enum spec3_op { | ||
73 | ext_op, dextm_op, dextu_op, dext_op, | ||
74 | ins_op, dinsm_op, dinsu_op, dins_op, | ||
75 | bshfl_op = 0x20, | ||
76 | dbshfl_op = 0x24, | ||
77 | rdhwr_op = 0x3f | ||
78 | }; | ||
79 | |||
80 | /* | ||
58 | * rt field of bcond opcodes. | 81 | * rt field of bcond opcodes. |
59 | */ | 82 | */ |
60 | enum rt_op { | 83 | enum rt_op { |
@@ -151,8 +174,8 @@ enum cop1x_func { | |||
151 | * func field for mad opcodes (MIPS IV). | 174 | * func field for mad opcodes (MIPS IV). |
152 | */ | 175 | */ |
153 | enum mad_func { | 176 | enum mad_func { |
154 | madd_op = 0x08, msub_op = 0x0a, | 177 | madd_fp_op = 0x08, msub_fp_op = 0x0a, |
155 | nmadd_op = 0x0c, nmsub_op = 0x0e | 178 | nmadd_fp_op = 0x0c, nmsub_fp_op = 0x0e |
156 | }; | 179 | }; |
157 | 180 | ||
158 | /* | 181 | /* |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index a2ef579f6b1a..5af7517fce8a 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -291,7 +291,7 @@ | |||
291 | #define ST0_DL (_ULCAST_(1) << 24) | 291 | #define ST0_DL (_ULCAST_(1) << 24) |
292 | 292 | ||
293 | /* | 293 | /* |
294 | * Enable the MIPS DSP ASE | 294 | * Enable the MIPS MDMX and DSP ASEs |
295 | */ | 295 | */ |
296 | #define ST0_MX 0x01000000 | 296 | #define ST0_MX 0x01000000 |
297 | 297 | ||
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 702a28fa7a34..d0af2a3b0152 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -70,7 +70,15 @@ extern unsigned long zero_page_mask; | |||
70 | #define ZERO_PAGE(vaddr) \ | 70 | #define ZERO_PAGE(vaddr) \ |
71 | (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) | 71 | (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) |
72 | 72 | ||
73 | #define __HAVE_ARCH_MULTIPLE_ZERO_PAGE | 73 | #define __HAVE_ARCH_MOVE_PTE |
74 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
75 | ({ \ | ||
76 | pte_t newpte = (pte); \ | ||
77 | if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ | ||
78 | pte_page(pte) == ZERO_PAGE(old_addr)) \ | ||
79 | newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ | ||
80 | newpte; \ | ||
81 | }) | ||
74 | 82 | ||
75 | extern void paging_init(void); | 83 | extern void paging_init(void); |
76 | 84 | ||
@@ -82,10 +90,11 @@ extern void paging_init(void); | |||
82 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) | 90 | #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) |
83 | #define pmd_page_kernel(pmd) pmd_val(pmd) | 91 | #define pmd_page_kernel(pmd) pmd_val(pmd) |
84 | 92 | ||
85 | #define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL)) | ||
86 | #define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) | ||
87 | |||
88 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) | 93 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) |
94 | |||
95 | #define pte_none(pte) (!(((pte).pte_low | (pte).pte_high) & ~_PAGE_GLOBAL)) | ||
96 | #define pte_present(pte) ((pte).pte_low & _PAGE_PRESENT) | ||
97 | |||
89 | static inline void set_pte(pte_t *ptep, pte_t pte) | 98 | static inline void set_pte(pte_t *ptep, pte_t pte) |
90 | { | 99 | { |
91 | ptep->pte_high = pte.pte_high; | 100 | ptep->pte_high = pte.pte_high; |
@@ -93,27 +102,35 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
93 | ptep->pte_low = pte.pte_low; | 102 | ptep->pte_low = pte.pte_low; |
94 | //printk("pte_high %x pte_low %x\n", ptep->pte_high, ptep->pte_low); | 103 | //printk("pte_high %x pte_low %x\n", ptep->pte_high, ptep->pte_low); |
95 | 104 | ||
96 | if (pte_val(pte) & _PAGE_GLOBAL) { | 105 | if (pte.pte_low & _PAGE_GLOBAL) { |
97 | pte_t *buddy = ptep_buddy(ptep); | 106 | pte_t *buddy = ptep_buddy(ptep); |
98 | /* | 107 | /* |
99 | * Make sure the buddy is global too (if it's !none, | 108 | * Make sure the buddy is global too (if it's !none, |
100 | * it better already be global) | 109 | * it better already be global) |
101 | */ | 110 | */ |
102 | if (pte_none(*buddy)) | 111 | if (pte_none(*buddy)) { |
103 | buddy->pte_low |= _PAGE_GLOBAL; | 112 | buddy->pte_low |= _PAGE_GLOBAL; |
113 | buddy->pte_high |= _PAGE_GLOBAL; | ||
114 | } | ||
104 | } | 115 | } |
105 | } | 116 | } |
106 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | 117 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) |
107 | 118 | ||
108 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 119 | static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
109 | { | 120 | { |
121 | pte_t null = __pte(0); | ||
122 | |||
110 | /* Preserve global status for the pair */ | 123 | /* Preserve global status for the pair */ |
111 | if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) | 124 | if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL) |
112 | set_pte_at(mm, addr, ptep, __pte(_PAGE_GLOBAL)); | 125 | null.pte_low = null.pte_high = _PAGE_GLOBAL; |
113 | else | 126 | |
114 | set_pte_at(mm, addr, ptep, __pte(0)); | 127 | set_pte_at(mm, addr, ptep, null); |
115 | } | 128 | } |
116 | #else | 129 | #else |
130 | |||
131 | #define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL)) | ||
132 | #define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) | ||
133 | |||
117 | /* | 134 | /* |
118 | * Certain architectures need to do special things when pte's | 135 | * Certain architectures need to do special things when pte's |
119 | * within a page table are directly modified. Thus, the following | 136 | * within a page table are directly modified. Thus, the following |
@@ -174,75 +191,76 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
174 | */ | 191 | */ |
175 | static inline int pte_user(pte_t pte) { BUG(); return 0; } | 192 | static inline int pte_user(pte_t pte) { BUG(); return 0; } |
176 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) | 193 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) |
177 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_READ; } | 194 | static inline int pte_read(pte_t pte) { return pte.pte_low & _PAGE_READ; } |
178 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_WRITE; } | 195 | static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; } |
179 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_MODIFIED; } | 196 | static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; } |
180 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } | 197 | static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; } |
181 | static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } | 198 | static inline int pte_file(pte_t pte) { return pte.pte_low & _PAGE_FILE; } |
199 | |||
182 | static inline pte_t pte_wrprotect(pte_t pte) | 200 | static inline pte_t pte_wrprotect(pte_t pte) |
183 | { | 201 | { |
184 | (pte).pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); | 202 | pte.pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); |
185 | (pte).pte_high &= ~_PAGE_SILENT_WRITE; | 203 | pte.pte_high &= ~_PAGE_SILENT_WRITE; |
186 | return pte; | 204 | return pte; |
187 | } | 205 | } |
188 | 206 | ||
189 | static inline pte_t pte_rdprotect(pte_t pte) | 207 | static inline pte_t pte_rdprotect(pte_t pte) |
190 | { | 208 | { |
191 | (pte).pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); | 209 | pte.pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); |
192 | (pte).pte_high &= ~_PAGE_SILENT_READ; | 210 | pte.pte_high &= ~_PAGE_SILENT_READ; |
193 | return pte; | 211 | return pte; |
194 | } | 212 | } |
195 | 213 | ||
196 | static inline pte_t pte_mkclean(pte_t pte) | 214 | static inline pte_t pte_mkclean(pte_t pte) |
197 | { | 215 | { |
198 | (pte).pte_low &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE); | 216 | pte.pte_low &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); |
199 | (pte).pte_high &= ~_PAGE_SILENT_WRITE; | 217 | pte.pte_high &= ~_PAGE_SILENT_WRITE; |
200 | return pte; | 218 | return pte; |
201 | } | 219 | } |
202 | 220 | ||
203 | static inline pte_t pte_mkold(pte_t pte) | 221 | static inline pte_t pte_mkold(pte_t pte) |
204 | { | 222 | { |
205 | (pte).pte_low &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ); | 223 | pte.pte_low &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ); |
206 | (pte).pte_high &= ~_PAGE_SILENT_READ; | 224 | pte.pte_high &= ~_PAGE_SILENT_READ; |
207 | return pte; | 225 | return pte; |
208 | } | 226 | } |
209 | 227 | ||
210 | static inline pte_t pte_mkwrite(pte_t pte) | 228 | static inline pte_t pte_mkwrite(pte_t pte) |
211 | { | 229 | { |
212 | (pte).pte_low |= _PAGE_WRITE; | 230 | pte.pte_low |= _PAGE_WRITE; |
213 | if ((pte).pte_low & _PAGE_MODIFIED) { | 231 | if (pte.pte_low & _PAGE_MODIFIED) { |
214 | (pte).pte_low |= _PAGE_SILENT_WRITE; | 232 | pte.pte_low |= _PAGE_SILENT_WRITE; |
215 | (pte).pte_high |= _PAGE_SILENT_WRITE; | 233 | pte.pte_high |= _PAGE_SILENT_WRITE; |
216 | } | 234 | } |
217 | return pte; | 235 | return pte; |
218 | } | 236 | } |
219 | 237 | ||
220 | static inline pte_t pte_mkread(pte_t pte) | 238 | static inline pte_t pte_mkread(pte_t pte) |
221 | { | 239 | { |
222 | (pte).pte_low |= _PAGE_READ; | 240 | pte.pte_low |= _PAGE_READ; |
223 | if ((pte).pte_low & _PAGE_ACCESSED) { | 241 | if (pte.pte_low & _PAGE_ACCESSED) { |
224 | (pte).pte_low |= _PAGE_SILENT_READ; | 242 | pte.pte_low |= _PAGE_SILENT_READ; |
225 | (pte).pte_high |= _PAGE_SILENT_READ; | 243 | pte.pte_high |= _PAGE_SILENT_READ; |
226 | } | 244 | } |
227 | return pte; | 245 | return pte; |
228 | } | 246 | } |
229 | 247 | ||
230 | static inline pte_t pte_mkdirty(pte_t pte) | 248 | static inline pte_t pte_mkdirty(pte_t pte) |
231 | { | 249 | { |
232 | (pte).pte_low |= _PAGE_MODIFIED; | 250 | pte.pte_low |= _PAGE_MODIFIED; |
233 | if ((pte).pte_low & _PAGE_WRITE) { | 251 | if (pte.pte_low & _PAGE_WRITE) { |
234 | (pte).pte_low |= _PAGE_SILENT_WRITE; | 252 | pte.pte_low |= _PAGE_SILENT_WRITE; |
235 | (pte).pte_high |= _PAGE_SILENT_WRITE; | 253 | pte.pte_high |= _PAGE_SILENT_WRITE; |
236 | } | 254 | } |
237 | return pte; | 255 | return pte; |
238 | } | 256 | } |
239 | 257 | ||
240 | static inline pte_t pte_mkyoung(pte_t pte) | 258 | static inline pte_t pte_mkyoung(pte_t pte) |
241 | { | 259 | { |
242 | (pte).pte_low |= _PAGE_ACCESSED; | 260 | pte.pte_low |= _PAGE_ACCESSED; |
243 | if ((pte).pte_low & _PAGE_READ) | 261 | if (pte.pte_low & _PAGE_READ) |
244 | (pte).pte_low |= _PAGE_SILENT_READ; | 262 | pte.pte_low |= _PAGE_SILENT_READ; |
245 | (pte).pte_high |= _PAGE_SILENT_READ; | 263 | pte.pte_high |= _PAGE_SILENT_READ; |
246 | return pte; | 264 | return pte; |
247 | } | 265 | } |
248 | #else | 266 | #else |
@@ -335,8 +353,9 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot) | |||
335 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) | 353 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) |
336 | 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) |
337 | { | 355 | { |
338 | pte.pte_low &= _PAGE_CHG_MASK; | 356 | pte.pte_low &= _PAGE_CHG_MASK; |
339 | pte.pte_low |= pgprot_val(newprot); | 357 | pte.pte_high &= ~0x3f; |
358 | pte.pte_low |= pgprot_val(newprot); | ||
340 | pte.pte_high |= pgprot_val(newprot) & 0x3f; | 359 | pte.pte_high |= pgprot_val(newprot) & 0x3f; |
341 | return pte; | 360 | return pte; |
342 | } | 361 | } |
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index 8edabb0be23f..cefa657dd04a 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h | |||
@@ -55,8 +55,14 @@ struct sigcontext { | |||
55 | struct sigcontext { | 55 | struct sigcontext { |
56 | unsigned long sc_regs[32]; | 56 | unsigned long sc_regs[32]; |
57 | unsigned long sc_fpregs[32]; | 57 | unsigned long sc_fpregs[32]; |
58 | unsigned long sc_hi[4]; | 58 | unsigned long sc_mdhi; |
59 | unsigned long sc_lo[4]; | 59 | unsigned long sc_hi1; |
60 | unsigned long sc_hi2; | ||
61 | unsigned long sc_hi3; | ||
62 | unsigned long sc_mdlo; | ||
63 | unsigned long sc_lo1; | ||
64 | unsigned long sc_lo2; | ||
65 | unsigned long sc_lo3; | ||
60 | unsigned long sc_pc; | 66 | unsigned long sc_pc; |
61 | unsigned int sc_fpc_csr; | 67 | unsigned int sc_fpc_csr; |
62 | unsigned int sc_used_math; | 68 | unsigned int sc_used_math; |
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-powerpc/termbits.h b/include/asm-powerpc/termbits.h index ebf6055481dc..6d533b07aaf5 100644 --- a/include/asm-powerpc/termbits.h +++ b/include/asm-powerpc/termbits.h | |||
@@ -153,6 +153,7 @@ struct termios { | |||
153 | #define HUPCL 00040000 | 153 | #define HUPCL 00040000 |
154 | 154 | ||
155 | #define CLOCAL 00100000 | 155 | #define CLOCAL 00100000 |
156 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
156 | #define CRTSCTS 020000000000 /* flow control */ | 157 | #define CRTSCTS 020000000000 /* flow control */ |
157 | 158 | ||
158 | /* c_lflag bits */ | 159 | /* c_lflag bits */ |
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-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index c44e7466534e..cd464f469a2c 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -689,6 +689,23 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p | |||
689 | #define pte_clear(mm,addr,ptep) \ | 689 | #define pte_clear(mm,addr,ptep) \ |
690 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) | 690 | set_pte_at((mm), (addr), (ptep), __pte(0UL)) |
691 | 691 | ||
692 | #ifdef DCACHE_ALIASING_POSSIBLE | ||
693 | #define __HAVE_ARCH_MOVE_PTE | ||
694 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
695 | ({ \ | ||
696 | pte_t newpte = (pte); \ | ||
697 | if (tlb_type != hypervisor && pte_present(pte)) { \ | ||
698 | unsigned long this_pfn = pte_pfn(pte); \ | ||
699 | \ | ||
700 | if (pfn_valid(this_pfn) && \ | ||
701 | (((old_addr) ^ (new_addr)) & (1 << 13))) \ | ||
702 | flush_dcache_page_all(current->mm, \ | ||
703 | pfn_to_page(this_pfn)); \ | ||
704 | } \ | ||
705 | newpte; \ | ||
706 | }) | ||
707 | #endif | ||
708 | |||
692 | extern pgd_t swapper_pg_dir[2048]; | 709 | extern pgd_t swapper_pg_dir[2048]; |
693 | extern pmd_t swapper_low_pmd_dir[2048]; | 710 | extern pmd_t swapper_low_pmd_dir[2048]; |
694 | 711 | ||
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/asm-x86_64/elf.h b/include/asm-x86_64/elf.h index c98633af07d2..b4f8f4a41a6e 100644 --- a/include/asm-x86_64/elf.h +++ b/include/asm-x86_64/elf.h | |||
@@ -159,7 +159,7 @@ extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *); | |||
159 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) | 159 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) |
160 | 160 | ||
161 | /* 1GB for 64bit, 8MB for 32bit */ | 161 | /* 1GB for 64bit, 8MB for 32bit */ |
162 | #define STACK_RND_MASK (is_compat_task() ? 0x7ff : 0x3fffff) | 162 | #define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff) |
163 | 163 | ||
164 | #endif | 164 | #endif |
165 | 165 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 50e338d2ffda..ce1a756c4c30 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -345,6 +345,8 @@ struct input_absinfo { | |||
345 | #define KEY_SAVE 234 | 345 | #define KEY_SAVE 234 |
346 | #define KEY_DOCUMENTS 235 | 346 | #define KEY_DOCUMENTS 235 |
347 | 347 | ||
348 | #define KEY_BATTERY 236 | ||
349 | |||
348 | #define KEY_UNKNOWN 240 | 350 | #define KEY_UNKNOWN 240 |
349 | 351 | ||
350 | #define BTN_MISC 0x100 | 352 | #define BTN_MISC 0x100 |
@@ -577,14 +579,9 @@ struct input_absinfo { | |||
577 | * Switch events | 579 | * Switch events |
578 | */ | 580 | */ |
579 | 581 | ||
580 | #define SW_0 0x00 | 582 | #define SW_LID 0x00 /* set = lid shut */ |
581 | #define SW_1 0x01 | 583 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
582 | #define SW_2 0x02 | 584 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
583 | #define SW_3 0x03 | ||
584 | #define SW_4 0x04 | ||
585 | #define SW_5 0x05 | ||
586 | #define SW_6 0x06 | ||
587 | #define SW_7 0x07 | ||
588 | #define SW_MAX 0x0f | 585 | #define SW_MAX 0x0f |
589 | 586 | ||
590 | /* | 587 | /* |
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/include/linux/pci_ids.h b/include/linux/pci_ids.h index d6fe048376ab..590dc6dca315 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1231,6 +1231,7 @@ | |||
1231 | #define PCI_DEVICE_ID_VIA_8380_0 0x0204 | 1231 | #define PCI_DEVICE_ID_VIA_8380_0 0x0204 |
1232 | #define PCI_DEVICE_ID_VIA_3238_0 0x0238 | 1232 | #define PCI_DEVICE_ID_VIA_3238_0 0x0238 |
1233 | #define PCI_DEVICE_ID_VIA_PT880 0x0258 | 1233 | #define PCI_DEVICE_ID_VIA_PT880 0x0258 |
1234 | #define PCI_DEVICE_ID_VIA_PT880ULTRA 0x0308 | ||
1234 | #define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259 | 1235 | #define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259 |
1235 | #define PCI_DEVICE_ID_VIA_3269_0 0x0269 | 1236 | #define PCI_DEVICE_ID_VIA_3269_0 0x0269 |
1236 | #define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282 | 1237 | #define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282 |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 530ae3f4248c..fab5aed8ca31 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -73,11 +73,6 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | |||
73 | int vt_waitactive(int vt); | 73 | int vt_waitactive(int vt); |
74 | void change_console(struct vc_data *new_vc); | 74 | void change_console(struct vc_data *new_vc); |
75 | void reset_vc(struct vc_data *vc); | 75 | void reset_vc(struct vc_data *vc); |
76 | #ifdef CONFIG_VT | ||
77 | int is_console_suspend_safe(void); | ||
78 | #else | ||
79 | static inline int is_console_suspend_safe(void) { return 1; } | ||
80 | #endif | ||
81 | 76 | ||
82 | /* | 77 | /* |
83 | * vc_screen.c shares this temporary buffer with the console write code so that | 78 | * vc_screen.c shares this temporary buffer with the console write code so that |
diff --git a/include/net/compat.h b/include/net/compat.h index 8662b8f43df5..e65cbedb6abc 100644 --- a/include/net/compat.h +++ b/include/net/compat.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | 5 | ||
6 | struct sock; | ||
7 | |||
6 | #if defined(CONFIG_COMPAT) | 8 | #if defined(CONFIG_COMPAT) |
7 | 9 | ||
8 | #include <linux/compat.h> | 10 | #include <linux/compat.h> |
@@ -23,7 +25,6 @@ struct compat_cmsghdr { | |||
23 | compat_int_t cmsg_type; | 25 | compat_int_t cmsg_type; |
24 | }; | 26 | }; |
25 | 27 | ||
26 | struct sock; | ||
27 | extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); | 28 | extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); |
28 | 29 | ||
29 | #else /* defined(CONFIG_COMPAT) */ | 30 | #else /* defined(CONFIG_COMPAT) */ |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index b7f0388bd71c..01fa2ae98a85 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -456,6 +456,7 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode) | |||
456 | 456 | ||
457 | return ret; | 457 | return ret; |
458 | } | 458 | } |
459 | EXPORT_SYMBOL_GPL(hrtimer_start); | ||
459 | 460 | ||
460 | /** | 461 | /** |
461 | * hrtimer_try_to_cancel - try to deactivate a timer | 462 | * hrtimer_try_to_cancel - try to deactivate a timer |
@@ -484,6 +485,7 @@ int hrtimer_try_to_cancel(struct hrtimer *timer) | |||
484 | return ret; | 485 | return ret; |
485 | 486 | ||
486 | } | 487 | } |
488 | EXPORT_SYMBOL_GPL(hrtimer_try_to_cancel); | ||
487 | 489 | ||
488 | /** | 490 | /** |
489 | * hrtimer_cancel - cancel a timer and wait for the handler to finish. | 491 | * hrtimer_cancel - cancel a timer and wait for the handler to finish. |
@@ -504,6 +506,7 @@ int hrtimer_cancel(struct hrtimer *timer) | |||
504 | cpu_relax(); | 506 | cpu_relax(); |
505 | } | 507 | } |
506 | } | 508 | } |
509 | EXPORT_SYMBOL_GPL(hrtimer_cancel); | ||
507 | 510 | ||
508 | /** | 511 | /** |
509 | * hrtimer_get_remaining - get remaining time for the timer | 512 | * hrtimer_get_remaining - get remaining time for the timer |
@@ -522,6 +525,7 @@ ktime_t hrtimer_get_remaining(const struct hrtimer *timer) | |||
522 | 525 | ||
523 | return rem; | 526 | return rem; |
524 | } | 527 | } |
528 | EXPORT_SYMBOL_GPL(hrtimer_get_remaining); | ||
525 | 529 | ||
526 | #ifdef CONFIG_NO_IDLE_HZ | 530 | #ifdef CONFIG_NO_IDLE_HZ |
527 | /** | 531 | /** |
@@ -580,6 +584,7 @@ void hrtimer_init(struct hrtimer *timer, clockid_t clock_id, | |||
580 | timer->base = &bases[clock_id]; | 584 | timer->base = &bases[clock_id]; |
581 | timer->node.rb_parent = HRTIMER_INACTIVE; | 585 | timer->node.rb_parent = HRTIMER_INACTIVE; |
582 | } | 586 | } |
587 | EXPORT_SYMBOL_GPL(hrtimer_init); | ||
583 | 588 | ||
584 | /** | 589 | /** |
585 | * hrtimer_get_res - get the timer resolution for a clock | 590 | * hrtimer_get_res - get the timer resolution for a clock |
@@ -599,6 +604,7 @@ int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp) | |||
599 | 604 | ||
600 | return 0; | 605 | return 0; |
601 | } | 606 | } |
607 | EXPORT_SYMBOL_GPL(hrtimer_get_res); | ||
602 | 608 | ||
603 | /* | 609 | /* |
604 | * Expire the per base hrtimer-queue: | 610 | * Expire the per base hrtimer-queue: |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1ae2b2cc3a54..70df5c0d957e 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -91,8 +91,8 @@ static void grow_zone_span(struct zone *zone, | |||
91 | if (start_pfn < zone->zone_start_pfn) | 91 | if (start_pfn < zone->zone_start_pfn) |
92 | zone->zone_start_pfn = start_pfn; | 92 | zone->zone_start_pfn = start_pfn; |
93 | 93 | ||
94 | if (end_pfn > old_zone_end_pfn) | 94 | zone->spanned_pages = max(old_zone_end_pfn, end_pfn) - |
95 | zone->spanned_pages = end_pfn - zone->zone_start_pfn; | 95 | zone->zone_start_pfn; |
96 | 96 | ||
97 | zone_span_writeunlock(zone); | 97 | zone_span_writeunlock(zone); |
98 | } | 98 | } |
@@ -106,8 +106,8 @@ static void grow_pgdat_span(struct pglist_data *pgdat, | |||
106 | if (start_pfn < pgdat->node_start_pfn) | 106 | if (start_pfn < pgdat->node_start_pfn) |
107 | pgdat->node_start_pfn = start_pfn; | 107 | pgdat->node_start_pfn = start_pfn; |
108 | 108 | ||
109 | if (end_pfn > old_pgdat_end_pfn) | 109 | pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) - |
110 | pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn; | 110 | pgdat->node_start_pfn; |
111 | } | 111 | } |
112 | 112 | ||
113 | int online_pages(unsigned long pfn, unsigned long nr_pages) | 113 | int online_pages(unsigned long pfn, unsigned long nr_pages) |
@@ -207,11 +207,6 @@ typedef unsigned int kmem_bufctl_t; | |||
207 | #define BUFCTL_ACTIVE (((kmem_bufctl_t)(~0U))-2) | 207 | #define BUFCTL_ACTIVE (((kmem_bufctl_t)(~0U))-2) |
208 | #define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-3) | 208 | #define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-3) |
209 | 209 | ||
210 | /* Max number of objs-per-slab for caches which use off-slab slabs. | ||
211 | * Needed to avoid a possible looping condition in cache_grow(). | ||
212 | */ | ||
213 | static unsigned long offslab_limit; | ||
214 | |||
215 | /* | 210 | /* |
216 | * struct slab | 211 | * struct slab |
217 | * | 212 | * |
@@ -1356,12 +1351,6 @@ void __init kmem_cache_init(void) | |||
1356 | NULL, NULL); | 1351 | NULL, NULL); |
1357 | } | 1352 | } |
1358 | 1353 | ||
1359 | /* Inc off-slab bufctl limit until the ceiling is hit. */ | ||
1360 | if (!(OFF_SLAB(sizes->cs_cachep))) { | ||
1361 | offslab_limit = sizes->cs_size - sizeof(struct slab); | ||
1362 | offslab_limit /= sizeof(kmem_bufctl_t); | ||
1363 | } | ||
1364 | |||
1365 | sizes->cs_dmacachep = kmem_cache_create(names->name_dma, | 1354 | sizes->cs_dmacachep = kmem_cache_create(names->name_dma, |
1366 | sizes->cs_size, | 1355 | sizes->cs_size, |
1367 | ARCH_KMALLOC_MINALIGN, | 1356 | ARCH_KMALLOC_MINALIGN, |
@@ -1780,6 +1769,7 @@ static void set_up_list3s(struct kmem_cache *cachep, int index) | |||
1780 | static size_t calculate_slab_order(struct kmem_cache *cachep, | 1769 | static size_t calculate_slab_order(struct kmem_cache *cachep, |
1781 | size_t size, size_t align, unsigned long flags) | 1770 | size_t size, size_t align, unsigned long flags) |
1782 | { | 1771 | { |
1772 | unsigned long offslab_limit; | ||
1783 | size_t left_over = 0; | 1773 | size_t left_over = 0; |
1784 | int gfporder; | 1774 | int gfporder; |
1785 | 1775 | ||
@@ -1791,9 +1781,18 @@ static size_t calculate_slab_order(struct kmem_cache *cachep, | |||
1791 | if (!num) | 1781 | if (!num) |
1792 | continue; | 1782 | continue; |
1793 | 1783 | ||
1794 | /* More than offslab_limit objects will cause problems */ | 1784 | if (flags & CFLGS_OFF_SLAB) { |
1795 | if ((flags & CFLGS_OFF_SLAB) && num > offslab_limit) | 1785 | /* |
1796 | break; | 1786 | * Max number of objs-per-slab for caches which |
1787 | * use off-slab slabs. Needed to avoid a possible | ||
1788 | * looping condition in cache_grow(). | ||
1789 | */ | ||
1790 | offslab_limit = size - sizeof(struct slab); | ||
1791 | offslab_limit /= sizeof(kmem_bufctl_t); | ||
1792 | |||
1793 | if (num > offslab_limit) | ||
1794 | break; | ||
1795 | } | ||
1797 | 1796 | ||
1798 | /* Found something acceptable - save it away */ | 1797 | /* Found something acceptable - save it away */ |
1799 | cachep->num = num; | 1798 | cachep->num = num; |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index ad1c7af65ec8..f5d47bf4f967 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -300,25 +300,20 @@ int br_add_bridge(const char *name) | |||
300 | rtnl_lock(); | 300 | rtnl_lock(); |
301 | if (strchr(dev->name, '%')) { | 301 | if (strchr(dev->name, '%')) { |
302 | ret = dev_alloc_name(dev, dev->name); | 302 | ret = dev_alloc_name(dev, dev->name); |
303 | if (ret < 0) | 303 | if (ret < 0) { |
304 | goto err1; | 304 | free_netdev(dev); |
305 | goto out; | ||
306 | } | ||
305 | } | 307 | } |
306 | 308 | ||
307 | ret = register_netdevice(dev); | 309 | ret = register_netdevice(dev); |
308 | if (ret) | 310 | if (ret) |
309 | goto err2; | 311 | goto out; |
310 | 312 | ||
311 | ret = br_sysfs_addbr(dev); | 313 | ret = br_sysfs_addbr(dev); |
312 | if (ret) | 314 | if (ret) |
313 | goto err3; | 315 | unregister_netdevice(dev); |
314 | rtnl_unlock(); | 316 | out: |
315 | return 0; | ||
316 | |||
317 | err3: | ||
318 | unregister_netdev(dev); | ||
319 | err2: | ||
320 | free_netdev(dev); | ||
321 | err1: | ||
322 | rtnl_unlock(); | 317 | rtnl_unlock(); |
323 | return ret; | 318 | return ret; |
324 | } | 319 | } |
diff --git a/net/core/dev.c b/net/core/dev.c index 2dce673a039b..4fba549caf29 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -127,7 +127,7 @@ | |||
127 | * sure which should go first, but I bet it won't make much | 127 | * sure which should go first, but I bet it won't make much |
128 | * difference if we are running VLANs. The good news is that | 128 | * difference if we are running VLANs. The good news is that |
129 | * this protocol won't be in the list unless compiled in, so | 129 | * this protocol won't be in the list unless compiled in, so |
130 | * the average user (w/out VLANs) will not be adversly affected. | 130 | * the average user (w/out VLANs) will not be adversely affected. |
131 | * --BLG | 131 | * --BLG |
132 | * | 132 | * |
133 | * 0800 IP | 133 | * 0800 IP |
@@ -149,7 +149,7 @@ static struct list_head ptype_base[16]; /* 16 way hashed list */ | |||
149 | static struct list_head ptype_all; /* Taps */ | 149 | static struct list_head ptype_all; /* Taps */ |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * The @dev_base list is protected by @dev_base_lock and the rtln | 152 | * The @dev_base list is protected by @dev_base_lock and the rtnl |
153 | * semaphore. | 153 | * semaphore. |
154 | * | 154 | * |
155 | * Pure readers hold dev_base_lock for reading. | 155 | * Pure readers hold dev_base_lock for reading. |
@@ -641,10 +641,12 @@ int dev_valid_name(const char *name) | |||
641 | * @name: name format string | 641 | * @name: name format string |
642 | * | 642 | * |
643 | * Passed a format string - eg "lt%d" it will try and find a suitable | 643 | * Passed a format string - eg "lt%d" it will try and find a suitable |
644 | * id. Not efficient for many devices, not called a lot. The caller | 644 | * id. It scans list of devices to build up a free map, then chooses |
645 | * must hold the dev_base or rtnl lock while allocating the name and | 645 | * the first empty slot. The caller must hold the dev_base or rtnl lock |
646 | * adding the device in order to avoid duplicates. Returns the number | 646 | * while allocating the name and adding the device in order to avoid |
647 | * of the unit assigned or a negative errno code. | 647 | * duplicates. |
648 | * Limited to bits_per_byte * page size devices (ie 32K on most platforms). | ||
649 | * Returns the number of the unit assigned or a negative errno code. | ||
648 | */ | 650 | */ |
649 | 651 | ||
650 | int dev_alloc_name(struct net_device *dev, const char *name) | 652 | int dev_alloc_name(struct net_device *dev, const char *name) |
@@ -744,7 +746,7 @@ int dev_change_name(struct net_device *dev, char *newname) | |||
744 | } | 746 | } |
745 | 747 | ||
746 | /** | 748 | /** |
747 | * netdev_features_change - device changes fatures | 749 | * netdev_features_change - device changes features |
748 | * @dev: device to cause notification | 750 | * @dev: device to cause notification |
749 | * | 751 | * |
750 | * Called to indicate a device has changed features. | 752 | * Called to indicate a device has changed features. |
@@ -2196,7 +2198,7 @@ int netdev_set_master(struct net_device *slave, struct net_device *master) | |||
2196 | * @dev: device | 2198 | * @dev: device |
2197 | * @inc: modifier | 2199 | * @inc: modifier |
2198 | * | 2200 | * |
2199 | * Add or remove promsicuity from a device. While the count in the device | 2201 | * Add or remove promiscuity from a device. While the count in the device |
2200 | * remains above zero the interface remains promiscuous. Once it hits zero | 2202 | * remains above zero the interface remains promiscuous. Once it hits zero |
2201 | * the device reverts back to normal filtering operation. A negative inc | 2203 | * the device reverts back to normal filtering operation. A negative inc |
2202 | * value is used to drop promiscuity on the device. | 2204 | * value is used to drop promiscuity on the device. |
@@ -3122,7 +3124,7 @@ EXPORT_SYMBOL(alloc_netdev); | |||
3122 | void free_netdev(struct net_device *dev) | 3124 | void free_netdev(struct net_device *dev) |
3123 | { | 3125 | { |
3124 | #ifdef CONFIG_SYSFS | 3126 | #ifdef CONFIG_SYSFS |
3125 | /* Compatiablity with error handling in drivers */ | 3127 | /* Compatibility with error handling in drivers */ |
3126 | if (dev->reg_state == NETREG_UNINITIALIZED) { | 3128 | if (dev->reg_state == NETREG_UNINITIALIZED) { |
3127 | kfree((char *)dev - dev->padded); | 3129 | kfree((char *)dev - dev->padded); |
3128 | return; | 3130 | return; |
diff --git a/net/ethernet/Makefile b/net/ethernet/Makefile index 69b74a9a0fc3..7cef1d8ace27 100644 --- a/net/ethernet/Makefile +++ b/net/ethernet/Makefile | |||
@@ -3,6 +3,5 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += eth.o | 5 | obj-y += eth.o |
6 | obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o | ||
7 | obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o | 6 | obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o |
8 | obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o | 7 | obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o |
diff --git a/net/ethernet/sysctl_net_ether.c b/net/ethernet/sysctl_net_ether.c deleted file mode 100644 index 66b39fc342d2..000000000000 --- a/net/ethernet/sysctl_net_ether.c +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* -*- linux-c -*- | ||
2 | * sysctl_net_ether.c: sysctl interface to net Ethernet subsystem. | ||
3 | * | ||
4 | * Begun April 1, 1996, Mike Shaver. | ||
5 | * Added /proc/sys/net/ether directory entry (empty =) ). [MS] | ||
6 | */ | ||
7 | |||
8 | #include <linux/mm.h> | ||
9 | #include <linux/sysctl.h> | ||
10 | #include <linux/if_ether.h> | ||
11 | |||
12 | ctl_table ether_table[] = { | ||
13 | {0} | ||
14 | }; | ||
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 3d560dec63ab..d4072533da21 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig | |||
@@ -170,8 +170,8 @@ config IP_NF_PPTP | |||
170 | Documentation/modules.txt. If unsure, say `N'. | 170 | Documentation/modules.txt. If unsure, say `N'. |
171 | 171 | ||
172 | config IP_NF_H323 | 172 | config IP_NF_H323 |
173 | tristate 'H.323 protocol support' | 173 | tristate 'H.323 protocol support (EXPERIMENTAL)' |
174 | depends on IP_NF_CONNTRACK | 174 | depends on IP_NF_CONNTRACK && EXPERIMENTAL |
175 | help | 175 | help |
176 | H.323 is a VoIP signalling protocol from ITU-T. As one of the most | 176 | H.323 is a VoIP signalling protocol from ITU-T. As one of the most |
177 | important VoIP protocols, it is widely used by voice hardware and | 177 | important VoIP protocols, it is widely used by voice hardware and |
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 979a2eac6f00..a297da7bbef5 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -1318,6 +1318,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len) | |||
1318 | .tuple.dst.u.tcp.port; | 1318 | .tuple.dst.u.tcp.port; |
1319 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] | 1319 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] |
1320 | .tuple.dst.ip; | 1320 | .tuple.dst.ip; |
1321 | memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); | ||
1321 | 1322 | ||
1322 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", | 1323 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", |
1323 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); | 1324 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c index 7d3ba4302e9e..8ccfe17bb253 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c | |||
@@ -469,8 +469,8 @@ pptp_inbound_pkt(struct sk_buff **pskb, | |||
469 | DEBUGP("%s but no session\n", pptp_msg_name[msg]); | 469 | DEBUGP("%s but no session\n", pptp_msg_name[msg]); |
470 | break; | 470 | break; |
471 | } | 471 | } |
472 | if (info->sstate != PPTP_CALL_IN_REP | 472 | if (info->cstate != PPTP_CALL_IN_REP |
473 | && info->sstate != PPTP_CALL_IN_CONF) { | 473 | && info->cstate != PPTP_CALL_IN_CONF) { |
474 | DEBUGP("%s but never sent IN_CALL_REPLY\n", | 474 | DEBUGP("%s but never sent IN_CALL_REPLY\n", |
475 | pptp_msg_name[msg]); | 475 | pptp_msg_name[msg]); |
476 | break; | 476 | break; |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 5bc9f64d7b5b..77d974443c7b 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -348,6 +348,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len) | |||
348 | .tuple.dst.u.tcp.port; | 348 | .tuple.dst.u.tcp.port; |
349 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] | 349 | sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] |
350 | .tuple.dst.u3.ip; | 350 | .tuple.dst.u3.ip; |
351 | memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); | ||
351 | 352 | ||
352 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", | 353 | DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", |
353 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); | 354 | NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); |
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index b72fa55dfb84..ba7c63ca5bb1 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c | |||
@@ -135,7 +135,8 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, | |||
135 | 135 | ||
136 | /* Do additive increase */ | 136 | /* Do additive increase */ |
137 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) { | 137 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) { |
138 | tp->snd_cwnd_cnt += ca->ai; | 138 | /* cwnd = cwnd + a(w) / cwnd */ |
139 | tp->snd_cwnd_cnt += ca->ai + 1; | ||
139 | if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { | 140 | if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { |
140 | tp->snd_cwnd_cnt -= tp->snd_cwnd; | 141 | tp->snd_cwnd_cnt -= tp->snd_cwnd; |
141 | tp->snd_cwnd++; | 142 | tp->snd_cwnd++; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 743016baa048..f33c9dddaa12 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -642,7 +642,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss | |||
642 | * eventually). The difference is that pulled data not copied, but | 642 | * eventually). The difference is that pulled data not copied, but |
643 | * immediately discarded. | 643 | * immediately discarded. |
644 | */ | 644 | */ |
645 | static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len) | 645 | static void __pskb_trim_head(struct sk_buff *skb, int len) |
646 | { | 646 | { |
647 | int i, k, eat; | 647 | int i, k, eat; |
648 | 648 | ||
@@ -667,7 +667,6 @@ static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len) | |||
667 | skb->tail = skb->data; | 667 | skb->tail = skb->data; |
668 | skb->data_len -= len; | 668 | skb->data_len -= len; |
669 | skb->len = skb->data_len; | 669 | skb->len = skb->data_len; |
670 | return skb->tail; | ||
671 | } | 670 | } |
672 | 671 | ||
673 | int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) | 672 | int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) |
@@ -676,12 +675,11 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) | |||
676 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) | 675 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) |
677 | return -ENOMEM; | 676 | return -ENOMEM; |
678 | 677 | ||
679 | if (len <= skb_headlen(skb)) { | 678 | /* If len == headlen, we avoid __skb_pull to preserve alignment. */ |
679 | if (unlikely(len < skb_headlen(skb))) | ||
680 | __skb_pull(skb, len); | 680 | __skb_pull(skb, len); |
681 | } else { | 681 | else |
682 | if (__pskb_trim_head(skb, len-skb_headlen(skb)) == NULL) | 682 | __pskb_trim_head(skb, len - skb_headlen(skb)); |
683 | return -ENOMEM; | ||
684 | } | ||
685 | 683 | ||
686 | TCP_SKB_CB(skb)->seq += len; | 684 | TCP_SKB_CB(skb)->seq += len; |
687 | skb->ip_summed = CHECKSUM_HW; | 685 | skb->ip_summed = CHECKSUM_HW; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0190e39096b9..8a777932786d 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -280,10 +280,13 @@ static int inline rt6_check_neigh(struct rt6_info *rt) | |||
280 | { | 280 | { |
281 | struct neighbour *neigh = rt->rt6i_nexthop; | 281 | struct neighbour *neigh = rt->rt6i_nexthop; |
282 | int m = 0; | 282 | int m = 0; |
283 | if (neigh) { | 283 | if (rt->rt6i_flags & RTF_NONEXTHOP || |
284 | !(rt->rt6i_flags & RTF_GATEWAY)) | ||
285 | m = 1; | ||
286 | else if (neigh) { | ||
284 | read_lock_bh(&neigh->lock); | 287 | read_lock_bh(&neigh->lock); |
285 | if (neigh->nud_state & NUD_VALID) | 288 | if (neigh->nud_state & NUD_VALID) |
286 | m = 1; | 289 | m = 2; |
287 | read_unlock_bh(&neigh->lock); | 290 | read_unlock_bh(&neigh->lock); |
288 | } | 291 | } |
289 | return m; | 292 | return m; |
@@ -292,15 +295,18 @@ static int inline rt6_check_neigh(struct rt6_info *rt) | |||
292 | static int rt6_score_route(struct rt6_info *rt, int oif, | 295 | static int rt6_score_route(struct rt6_info *rt, int oif, |
293 | int strict) | 296 | int strict) |
294 | { | 297 | { |
295 | int m = rt6_check_dev(rt, oif); | 298 | int m, n; |
299 | |||
300 | m = rt6_check_dev(rt, oif); | ||
296 | if (!m && (strict & RT6_SELECT_F_IFACE)) | 301 | if (!m && (strict & RT6_SELECT_F_IFACE)) |
297 | return -1; | 302 | return -1; |
298 | #ifdef CONFIG_IPV6_ROUTER_PREF | 303 | #ifdef CONFIG_IPV6_ROUTER_PREF |
299 | m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2; | 304 | m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2; |
300 | #endif | 305 | #endif |
301 | if (rt6_check_neigh(rt)) | 306 | n = rt6_check_neigh(rt); |
307 | if (n > 1) | ||
302 | m |= 16; | 308 | m |= 16; |
303 | else if (strict & RT6_SELECT_F_REACHABLE) | 309 | else if (!n && strict & RT6_SELECT_F_REACHABLE) |
304 | return -1; | 310 | return -1; |
305 | return m; | 311 | return m; |
306 | } | 312 | } |
diff --git a/net/irda/irlap.c b/net/irda/irlap.c index 7029618f5719..a16528657b4c 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c | |||
@@ -884,7 +884,8 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now) | |||
884 | if (now) { | 884 | if (now) { |
885 | /* Send down empty frame to trigger speed change */ | 885 | /* Send down empty frame to trigger speed change */ |
886 | skb = dev_alloc_skb(0); | 886 | skb = dev_alloc_skb(0); |
887 | irlap_queue_xmit(self, skb); | 887 | if (skb) |
888 | irlap_queue_xmit(self, skb); | ||
888 | } | 889 | } |
889 | } | 890 | } |
890 | 891 | ||
diff --git a/net/sysctl_net.c b/net/sysctl_net.c index 55538f6b60ff..58a1b6b42ddd 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c | |||
@@ -37,14 +37,6 @@ struct ctl_table net_table[] = { | |||
37 | .mode = 0555, | 37 | .mode = 0555, |
38 | .child = core_table, | 38 | .child = core_table, |
39 | }, | 39 | }, |
40 | #ifdef CONFIG_NET | ||
41 | { | ||
42 | .ctl_name = NET_ETHER, | ||
43 | .procname = "ethernet", | ||
44 | .mode = 0555, | ||
45 | .child = ether_table, | ||
46 | }, | ||
47 | #endif | ||
48 | #ifdef CONFIG_INET | 40 | #ifdef CONFIG_INET |
49 | { | 41 | { |
50 | .ctl_name = NET_IPV4, | 42 | .ctl_name = NET_IPV4, |
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 |