···214214 The interaction of the iflag bits is as follows (parity error215215 given as an example):216216 Parity error INPCK IGNPAR217217- None n/a n/a character received218218- Yes n/a 0 character discarded219219- Yes 0 1 character received, marked as217217+ n/a 0 n/a character received, marked as220218 TTY_NORMAL221221- Yes 1 1 character received, marked as219219+ None 1 n/a character received, marked as220220+ TTY_NORMAL221221+ Yes 1 0 character received, marked as222222 TTY_PARITY223223+ Yes 1 1 character discarded223224224225 Other flags may be used (eg, xon/xoff characters) if your225226 hardware supports hardware "soft" flow control.
+25-2
MAINTAINERS
···565565P: Arnd Bergmann566566M: arnd@arndb.de567567L: linuxppc-dev@ozlabs.org568568-W: http://linuxppc64.org568568+W: http://www.penguinppc.org/ppc64/569569+S: Supported570570+571571+BROADCOM BNX2 GIGABIT ETHERNET DRIVER572572+P: Michael Chan573573+M: mchan@broadcom.com574574+L: netdev@vger.kernel.org575575+S: Supported576576+577577+BROADCOM TG3 GIGABIT ETHERNET DRIVER578578+P: Michael Chan579579+M: mchan@broadcom.com580580+L: netdev@vger.kernel.org569581S: Supported570582571583BTTV VIDEO4LINUX DRIVER···17461734P: Anton Blanchard17471735M: anton@samba.org17481736M: anton@au.ibm.com17491749-W: http://linuxppc64.org17371737+W: http://www.penguinppc.org/ppc64/17501738L: linuxppc-dev@ozlabs.org17511739S: Supported17521740···19071895W: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html19081896S: Maintained1909189718981898+MULTIMEDIA CARD SUBSYSTEM18991899+P: Russell King19001900+M: rmk+mmc@arm.linux.org.uk19011901+S: Maintained19021902+19101903MULTISOUND SOUND DRIVER19111904P: Andrew Veliath19121905M: andrewtv@usa.net···19321915P: James E.J. Bottomley19331916M: James.Bottomley@HansenPartnership.com19341917L: linux-scsi@vger.kernel.org19181918+S: Maintained19191919+19201920+NETEM NETWORK EMULATOR19211921+P: Stephen Hemminger19221922+M: shemminger@osdl.org19231923+L: netem@osdl.org19351924S: Maintained1936192519371926NETFILTER/IPTABLES/IPCHAINS
+2-2
Makefile
···11VERSION = 222PATCHLEVEL = 633SUBLEVEL = 1744-EXTRAVERSION =-rc555-NAME=Lordi Rules44+EXTRAVERSION =-rc655+NAME=Crazed Snow-Weasel6677# *DOCUMENTATION*88# To see a list of typical targets execute "make help"
···9494 if (cpuid != boot_cpuid) {9595 flags |= 0x00040000UL; /* "remain halted" */9696 *pflags = flags;9797- clear_bit(cpuid, &cpu_present_mask);9797+ cpu_clear(cpuid, cpu_present_map);9898 halt();9999 }100100#endif···120120121121#ifdef CONFIG_SMP122122 /* Wait for the secondaries to halt. */123123- cpu_clear(boot_cpuid, cpu_possible_map);124124- while (cpus_weight(cpu_possible_map))123123+ cpu_clear(boot_cpuid, cpu_present_map);124124+ while (cpus_weight(cpu_present_map))125125 barrier();126126#endif127127
+4-10
arch/alpha/kernel/smp.c
···6868static int smp_secondary_alive __initdata = 0;69697070/* Which cpus ids came online. */7171-cpumask_t cpu_present_mask;7271cpumask_t cpu_online_map;73727473EXPORT_SYMBOL(cpu_online_map);···438439 if ((cpu->flags & 0x1cc) == 0x1cc) {439440 smp_num_probed++;440441 /* Assume here that "whami" == index */441441- cpu_set(i, cpu_present_mask);442442+ cpu_set(i, cpu_present_map);442443 cpu->pal_revision = boot_cpu_palrev;443444 }444445···449450 }450451 } else {451452 smp_num_probed = 1;452452- cpu_set(boot_cpuid, cpu_present_mask);453453 }454454455455- printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n",456456- smp_num_probed, cpu_possible_map.bits[0]);455455+ printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n",456456+ smp_num_probed, cpu_present_map.bits[0]);457457}458458459459/*···471473472474 /* Nothing to do on a UP box, or when told not to. */473475 if (smp_num_probed == 1 || max_cpus == 0) {474474- cpu_present_mask = cpumask_of_cpu(boot_cpuid);476476+ cpu_present_map = cpumask_of_cpu(boot_cpuid);475477 printk(KERN_INFO "SMP mode deactivated.\n");476478 return;477479 }···484486void __devinit485487smp_prepare_boot_cpu(void)486488{487487- /*488488- * Mark the boot cpu (current cpu) as online489489- */ 490490- cpu_set(smp_processor_id(), cpu_online_map);491489}492490493491int __devinit
+1-1
arch/alpha/kernel/sys_titan.c
···6666 register int bcpu = boot_cpuid;67676868#ifdef CONFIG_SMP6969- cpumask_t cpm = cpu_present_mask;6969+ cpumask_t cpm = cpu_present_map;7070 volatile unsigned long *dim0, *dim1, *dim2, *dim3;7171 unsigned long mask0, mask1, mask2, mask3, dummy;7272
+1-1
arch/arm/Kconfig.debug
···101101 help102102 Choice for UART for kernel low-level using S3C2410 UARTS,103103 should be between zero and two. The port must have been104104- initalised by the boot-loader before use.104104+ initialised by the boot-loader before use.105105106106 The uncompressor code port configuration is now handled107107 by CONFIG_S3C2410_LOWLEVEL_UART_PORT.
+15-3
arch/arm/mach-ixp23xx/core.c
···178178179179static void ixp23xx_irq_mask(unsigned int irq)180180{181181- volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);181181+ volatile unsigned long *intr_reg;182182183183+ if (irq >= 56)184184+ irq += 8;185185+186186+ intr_reg = IXP23XX_INTR_EN1 + (irq / 32);183187 *intr_reg &= ~(1 << (irq % 32));184188}185189···203199 */204200static void ixp23xx_irq_level_unmask(unsigned int irq)205201{206206- volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);202202+ volatile unsigned long *intr_reg;207203208204 ixp23xx_irq_ack(irq);209205206206+ if (irq >= 56)207207+ irq += 8;208208+209209+ intr_reg = IXP23XX_INTR_EN1 + (irq / 32);210210 *intr_reg |= (1 << (irq % 32));211211}212212213213static void ixp23xx_irq_edge_unmask(unsigned int irq)214214{215215- volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32);215215+ volatile unsigned long *intr_reg;216216217217+ if (irq >= 56)218218+ irq += 8;219219+220220+ intr_reg = IXP23XX_INTR_EN1 + (irq / 32);217221 *intr_reg |= (1 << (irq % 32));218222}219223
+1-1
arch/arm/mach-ixp4xx/Kconfig
···141141 2) If > 64MB of memory space is required, the IXP4xx can be 142142 configured to use indirect registers to access PCI This allows 143143 for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. 144144- The disadvantadge of this is that every PCI access requires 144144+ The disadvantage of this is that every PCI access requires 145145 three local register accesses plus a spinlock, but in some 146146 cases the performance hit is acceptable. In addition, you cannot 147147 mmap() PCI devices in this case due to the indirect nature
···170170 depends on ARCH_S3C2410 && PM171171 help172172 Say Y here if you want verbose debugging from the PM Suspend and173173- Resume code. See `Documentation/arm/Samsing-S3C24XX/Suspend.txt`173173+ Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>174174 for more information.175175176176config S3C2410_PM_CHECK
+2-2
arch/arm/mm/mm-armv.c
···376376 ecc_mask = 0;377377 }378378379379- if (cpu_arch <= CPU_ARCH_ARMv5TEJ) {379379+ if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) {380380 for (i = 0; i < ARRAY_SIZE(mem_types); i++) {381381 if (mem_types[i].prot_l1)382382 mem_types[i].prot_l1 |= PMD_BIT4;···631631 pgd = init_mm.pgd;632632633633 base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT;634634- if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ)634634+ if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())635635 base_pmdval |= PMD_BIT4;636636637637 for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) {
···9393 int i;9494 for (i = 0; apic_probe[i]; ++i) { 9595 if (apic_probe[i]->mps_oem_check(mpc,oem,productid)) { 9696- genapic = apic_probe[i];9797- printk(KERN_INFO "Switched to APIC driver `%s'.\n", 9898- genapic->name);9696+ if (!cmdline_apic) {9797+ genapic = apic_probe[i];9898+ printk(KERN_INFO "Switched to APIC driver `%s'.\n",9999+ genapic->name);100100+ }99101 return 1;100102 } 101103 } ···109107 int i;110108 for (i = 0; apic_probe[i]; ++i) { 111109 if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { 112112- genapic = apic_probe[i];113113- printk(KERN_INFO "Switched to APIC driver `%s'.\n", 114114- genapic->name);110110+ if (!cmdline_apic) {111111+ genapic = apic_probe[i];112112+ printk(KERN_INFO "Switched to APIC driver `%s'.\n",113113+ genapic->name);114114+ }115115 return 1;116116 } 117117 }
+47-49
arch/mips/Kconfig
···1313 default SGI_IP2214141515config MIPS_MTX11616- bool "Support for 4G Systems MTX-1 board"1616+ bool "4G Systems MTX-1 board"1717 select DMA_NONCOHERENT1818 select HW_HAS_PCI1919 select SOC_AU1500···120120 select SYS_SUPPORTS_LITTLE_ENDIAN121121122122config MIPS_COBALT123123- bool "Support for Cobalt Server"123123+ bool "Cobalt Server"124124 select DMA_NONCOHERENT125125 select HW_HAS_PCI126126 select I8259···132132 select SYS_SUPPORTS_LITTLE_ENDIAN133133134134config MACH_DECSTATION135135- bool "Support for DECstations"135135+ bool "DECstations"136136 select BOOT_ELF32137137 select DMA_NONCOHERENT138138 select EARLY_PRINTK···158158 otherwise choose R3000.159159160160config MIPS_EV64120161161- bool "Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)"161161+ bool "Galileo EV64120 Evaluation board (EXPERIMENTAL)"162162 depends on EXPERIMENTAL163163 select DMA_NONCOHERENT164164 select HW_HAS_PCI···175175 kernel for this platform.176176177177config MIPS_EV96100178178- bool "Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)"178178+ bool "Galileo EV96100 Evaluation board (EXPERIMENTAL)"179179 depends on EXPERIMENTAL180180 select DMA_NONCOHERENT181181 select HW_HAS_PCI···195195 here if you wish to build a kernel for this platform.196196197197config MIPS_IVR198198- bool "Support for Globespan IVR board"198198+ bool "Globespan IVR board"199199 select DMA_NONCOHERENT200200 select HW_HAS_PCI201201 select ITE_BOARD_GEN···211211 build a kernel for this platform.212212213213config MIPS_ITE8172214214- bool "Support for ITE 8172G board"214214+ bool "ITE 8172G board"215215 select DMA_NONCOHERENT216216 select HW_HAS_PCI217217 select ITE_BOARD_GEN···228228 a kernel for this platform.229229230230config MACH_JAZZ231231- bool "Support for the Jazz family of machines"231231+ bool "Jazz family of machines"232232 select ARC233233 select ARC32234234 select ARCH_MAY_HAVE_PC_FDC···246246 Olivetti M700-10 workstations.247247248248config LASAT249249- bool "Support for LASAT Networks platforms"249249+ bool "LASAT Networks platforms"250250 select DMA_NONCOHERENT251251 select HW_HAS_PCI252252 select MIPS_GT64120···258258 select SYS_SUPPORTS_LITTLE_ENDIAN259259260260config MIPS_ATLAS261261- bool "Support for MIPS Atlas board"261261+ bool "MIPS Atlas board"262262 select BOOT_ELF32263263 select DMA_NONCOHERENT264264 select IRQ_CPU···283283 board.284284285285config MIPS_MALTA286286- bool "Support for MIPS Malta board"286286+ bool "MIPS Malta board"287287 select ARCH_MAY_HAVE_PC_FDC288288 select BOOT_ELF32289289 select HAVE_STD_PC_SERIAL_PORT···311311 board.312312313313config MIPS_SEAD314314- bool "Support for MIPS SEAD board (EXPERIMENTAL)"314314+ bool "MIPS SEAD board (EXPERIMENTAL)"315315 depends on EXPERIMENTAL316316 select IRQ_CPU317317 select DMA_NONCOHERENT···328328 board.329329330330config MIPS_SIM331331- bool 'Support for MIPS simulator (MIPSsim)'331331+ bool 'MIPS simulator (MIPSsim)'332332 select DMA_NONCOHERENT333333 select IRQ_CPU334334 select SYS_HAS_CPU_MIPS32_R1···341341 emulator.342342343343config MOMENCO_JAGUAR_ATX344344- bool "Support for Momentum Jaguar board"344344+ bool "Momentum Jaguar board"345345 select BOOT_ELF32346346 select DMA_NONCOHERENT347347 select HW_HAS_PCI···361361 Momentum Computer <http://www.momenco.com/>.362362363363config MOMENCO_OCELOT364364- bool "Support for Momentum Ocelot board"364364+ bool "Momentum Ocelot board"365365 select DMA_NONCOHERENT366366 select HW_HAS_PCI367367 select IRQ_CPU···378378 Momentum Computer <http://www.momenco.com/>.379379380380config MOMENCO_OCELOT_3381381- bool "Support for Momentum Ocelot-3 board"381381+ bool "Momentum Ocelot-3 board"382382 select BOOT_ELF32383383 select DMA_NONCOHERENT384384 select HW_HAS_PCI···397397 PMC-Sierra Rm79000 core.398398399399config MOMENCO_OCELOT_C400400- bool "Support for Momentum Ocelot-C board"400400+ bool "Momentum Ocelot-C board"401401 select DMA_NONCOHERENT402402 select HW_HAS_PCI403403 select IRQ_CPU···414414 Momentum Computer <http://www.momenco.com/>.415415416416config MOMENCO_OCELOT_G417417- bool "Support for Momentum Ocelot-G board"417417+ bool "Momentum Ocelot-G board"418418 select DMA_NONCOHERENT419419 select HW_HAS_PCI420420 select IRQ_CPU···431431 Momentum Computer <http://www.momenco.com/>.432432433433config MIPS_XXS1500434434- bool "Support for MyCable XXS1500 board"434434+ bool "MyCable XXS1500 board"435435 select DMA_NONCOHERENT436436 select SOC_AU1500437437 select SYS_SUPPORTS_LITTLE_ENDIAN438438439439config PNX8550_V2PCI440440- bool "Support for Philips PNX8550 based Viper2-PCI board"440440+ bool "Philips PNX8550 based Viper2-PCI board"441441 select PNX8550442442 select SYS_SUPPORTS_LITTLE_ENDIAN443443444444config PNX8550_JBS445445- bool "Support for Philips PNX8550 based JBS board"445445+ bool "Philips PNX8550 based JBS board"446446 select PNX8550447447 select SYS_SUPPORTS_LITTLE_ENDIAN448448449449config DDB5074450450- bool "Support for NEC DDB Vrc-5074 (EXPERIMENTAL)"450450+ bool "NEC DDB Vrc-5074 (EXPERIMENTAL)"451451 depends on EXPERIMENTAL452452 select DDB5XXX_COMMON453453 select DMA_NONCOHERENT···465465 evaluation board.466466467467config DDB5476468468- bool "Support for NEC DDB Vrc-5476"468468+ bool "NEC DDB Vrc-5476"469469 select DDB5XXX_COMMON470470 select DMA_NONCOHERENT471471 select HAVE_STD_PC_SERIAL_PORT···486486 IDE controller, PS2 keyboard, PS2 mouse, etc.487487488488config DDB5477489489- bool "Support for NEC DDB Vrc-5477"489489+ bool "NEC DDB Vrc-5477"490490 select DDB5XXX_COMMON491491 select DMA_NONCOHERENT492492 select HW_HAS_PCI···504504 ether port USB, AC97, PCI, etc.505505506506config MACH_VR41XX507507- bool "Support for NEC VR4100 series based machines"507507+ bool "NEC VR41XX-based machines"508508 select SYS_HAS_CPU_VR41XX509509 select SYS_SUPPORTS_32BIT_KERNEL510510 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL511511512512config PMC_YOSEMITE513513- bool "Support for PMC-Sierra Yosemite eval board"513513+ bool "PMC-Sierra Yosemite eval board"514514 select DMA_COHERENT515515 select HW_HAS_PCI516516 select IRQ_CPU···527527 manufactured by PMC-Sierra.528528529529config QEMU530530- bool "Support for Qemu"530530+ bool "Qemu"531531 select DMA_COHERENT532532 select GENERIC_ISA_DMA533533 select HAVE_STD_PC_SERIAL_PORT···547547 can be found at http://www.linux-mips.org/wiki/Qemu.548548549549config SGI_IP22550550- bool "Support for SGI IP22 (Indy/Indigo2)"550550+ bool "SGI IP22 (Indy/Indigo2)"551551 select ARC552552 select ARC32553553 select BOOT_ELF32···567567 that runs on these, say Y here.568568569569config SGI_IP27570570- bool "Support for SGI IP27 (Origin200/2000)"570570+ bool "SGI IP27 (Origin200/2000)"571571 select ARC572572 select ARC64573573 select BOOT_ELF64···583583 here.584584585585config SGI_IP32586586- bool "Support for SGI IP32 (O2) (EXPERIMENTAL)"586586+ bool "SGI IP32 (O2) (EXPERIMENTAL)"587587 depends on EXPERIMENTAL588588 select ARC589589 select ARC32···604604 If you want this kernel to run on SGI O2 workstation, say Y here.605605606606config SIBYTE_BIGSUR607607- bool "Support for Sibyte BCM91480B-BigSur"607607+ bool "Sibyte BCM91480B-BigSur"608608 select BOOT_ELF32609609 select DMA_COHERENT610610 select PCI_DOMAINS···615615 select SYS_SUPPORTS_LITTLE_ENDIAN616616617617config SIBYTE_SWARM618618- bool "Support for Sibyte BCM91250A-SWARM"618618+ bool "Sibyte BCM91250A-SWARM"619619 select BOOT_ELF32620620 select DMA_COHERENT621621 select SIBYTE_SB1250···626626 select SYS_SUPPORTS_LITTLE_ENDIAN627627628628config SIBYTE_SENTOSA629629- bool "Support for Sibyte BCM91250E-Sentosa"629629+ bool "Sibyte BCM91250E-Sentosa"630630 depends on EXPERIMENTAL631631 select BOOT_ELF32632632 select DMA_COHERENT···637637 select SYS_SUPPORTS_LITTLE_ENDIAN638638639639config SIBYTE_RHONE640640- bool "Support for Sibyte BCM91125E-Rhone"640640+ bool "Sibyte BCM91125E-Rhone"641641 depends on EXPERIMENTAL642642 select BOOT_ELF32643643 select DMA_COHERENT···648648 select SYS_SUPPORTS_LITTLE_ENDIAN649649650650config SIBYTE_CARMEL651651- bool "Support for Sibyte BCM91120x-Carmel"651651+ bool "Sibyte BCM91120x-Carmel"652652 depends on EXPERIMENTAL653653 select BOOT_ELF32654654 select DMA_COHERENT···659659 select SYS_SUPPORTS_LITTLE_ENDIAN660660661661config SIBYTE_PTSWARM662662- bool "Support for Sibyte BCM91250PT-PTSWARM"662662+ bool "Sibyte BCM91250PT-PTSWARM"663663 depends on EXPERIMENTAL664664 select BOOT_ELF32665665 select DMA_COHERENT···671671 select SYS_SUPPORTS_LITTLE_ENDIAN672672673673config SIBYTE_LITTLESUR674674- bool "Support for Sibyte BCM91250C2-LittleSur"674674+ bool "Sibyte BCM91250C2-LittleSur"675675 depends on EXPERIMENTAL676676 select BOOT_ELF32677677 select DMA_COHERENT···683683 select SYS_SUPPORTS_LITTLE_ENDIAN684684685685config SIBYTE_CRHINE686686- bool "Support for Sibyte BCM91120C-CRhine"686686+ bool "Sibyte BCM91120C-CRhine"687687 depends on EXPERIMENTAL688688 select BOOT_ELF32689689 select DMA_COHERENT···694694 select SYS_SUPPORTS_LITTLE_ENDIAN695695696696config SIBYTE_CRHONE697697- bool "Support for Sibyte BCM91125C-CRhone"697697+ bool "Sibyte BCM91125C-CRhone"698698 depends on EXPERIMENTAL699699 select BOOT_ELF32700700 select DMA_COHERENT···706706 select SYS_SUPPORTS_LITTLE_ENDIAN707707708708config SNI_RM200_PCI709709- bool "Support for SNI RM200 PCI"709709+ bool "SNI RM200 PCI"710710 select ARC711711 select ARC32712712 select ARCH_MAY_HAVE_PC_FDC···732732 support this machine type.733733734734config TOSHIBA_JMR3927735735- bool "Support for Toshiba JMR-TX3927 board"735735+ bool "Toshiba JMR-TX3927 board"736736 select DMA_NONCOHERENT737737 select HW_HAS_PCI738738 select MIPS_TX3927···743743 select TOSHIBA_BOARDS744744745745config TOSHIBA_RBTX4927746746- bool "Support for Toshiba TBTX49[23]7 board"746746+ bool "Toshiba TBTX49[23]7 board"747747 select DMA_NONCOHERENT748748 select HAS_TXX9_SERIAL749749 select HW_HAS_PCI···760760 support this machine type761761762762config TOSHIBA_RBTX4938763763- bool "Support for Toshiba RBTX4938 board"763763+ bool "Toshiba RBTX4938 board"764764 select HAVE_STD_PC_SERIAL_PORT765765 select DMA_NONCOHERENT766766 select GENERIC_ISA_DMA···1411141114121412config PAGE_SIZE_16KB14131413 bool "16kB"14141414- depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX14141414+ depends on !CPU_R3000 && !CPU_TX39XX14151415 help14161416 Using 16kB page size will result in higher performance kernel at14171417 the price of higher memory consumption. This option is available on14181418- all non-R3000 family processor. Not that at the time of this14191419- writing this option is still high experimental; there are also14201420- issues with compatibility of user applications.14181418+ all non-R3000 family processors. Note that you will need a suitable14191419+ Linux distribution to support this.1421142014221421config PAGE_SIZE_64KB14231422 bool "64kB"···14251426 Using 64kB page size will result in higher performance kernel at14261427 the price of higher memory consumption. This option is available on14271428 all non-R3000 family processor. Not that at the time of this14281428- writing this option is still high experimental; there are also14291429- issues with compatibility of user applications.14291429+ writing this option is still high experimental.1430143014311431endchoice14321432
+1
arch/mips/au1000/common/irq.c
···68686969extern void set_debug_traps(void);7070extern irq_cpustat_t irq_stat [NR_CPUS];7171+extern void mips_timer_interrupt(struct pt_regs *regs);71727273static void setup_local_irq(unsigned int irq, int type, int int_req);7374static unsigned int startup_irq(unsigned int irq);
+9-15
arch/mips/au1000/common/prom.c
···11/*22 *33 * BRIEF MODULE DESCRIPTION44- * PROM library initialisation code, assuming a version of55- * pmon is the boot code.44+ * PROM library initialisation code, assuming YAMON is the boot loader.65 *77- * Copyright 2000,2001 MontaVista Software Inc.66+ * Copyright 2000, 2001, 2006 MontaVista Software Inc.87 * Author: MontaVista Software, Inc.98 * ppopov@mvista.com or source@mvista.com109 *···48494950typedef struct5051{5151- char *name;5252-/* char *val; */5353-}t_env_var;5252+ char *name;5353+ char *val;5454+} t_env_var;545555565657char * prom_getcmdline(void)···8485{8586 /*8687 * Return a pointer to the given environment variable.8787- * Environment variables are stored in the form of "memsize=64".8888 */89899090 t_env_var *env = (t_env_var *)prom_envp;9191- int i;92919393- i = strlen(envname);9494-9595- while(env->name) {9696- if(strncmp(envname, env->name, i) == 0) {9797- return(env->name + strlen(envname) + 1);9898- }9292+ while (env->name) {9393+ if (strcmp(envname, env->name) == 0)9494+ return env->val;9995 env++;10096 }101101- return(NULL);9797+ return NULL;10298}10399104100inline unsigned char str2hexnum(unsigned char c)
+5
arch/mips/au1000/common/sleeper.S
···112112 mtc0 k0, CP0_PAGEMASK113113 lw k0, 0x14(sp)114114 mtc0 k0, CP0_CONFIG115115+116116+ /* We need to catch the ealry Alchemy SOCs with117117+ * the write-only Config[OD] bit and set it back to one...118118+ */119119+ jal au1x00_fixup_config_od115120 lw $1, PT_R1(sp)116121 lw $2, PT_R2(sp)117122 lw $3, PT_R3(sp)
···8686 /* disable interrupts */8787 UART16550_WRITE(OFS_INTR_ENABLE, 0);88888989- /* set up buad rate */8989+ /* set up baud rate */9090 {9191 uint32 divisor;9292
+1-1
arch/mips/ddb5xxx/ddb5477/kgdb_io.c
···8686 /* disable interrupts */8787 UART16550_WRITE(OFS_INTR_ENABLE, 0);88888989- /* set up buad rate */8989+ /* set up baud rate */9090 {9191 uint32 divisor;9292
+1-1
arch/mips/gt64120/ev64120/serialGT.c
···149149#else150150 /*151151 * Note: Set baud rate, hardcoded here for rate of 115200152152- * since became unsure of above "buad rate" algorithm (??).152152+ * since became unsure of above "baud rate" algorithm (??).153153 */154154 outreg(channel, LCR, 0x83);155155 outreg(channel, DLM, 0x00); // See note above
+1-1
arch/mips/gt64120/momenco_ocelot/dbg_io.c
···7373 /* disable interrupts */7474 UART16550_WRITE(OFS_INTR_ENABLE, 0);75757676- /* set up buad rate */7676+ /* set up baud rate */7777 {7878 uint32 divisor;7979
+1-1
arch/mips/ite-boards/generic/dbg_io.c
···7272 /* disable interrupts */7373 UART16550_WRITE(OFS_INTR_ENABLE, 0);74747575- /* set up buad rate */7575+ /* set up baud rate */7676 {7777 uint32 divisor;7878
···121121 case CPU_24K:122122 case CPU_25KF:123123 case CPU_34K:124124+ case CPU_74K:124125 case CPU_PR4450:125126 cpu_wait = r4k_wait;126127 printk(" available.\n");···433432 MIPS_CPU_LLSC;434433 c->tlbsize = 64;435434 break;435435+ case PRID_IMP_R14000:436436+ c->cputype = CPU_R14000;437437+ c->isa_level = MIPS_CPU_ISA_IV;438438+ c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |439439+ MIPS_CPU_FPU | MIPS_CPU_32FPR |440440+ MIPS_CPU_COUNTER | MIPS_CPU_WATCH |441441+ MIPS_CPU_LLSC;442442+ c->tlbsize = 64;443443+ break;436444 }437445}438446···603593 case PRID_IMP_34K:604594 c->cputype = CPU_34K;605595 break;596596+ case PRID_IMP_74K:597597+ c->cputype = CPU_74K;598598+ break;606599 }607600}608601···655642 case PRID_IMP_SB1:656643 c->cputype = CPU_SB1;657644 /* FPU in pass1 is known to have issues. */658658- if ((c->processor_id & 0xff) < 0x20)645645+ if ((c->processor_id & 0xff) < 0x02)659646 c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);660647 break;661648 case PRID_IMP_SB1A:
+1-1
arch/mips/kernel/entry.S
···101101 EMT1021021:103103 mfc0 v1, CP0_TCSTATUS104104- /* We set IXMT above, XOR should cler it here */104104+ /* We set IXMT above, XOR should clear it here */105105 xori v1, v1, TCSTATUS_IXMT106106 or v1, v0, v1107107 mtc0 v1, CP0_TCSTATUS
···247247 current_thread_info()->cpu = 0;248248 smp_tune_scheduling();249249 plat_prepare_cpus(max_cpus);250250+#ifndef CONFIG_HOTPLUG_CPU251251+ cpu_present_map = cpu_possible_map;252252+#endif250253}251254252255/* preload SMP state for boot cpu */···445442 int cpu;446443 int ret;447444448448- for_each_cpu(cpu) {445445+ for_each_present_cpu(cpu) {449446 ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL);450447 if (ret)451448 printk(KERN_WARNING "topology_init: register_cpu %d "
+1-26
arch/mips/kernel/syscall.c
···276276277277asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3)278278{279279- int tmp, len;280280- char __user *name;279279+ int tmp;281280282281 switch(cmd) {283283- case SETNAME: {284284- char nodename[__NEW_UTS_LEN + 1];285285-286286- if (!capable(CAP_SYS_ADMIN))287287- return -EPERM;288288-289289- name = (char __user *) arg1;290290-291291- len = strncpy_from_user(nodename, name, __NEW_UTS_LEN);292292- if (len < 0)293293- return -EFAULT;294294-295295- down_write(&uts_sem);296296- strncpy(system_utsname.nodename, nodename, len);297297- nodename[__NEW_UTS_LEN] = '\0';298298- strlcpy(system_utsname.nodename, nodename,299299- sizeof(system_utsname.nodename));300300- up_write(&uts_sem);301301- return 0;302302- }303303-304282 case MIPS_ATOMIC_SET:305283 printk(KERN_CRIT "How did I get here?\n");306284 return -EINVAL;···291313 case FLUSH_CACHE:292314 __flush_cache_all();293315 return 0;294294-295295- case MIPS_RDNVRAM:296296- return -EIO;297316 }298317299318 return -EINVAL;
+18-2
arch/mips/kernel/traps.c
···819819820820asmlinkage void do_mcheck(struct pt_regs *regs)821821{822822+ const int field = 2 * sizeof(unsigned long);823823+ int multi_match = regs->cp0_status & ST0_TS;824824+822825 show_regs(regs);823823- dump_tlb_all();826826+827827+ if (multi_match) {828828+ printk("Index : %0x\n", read_c0_index());829829+ printk("Pagemask: %0x\n", read_c0_pagemask());830830+ printk("EntryHi : %0*lx\n", field, read_c0_entryhi());831831+ printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0());832832+ printk("EntryLo1: %0*lx\n", field, read_c0_entrylo1());833833+ printk("\n");834834+ dump_tlb_all();835835+ }836836+837837+ show_code((unsigned int *) regs->cp0_epc);838838+824839 /*825840 * Some chips may have other causes of machine check (e.g. SB1826841 * graduation timer)827842 */828843 panic("Caught Machine Check exception - %scaused by multiple "829844 "matching entries in the TLB.",830830- (regs->cp0_status & ST0_TS) ? "" : "not ");845845+ (multi_match) ? "" : "not ");831846}832847833848asmlinkage void do_mt(struct pt_regs *regs)···917902{918903 switch (current_cpu_data.cputype) {919904 case CPU_24K:905905+ case CPU_34K:920906 case CPU_5KC:921907 write_c0_ecc(0x80000000);922908 back_to_back_c0_hazard();
+5-15
arch/mips/kernel/vmlinux.lds.S
···151151152152 /* This is the MIPS specific mdebug section. */153153 .mdebug : { *(.mdebug) }154154- /* These are needed for ELF backends which have not yet been155155- converted to the new style linker. */156156- .stab 0 : { *(.stab) }157157- .stabstr 0 : { *(.stabstr) }158158- /* DWARF debug sections.159159- Symbols in the .debug DWARF section are relative to the beginning of the160160- section so we begin .debug at 0. It's not clear yet what needs to happen161161- for the others. */162162- .debug 0 : { *(.debug) }163163- .debug_srcinfo 0 : { *(.debug_srcinfo) }164164- .debug_aranges 0 : { *(.debug_aranges) }165165- .debug_pubnames 0 : { *(.debug_pubnames) }166166- .debug_sfnames 0 : { *(.debug_sfnames) }167167- .line 0 : { *(.line) }154154+155155+ STABS_DEBUG156156+157157+ DWARF_DEBUG158158+168159 /* These must appear regardless of . */169160 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }170161 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }171171- .comment : { *(.comment) }172162 .note : { *(.note) }173163}
···29293030ieee754sp ieee754sp_flong(s64 x)3131{3232- COMPXDP; /* <--- need 64-bit mantissa temp */3232+ u64 xm; /* <--- need 64-bit mantissa temp */3333+ int xe;3434+ int xs;33353436 CLEARCX;3537
+69-9
arch/mips/mm/c-r4k.c
···2929#include <asm/war.h>3030#include <asm/cacheflush.h> /* for run_uncached() */31313232+3333+/*3434+ * Special Variant of smp_call_function for use by cache functions:3535+ *3636+ * o No return value3737+ * o collapses to normal function call on UP kernels3838+ * o collapses to normal function call on systems with a single shared3939+ * primary cache.4040+ */4141+static inline void r4k_on_each_cpu(void (*func) (void *info), void *info,4242+ int retry, int wait)4343+{4444+ preempt_disable();4545+4646+#if !defined(CONFIG_MIPS_MT_SMP) && !defined(CONFIG_MIPS_MT_SMTC)4747+ smp_call_function(func, info, retry, wait);4848+#endif4949+ func(info);5050+ preempt_enable();5151+}5252+3253/*3354 * Must die.3455 */···320299 if (!cpu_has_dc_aliases)321300 return;322301323323- on_each_cpu(local_r4k_flush_cache_all, NULL, 1, 1);302302+ r4k_on_each_cpu(local_r4k_flush_cache_all, NULL, 1, 1);324303}325304326305static inline void local_r4k___flush_cache_all(void * args)···335314 case CPU_R4400MC:336315 case CPU_R10000:337316 case CPU_R12000:317317+ case CPU_R14000:338318 r4k_blast_scache();339319 }340320}341321342322static void r4k___flush_cache_all(void)343323{344344- on_each_cpu(local_r4k___flush_cache_all, NULL, 1, 1);324324+ r4k_on_each_cpu(local_r4k___flush_cache_all, NULL, 1, 1);345325}346326347327static inline void local_r4k_flush_cache_range(void * args)···363341static void r4k_flush_cache_range(struct vm_area_struct *vma,364342 unsigned long start, unsigned long end)365343{366366- on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);344344+ r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);367345}368346369347static inline void local_r4k_flush_cache_mm(void * args)···392370 if (!cpu_has_dc_aliases)393371 return;394372395395- on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1);373373+ r4k_on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1);396374}397375398376struct flush_cache_page_args {···483461 args.addr = addr;484462 args.pfn = pfn;485463486486- on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1);464464+ r4k_on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1);487465}488466489467static inline void local_r4k_flush_data_cache_page(void * addr)···493471494472static void r4k_flush_data_cache_page(unsigned long addr)495473{496496- on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 1, 1);474474+ r4k_on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 1, 1);497475}498476499477struct flush_icache_range_args {···536514 args.start = start;537515 args.end = end;538516539539- on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1);517517+ r4k_on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1);540518 instruction_hazard();541519}542520···612590 args.vma = vma;613591 args.page = page;614592615615- on_each_cpu(local_r4k_flush_icache_page, &args, 1, 1);593593+ r4k_on_each_cpu(local_r4k_flush_icache_page, &args, 1, 1);616594}617595618596···711689712690static void r4k_flush_cache_sigtramp(unsigned long addr)713691{714714- on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1, 1);692692+ r4k_on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1, 1);715693}716694717695static void r4k_flush_icache_all(void)···834812835813 case CPU_R10000:836814 case CPU_R12000:815815+ case CPU_R14000:837816 icache_size = 1 << (12 + ((config & R10K_CONF_IC) >> 29));838817 c->icache.linesz = 64;839818 c->icache.ways = 2;···988965 c->dcache.flags |= MIPS_CACHE_PINDEX;989966 case CPU_R10000:990967 case CPU_R12000:968968+ case CPU_R14000:991969 case CPU_SB1:992970 break;993971 case CPU_24K:972972+ case CPU_34K:994973 if (!(read_c0_config7() & (1 << 16)))995974 default:996975 if (c->dcache.waysize > PAGE_SIZE)···1116109111171092 case CPU_R10000:11181093 case CPU_R12000:10941094+ case CPU_R14000:11191095 scache_size = 0x80000 << ((config & R10K_CONF_SS) >> 16);11201096 c->scache.linesz = 64 << ((config >> 13) & 1);11211097 c->scache.ways = 2;···11611135 c->options |= MIPS_CPU_SUBSET_CACHES;11621136}1163113711381138+void au1x00_fixup_config_od(void)11391139+{11401140+ /*11411141+ * c0_config.od (bit 19) was write only (and read as 0)11421142+ * on the early revisions of Alchemy SOCs. It disables the bus11431143+ * transaction overlapping and needs to be set to fix various errata.11441144+ */11451145+ switch (read_c0_prid()) {11461146+ case 0x00030100: /* Au1000 DA */11471147+ case 0x00030201: /* Au1000 HA */11481148+ case 0x00030202: /* Au1000 HB */11491149+ case 0x01030200: /* Au1500 AB */11501150+ /*11511151+ * Au1100 errata actually keeps silence about this bit, so we set it11521152+ * just in case for those revisions that require it to be set according11531153+ * to arch/mips/au1000/common/cputable.c11541154+ */11551155+ case 0x02030200: /* Au1100 AB */11561156+ case 0x02030201: /* Au1100 BA */11571157+ case 0x02030202: /* Au1100 BC */11581158+ set_c0_config(1 << 19);11591159+ break;11601160+ }11611161+}11621162+11641163static inline void coherency_setup(void)11651164{11661165 change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT);···12051154 case CPU_R4400SC:12061155 case CPU_R4400MC:12071156 clear_c0_config(CONF_CU);11571157+ break;11581158+ /*11591159+ * We need to catch the ealry Alchemy SOCs with11601160+ * the write-only co_config.od bit and set it back to one...11611161+ */11621162+ case CPU_AU1000: /* rev. DA, HA, HB */11631163+ case CPU_AU1100: /* rev. AB, BA, BC ?? */11641164+ case CPU_AU1500: /* rev. AB */11651165+ au1x00_fixup_config_od();12081166 break;12091167 }12101168}
+1-1
arch/mips/mm/init.c
···227227 for (tmp = 0; tmp < max_low_pfn; tmp++)228228 if (page_is_ram(tmp)) {229229 ram++;230230- if (PageReserved(mem_map+tmp))230230+ if (PageReserved(pfn_to_page(tmp)))231231 reservedpages++;232232 }233233
+1
arch/mips/mm/pg-r4k.c
···357357358358 case CPU_R10000:359359 case CPU_R12000:360360+ case CPU_R14000:360361 pref_src_mode = Pref_LoadStreamed;361362 pref_dst_mode = Pref_StoreStreamed;362363 break;
···3131/* issue a PIO read to make sure no PIO writes are pending */3232static void inline flush_crime_bus(void)3333{3434- volatile unsigned long junk = crime->control;3434+ crime->control;3535}36363737static void inline flush_mace_bus(void)3838{3939- volatile unsigned long junk = mace->perif.ctrl.misc;3939+ mace->perif.ctrl.misc;4040}41414242#undef DEBUG_IRQ
+45-3
arch/powerpc/kernel/prom_init.c
···2057205720582058}2059205920602060-20612061-static void __init fixup_device_tree(void)20602060+#ifdef CONFIG_PPC_MAPLE20612061+/* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property.20622062+ * The values are bad, and it doesn't even have the right number of cells. */20632063+static void __init fixup_device_tree_maple(void)20622064{20652065+ phandle isa;20662066+ u32 isa_ranges[6];20672067+20682068+ isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4"));20692069+ if (!PHANDLE_VALID(isa))20702070+ return;20712071+20722072+ if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges))20732073+ == PROM_ERROR)20742074+ return;20752075+20762076+ if (isa_ranges[0] != 0x1 ||20772077+ isa_ranges[1] != 0xf4000000 ||20782078+ isa_ranges[2] != 0x00010000)20792079+ return;20802080+20812081+ prom_printf("fixing up bogus ISA range on Maple...\n");20822082+20832083+ isa_ranges[0] = 0x1;20842084+ isa_ranges[1] = 0x0;20852085+ isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */20862086+ isa_ranges[3] = 0x0;20872087+ isa_ranges[4] = 0x0;20882088+ isa_ranges[5] = 0x00010000;20892089+ prom_setprop(isa, "/ht@0/isa@4", "ranges",20902090+ isa_ranges, sizeof(isa_ranges));20912091+}20922092+#else20932093+#define fixup_device_tree_maple()20942094+#endif20952095+20632096#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)20972097+static void __init fixup_device_tree_pmac(void)20982098+{20642099 phandle u3, i2c, mpic;20652100 u32 u3_rev;20662101 u32 interrupts[2];···21322097 parent = (u32)mpic;21332098 prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent",21342099 &parent, sizeof(parent));21352135-#endif21362100}21012101+#else21022102+#define fixup_device_tree_pmac()21032103+#endif2137210421052105+static void __init fixup_device_tree(void)21062106+{21072107+ fixup_device_tree_maple();21082108+ fixup_device_tree_pmac();21092109+}2138211021392111static void __init prom_find_boot_cpu(void)21402112{
+12
arch/powerpc/platforms/powermac/low_i2c.c
···11571157/* some quirks for platform function decoding */11581158enum {11591159 pmac_i2c_quirk_invmask = 0x00000001u,11601160+ pmac_i2c_quirk_skip = 0x00000002u,11601161};1161116211621163static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,···11731172 /* XXX Study device-tree's & apple drivers are get the quirks11741173 * right !11751174 */11751175+ /* Workaround: It seems that running the clockspreading11761176+ * properties on the eMac will cause lockups during boot.11771177+ * The machine seems to work fine without that. So for now,11781178+ * let's make sure i2c-hwclock doesn't match about "imic"11791179+ * clocks and we'll figure out if we really need to do11801180+ * something special about those later.11811181+ */11821182+ { "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip },11831183+ { "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip },11761184 { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask },11771185 { "i2c-cpu-voltage", NULL, 0},11781186 { "temp-monitor", NULL, 0 },···12081198 if (p->compatible &&12091199 !device_is_compatible(np, p->compatible))12101200 continue;12011201+ if (p->quirks & pmac_i2c_quirk_skip)12021202+ break;12111203 callback(np, p->quirks);12121204 break;12131205 }
···139139 .ppc_sys_name = "8272",140140 .mask = 0x0000ff00,141141 .value = 0x00000c00,142142- .num_devices = 11,142142+ .num_devices = 12,143143 .device_list = (enum ppc_sys_devices[])144144 {145145 MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1,146146- MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1,147147- MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C,148148- MPC82xx_CPM_USB, MPC82xx_SEC1,146146+ MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4,147147+ MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI,148148+ MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1,149149 },150150 },151151 /* below is a list of the 8280 family of processors */
+1-1
arch/s390/kernel/time.c
···272272 next = next_timer_interrupt();273273 do {274274 seq = read_seqbegin_irqsave(&xtime_lock, flags);275275- timer = (__u64 next) - (__u64 jiffies) + jiffies_64;275275+ timer = ((__u64) next) - ((__u64) jiffies) + jiffies_64;276276 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));277277 todval = -1ULL;278278 /* Be careful about overflows. */
+30
arch/sparc64/kernel/head.S
···1010#include <linux/config.h>1111#include <linux/version.h>1212#include <linux/errno.h>1313+#include <linux/threads.h>1314#include <asm/thread_info.h>1415#include <asm/asi.h>1516#include <asm/pstate.h>···493492 mov %l6, %o1 ! OpenPROM stack494493 call prom_init495494 mov %l7, %o0 ! OpenPROM cif handler495495+496496+ /* Initialize current_thread_info()->cpu as early as possible.497497+ * In order to do that accurately we have to patch up the get_cpuid()498498+ * assembler sequences. And that, in turn, requires that we know499499+ * if we are on a Starfire box or not. While we're here, patch up500500+ * the sun4v sequences as well.501501+ */502502+ call check_if_starfire503503+ nop504504+ call per_cpu_patch505505+ nop506506+ call sun4v_patch507507+ nop508508+509509+#ifdef CONFIG_SMP510510+ call hard_smp_processor_id511511+ nop512512+ cmp %o0, NR_CPUS513513+ blu,pt %xcc, 1f514514+ nop515515+ call boot_cpu_id_too_large516516+ nop517517+ /* Not reached... */518518+519519+1:520520+#else521521+ mov 0, %o0522522+#endif523523+ stb %o0, [%g6 + TI_CPU]496524497525 /* Off we go.... */498526 call start_kernel
+11-12
arch/sparc64/kernel/setup.c
···220220221221static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 };222222223223-static void __init per_cpu_patch(void)223223+void __init per_cpu_patch(void)224224{225225 struct cpuid_patch_entry *p;226226 unsigned long ver;···280280 }281281}282282283283-static void __init sun4v_patch(void)283283+void __init sun4v_patch(void)284284{285285 struct sun4v_1insn_patch_entry *p1;286286 struct sun4v_2insn_patch_entry *p2;···315315 }316316}317317318318+#ifdef CONFIG_SMP319319+void __init boot_cpu_id_too_large(int cpu)320320+{321321+ prom_printf("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n",322322+ cpu, NR_CPUS);323323+ prom_halt();324324+}325325+#endif326326+318327void __init setup_arch(char **cmdline_p)319328{320329 /* Initialize PROM console and command line. */···340331#elif defined(CONFIG_PROM_CONSOLE)341332 conswitchp = &prom_con;342333#endif343343-344344- /* Work out if we are starfire early on */345345- check_if_starfire();346346-347347- /* Now we know enough to patch the get_cpuid sequences348348- * used by trap code.349349- */350350- per_cpu_patch();351351-352352- sun4v_patch();353334354335 boot_flags_init(*cmdline_p);355336
+3-13
arch/sparc64/kernel/smp.c
···12641264 boot_cpu_id = hard_smp_processor_id();12651265 current_tick_offset = timer_tick_offset;1266126612671267- cpu_set(boot_cpu_id, cpu_online_map);12681267 prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1;12691268}12701269···1344134513451346void __devinit smp_prepare_boot_cpu(void)13461347{13471347- int cpu = hard_smp_processor_id();13481348-13491349- if (cpu >= NR_CPUS) {13501350- prom_printf("Serious problem, boot cpu id >= NR_CPUS\n");13511351- prom_halt();13521352- }13531353-13541354- current_thread_info()->cpu = cpu;13551355- __local_per_cpu_offset = __per_cpu_offset(cpu);13561356-13571357- cpu_set(smp_processor_id(), cpu_online_map);13581358- cpu_set(smp_processor_id(), phys_cpu_present_map);13591348}1360134913611350int __devinit __cpu_up(unsigned int cpu)···1420143314211434 for (i = 0; i < NR_CPUS; i++, ptr += size)14221435 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);14361436+14371437+ /* Setup %g5 for the boot cpu. */14381438+ __local_per_cpu_offset = __per_cpu_offset(smp_processor_id());14231439}
···3333# prevent gcc from keeping the stack 16 byte aligned. Taken from i386.3434cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)35353636+# Prevent sprintf in nfsd from being converted to strcpy and resulting in3737+# an unresolved reference.3838+cflags-y += -ffreestanding3939+3640CFLAGS += $(cflags-y)3741USER_CFLAGS += $(cflags-y)
+2-11
arch/um/include/kern_util.h
···120120extern void free_irq(unsigned int, void *);121121extern int cpu(void);122122123123+extern void time_init_kern(void);124124+123125/* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */124126extern int __cant_sleep(void);125127extern void segv_handler(int sig, union uml_pt_regs *regs);126128extern void sigio_handler(int sig, union uml_pt_regs *regs);127129128130#endif129129-130130-/*131131- * Overrides for Emacs so that we follow Linus's tabbing style.132132- * Emacs will notice this stuff at the end of the file and automatically133133- * adjust the settings for this buffer only. This must remain at the end134134- * of the file.135135- * ---------------------------------------------------------------------------136136- * Local variables:137137- * c-file-style: "linux"138138- * End:139139- */
···4545 case ARCH_GET_GS:4646 ret = arch_prctl(code, (unsigned long) &tmp);4747 if(!ret)4848- ret = put_user(tmp, &addr);4848+ ret = put_user(tmp, (long __user *)addr);4949 break;5050 default:5151 ret = -EINVAL;
···149149 addr = start;150150 if (addr > ei->addr + ei->size) 151151 continue; 152152- while (bad_addr(&addr, size) && addr+size < ei->addr + ei->size)152152+ while (bad_addr(&addr, size) && addr+size <= ei->addr+ei->size)153153 ;154154 last = addr + size;155155 if (last > ei->addr + ei->size)
+1-6
arch/x86_64/kernel/entry.S
···281281 ja 1f282282 movq %r10,%rcx /* fixup for C */283283 call *sys_call_table(,%rax,8)284284- movq %rax,RAX-ARGOFFSET(%rsp)285285-1: SAVE_REST286286- movq %rsp,%rdi287287- call syscall_trace_leave288288- RESTORE_TOP_OF_STACK %rbx289289- RESTORE_REST284284+1: movq %rax,RAX-ARGOFFSET(%rsp)290285 /* Use IRET because user could have changed frame */291286 jmp int_ret_from_sys_call292287 CFI_ENDPROC
···631631 printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n");632632 if (end_pfn > MAX_DMA32_PFN) {633633 printk(KERN_ERR "WARNING more than 4GB of memory "634634- "but IOMMU not compiled in.\n"635635- KERN_ERR "WARNING 32bit PCI may malfunction.\n"636636- KERN_ERR "You might want to enable "637637- "CONFIG_GART_IOMMU\n");634634+ "but IOMMU not available.\n"635635+ KERN_ERR "WARNING 32bit PCI may malfunction.\n");638636 }639637 return -1;640638 }
+1-1
arch/x86_64/kernel/pmtimer.c
···6868 offset_delay = delta % (USEC_PER_SEC / HZ);69697070 rdtscll(tsc);7171- vxtime.last_tsc = tsc - offset_delay * cpu_khz;7171+ vxtime.last_tsc = tsc - offset_delay * (u64)cpu_khz / 1000;72727373 /* don't calculate delay for first run,7474 or if we've got less then a tick */
+1-1
arch/x86_64/kernel/setup.c
···10511051 for now. */10521052 node = apicid_to_node[hard_smp_processor_id()];10531053 if (node == NUMA_NO_NODE)10541054- node = 0;10541054+ node = first_node(node_online_map);10551055 numa_set_node(cpu, node);1056105610571057 if (acpi_numa > 0)
+3-1
arch/x86_64/mm/srat.c
···399399 /* First clean up the node list */400400 for (i = 0; i < MAX_NUMNODES; i++) {401401 cutoff_node(i, start, end);402402- if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE)402402+ if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) {403403 unparse_node(i);404404+ node_set_offline(i);405405+ }404406 }405407406408 if (acpi_numa <= 0)
+54-23
block/cfq-iosched.c
···33333434#define CFQ_KEY_ASYNC (0)35353636-static DEFINE_RWLOCK(cfq_exit_lock);3636+static DEFINE_SPINLOCK(cfq_exit_lock);37373838/*3939 * for the hash of cfqq inside the cfqd···133133 mempool_t *crq_pool;134134135135 int rq_in_driver;136136+ int hw_tag;136137137138 /*138139 * schedule slice state info···501500502501 /*503502 * if queue was preempted, just add to front to be fair. busy_rr504504- * isn't sorted.503503+ * isn't sorted, but insert at the back for fairness.505504 */506505 if (preempted || list == &cfqd->busy_rr) {507507- list_add(&cfqq->cfq_list, list);506506+ if (preempted)507507+ list = list->prev;508508+509509+ list_add_tail(&cfqq->cfq_list, list);508510 return;509511 }510512···668664 struct cfq_data *cfqd = q->elevator->elevator_data;669665670666 cfqd->rq_in_driver++;667667+668668+ /*669669+ * If the depth is larger 1, it really could be queueing. But lets670670+ * make the mark a little higher - idling could still be good for671671+ * low queueing, and a low queueing number could also just indicate672672+ * a SCSI mid layer like behaviour where limit+1 is often seen.673673+ */674674+ if (!cfqd->hw_tag && cfqd->rq_in_driver > 4)675675+ cfqd->hw_tag = 1;671676}672677673678static void cfq_deactivate_request(request_queue_t *q, struct request *rq)···890877 */891878 if (!list_empty(&cfqd->cur_rr) || cfq_get_next_prio_level(cfqd) != -1)892879 cfqq = list_entry_cfqq(cfqd->cur_rr.next);880880+881881+ /*882882+ * If no new queues are available, check if the busy list has some883883+ * before falling back to idle io.884884+ */885885+ if (!cfqq && !list_empty(&cfqd->busy_rr))886886+ cfqq = list_entry_cfqq(cfqd->busy_rr.next);893887894888 /*895889 * if we have idle queues and no rt or be queues had pending···13041284 /*13051285 * put the reference this task is holding to the various queues13061286 */13071307- read_lock_irqsave(&cfq_exit_lock, flags);12871287+ spin_lock_irqsave(&cfq_exit_lock, flags);1308128813091289 n = rb_first(&ioc->cic_root);13101290 while (n != NULL) {···13141294 n = rb_next(n);13151295 }1316129613171317- read_unlock_irqrestore(&cfq_exit_lock, flags);12971297+ spin_unlock_irqrestore(&cfq_exit_lock, flags);13181298}1319129913201300static struct cfq_io_context *···14201400 struct cfq_io_context *cic;14211401 struct rb_node *n;1422140214231423- write_lock(&cfq_exit_lock);14031403+ spin_lock(&cfq_exit_lock);1424140414251405 n = rb_first(&ioc->cic_root);14261406 while (n != NULL) {14271407 cic = rb_entry(n, struct cfq_io_context, rb_node);14281428-14081408+14291409 changed_ioprio(cic);14301410 n = rb_next(n);14311411 }1432141214331433- write_unlock(&cfq_exit_lock);14131413+ spin_unlock(&cfq_exit_lock);1434141414351415 return 0;14361416}···14781458 * set ->slice_left to allow preemption for a new process14791459 */14801460 cfqq->slice_left = 2 * cfqd->cfq_slice_idle;14811481- cfq_mark_cfqq_idle_window(cfqq);14611461+ if (!cfqd->hw_tag)14621462+ cfq_mark_cfqq_idle_window(cfqq);14821463 cfq_mark_cfqq_prio_changed(cfqq);14831464 cfq_init_prio_data(cfqq);14841465 }···14961475static void14971476cfq_drop_dead_cic(struct io_context *ioc, struct cfq_io_context *cic)14981477{14991499- read_lock(&cfq_exit_lock);14781478+ spin_lock(&cfq_exit_lock);15001479 rb_erase(&cic->rb_node, &ioc->cic_root);15011501- read_unlock(&cfq_exit_lock);14801480+ list_del_init(&cic->queue_list);14811481+ spin_unlock(&cfq_exit_lock);15021482 kmem_cache_free(cfq_ioc_pool, cic);15031483 atomic_dec(&ioc_count);15041484}···15671545 BUG();15681546 }1569154715701570- read_lock(&cfq_exit_lock);15481548+ spin_lock(&cfq_exit_lock);15711549 rb_link_node(&cic->rb_node, parent, p);15721550 rb_insert_color(&cic->rb_node, &ioc->cic_root);15731551 list_add(&cic->queue_list, &cfqd->cic_list);15741574- read_unlock(&cfq_exit_lock);15521552+ spin_unlock(&cfq_exit_lock);15751553}1576155415771555/*···16701648{16711649 int enable_idle = cfq_cfqq_idle_window(cfqq);1672165016731673- if (!cic->ioc->task || !cfqd->cfq_slice_idle)16511651+ if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag)16741652 enable_idle = 0;16751653 else if (sample_valid(cic->ttime_samples)) {16761654 if (cic->ttime_mean > cfqd->cfq_slice_idle)···1761173917621740 cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq);1763174117421742+ cic = crq->io_context;17431743+17641744 /*17651745 * we never wait for an async request and we don't allow preemption17661746 * of an async request. so just return early17671747 */17681768- if (!cfq_crq_is_sync(crq))17481748+ if (!cfq_crq_is_sync(crq)) {17491749+ /*17501750+ * sync process issued an async request, if it's waiting17511751+ * then expire it and kick rq handling.17521752+ */17531753+ if (cic == cfqd->active_cic &&17541754+ del_timer(&cfqd->idle_slice_timer)) {17551755+ cfq_slice_expired(cfqd, 0);17561756+ cfq_start_queueing(cfqd, cfqq);17571757+ }17691758 return;17701770-17711771- cic = crq->io_context;17591759+ }1772176017731761 cfq_update_io_thinktime(cfqd, cic);17741762 cfq_update_io_seektime(cfqd, cic, crq);···21962164 * race with a non-idle queue, reset timer21972165 */21982166 end = cfqd->last_end_request + CFQ_IDLE_GRACE;21992199- if (!time_after_eq(jiffies, end)) {22002200- cfqd->idle_class_timer.expires = end;22012201- add_timer(&cfqd->idle_class_timer);22022202- } else21672167+ if (!time_after_eq(jiffies, end))21682168+ mod_timer(&cfqd->idle_class_timer, end);21692169+ else22032170 cfq_schedule_dispatch(cfqd);2204217122052172 spin_unlock_irqrestore(cfqd->queue->queue_lock, flags);···2218218722192188 cfq_shutdown_timer_wq(cfqd);2220218922212221- write_lock(&cfq_exit_lock);21902190+ spin_lock(&cfq_exit_lock);22222191 spin_lock_irq(q->queue_lock);2223219222242193 if (cfqd->active_queue)···22412210 }2242221122432212 spin_unlock_irq(q->queue_lock);22442244- write_unlock(&cfq_exit_lock);22132213+ spin_unlock(&cfq_exit_lock);2245221422462215 cfq_shutdown_timer_wq(cfqd);22472216
+1-4
drivers/base/power/suspend.c
···88 *99 */10101111-#include <linux/vt_kern.h>1211#include <linux/device.h>1312#include <linux/kallsyms.h>1413#include <linux/pm.h>···6566 return error;6667}67686969+6870/**6971 * device_suspend - Save state and stop all devices in system.7072 * @state: Power state to put each device in.···8484int device_suspend(pm_message_t state)8585{8686 int error = 0;8787-8888- if (!is_console_suspend_safe())8989- return -EINVAL;90879188 down(&dpm_sem);9289 down(&dpm_list_sem);
+1-1
drivers/char/agp/Kconfig
···86868787config AGP_SIS8888 tristate "SiS chipset support"8989- depends on AGP && X86_328989+ depends on AGP9090 help9191 This option gives you AGP support for the GLX component of9292 X on Silicon Integrated Systems [SiS] chipsets.
···11841184static void port_cleanup(struct smi_info *info)11851185{11861186 unsigned int addr = info->io.addr_data;11871187- int mapsize;11871187+ int idx;1188118811891189 if (addr) {11901190- mapsize = ((info->io_size * info->io.regspacing)11911191- - (info->io.regspacing - info->io.regsize));11921192-11931193- release_region (addr, mapsize);11901190+ for (idx = 0; idx < info->io_size; idx++) {11911191+ release_region(addr + idx * info->io.regspacing,11921192+ info->io.regsize);11931193+ }11941194 }11951195}1196119611971197static int port_setup(struct smi_info *info)11981198{11991199 unsigned int addr = info->io.addr_data;12001200- int mapsize;12001200+ int idx;1201120112021202 if (!addr)12031203 return -ENODEV;···12251225 return -EINVAL;12261226 }1227122712281228- /* Calculate the total amount of memory to claim. This is an12291229- * unusual looking calculation, but it avoids claiming any12301230- * more memory than it has to. It will claim everything12311231- * between the first address to the end of the last full12321232- * register. */12331233- mapsize = ((info->io_size * info->io.regspacing)12341234- - (info->io.regspacing - info->io.regsize));12351235-12361236- if (request_region(addr, mapsize, DEVICE_NAME) == NULL)12371237- return -EIO;12281228+ /* Some BIOSes reserve disjoint I/O regions in their ACPI12291229+ * tables. This causes problems when trying to register the12301230+ * entire I/O region. Therefore we must register each I/O12311231+ * port separately.12321232+ */12331233+ for (idx = 0; idx < info->io_size; idx++) {12341234+ if (request_region(addr + idx * info->io.regspacing,12351235+ info->io.regsize, DEVICE_NAME) == NULL) {12361236+ /* Undo allocations */12371237+ while (idx--) {12381238+ release_region(addr + idx * info->io.regspacing,12391239+ info->io.regsize);12401240+ }12411241+ return -EIO;12421242+ }12431243+ }12381244 return 0;12391245}12401246
···32383238 }32393239}3240324032413241-int is_console_suspend_safe(void)32423242-{32433243- /* It is unsafe to suspend devices while X has control of the32443244- * hardware. Make sure we are running on a kernel-controlled console.32453245- */32463246- return vc_cons[fg_console].d->vc_mode == KD_TEXT;32473247-}32483248-32493241/*32503242 * Visible symbols for modules32513243 */
+1-1
drivers/i2c/busses/scx200_acb.c
···491491492492#define MSR_LBAR_SMB 0x5140000B493493494494-static int scx200_add_cs553x(void)494494+static __init int scx200_add_cs553x(void)495495{496496 u32 low, hi;497497 u32 smb_base;
+11-5
drivers/ide/pci/sgiioc4.c
···345345static u8346346sgiioc4_INB(unsigned long port)347347{348348- u8 reg = (u8) inb(port);348348+ u8 reg = (u8) readb((void __iomem *) port);349349350350 if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */351351 if (reg & 0x51) { /* Not busy...check for interrupt */352352 unsigned long other_ir = port - 0x110;353353- unsigned int intr_reg = (u32) inl(other_ir);353353+ unsigned int intr_reg = (u32) readl((void __iomem *) other_ir);354354355355 /* Clear the Interrupt, Error bits on the IOC4 */356356 if (intr_reg & 0x03) {357357- outl(0x03, other_ir);358358- intr_reg = (u32) inl(other_ir);357357+ writel(0x03, (void __iomem *) other_ir);358358+ intr_reg = (u32) readl((void __iomem *) other_ir);359359 }360360 }361361 }···606606 hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off;607607 hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;608608 hwif->ide_dma_timeout = &__ide_dma_timeout;609609+610610+ /*611611+ * The IOC4 uses MMIO rather than Port IO.612612+ * It also needs special workarounds for INB.613613+ */614614+ default_hwif_mmiops(hwif);609615 hwif->INB = &sgiioc4_INB;610616}611617···749743module_init(ioc4_ide_init);750744module_exit(ioc4_ide_exit);751745752752-MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)");746746+MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon");753747MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card");754748MODULE_LICENSE("GPL");
+1-1
drivers/ieee1394/sbp2.c
···845845 &sbp2_highlevel, ud->ne->host, &sbp2_ops,846846 sizeof(struct sbp2_status_block), sizeof(quadlet_t),847847 0x010000000000ULL, CSR1212_ALL_SPACE_END);848848- if (!scsi_id->status_fifo_addr) {848848+ if (scsi_id->status_fifo_addr == ~0ULL) {849849 SBP2_ERR("failed to allocate status FIFO address range");850850 goto failed_alloc;851851 }
+21-20
drivers/infiniband/hw/mthca/mthca_srq.c
···490490491491 first_ind = srq->first_free;492492493493- for (nreq = 0; wr; ++nreq, wr = wr->next) {494494- if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) {495495- nreq = 0;496496-497497- doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift);498498- doorbell[1] = cpu_to_be32(srq->srqn << 8);499499-500500- /*501501- * Make sure that descriptors are written502502- * before doorbell is rung.503503- */504504- wmb();505505-506506- mthca_write64(doorbell,507507- dev->kar + MTHCA_RECEIVE_DOORBELL,508508- MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));509509-510510- first_ind = srq->first_free;511511- }512512-493493+ for (nreq = 0; wr; wr = wr->next) {513494 ind = srq->first_free;514495515496 if (ind < 0) {···550569551570 srq->wrid[ind] = wr->wr_id;552571 srq->first_free = next_ind;572572+573573+ ++nreq;574574+ if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) {575575+ nreq = 0;576576+577577+ doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift);578578+ doorbell[1] = cpu_to_be32(srq->srqn << 8);579579+580580+ /*581581+ * Make sure that descriptors are written582582+ * before doorbell is rung.583583+ */584584+ wmb();585585+586586+ mthca_write64(doorbell,587587+ dev->kar + MTHCA_RECEIVE_DOORBELL,588588+ MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));589589+590590+ first_ind = srq->first_free;591591+ }553592 }554593555594 if (likely(nreq)) {
···363637373838/*3939- * This code has been tested on an ads7846 / N770 device.3939+ * This code has been heavily tested on a Nokia 770, and lightly4040+ * tested on other ads7846 devices (OSK/Mistral, Lubbock).4041 * Support for ads7843 and ads7845 has only been stubbed in.4141- *4242- * Not yet done: How accurate are the temperature and voltage4343- * readings? (System-specific calibration should support4444- * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.)4542 *4643 * IRQ handling needs a workaround because of a shortcoming in handling4744 * edge triggered IRQs on some platforms like the OMAP1/2. These···245248246249 if (req->msg.status)247250 status = req->msg.status;248248- sample = be16_to_cpu(req->sample);249249- sample = sample >> 4;250250- kfree(req);251251252252+ /* on-wire is a must-ignore bit, a BE12 value, then padding */253253+ sample = be16_to_cpu(req->sample);254254+ sample = sample >> 3;255255+ sample &= 0x0fff;256256+257257+ kfree(req);252258 return status ? status : sample;253259}254260···336336 u16 x, y, z1, z2;337337 unsigned long flags;338338339339- /* adjust: 12 bit samples (left aligned), built from340340- * two 8 bit values writen msb-first.339339+ /* adjust: on-wire is a must-ignore bit, a BE12 value, then padding;340340+ * built from two 8 bit values written msb-first.341341 */342342- x = be16_to_cpu(ts->tc.x) >> 4;343343- y = be16_to_cpu(ts->tc.y) >> 4;344344- z1 = be16_to_cpu(ts->tc.z1) >> 4;345345- z2 = be16_to_cpu(ts->tc.z2) >> 4;342342+ x = (be16_to_cpu(ts->tc.x) >> 3) & 0x0fff;343343+ y = (be16_to_cpu(ts->tc.y) >> 3) & 0x0fff;344344+ z1 = (be16_to_cpu(ts->tc.z1) >> 3) & 0x0fff;345345+ z2 = (be16_to_cpu(ts->tc.z2) >> 3) & 0x0fff;346346347347 /* range filtering */348348 if (x == MAX_12BIT)···420420421421 m = &ts->msg[ts->msg_idx];422422 t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list);423423- val = (*(u16 *)t->rx_buf) >> 3;423423+ val = (be16_to_cpu(*(__be16 *)t->rx_buf) >> 3) & 0x0fff;424424 if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) {425425 /* Repeat it, if this was the first read or the read426426 * wasn't consistent enough. */···469469 spin_lock_irq(&ts->lock);470470471471 if (unlikely(ts->msg_idx && !ts->pendown)) {472472- /* measurment cycle ended */472472+ /* measurement cycle ended */473473 if (!device_suspended(&ts->spi->dev)) {474474 ts->irq_disabled = 0;475475 enable_irq(ts->spi->irq);···495495 spin_lock_irqsave(&ts->lock, flags);496496 if (likely(ts->get_pendown_state())) {497497 if (!ts->irq_disabled) {498498- /* REVISIT irq logic for many ARM chips has cloned a499499- * bug wherein disabling an irq in its handler won't500500- * work;(it's disabled lazily, and too late to work.501501- * until all their irq logic is fixed, we must shadow502502- * that state here.498498+ /* The ARM do_simple_IRQ() dispatcher doesn't act499499+ * like the other dispatchers: it will report IRQs500500+ * even after they've been disabled. We work around501501+ * that here. (The "generic irq" framework may help...)503502 */504503 ts->irq_disabled = 1;505504 disable_irq(ts->spi->irq);···608609 return -EINVAL;609610 }610611612612+ /* REVISIT when the irq can be triggered active-low, or if for some613613+ * reason the touchscreen isn't hooked up, we don't need to access614614+ * the pendown state.615615+ */611616 if (pdata->get_pendown_state == NULL) {612617 dev_dbg(&spi->dev, "no get_pendown_state function?\n");613618 return -EINVAL;614619 }615620616616- /* We'd set the wordsize to 12 bits ... except that some controllers617617- * will then treat the 8 bit command words as 12 bits (and drop the618618- * four MSBs of the 12 bit result). Result: inputs must be shifted619619- * to discard the four garbage LSBs.621621+ /* We'd set TX wordsize 8 bits and RX wordsize to 13 bits ... except622622+ * that even if the hardware can do that, the SPI controller driver623623+ * may not. So we stick to very-portable 8 bit words, both RX and TX.620624 */625625+ spi->bits_per_word = 8;621626622627 ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL);623628 input_dev = input_allocate_device();···775772776773 if (request_irq(spi->irq, ads7846_irq,777774 SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING,778778- spi->dev.bus_id, ts)) {775775+ spi->dev.driver->name, ts)) {779776 dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);780777 err = -EBUSY;781778 goto err_free_mem;
+13-2
drivers/md/md.c
···167167}168168EXPORT_SYMBOL_GPL(md_new_event);169169170170+/* Alternate version that can be called from interrupts171171+ * when calling sysfs_notify isn't needed.172172+ */173173+void md_new_event_inintr(mddev_t *mddev)174174+{175175+ atomic_inc(&md_event_count);176176+ wake_up(&md_event_waiters);177177+}178178+170179/*171180 * Enables to iterate over all existing md arrays172181 * all_mddevs_lock protects this list.···41584149 set_bit(MD_RECOVERY_INTR, &mddev->recovery);41594150 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);41604151 md_wakeup_thread(mddev->thread);41614161- md_new_event(mddev);41524152+ md_new_event_inintr(mddev);41624153}4163415441644155/* seq_file implementation /proc/mdstat */···50375028 printk(KERN_INFO "md: stopping all md devices.\n");5038502950395030 ITERATE_MDDEV(mddev,tmp)50405040- if (mddev_trylock(mddev))50315031+ if (mddev_trylock(mddev)) {50415032 do_md_stop (mddev, 1);50335033+ mddev_unlock(mddev);50345034+ }50425035 /*50435036 * certain more exotic SCSI devices are known to be50445037 * volatile wrt too early system reboots. While the
+21-6
drivers/message/fusion/mptbase.c
···16051605}16061606#endif1607160716081608+static int16091609+mpt_signal_reset(int index, MPT_ADAPTER *ioc, int reset_phase)16101610+{16111611+ if ((MptDriverClass[index] == MPTSPI_DRIVER &&16121612+ ioc->bus_type != SPI) ||16131613+ (MptDriverClass[index] == MPTFC_DRIVER &&16141614+ ioc->bus_type != FC) ||16151615+ (MptDriverClass[index] == MPTSAS_DRIVER &&16161616+ ioc->bus_type != SAS))16171617+ /* make sure we only call the relevant reset handler16181618+ * for the bus */16191619+ return 0;16201620+ return (MptResetHandlers[index])(ioc, reset_phase);16211621+}16221622+16081623/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/16091624/*16101625 * mpt_do_ioc_recovery - Initialize or recover MPT adapter.···19001885 if ((ret == 0) && MptResetHandlers[ii]) {19011886 dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n",19021887 ioc->name, ii));19031903- rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET);18881888+ rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET);19041889 handlers++;19051890 }1906189119071892 if (alt_ioc_ready && MptResetHandlers[ii]) {19081893 drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n",19091894 ioc->name, ioc->alt_ioc->name, ii));19101910- rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET);18951895+ rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET);19111896 handlers++;19121897 }19131898 }···32823267 if (MptResetHandlers[ii]) {32833268 dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n",32843269 ioc->name, ii));32853285- r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET);32703270+ r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET);32863271 if (ioc->alt_ioc) {32873272 dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n",32883273 ioc->name, ioc->alt_ioc->name, ii));32893289- r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET);32743274+ r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET);32903275 }32913276 }32923277 }···57215706 if (MptResetHandlers[ii]) {57225707 dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n",57235708 ioc->name, ii));57245724- r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET);57095709+ r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET);57255710 if (ioc->alt_ioc) {57265711 dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n",57275712 ioc->name, ioc->alt_ioc->name, ii));57285728- r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET);57135713+ r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET);57295714 }57305715 }57315716 }
+1-1
drivers/mmc/Kconfig
···84848585config MMC_AU1X8686 tristate "Alchemy AU1XX0 MMC Card Interface support"8787- depends on SOC_AU1X00 && MMC8787+ depends on MMC && SOC_AU12008888 help8989 This selects the AMD Alchemy(R) Multimedia card interface.9090 If you have a Alchemy platform with a MMC slot, say Y or M here.
+9-1
drivers/net/e1000/e1000_main.c
···220220static int e1000_suspend(struct pci_dev *pdev, pm_message_t state);221221static int e1000_resume(struct pci_dev *pdev);222222#endif223223+static void e1000_shutdown(struct pci_dev *pdev);223224224225#ifdef CONFIG_NET_POLL_CONTROLLER225226/* for netdump / net console */···236235 /* Power Managment Hooks */237236#ifdef CONFIG_PM238237 .suspend = e1000_suspend,239239- .resume = e1000_resume238238+ .resume = e1000_resume,240239#endif240240+ .shutdown = e1000_shutdown241241};242242243243MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>");···46134611 return 0;46144612}46154613#endif46144614+46154615+static void e1000_shutdown(struct pci_dev *pdev)46164616+{46174617+ e1000_suspend(pdev, PMSG_SUSPEND);46184618+}46194619+46164620#ifdef CONFIG_NET_POLL_CONTROLLER46174621/*46184622 * Polling 'interrupt' - used by things like netconsole to send skbs
···33333434config ESI_DONGLE3535 tristate "ESI JetEye PC dongle"3636- depends on DONGLE && IRDA3636+ depends on IRTTY_SIR && DONGLE && IRDA3737 help3838 Say Y here if you want to build support for the Extended Systems3939 JetEye PC dongle. To compile it as a module, choose M here. The ESI···44444545config ACTISYS_DONGLE4646 tristate "ACTiSYS IR-220L and IR220L+ dongle"4747- depends on DONGLE && IRDA4747+ depends on IRTTY_SIR && DONGLE && IRDA4848 help4949 Say Y here if you want to build support for the ACTiSYS IR-220L and5050 IR220L+ dongles. To compile it as a module, choose M here. The···55555656config TEKRAM_DONGLE5757 tristate "Tekram IrMate 210B dongle"5858- depends on DONGLE && IRDA5858+ depends on IRTTY_SIR && DONGLE && IRDA5959 help6060 Say Y here if you want to build support for the Tekram IrMate 210B6161 dongle. To compile it as a module, choose M here. The Tekram dongle···66666767config TOIM3232_DONGLE6868 tristate "TOIM3232 IrDa dongle"6969- depends on DONGLE && IRDA6969+ depends on IRTTY_SIR && DONGLE && IRDA7070 help7171 Say Y here if you want to build support for the Vishay/Temic7272 TOIM3232 and TOIM4232 based dongles.···74747575config LITELINK_DONGLE7676 tristate "Parallax LiteLink dongle"7777- depends on DONGLE && IRDA7777+ depends on IRTTY_SIR && DONGLE && IRDA7878 help7979 Say Y here if you want to build support for the Parallax Litelink8080 dongle. To compile it as a module, choose M here. The Parallax···85858686config MA600_DONGLE8787 tristate "Mobile Action MA600 dongle"8888- depends on DONGLE && IRDA && EXPERIMENTAL8888+ depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL8989 help9090 Say Y here if you want to build support for the Mobile Action MA6009191 dongle. To compile it as a module, choose M here. The MA600 dongle···98989999config GIRBIL_DONGLE100100 tristate "Greenwich GIrBIL dongle"101101- depends on DONGLE && IRDA && EXPERIMENTAL101101+ depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL102102 help103103 Say Y here if you want to build support for the Greenwich GIrBIL104104 dongle. If you want to compile it as a module, choose M here.···109109110110config MCP2120_DONGLE111111 tristate "Microchip MCP2120"112112- depends on DONGLE && IRDA && EXPERIMENTAL112112+ depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL113113 help114114 Say Y here if you want to build support for the Microchip MCP2120115115 dongle. If you want to compile it as a module, choose M here.···123123124124config OLD_BELKIN_DONGLE125125 tristate "Old Belkin dongle"126126- depends on DONGLE && IRDA && EXPERIMENTAL126126+ depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL127127 help128128 Say Y here if you want to build support for the Adaptec Airport 1000129129 and 2000 dongles. If you want to compile it as a module, choose···132132133133config ACT200L_DONGLE134134 tristate "ACTiSYS IR-200L dongle"135135- depends on DONGLE && IRDA && EXPERIMENTAL135135+ depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL136136 help137137 Say Y here if you want to build support for the ACTiSYS IR-200L138138 dongle. If you want to compile it as a module, choose M here.
···43064306 * Insertion of the module43074307 * I'm now quite proud of the multi-device support.43084308 */43094309-int init_module(void)43094309+int __init init_module(void)43104310{43114311 int ret = -EIO; /* Return error if no cards found */43124312 int i;
···4545 union {4646 __u8 fc; /* SPID function code */4747 struct path_state ps; /* SNID path state */4848- } inf;4848+ } __attribute__ ((packed)) inf;4949 union {5050 __u32 cpu_addr : 16; /* CPU address */5151 struct extended_cssid ext_cssid;5252- } pgid_high;5252+ } __attribute__ ((packed)) pgid_high;5353 __u32 cpu_id : 24; /* CPU identification */5454 __u32 cpu_model : 16; /* CPU model */5555 __u32 tod_high; /* high word TOD clock */
+1-1
drivers/s390/cio/device_fsm.c
···749749 /* Unit check but no sense data. Need basic sense. */750750 if (ccw_device_do_sense(cdev, irb) != 0)751751 goto call_handler_unsol;752752- memcpy(irb, &cdev->private->irb, sizeof(struct irb));752752+ memcpy(&cdev->private->irb, irb, sizeof(struct irb));753753 cdev->private->state = DEV_STATE_W4SENSE;754754 cdev->private->intparm = 0;755755 return;
+13-13
drivers/s390/net/ctcmain.c
···14861486 }14871487}1488148814891489-static void 14891489+static void14901490ch_action_reinit(fsm_instance *fi, int event, void *arg)14911491{14921492 struct channel *ch = (struct channel *)arg;14931493 struct net_device *dev = ch->netdev;14941494 struct ctc_priv *privptr = dev->priv;14951495-14951495+14961496 DBF_TEXT(trace, 4, __FUNCTION__);14971497 ch_action_iofatal(fi, event, arg);14981498 fsm_addtimer(&privptr->restart_timer, 1000, DEV_EVENT_RESTART, dev);···16241624 }16251625 dev1 = simple_strtoul(id1, &id1, 16);16261626 dev2 = simple_strtoul(id2, &id2, 16);16271627-16271627+16281628 return (dev1 < dev2);16291629}16301630···18951895 irb->scsw.dstat);18961896 return;18971897 }18981898-18981898+18991899 priv = ((struct ccwgroup_device *)cdev->dev.driver_data)19001900 ->dev.driver_data;19011901···19091909 "device %s\n", cdev->dev.bus_id);19101910 return;19111911 }19121912-19121912+19131913 dev = (struct net_device *) (ch->netdev);19141914 if (dev == NULL) {19151915 ctc_pr_crit("ctc: ctc_irq_handler dev=NULL bus_id=%s, ch=0x%p\n",···20082008 fsm_event(ch->fsm, CH_EVENT_STOP, ch);20092009 }20102010}20112011-static void 20112011+static void20122012dev_action_restart(fsm_instance *fi, int event, void *arg)20132013{20142014 struct net_device *dev = (struct net_device *)arg;20152015 struct ctc_priv *privptr = dev->priv;20162016-20162016+20172017 DBF_TEXT(trace, 3, __FUNCTION__);20182018 ctc_pr_debug("%s: Restarting\n", dev->name);20192019 dev_action_stop(fi, event, arg);···2193219321942194 DBF_TEXT(trace, 5, __FUNCTION__);21952195 /* we need to acquire the lock for testing the state21962196- * otherwise we can have an IRQ changing the state to 21962196+ * otherwise we can have an IRQ changing the state to21972197 * TXIDLE after the test but before acquiring the lock.21982198 */21992199 spin_lock_irqsave(&ch->collect_lock, saveflags);···2393239323942394 /**23952395 * If channels are not running, try to restart them23962396- * and throw away packet. 23962396+ * and throw away packet.23972397 */23982398 if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) {23992399 fsm_event(privptr->fsm, DEV_EVENT_START, dev);···27382738/**27392739 * Add ctc specific attributes.27402740 * Add ctc private data.27412741- * 27412741+ *27422742 * @param cgdev pointer to ccwgroup_device just added27432743 *27442744 * @returns 0 on success, !0 on failure.···28692869 DBF_TEXT(setup, 3, buffer);2870287028712871 type = get_channel_type(&cgdev->cdev[0]->id);28722872-28722872+28732873 snprintf(read_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[0]->dev.bus_id);28742874 snprintf(write_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[1]->dev.bus_id);28752875···29072907 channel_get(type, direction == READ ? read_id : write_id,29082908 direction);29092909 if (privptr->channel[direction] == NULL) {29102910- if (direction == WRITE) 29102910+ if (direction == WRITE)29112911 channel_free(privptr->channel[READ]);2912291229132913 ctc_free_netdevice(dev, 1);···29552955{29562956 struct ctc_priv *priv;29572957 struct net_device *ndev;29582958-29582958+29592959 DBF_TEXT(setup, 3, __FUNCTION__);29602960 pr_debug("%s() called\n", __FUNCTION__);29612961
+5-5
drivers/s390/net/ctctty.c
···130130 if ((tty = info->tty)) {131131 if (info->mcr & UART_MCR_RTS) {132132 struct sk_buff *skb;133133-133133+134134 if ((skb = skb_dequeue(&info->rx_queue))) {135135 int len = skb->len;136136 tty_insert_flip_string(tty, skb->data, len);···328328{329329 int skb_res;330330 struct sk_buff *skb;331331-331331+332332 DBF_TEXT(trace, 4, __FUNCTION__);333333 if (ctc_tty_shuttingdown)334334 return;···497497 c = (count < CTC_TTY_XMIT_SIZE) ? count : CTC_TTY_XMIT_SIZE;498498 if (c <= 0)499499 break;500500-500500+501501 skb_res = info->netdev->hard_header_len + sizeof(info->mcr) +502502 + sizeof(__u32);503503 skb = dev_alloc_skb(skb_res + c);···828828 if (tty_hung_up_p(filp) ||829829 (info->flags & CTC_ASYNC_CLOSING)) {830830 if (info->flags & CTC_ASYNC_CLOSING)831831- wait_event(info->close_wait, 831831+ wait_event(info->close_wait,832832 !(info->flags & CTC_ASYNC_CLOSING));833833#ifdef MODEM_DO_RESTART834834 if (info->flags & CTC_ASYNC_HUP_NOTIFY)···12471247void12481248ctc_tty_cleanup(void) {12491249 unsigned long saveflags;12501250-12501250+12511251 DBF_TEXT(trace, 2, __FUNCTION__);12521252 spin_lock_irqsave(&ctc_tty_lock, saveflags);12531253 ctc_tty_shuttingdown = 1;
+5-5
drivers/s390/net/cu3088.c
···2020 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.2121 *2222 */2323-2323+2424#include <linux/init.h>2525#include <linux/module.h>2626#include <linux/err.h>···7777 int len;78787979 if (!(end = strchr(start, delim[i])))8080- return count;8080+ return -EINVAL;8181 len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start + 1);8282 strlcpy (bus_ids[i], start, len);8383 argv[i] = bus_ids[i];···94949595/* Register-unregister for ctc&lcs */9696int9797-register_cu3088_discipline(struct ccwgroup_driver *dcp) 9797+register_cu3088_discipline(struct ccwgroup_driver *dcp)9898{9999 int rc;100100···109109 rc = driver_create_file(&dcp->driver, &driver_attr_group);110110 if (rc)111111 ccwgroup_driver_unregister(dcp);112112-112112+113113 return rc;114114115115}···137137cu3088_init (void)138138{139139 int rc;140140-140140+141141 cu3088_root_dev = s390_root_dev_register("cu3088");142142 if (IS_ERR(cu3088_root_dev))143143 return PTR_ERR(cu3088_root_dev);
+18-18
drivers/s390/net/iucv.c
···11-/* 11+/*22 * IUCV network driver33 *44 * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation···2828 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.2929 *3030 */3131-3131+3232/* #define DEBUG */33333434#include <linux/module.h>···8181struct bus_type iucv_bus = {8282 .name = "iucv",8383 .match = iucv_bus_match,8484-}; 8484+};85858686struct device *iucv_root;8787···297297/*298298 * Debugging stuff299299 *******************************************************************************/300300-300300+301301302302#ifdef DEBUG303303static int debuglevel = 0;···344344/*345345 * Internal functions346346 *******************************************************************************/347347-347347+348348/**349349 * print start banner350350 */···810810 sizeof (new_handler->id.userid));811811 EBC_TOUPPER (new_handler->id.userid,812812 sizeof (new_handler->id.userid));813813-813813+814814 if (pgmmask) {815815 memcpy (new_handler->id.mask, pgmmask,816816 sizeof (new_handler->id.mask));···12291229 /* parm->ipaudit has only 3 bytes */12301230 *audit >>= 8;12311231 }12321232-12321232+12331233 release_param(parm);1234123412351235 iucv_debug(1, "b2f0_result = %ld", b2f0_result);···23302330 temp_buff1[j] &= (h->id.mask)[j];23312331 temp_buff2[j] &= (h->id.mask)[j];23322332 }23332333-23332333+23342334 iucv_dumpit("temp_buff1:",23352335 temp_buff1, sizeof(temp_buff1));23362336 iucv_dumpit("temp_buff2",23372337 temp_buff2, sizeof(temp_buff2));23382338-23382338+23392339 if (!memcmp (temp_buff1, temp_buff2, 24)) {23402340-23402340+23412341 iucv_debug(2,23422342 "found a matching handler");23432343 break;···23682368 } else23692369 iucv_sever(int_buf->ippathid, no_listener);23702370 break;23712371-23712371+23722372 case 0x02: /*connection complete */23732373 if (messagesDisabled) {23742374 iucv_setmask(~0);···23872387 } else23882388 iucv_sever(int_buf->ippathid, no_listener);23892389 break;23902390-23902390+23912391 case 0x03: /* connection severed */23922392 if (messagesDisabled) {23932393 iucv_setmask(~0);···23982398 interrupt->ConnectionSevered(23992399 (iucv_ConnectionSevered *)int_buf,24002400 h->pgm_data);24012401-24012401+24022402 else24032403 iucv_sever (int_buf->ippathid, no_listener);24042404 } else24052405 iucv_sever(int_buf->ippathid, no_listener);24062406 break;24072407-24072407+24082408 case 0x04: /* connection quiesced */24092409 if (messagesDisabled) {24102410 iucv_setmask(~0);···24202420 "ConnectionQuiesced not called");24212421 }24222422 break;24232423-24232423+24242424 case 0x05: /* connection resumed */24252425 if (messagesDisabled) {24262426 iucv_setmask(~0);···24362436 "ConnectionResumed not called");24372437 }24382438 break;24392439-24392439+24402440 case 0x06: /* priority message complete */24412441 case 0x07: /* nonpriority message complete */24422442 if (h) {···24492449 "MessageComplete not called");24502450 }24512451 break;24522452-24522452+24532453 case 0x08: /* priority message pending */24542454 case 0x09: /* nonpriority message pending */24552455 if (h) {···24672467 __FUNCTION__);24682468 break;24692469 } /* end switch */24702470-24702470+24712471 iucv_debug(2, "exiting pathid %d, type %02X",24722472 int_buf->ippathid, int_buf->iptype);24732473
+311-311
drivers/s390/net/iucv.h
···44 *55 * S390 version66 * Copyright (C) 2000 IBM Corporation77- * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com) 77+ * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com)88 * Xenia Tkatschow (xenia@us.ibm.com)99 *1010 *···1616 * CP Programming Services book, also available on the web1717 * thru www.ibm.com/s390/vm/pubs, manual # SC24-57601818 *1919- * Definition of Return Codes 2020- * -All positive return codes including zero are reflected back 2121- * from CP except for iucv_register_program. The definition of each 2222- * return code can be found in CP Programming Services book. 2323- * Also available on the web thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 2424- * - Return Code of: 2525- * (-EINVAL) Invalid value 2626- * (-ENOMEM) storage allocation failed 1919+ * Definition of Return Codes2020+ * -All positive return codes including zero are reflected back2121+ * from CP except for iucv_register_program. The definition of each2222+ * return code can be found in CP Programming Services book.2323+ * Also available on the web thru www.ibm.com/s390/vm/pubs, manual # SC24-57602424+ * - Return Code of:2525+ * (-EINVAL) Invalid value2626+ * (-ENOMEM) storage allocation failed2727 * pgmask defined in iucv_register_program will be set depending on input2828- * paramters. 2929- * 2828+ * paramters.2929+ *3030 */31313232#include <linux/types.h>···124124#define iucv_handle_t void *125125126126/* flags1:127127- * All flags are defined in the field IPFLAGS1 of each function 128128- * and can be found in CP Programming Services. 129129- * IPLOCAL - Indicates the connect can only be satisfied on the 130130- * local system 131131- * IPPRTY - Indicates a priority message 132132- * IPQUSCE - Indicates you do not want to receive messages on a 133133- * path until an iucv_resume is issued 127127+ * All flags are defined in the field IPFLAGS1 of each function128128+ * and can be found in CP Programming Services.129129+ * IPLOCAL - Indicates the connect can only be satisfied on the130130+ * local system131131+ * IPPRTY - Indicates a priority message132132+ * IPQUSCE - Indicates you do not want to receive messages on a133133+ * path until an iucv_resume is issued134134 * IPRMDATA - Indicates that the message is in the parameter list135135 */136136#define IPLOCAL 0x01···154154#define AllInterrupts 0xf8155155/*156156 * Mapping of external interrupt buffers should be used with the corresponding157157- * interrupt types. 158158- * Names: iucv_ConnectionPending -> connection pending 157157+ * interrupt types.158158+ * Names: iucv_ConnectionPending -> connection pending159159 * iucv_ConnectionComplete -> connection complete160160- * iucv_ConnectionSevered -> connection severed 161161- * iucv_ConnectionQuiesced -> connection quiesced 162162- * iucv_ConnectionResumed -> connection resumed 163163- * iucv_MessagePending -> message pending 164164- * iucv_MessageComplete -> message complete 160160+ * iucv_ConnectionSevered -> connection severed161161+ * iucv_ConnectionQuiesced -> connection quiesced162162+ * iucv_ConnectionResumed -> connection resumed163163+ * iucv_MessagePending -> message pending164164+ * iucv_MessageComplete -> message complete165165 */166166typedef struct {167167 u16 ippathid;···260260 uchar res2[3];261261} iucv_MessageComplete;262262263263-/* 264264- * iucv_interrupt_ops_t: Is a vector of functions that handle 265265- * IUCV interrupts. 266266- * Parameter list: 267267- * eib - is a pointer to a 40-byte area described 268268- * with one of the structures above. 269269- * pgm_data - this data is strictly for the 270270- * interrupt handler that is passed by 271271- * the application. This may be an address 272272- * or token. 263263+/*264264+ * iucv_interrupt_ops_t: Is a vector of functions that handle265265+ * IUCV interrupts.266266+ * Parameter list:267267+ * eib - is a pointer to a 40-byte area described268268+ * with one of the structures above.269269+ * pgm_data - this data is strictly for the270270+ * interrupt handler that is passed by271271+ * the application. This may be an address272272+ * or token.273273*/274274typedef struct {275275 void (*ConnectionPending) (iucv_ConnectionPending * eib,···287287} iucv_interrupt_ops_t;288288289289/*290290- *iucv_array_t : Defines buffer array. 291291- * Inside the array may be 31- bit addresses and 31-bit lengths. 290290+ *iucv_array_t : Defines buffer array.291291+ * Inside the array may be 31- bit addresses and 31-bit lengths.292292*/293293typedef struct {294294 u32 address;···299299extern struct device *iucv_root;300300301301/* -prototypes- */302302-/* 303303- * Name: iucv_register_program 304304- * Purpose: Registers an application with IUCV 305305- * Input: prmname - user identification 302302+/*303303+ * Name: iucv_register_program304304+ * Purpose: Registers an application with IUCV305305+ * Input: prmname - user identification306306 * userid - machine identification307307 * pgmmask - indicates which bits in the prmname and userid combined will be308308 * used to determine who is given control309309- * ops - address of vector of interrupt handlers 310310- * pgm_data- application data passed to interrupt handlers 311311- * Output: NA 312312- * Return: address of handler 309309+ * ops - address of vector of interrupt handlers310310+ * pgm_data- application data passed to interrupt handlers311311+ * Output: NA312312+ * Return: address of handler313313 * (0) - Error occurred, registration not completed.314314- * NOTE: Exact cause of failure will be recorded in syslog. 314314+ * NOTE: Exact cause of failure will be recorded in syslog.315315*/316316iucv_handle_t iucv_register_program (uchar pgmname[16],317317 uchar userid[8],···319319 iucv_interrupt_ops_t * ops,320320 void *pgm_data);321321322322-/* 323323- * Name: iucv_unregister_program 324324- * Purpose: Unregister application with IUCV 325325- * Input: address of handler 326326- * Output: NA 327327- * Return: (0) - Normal return 328328- * (-EINVAL) - Internal error, wild pointer 322322+/*323323+ * Name: iucv_unregister_program324324+ * Purpose: Unregister application with IUCV325325+ * Input: address of handler326326+ * Output: NA327327+ * Return: (0) - Normal return328328+ * (-EINVAL) - Internal error, wild pointer329329*/330330int iucv_unregister_program (iucv_handle_t handle);331331···333333 * Name: iucv_accept334334 * Purpose: This function is issued after the user receives a Connection Pending external335335 * interrupt and now wishes to complete the IUCV communication path.336336- * Input: pathid - u16 , Path identification number 336336+ * Input: pathid - u16 , Path identification number337337 * msglim_reqstd - u16, The number of outstanding messages requested.338338 * user_data - uchar[16], Data specified by the iucv_connect function.339339 * flags1 - int, Contains options for this path.···358358 void *pgm_data, int *flags1_out, u16 * msglim);359359360360/*361361- * Name: iucv_connect 361361+ * Name: iucv_connect362362 * Purpose: This function establishes an IUCV path. Although the connect may complete363363- * successfully, you are not able to use the path until you receive an IUCV 364364- * Connection Complete external interrupt. 365365- * Input: pathid - u16 *, Path identification number 366366- * msglim_reqstd - u16, Number of outstanding messages requested 367367- * user_data - uchar[16], 16-byte user data 363363+ * successfully, you are not able to use the path until you receive an IUCV364364+ * Connection Complete external interrupt.365365+ * Input: pathid - u16 *, Path identification number366366+ * msglim_reqstd - u16, Number of outstanding messages requested367367+ * user_data - uchar[16], 16-byte user data368368 * userid - uchar[8], User identification369369- * system_name - uchar[8], 8-byte identifying the system name 369369+ * system_name - uchar[8], 8-byte identifying the system name370370 * flags1 - int, Contains options for this path.371371 * -IPPRTY - 0x20, Specifies if you want to send priority message.372372 * -IPRMDATA - 0x80, Specifies whether your program can handle a message373373 * in the parameter list.374374- * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being 374374+ * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being375375 * established.376376- * -IPLOCAL - 0X01, Allows an application to force the partner to be on 376376+ * -IPLOCAL - 0X01, Allows an application to force the partner to be on377377 * the local system. If local is specified then target class cannot be378378- * specified. 378378+ * specified.379379 * flags1_out - int * Contains information about the path380380 * - IPPRTY - 0x20, Indicates you may send priority messages.381381 * msglim - * u16, Number of outstanding messages382382- * handle - iucv_handle_t, Address of handler 383383- * pgm_data - void *, Application data passed to interrupt handlers 382382+ * handle - iucv_handle_t, Address of handler383383+ * pgm_data - void *, Application data passed to interrupt handlers384384 * Output: return code from CP IUCV call385385 * rc - return code from iucv_declare_buffer386386- * -EINVAL - Invalid handle passed by application 387387- * -EINVAL - Pathid address is NULL 388388- * add_pathid_result - Return code from internal function add_pathid 386386+ * -EINVAL - Invalid handle passed by application387387+ * -EINVAL - Pathid address is NULL388388+ * add_pathid_result - Return code from internal function add_pathid389389*/390390int391391 iucv_connect (u16 * pathid,···397397 int *flags1_out,398398 u16 * msglim, iucv_handle_t handle, void *pgm_data);399399400400-/* 401401- * Name: iucv_purge 402402- * Purpose: This function cancels a message that you have sent. 403403- * Input: pathid - Path identification number. 400400+/*401401+ * Name: iucv_purge402402+ * Purpose: This function cancels a message that you have sent.403403+ * Input: pathid - Path identification number.404404 * msgid - Specifies the message ID of the message to be purged.405405- * srccls - Specifies the source message class. 406406- * Output: audit - Contains information about asynchronous error 407407- * that may have affected the normal completion 408408- * of this message. 409409- * Return: Return code from CP IUCV call. 405405+ * srccls - Specifies the source message class.406406+ * Output: audit - Contains information about asynchronous error407407+ * that may have affected the normal completion408408+ * of this message.409409+ * Return: Return code from CP IUCV call.410410*/411411int iucv_purge (u16 pathid, u32 msgid, u32 srccls, __u32 *audit);412412/*···426426 */427427ulong iucv_query_bufsize (void);428428429429-/* 430430- * Name: iucv_quiesce 431431- * Purpose: This function temporarily suspends incoming messages on an 432432- * IUCV path. You can later reactivate the path by invoking 433433- * the iucv_resume function. 434434- * Input: pathid - Path identification number 435435- * user_data - 16-bytes of user data 436436- * Output: NA 437437- * Return: Return code from CP IUCV call. 429429+/*430430+ * Name: iucv_quiesce431431+ * Purpose: This function temporarily suspends incoming messages on an432432+ * IUCV path. You can later reactivate the path by invoking433433+ * the iucv_resume function.434434+ * Input: pathid - Path identification number435435+ * user_data - 16-bytes of user data436436+ * Output: NA437437+ * Return: Return code from CP IUCV call.438438*/439439int iucv_quiesce (u16 pathid, uchar user_data[16]);440440441441-/* 442442- * Name: iucv_receive 443443- * Purpose: This function receives messages that are being sent to you 441441+/*442442+ * Name: iucv_receive443443+ * Purpose: This function receives messages that are being sent to you444444 * over established paths. Data will be returned in buffer for length of445445 * buflen.446446- * Input: 447447- * pathid - Path identification number. 448448- * buffer - Address of buffer to receive. 449449- * buflen - Length of buffer to receive. 450450- * msgid - Specifies the message ID. 451451- * trgcls - Specifies target class. 452452- * Output: 446446+ * Input:447447+ * pathid - Path identification number.448448+ * buffer - Address of buffer to receive.449449+ * buflen - Length of buffer to receive.450450+ * msgid - Specifies the message ID.451451+ * trgcls - Specifies target class.452452+ * Output:453453 * flags1_out: int *, Contains information about this path.454454 * IPNORPY - 0x10 Specifies this is a one-way message and no reply is455455- * expected. 456456- * IPPRTY - 0x20 Specifies if you want to send priority message. 455455+ * expected.456456+ * IPPRTY - 0x20 Specifies if you want to send priority message.457457 * IPRMDATA - 0x80 specifies the data is contained in the parameter list458458 * residual_buffer - address of buffer updated by the number459459 * of bytes you have received.460460- * residual_length - 460460+ * residual_length -461461 * Contains one of the following values, if the receive buffer is:462462 * The same length as the message, this field is zero.463463 * Longer than the message, this field contains the number of···466466 * count (that is, the number of bytes remaining in the467467 * message that does not fit into the buffer. In this468468 * case b2f0_result = 5.469469- * Return: Return code from CP IUCV call. 470470- * (-EINVAL) - buffer address is pointing to NULL 469469+ * Return: Return code from CP IUCV call.470470+ * (-EINVAL) - buffer address is pointing to NULL471471*/472472int iucv_receive (u16 pathid,473473 u32 msgid,···477477 int *flags1_out,478478 ulong * residual_buffer, ulong * residual_length);479479480480- /* 481481- * Name: iucv_receive_array 482482- * Purpose: This function receives messages that are being sent to you 480480+ /*481481+ * Name: iucv_receive_array482482+ * Purpose: This function receives messages that are being sent to you483483 * over established paths. Data will be returned in first buffer for484484 * length of first buffer.485485- * Input: pathid - Path identification number. 485485+ * Input: pathid - Path identification number.486486 * msgid - specifies the message ID.487487 * trgcls - Specifies target class.488488- * buffer - Address of array of buffers. 489489- * buflen - Total length of buffers. 488488+ * buffer - Address of array of buffers.489489+ * buflen - Total length of buffers.490490 * Output:491491 * flags1_out: int *, Contains information about this path.492492 * IPNORPY - 0x10 Specifies this is a one-way message and no reply is···504504 * count (that is, the number of bytes remaining in the505505 * message that does not fit into the buffer. In this506506 * case b2f0_result = 5.507507- * Return: Return code from CP IUCV call. 508508- * (-EINVAL) - Buffer address is NULL. 507507+ * Return: Return code from CP IUCV call.508508+ * (-EINVAL) - Buffer address is NULL.509509 */510510int iucv_receive_array (u16 pathid,511511 u32 msgid,···515515 int *flags1_out,516516 ulong * residual_buffer, ulong * residual_length);517517518518-/* 519519- * Name: iucv_reject 520520- * Purpose: The reject function refuses a specified message. Between the 521521- * time you are notified of a message and the time that you 522522- * complete the message, the message may be rejected. 523523- * Input: pathid - Path identification number. 524524- * msgid - Specifies the message ID. 525525- * trgcls - Specifies target class. 526526- * Output: NA 527527- * Return: Return code from CP IUCV call. 518518+/*519519+ * Name: iucv_reject520520+ * Purpose: The reject function refuses a specified message. Between the521521+ * time you are notified of a message and the time that you522522+ * complete the message, the message may be rejected.523523+ * Input: pathid - Path identification number.524524+ * msgid - Specifies the message ID.525525+ * trgcls - Specifies target class.526526+ * Output: NA527527+ * Return: Return code from CP IUCV call.528528*/529529int iucv_reject (u16 pathid, u32 msgid, u32 trgcls);530530531531-/* 532532- * Name: iucv_reply 533533- * Purpose: This function responds to the two-way messages that you 534534- * receive. You must identify completely the message to 535535- * which you wish to reply. ie, pathid, msgid, and trgcls. 536536- * Input: pathid - Path identification number. 537537- * msgid - Specifies the message ID. 538538- * trgcls - Specifies target class. 531531+/*532532+ * Name: iucv_reply533533+ * Purpose: This function responds to the two-way messages that you534534+ * receive. You must identify completely the message to535535+ * which you wish to reply. ie, pathid, msgid, and trgcls.536536+ * Input: pathid - Path identification number.537537+ * msgid - Specifies the message ID.538538+ * trgcls - Specifies target class.539539 * flags1 - Option for path.540540- * IPPRTY- 0x20, Specifies if you want to send priority message. 541541- * buffer - Address of reply buffer. 542542- * buflen - Length of reply buffer. 543543- * Output: residual_buffer - Address of buffer updated by the number 544544- * of bytes you have moved. 540540+ * IPPRTY- 0x20, Specifies if you want to send priority message.541541+ * buffer - Address of reply buffer.542542+ * buflen - Length of reply buffer.543543+ * Output: residual_buffer - Address of buffer updated by the number544544+ * of bytes you have moved.545545 * residual_length - Contains one of the following values:546546 * If the answer buffer is the same length as the reply, this field547547 * contains zero.548548 * If the answer buffer is longer than the reply, this field contains549549- * the number of bytes remaining in the buffer. 549549+ * the number of bytes remaining in the buffer.550550 * If the answer buffer is shorter than the reply, this field contains551551 * a residual count (that is, the number of bytes remianing in the552552 * reply that does not fit into the buffer. In this553553 * case b2f0_result = 5.554554- * Return: Return code from CP IUCV call. 555555- * (-EINVAL) - Buffer address is NULL. 554554+ * Return: Return code from CP IUCV call.555555+ * (-EINVAL) - Buffer address is NULL.556556*/557557int iucv_reply (u16 pathid,558558 u32 msgid,···561561 void *buffer, ulong buflen, ulong * residual_buffer,562562 ulong * residual_length);563563564564-/* 565565- * Name: iucv_reply_array 566566- * Purpose: This function responds to the two-way messages that you 567567- * receive. You must identify completely the message to 568568- * which you wish to reply. ie, pathid, msgid, and trgcls. 569569- * The array identifies a list of addresses and lengths of 570570- * discontiguous buffers that contains the reply data. 571571- * Input: pathid - Path identification number 572572- * msgid - Specifies the message ID. 573573- * trgcls - Specifies target class. 564564+/*565565+ * Name: iucv_reply_array566566+ * Purpose: This function responds to the two-way messages that you567567+ * receive. You must identify completely the message to568568+ * which you wish to reply. ie, pathid, msgid, and trgcls.569569+ * The array identifies a list of addresses and lengths of570570+ * discontiguous buffers that contains the reply data.571571+ * Input: pathid - Path identification number572572+ * msgid - Specifies the message ID.573573+ * trgcls - Specifies target class.574574 * flags1 - Option for path.575575 * IPPRTY- 0x20, Specifies if you want to send priority message.576576- * buffer - Address of array of reply buffers. 577577- * buflen - Total length of reply buffers. 576576+ * buffer - Address of array of reply buffers.577577+ * buflen - Total length of reply buffers.578578 * Output: residual_buffer - Address of buffer which IUCV is currently working on.579579 * residual_length - Contains one of the following values:580580 * If the answer buffer is the same length as the reply, this field···585585 * a residual count (that is, the number of bytes remianing in the586586 * reply that does not fit into the buffer. In this587587 * case b2f0_result = 5.588588- * Return: Return code from CP IUCV call. 589589- * (-EINVAL) - Buffer address is NULL. 588588+ * Return: Return code from CP IUCV call.589589+ * (-EINVAL) - Buffer address is NULL.590590*/591591int iucv_reply_array (u16 pathid,592592 u32 msgid,···596596 ulong buflen, ulong * residual_address,597597 ulong * residual_length);598598599599-/* 600600- * Name: iucv_reply_prmmsg 601601- * Purpose: This function responds to the two-way messages that you 602602- * receive. You must identify completely the message to 603603- * which you wish to reply. ie, pathid, msgid, and trgcls. 604604- * Prmmsg signifies the data is moved into the 605605- * parameter list. 606606- * Input: pathid - Path identification number. 607607- * msgid - Specifies the message ID. 608608- * trgcls - Specifies target class. 599599+/*600600+ * Name: iucv_reply_prmmsg601601+ * Purpose: This function responds to the two-way messages that you602602+ * receive. You must identify completely the message to603603+ * which you wish to reply. ie, pathid, msgid, and trgcls.604604+ * Prmmsg signifies the data is moved into the605605+ * parameter list.606606+ * Input: pathid - Path identification number.607607+ * msgid - Specifies the message ID.608608+ * trgcls - Specifies target class.609609 * flags1 - Option for path.610610 * IPPRTY- 0x20 Specifies if you want to send priority message.611611- * prmmsg - 8-bytes of data to be placed into the parameter. 612612- * list. 613613- * Output: NA 614614- * Return: Return code from CP IUCV call. 611611+ * prmmsg - 8-bytes of data to be placed into the parameter.612612+ * list.613613+ * Output: NA614614+ * Return: Return code from CP IUCV call.615615*/616616int iucv_reply_prmmsg (u16 pathid,617617 u32 msgid, u32 trgcls, int flags1, uchar prmmsg[8]);618618619619-/* 620620- * Name: iucv_resume 621621- * Purpose: This function restores communications over a quiesced path 622622- * Input: pathid - Path identification number. 623623- * user_data - 16-bytes of user data. 624624- * Output: NA 625625- * Return: Return code from CP IUCV call. 619619+/*620620+ * Name: iucv_resume621621+ * Purpose: This function restores communications over a quiesced path622622+ * Input: pathid - Path identification number.623623+ * user_data - 16-bytes of user data.624624+ * Output: NA625625+ * Return: Return code from CP IUCV call.626626*/627627int iucv_resume (u16 pathid, uchar user_data[16]);628628629629-/* 630630- * Name: iucv_send 631631- * Purpose: This function transmits data to another application. 632632- * Data to be transmitted is in a buffer and this is a 633633- * one-way message and the receiver will not reply to the 634634- * message. 635635- * Input: pathid - Path identification number. 636636- * trgcls - Specifies target class. 637637- * srccls - Specifies the source message class. 638638- * msgtag - Specifies a tag to be associated with the message. 629629+/*630630+ * Name: iucv_send631631+ * Purpose: This function transmits data to another application.632632+ * Data to be transmitted is in a buffer and this is a633633+ * one-way message and the receiver will not reply to the634634+ * message.635635+ * Input: pathid - Path identification number.636636+ * trgcls - Specifies target class.637637+ * srccls - Specifies the source message class.638638+ * msgtag - Specifies a tag to be associated with the message.639639 * flags1 - Option for path.640640 * IPPRTY- 0x20 Specifies if you want to send priority message.641641- * buffer - Address of send buffer. 642642- * buflen - Length of send buffer. 643643- * Output: msgid - Specifies the message ID. 644644- * Return: Return code from CP IUCV call. 645645- * (-EINVAL) - Buffer address is NULL. 641641+ * buffer - Address of send buffer.642642+ * buflen - Length of send buffer.643643+ * Output: msgid - Specifies the message ID.644644+ * Return: Return code from CP IUCV call.645645+ * (-EINVAL) - Buffer address is NULL.646646*/647647int iucv_send (u16 pathid,648648 u32 * msgid,649649 u32 trgcls,650650 u32 srccls, u32 msgtag, int flags1, void *buffer, ulong buflen);651651652652-/* 653653- * Name: iucv_send_array 654654- * Purpose: This function transmits data to another application. 655655- * The contents of buffer is the address of the array of 656656- * addresses and lengths of discontiguous buffers that hold 657657- * the message text. This is a one-way message and the 658658- * receiver will not reply to the message. 659659- * Input: pathid - Path identification number. 660660- * trgcls - Specifies target class. 661661- * srccls - Specifies the source message class. 652652+/*653653+ * Name: iucv_send_array654654+ * Purpose: This function transmits data to another application.655655+ * The contents of buffer is the address of the array of656656+ * addresses and lengths of discontiguous buffers that hold657657+ * the message text. This is a one-way message and the658658+ * receiver will not reply to the message.659659+ * Input: pathid - Path identification number.660660+ * trgcls - Specifies target class.661661+ * srccls - Specifies the source message class.662662 * msgtag - Specifies a tag to be associated witht the message.663663 * flags1 - Option for path.664664- * IPPRTY- specifies if you want to send priority message. 665665- * buffer - Address of array of send buffers. 666666- * buflen - Total length of send buffers. 667667- * Output: msgid - Specifies the message ID. 668668- * Return: Return code from CP IUCV call. 669669- * (-EINVAL) - Buffer address is NULL. 664664+ * IPPRTY- specifies if you want to send priority message.665665+ * buffer - Address of array of send buffers.666666+ * buflen - Total length of send buffers.667667+ * Output: msgid - Specifies the message ID.668668+ * Return: Return code from CP IUCV call.669669+ * (-EINVAL) - Buffer address is NULL.670670*/671671int iucv_send_array (u16 pathid,672672 u32 * msgid,···675675 u32 msgtag,676676 int flags1, iucv_array_t * buffer, ulong buflen);677677678678-/* 679679- * Name: iucv_send_prmmsg 680680- * Purpose: This function transmits data to another application. 681681- * Prmmsg specifies that the 8-bytes of data are to be moved 682682- * into the parameter list. This is a one-way message and the 683683- * receiver will not reply to the message. 684684- * Input: pathid - Path identification number. 685685- * trgcls - Specifies target class. 686686- * srccls - Specifies the source message class. 687687- * msgtag - Specifies a tag to be associated with the message. 678678+/*679679+ * Name: iucv_send_prmmsg680680+ * Purpose: This function transmits data to another application.681681+ * Prmmsg specifies that the 8-bytes of data are to be moved682682+ * into the parameter list. This is a one-way message and the683683+ * receiver will not reply to the message.684684+ * Input: pathid - Path identification number.685685+ * trgcls - Specifies target class.686686+ * srccls - Specifies the source message class.687687+ * msgtag - Specifies a tag to be associated with the message.688688 * flags1 - Option for path.689689 * IPPRTY- 0x20 specifies if you want to send priority message.690690- * prmmsg - 8-bytes of data to be placed into parameter list. 691691- * Output: msgid - Specifies the message ID. 692692- * Return: Return code from CP IUCV call. 690690+ * prmmsg - 8-bytes of data to be placed into parameter list.691691+ * Output: msgid - Specifies the message ID.692692+ * Return: Return code from CP IUCV call.693693*/694694int iucv_send_prmmsg (u16 pathid,695695 u32 * msgid,696696 u32 trgcls,697697 u32 srccls, u32 msgtag, int flags1, uchar prmmsg[8]);698698699699-/* 700700- * Name: iucv_send2way 701701- * Purpose: This function transmits data to another application. 702702- * Data to be transmitted is in a buffer. The receiver 703703- * of the send is expected to reply to the message and 704704- * a buffer is provided into which IUCV moves the reply 705705- * to this message. 706706- * Input: pathid - Path identification number. 707707- * trgcls - Specifies target class. 708708- * srccls - Specifies the source message class. 709709- * msgtag - Specifies a tag associated with the message. 699699+/*700700+ * Name: iucv_send2way701701+ * Purpose: This function transmits data to another application.702702+ * Data to be transmitted is in a buffer. The receiver703703+ * of the send is expected to reply to the message and704704+ * a buffer is provided into which IUCV moves the reply705705+ * to this message.706706+ * Input: pathid - Path identification number.707707+ * trgcls - Specifies target class.708708+ * srccls - Specifies the source message class.709709+ * msgtag - Specifies a tag associated with the message.710710 * flags1 - Option for path.711711 * IPPRTY- 0x20 Specifies if you want to send priority message.712712- * buffer - Address of send buffer. 713713- * buflen - Length of send buffer. 714714- * ansbuf - Address of buffer into which IUCV moves the reply of 715715- * this message. 716716- * anslen - Address of length of buffer. 717717- * Output: msgid - Specifies the message ID. 718718- * Return: Return code from CP IUCV call. 719719- * (-EINVAL) - Buffer or ansbuf address is NULL. 712712+ * buffer - Address of send buffer.713713+ * buflen - Length of send buffer.714714+ * ansbuf - Address of buffer into which IUCV moves the reply of715715+ * this message.716716+ * anslen - Address of length of buffer.717717+ * Output: msgid - Specifies the message ID.718718+ * Return: Return code from CP IUCV call.719719+ * (-EINVAL) - Buffer or ansbuf address is NULL.720720*/721721int iucv_send2way (u16 pathid,722722 u32 * msgid,···726726 int flags1,727727 void *buffer, ulong buflen, void *ansbuf, ulong anslen);728728729729-/* 730730- * Name: iucv_send2way_array 731731- * Purpose: This function transmits data to another application. 732732- * The contents of buffer is the address of the array of 733733- * addresses and lengths of discontiguous buffers that hold 734734- * the message text. The receiver of the send is expected to 735735- * reply to the message and a buffer is provided into which 736736- * IUCV moves the reply to this message. 737737- * Input: pathid - Path identification number. 738738- * trgcls - Specifies target class. 739739- * srccls - Specifies the source message class. 740740- * msgtag - Specifies a tag to be associated with the message. 729729+/*730730+ * Name: iucv_send2way_array731731+ * Purpose: This function transmits data to another application.732732+ * The contents of buffer is the address of the array of733733+ * addresses and lengths of discontiguous buffers that hold734734+ * the message text. The receiver of the send is expected to735735+ * reply to the message and a buffer is provided into which736736+ * IUCV moves the reply to this message.737737+ * Input: pathid - Path identification number.738738+ * trgcls - Specifies target class.739739+ * srccls - Specifies the source message class.740740+ * msgtag - Specifies a tag to be associated with the message.741741 * flags1 - Option for path.742742 * IPPRTY- 0x20 Specifies if you want to send priority message.743743- * buffer - Sddress of array of send buffers. 744744- * buflen - Total length of send buffers. 745745- * ansbuf - Address of array of buffer into which IUCV moves the reply 746746- * of this message. 747747- * anslen - Address of length reply buffers. 748748- * Output: msgid - Specifies the message ID. 749749- * Return: Return code from CP IUCV call. 750750- * (-EINVAL) - Buffer address is NULL. 743743+ * buffer - Sddress of array of send buffers.744744+ * buflen - Total length of send buffers.745745+ * ansbuf - Address of array of buffer into which IUCV moves the reply746746+ * of this message.747747+ * anslen - Address of length reply buffers.748748+ * Output: msgid - Specifies the message ID.749749+ * Return: Return code from CP IUCV call.750750+ * (-EINVAL) - Buffer address is NULL.751751*/752752int iucv_send2way_array (u16 pathid,753753 u32 * msgid,···758758 iucv_array_t * buffer,759759 ulong buflen, iucv_array_t * ansbuf, ulong anslen);760760761761-/* 762762- * Name: iucv_send2way_prmmsg 763763- * Purpose: This function transmits data to another application. 764764- * Prmmsg specifies that the 8-bytes of data are to be moved 765765- * into the parameter list. This is a two-way message and the 766766- * receiver of the message is expected to reply. A buffer 767767- * is provided into which IUCV moves the reply to this 768768- * message. 769769- * Input: pathid - Rath identification number. 770770- * trgcls - Specifies target class. 771771- * srccls - Specifies the source message class. 772772- * msgtag - Specifies a tag to be associated with the message. 761761+/*762762+ * Name: iucv_send2way_prmmsg763763+ * Purpose: This function transmits data to another application.764764+ * Prmmsg specifies that the 8-bytes of data are to be moved765765+ * into the parameter list. This is a two-way message and the766766+ * receiver of the message is expected to reply. A buffer767767+ * is provided into which IUCV moves the reply to this768768+ * message.769769+ * Input: pathid - Rath identification number.770770+ * trgcls - Specifies target class.771771+ * srccls - Specifies the source message class.772772+ * msgtag - Specifies a tag to be associated with the message.773773 * flags1 - Option for path.774774 * IPPRTY- 0x20 Specifies if you want to send priority message.775775- * prmmsg - 8-bytes of data to be placed in parameter list. 776776- * ansbuf - Address of buffer into which IUCV moves the reply of 775775+ * prmmsg - 8-bytes of data to be placed in parameter list.776776+ * ansbuf - Address of buffer into which IUCV moves the reply of777777 * this message.778778- * anslen - Address of length of buffer. 779779- * Output: msgid - Specifies the message ID. 780780- * Return: Return code from CP IUCV call. 781781- * (-EINVAL) - Buffer address is NULL. 778778+ * anslen - Address of length of buffer.779779+ * Output: msgid - Specifies the message ID.780780+ * Return: Return code from CP IUCV call.781781+ * (-EINVAL) - Buffer address is NULL.782782*/783783int iucv_send2way_prmmsg (u16 pathid,784784 u32 * msgid,···788788 ulong flags1,789789 uchar prmmsg[8], void *ansbuf, ulong anslen);790790791791-/* 792792- * Name: iucv_send2way_prmmsg_array 793793- * Purpose: This function transmits data to another application. 794794- * Prmmsg specifies that the 8-bytes of data are to be moved 795795- * into the parameter list. This is a two-way message and the 796796- * receiver of the message is expected to reply. A buffer 797797- * is provided into which IUCV moves the reply to this 798798- * message. The contents of ansbuf is the address of the 799799- * array of addresses and lengths of discontiguous buffers 800800- * that contain the reply. 801801- * Input: pathid - Path identification number. 802802- * trgcls - Specifies target class. 803803- * srccls - Specifies the source message class. 804804- * msgtag - Specifies a tag to be associated with the message. 791791+/*792792+ * Name: iucv_send2way_prmmsg_array793793+ * Purpose: This function transmits data to another application.794794+ * Prmmsg specifies that the 8-bytes of data are to be moved795795+ * into the parameter list. This is a two-way message and the796796+ * receiver of the message is expected to reply. A buffer797797+ * is provided into which IUCV moves the reply to this798798+ * message. The contents of ansbuf is the address of the799799+ * array of addresses and lengths of discontiguous buffers800800+ * that contain the reply.801801+ * Input: pathid - Path identification number.802802+ * trgcls - Specifies target class.803803+ * srccls - Specifies the source message class.804804+ * msgtag - Specifies a tag to be associated with the message.805805 * flags1 - Option for path.806806 * IPPRTY- 0x20 specifies if you want to send priority message.807807- * prmmsg - 8-bytes of data to be placed into the parameter list. 807807+ * prmmsg - 8-bytes of data to be placed into the parameter list.808808 * ansbuf - Address of array of buffer into which IUCV moves the reply809809- * of this message. 810810- * anslen - Address of length of reply buffers. 811811- * Output: msgid - Specifies the message ID. 812812- * Return: Return code from CP IUCV call. 813813- * (-EINVAL) - Ansbuf address is NULL. 809809+ * of this message.810810+ * anslen - Address of length of reply buffers.811811+ * Output: msgid - Specifies the message ID.812812+ * Return: Return code from CP IUCV call.813813+ * (-EINVAL) - Ansbuf address is NULL.814814*/815815int iucv_send2way_prmmsg_array (u16 pathid,816816 u32 * msgid,···821821 uchar prmmsg[8],822822 iucv_array_t * ansbuf, ulong anslen);823823824824-/* 825825- * Name: iucv_setmask 826826- * Purpose: This function enables or disables the following IUCV 827827- * external interruptions: Nonpriority and priority message 828828- * interrupts, nonpriority and priority reply interrupts. 824824+/*825825+ * Name: iucv_setmask826826+ * Purpose: This function enables or disables the following IUCV827827+ * external interruptions: Nonpriority and priority message828828+ * interrupts, nonpriority and priority reply interrupts.829829 * Input: SetMaskFlag - options for interrupts830830- * 0x80 - Nonpriority_MessagePendingInterruptsFlag 831831- * 0x40 - Priority_MessagePendingInterruptsFlag 832832- * 0x20 - Nonpriority_MessageCompletionInterruptsFlag 833833- * 0x10 - Priority_MessageCompletionInterruptsFlag 830830+ * 0x80 - Nonpriority_MessagePendingInterruptsFlag831831+ * 0x40 - Priority_MessagePendingInterruptsFlag832832+ * 0x20 - Nonpriority_MessageCompletionInterruptsFlag833833+ * 0x10 - Priority_MessageCompletionInterruptsFlag834834 * 0x08 - IUCVControlInterruptsFlag835835- * Output: NA 836836- * Return: Return code from CP IUCV call. 835835+ * Output: NA836836+ * Return: Return code from CP IUCV call.837837*/838838int iucv_setmask (int SetMaskFlag);839839840840-/* 841841- * Name: iucv_sever 842842- * Purpose: This function terminates an IUCV path. 843843- * Input: pathid - Path identification number. 844844- * user_data - 16-bytes of user data. 845845- * Output: NA 846846- * Return: Return code from CP IUCV call. 847847- * (-EINVAL) - Interal error, wild pointer. 840840+/*841841+ * Name: iucv_sever842842+ * Purpose: This function terminates an IUCV path.843843+ * Input: pathid - Path identification number.844844+ * user_data - 16-bytes of user data.845845+ * Output: NA846846+ * Return: Return code from CP IUCV call.847847+ * (-EINVAL) - Interal error, wild pointer.848848*/849849int iucv_sever (u16 pathid, uchar user_data[16]);
+173-172
drivers/s390/net/lcs.c
···6868static void lcs_start_kernel_thread(struct lcs_card *card);6969static void lcs_get_frames_cb(struct lcs_channel *, struct lcs_buffer *);7070static int lcs_send_delipm(struct lcs_card *, struct lcs_ipm_list *);7171+static int lcs_recovery(void *ptr);71727273/**7374 * Debug Facility Stuff···430429 card->tx_buffer = NULL;431430 card->tx_emitted = 0;432431433433- /* Initialize kernel thread task used for LGW commands. */434434- INIT_WORK(&card->kernel_thread_starter,435435- (void *)lcs_start_kernel_thread,card);436436- card->thread_start_mask = 0;437437- card->thread_allowed_mask = 0;438438- card->thread_running_mask = 0;439432 init_waitqueue_head(&card->wait_q);440433 spin_lock_init(&card->lock);441434 spin_lock_init(&card->ipm_lock);···670675 int index, rc;671676672677 LCS_DBF_TEXT(5, trace, "rdybuff");673673- BUG_ON(buffer->state != BUF_STATE_LOCKED &&674674- buffer->state != BUF_STATE_PROCESSED);678678+ if (buffer->state != BUF_STATE_LOCKED &&679679+ buffer->state != BUF_STATE_PROCESSED)680680+ BUG();675681 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);676682 buffer->state = BUF_STATE_READY;677683 index = buffer - channel->iob;···696700 int index, prev, next;697701698702 LCS_DBF_TEXT(5, trace, "prcsbuff");699699- BUG_ON(buffer->state != BUF_STATE_READY);703703+ if (buffer->state != BUF_STATE_READY)704704+ BUG();700705 buffer->state = BUF_STATE_PROCESSED;701706 index = buffer - channel->iob;702707 prev = (index - 1) & (LCS_NUM_BUFFS - 1);···729732 unsigned long flags;730733731734 LCS_DBF_TEXT(5, trace, "relbuff");732732- BUG_ON(buffer->state != BUF_STATE_LOCKED &&733733- buffer->state != BUF_STATE_PROCESSED);735735+ if (buffer->state != BUF_STATE_LOCKED &&736736+ buffer->state != BUF_STATE_PROCESSED)737737+ BUG();734738 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);735739 buffer->state = BUF_STATE_EMPTY;736740 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);···11451147 list_add_tail(&ipm->list, &card->ipm_list);11461148 }11471149 spin_unlock_irqrestore(&card->ipm_lock, flags);11481148- if (card->state == DEV_STATE_UP)11491149- netif_wake_queue(card->dev);11501150}1151115111521152/**···12271231 if (ipm != NULL)12281232 continue; /* Address already in list. */12291233 ipm = (struct lcs_ipm_list *)12301230- kmalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC);12341234+ kzalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC);12311235 if (ipm == NULL) {12321236 PRINT_INFO("Not enough memory to add "12331237 "new multicast entry!\n");12341238 break;12351239 }12361236- memset(ipm, 0, sizeof(struct lcs_ipm_list));12371240 memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH);12381241 ipm->ipm.ip_addr = im4->multiaddr;12391242 ipm->ipm_state = LCS_IPM_STATE_SET_REQUIRED;12401243 spin_lock_irqsave(&card->ipm_lock, flags);12441244+ LCS_DBF_HEX(2,trace,&ipm->ipm.ip_addr,4);12411245 list_add(&ipm->list, &card->ipm_list);12421246 spin_unlock_irqrestore(&card->ipm_lock, flags);12431247 }···12651269 read_unlock(&in4_dev->mc_list_lock);12661270 in_dev_put(in4_dev);1267127112721272+ netif_carrier_off(card->dev);12731273+ netif_tx_disable(card->dev);12741274+ wait_event(card->write.wait_q,12751275+ (card->write.state != CH_STATE_RUNNING));12681276 lcs_fix_multicast_list(card);12771277+ if (card->state == DEV_STATE_UP) {12781278+ netif_carrier_on(card->dev);12791279+ netif_wake_queue(card->dev);12801280+ }12691281out:12701282 lcs_clear_thread_running_bit(card, LCS_SET_MC_THREAD);12711283 return 0;···12901286 LCS_DBF_TEXT(4, trace, "setmulti");12911287 card = (struct lcs_card *) dev->priv;1292128812931293- if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) 12891289+ if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD))12941290 schedule_work(&card->kernel_thread_starter);12951291}12961292···13221318 return PTR_ERR(irb);13231319}1324132013211321+static int13221322+lcs_get_problem(struct ccw_device *cdev, struct irb *irb)13231323+{13241324+ int dstat, cstat;13251325+ char *sense;13261326+13271327+ sense = (char *) irb->ecw;13281328+ cstat = irb->scsw.cstat;13291329+ dstat = irb->scsw.dstat;13301330+13311331+ if (cstat & (SCHN_STAT_CHN_CTRL_CHK | SCHN_STAT_INTF_CTRL_CHK |13321332+ SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK |13331333+ SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) {13341334+ LCS_DBF_TEXT(2, trace, "CGENCHK");13351335+ return 1;13361336+ }13371337+ if (dstat & DEV_STAT_UNIT_CHECK) {13381338+ if (sense[LCS_SENSE_BYTE_1] &13391339+ LCS_SENSE_RESETTING_EVENT) {13401340+ LCS_DBF_TEXT(2, trace, "REVIND");13411341+ return 1;13421342+ }13431343+ if (sense[LCS_SENSE_BYTE_0] &13441344+ LCS_SENSE_CMD_REJECT) {13451345+ LCS_DBF_TEXT(2, trace, "CMDREJ");13461346+ return 0;13471347+ }13481348+ if ((!sense[LCS_SENSE_BYTE_0]) &&13491349+ (!sense[LCS_SENSE_BYTE_1]) &&13501350+ (!sense[LCS_SENSE_BYTE_2]) &&13511351+ (!sense[LCS_SENSE_BYTE_3])) {13521352+ LCS_DBF_TEXT(2, trace, "ZEROSEN");13531353+ return 0;13541354+ }13551355+ LCS_DBF_TEXT(2, trace, "DGENCHK");13561356+ return 1;13571357+ }13581358+ return 0;13591359+}13601360+13611361+void13621362+lcs_schedule_recovery(struct lcs_card *card)13631363+{13641364+ LCS_DBF_TEXT(2, trace, "startrec");13651365+ if (!lcs_set_thread_start_bit(card, LCS_RECOVERY_THREAD))13661366+ schedule_work(&card->kernel_thread_starter);13671367+}1325136813261369/**13271370 * IRQ Handler for LCS channels···13781327{13791328 struct lcs_card *card;13801329 struct lcs_channel *channel;13811381- int index;13301330+ int rc, index;13311331+ int cstat, dstat;1382133213831333 if (lcs_check_irb_error(cdev, irb))13841334 return;···13901338 else13911339 channel = &card->write;1392134013411341+ cstat = irb->scsw.cstat;13421342+ dstat = irb->scsw.dstat;13931343 LCS_DBF_TEXT_(5, trace, "Rint%s",cdev->dev.bus_id);13941344 LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.cstat, irb->scsw.dstat);13951345 LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.fctl, irb->scsw.actl);1396134613471347+ /* Check for channel and device errors presented */13481348+ rc = lcs_get_problem(cdev, irb);13491349+ if (rc || (dstat & DEV_STAT_UNIT_EXCEP)) {13501350+ PRINT_WARN("check on device %s, dstat=0x%X, cstat=0x%X \n",13511351+ cdev->dev.bus_id, dstat, cstat);13521352+ if (rc) {13531353+ lcs_schedule_recovery(card);13541354+ wake_up(&card->wait_q);13551355+ return;13561356+ }13571357+ }13971358 /* How far in the ccw chain have we processed? */13981359 if ((channel->state != CH_STATE_INIT) &&13991360 (irb->scsw.fctl & SCSW_FCTL_START_FUNC)) {14001400- index = (struct ccw1 *) __va((addr_t) irb->scsw.cpa) 13611361+ index = (struct ccw1 *) __va((addr_t) irb->scsw.cpa)14011362 - channel->ccws;14021363 if ((irb->scsw.actl & SCSW_ACTL_SUSPENDED) ||14031364 (irb->scsw.cstat & SCHN_STAT_PCI))···14321367 else if (irb->scsw.actl & SCSW_ACTL_SUSPENDED)14331368 /* CCW execution stopped on a suspend bit. */14341369 channel->state = CH_STATE_SUSPENDED;14351435-14361370 if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) {14371371 if (irb->scsw.cc != 0) {14381372 ccw_device_halt(channel->ccwdev, (addr_t) channel);···14401376 /* The channel has been stopped by halt_IO. */14411377 channel->state = CH_STATE_HALTED;14421378 }14431443-14441379 if (irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) {14451380 channel->state = CH_STATE_CLEARED;14461381 }···15151452 lcs_release_buffer(channel, buffer);15161453 card = (struct lcs_card *)15171454 ((char *) channel - offsetof(struct lcs_card, write));15181518- if (netif_queue_stopped(card->dev))14551455+ if (netif_queue_stopped(card->dev) && netif_carrier_ok(card->dev))15191456 netif_wake_queue(card->dev);15201457 spin_lock(&card->lock);15211458 card->tx_emitted--;···15491486 card->stats.tx_dropped++;15501487 card->stats.tx_errors++;15511488 card->stats.tx_carrier_errors++;14891489+ return 0;14901490+ }14911491+ if (skb->protocol == htons(ETH_P_IPV6)) {14921492+ dev_kfree_skb(skb);15521493 return 0;15531494 }15541495 netif_stop_queue(card->dev);···17001633}1701163417021635/**17031703- * reset card17041704- */17051705-static int17061706-lcs_resetcard(struct lcs_card *card)17071707-{17081708- int retries;17091709-17101710- LCS_DBF_TEXT(2, trace, "rescard");17111711- for (retries = 0; retries < 10; retries++) {17121712- if (lcs_detect(card) == 0) {17131713- netif_wake_queue(card->dev);17141714- card->state = DEV_STATE_UP;17151715- PRINT_INFO("LCS device %s successfully restarted!\n",17161716- card->dev->name);17171717- return 0;17181718- }17191719- msleep(3000);17201720- }17211721- PRINT_ERR("Error in Reseting LCS card!\n");17221722- return -EIO;17231723-}17241724-17251725-17261726-/**17271636 * LCS Stop card17281637 */17291638static int···17231680}1724168117251682/**17261726- * LGW initiated commands17271727- */17281728-static int17291729-lcs_lgw_startlan_thread(void *data)17301730-{17311731- struct lcs_card *card;17321732-17331733- card = (struct lcs_card *) data;17341734- daemonize("lgwstpln");17351735-17361736- if (!lcs_do_run_thread(card, LCS_STARTLAN_THREAD))17371737- return 0;17381738- LCS_DBF_TEXT(4, trace, "lgwstpln");17391739- if (card->dev)17401740- netif_stop_queue(card->dev);17411741- if (lcs_startlan(card) == 0) {17421742- netif_wake_queue(card->dev);17431743- card->state = DEV_STATE_UP;17441744- PRINT_INFO("LCS Startlan for device %s succeeded!\n",17451745- card->dev->name);17461746-17471747- } else17481748- PRINT_ERR("LCS Startlan for device %s failed!\n",17491749- card->dev->name);17501750- lcs_clear_thread_running_bit(card, LCS_STARTLAN_THREAD);17511751- return 0;17521752-}17531753-17541754-/**17551755- * Send startup command initiated by Lan Gateway17561756- */17571757-static int17581758-lcs_lgw_startup_thread(void *data)17591759-{17601760- int rc;17611761-17621762- struct lcs_card *card;17631763-17641764- card = (struct lcs_card *) data;17651765- daemonize("lgwstaln");17661766-17671767- if (!lcs_do_run_thread(card, LCS_STARTUP_THREAD))17681768- return 0;17691769- LCS_DBF_TEXT(4, trace, "lgwstaln");17701770- if (card->dev)17711771- netif_stop_queue(card->dev);17721772- rc = lcs_send_startup(card, LCS_INITIATOR_LGW);17731773- if (rc != 0) {17741774- PRINT_ERR("Startup for LCS device %s initiated " \17751775- "by LGW failed!\nReseting card ...\n",17761776- card->dev->name);17771777- /* do a card reset */17781778- rc = lcs_resetcard(card);17791779- if (rc == 0)17801780- goto Done;17811781- }17821782- rc = lcs_startlan(card);17831783- if (rc == 0) {17841784- netif_wake_queue(card->dev);17851785- card->state = DEV_STATE_UP;17861786- }17871787-Done:17881788- if (rc == 0)17891789- PRINT_INFO("LCS Startup for device %s succeeded!\n",17901790- card->dev->name);17911791- else17921792- PRINT_ERR("LCS Startup for device %s failed!\n",17931793- card->dev->name);17941794- lcs_clear_thread_running_bit(card, LCS_STARTUP_THREAD);17951795- return 0;17961796-}17971797-17981798-17991799-/**18001800- * send stoplan command initiated by Lan Gateway18011801- */18021802-static int18031803-lcs_lgw_stoplan_thread(void *data)18041804-{18051805- struct lcs_card *card;18061806- int rc;18071807-18081808- card = (struct lcs_card *) data;18091809- daemonize("lgwstop");18101810-18111811- if (!lcs_do_run_thread(card, LCS_STOPLAN_THREAD))18121812- return 0;18131813- LCS_DBF_TEXT(4, trace, "lgwstop");18141814- if (card->dev)18151815- netif_stop_queue(card->dev);18161816- if (lcs_send_stoplan(card, LCS_INITIATOR_LGW) == 0)18171817- PRINT_INFO("Stoplan for %s initiated by LGW succeeded!\n",18181818- card->dev->name);18191819- else18201820- PRINT_ERR("Stoplan %s initiated by LGW failed!\n",18211821- card->dev->name);18221822- /*Try to reset the card, stop it on failure */18231823- rc = lcs_resetcard(card);18241824- if (rc != 0)18251825- rc = lcs_stopcard(card);18261826- lcs_clear_thread_running_bit(card, LCS_STOPLAN_THREAD);18271827- return rc;18281828-}18291829-18301830-/**18311683 * Kernel Thread helper functions for LGW initiated commands18321684 */18331685static void18341686lcs_start_kernel_thread(struct lcs_card *card)18351687{18361688 LCS_DBF_TEXT(5, trace, "krnthrd");18371837- if (lcs_do_start_thread(card, LCS_STARTUP_THREAD))18381838- kernel_thread(lcs_lgw_startup_thread, (void *) card, SIGCHLD);18391839- if (lcs_do_start_thread(card, LCS_STARTLAN_THREAD))18401840- kernel_thread(lcs_lgw_startlan_thread, (void *) card, SIGCHLD);18411841- if (lcs_do_start_thread(card, LCS_STOPLAN_THREAD))18421842- kernel_thread(lcs_lgw_stoplan_thread, (void *) card, SIGCHLD);16891689+ if (lcs_do_start_thread(card, LCS_RECOVERY_THREAD))16901690+ kernel_thread(lcs_recovery, (void *) card, SIGCHLD);18431691#ifdef CONFIG_IP_MULTICAST18441692 if (lcs_do_start_thread(card, LCS_SET_MC_THREAD))18451845- kernel_thread(lcs_register_mc_addresses, (void *) card, SIGCHLD);16931693+ kernel_thread(lcs_register_mc_addresses,16941694+ (void *) card, SIGCHLD);18461695#endif18471696}18481697···17481813 if (cmd->initiator == LCS_INITIATOR_LGW) {17491814 switch(cmd->cmd_code) {17501815 case LCS_CMD_STARTUP:17511751- if (!lcs_set_thread_start_bit(card,17521752- LCS_STARTUP_THREAD))17531753- schedule_work(&card->kernel_thread_starter);17541754- break;17551816 case LCS_CMD_STARTLAN:17561756- if (!lcs_set_thread_start_bit(card,17571757- LCS_STARTLAN_THREAD))17581758- schedule_work(&card->kernel_thread_starter);18171817+ lcs_schedule_recovery(card);17591818 break;17601819 case LCS_CMD_STOPLAN:17611761- if (!lcs_set_thread_start_bit(card,17621762- LCS_STOPLAN_THREAD))17631763- schedule_work(&card->kernel_thread_starter);18201820+ PRINT_WARN("Stoplan for %s initiated by LGW.\n",18211821+ card->dev->name);18221822+ if (card->dev)18231823+ netif_carrier_off(card->dev);17641824 break;17651825 default:17661826 PRINT_INFO("UNRECOGNIZED LGW COMMAND\n");···1871194118721942 LCS_DBF_TEXT(2, trace, "stopdev");18731943 card = (struct lcs_card *) dev->priv;18741874- netif_stop_queue(dev);19441944+ netif_carrier_off(dev);19451945+ netif_tx_disable(dev);18751946 dev->flags &= ~IFF_UP;19471947+ wait_event(card->write.wait_q,19481948+ (card->write.state != CH_STATE_RUNNING));18761949 rc = lcs_stopcard(card);18771950 if (rc)18781951 PRINT_ERR("Try it again!\n ");···1901196819021969 } else {19031970 dev->flags |= IFF_UP;19711971+ netif_carrier_on(dev);19041972 netif_wake_queue(dev);19051973 card->state = DEV_STATE_UP;19061974 }···1993205919942060DEVICE_ATTR(lancmd_timeout, 0644, lcs_timeout_show, lcs_timeout_store);1995206120622062+static ssize_t20632063+lcs_dev_recover_store(struct device *dev, struct device_attribute *attr,20642064+ const char *buf, size_t count)20652065+{20662066+ struct lcs_card *card = dev->driver_data;20672067+ char *tmp;20682068+ int i;20692069+20702070+ if (!card)20712071+ return -EINVAL;20722072+ if (card->state != DEV_STATE_UP)20732073+ return -EPERM;20742074+ i = simple_strtoul(buf, &tmp, 16);20752075+ if (i == 1)20762076+ lcs_schedule_recovery(card);20772077+ return count;20782078+}20792079+20802080+static DEVICE_ATTR(recover, 0200, NULL, lcs_dev_recover_store);20812081+19962082static struct attribute * lcs_attrs[] = {19972083 &dev_attr_portno.attr,19982084 &dev_attr_type.attr,19992085 &dev_attr_lancmd_timeout.attr,20862086+ &dev_attr_recover.attr,20002087 NULL,20012088};20022089···20542099 ccwgdev->dev.driver_data = card;20552100 ccwgdev->cdev[0]->handler = lcs_irq;20562101 ccwgdev->cdev[1]->handler = lcs_irq;21022102+ card->gdev = ccwgdev;21032103+ INIT_WORK(&card->kernel_thread_starter,21042104+ (void *) lcs_start_kernel_thread, card);21052105+ card->thread_start_mask = 0;21062106+ card->thread_allowed_mask = 0;21072107+ card->thread_running_mask = 0;20572108 return 0;20582109}20592110···21612200 if (recover_state == DEV_STATE_RECOVER) {21622201 lcs_set_multicast_list(card->dev);21632202 card->dev->flags |= IFF_UP;22032203+ netif_carrier_on(card->dev);21642204 netif_wake_queue(card->dev);21652205 card->state = DEV_STATE_UP;21662206 } else {···21912229 * lcs_shutdown_device, called when setting the group device offline.21922230 */21932231static int21942194-lcs_shutdown_device(struct ccwgroup_device *ccwgdev)22322232+__lcs_shutdown_device(struct ccwgroup_device *ccwgdev, int recovery_mode)21952233{21962234 struct lcs_card *card;21972235 enum lcs_dev_states recover_state;···22012239 card = (struct lcs_card *)ccwgdev->dev.driver_data;22022240 if (!card)22032241 return -ENODEV;22042204- lcs_set_allowed_threads(card, 0);22052205- if (lcs_wait_for_threads(card, LCS_SET_MC_THREAD))22062206- return -ERESTARTSYS;22422242+ if (recovery_mode == 0) {22432243+ lcs_set_allowed_threads(card, 0);22442244+ if (lcs_wait_for_threads(card, LCS_SET_MC_THREAD))22452245+ return -ERESTARTSYS;22462246+ }22072247 LCS_DBF_HEX(3, setup, &card, sizeof(void*));22082248 recover_state = card->state;22092249···22172253 }22182254 if (ret)22192255 return ret;22562256+ return 0;22572257+}22582258+22592259+static int22602260+lcs_shutdown_device(struct ccwgroup_device *ccwgdev)22612261+{22622262+ return __lcs_shutdown_device(ccwgdev, 0);22632263+}22642264+22652265+/**22662266+ * drive lcs recovery after startup and startlan initiated by Lan Gateway22672267+ */22682268+static int22692269+lcs_recovery(void *ptr)22702270+{22712271+ struct lcs_card *card;22722272+ struct ccwgroup_device *gdev;22732273+ int rc;22742274+22752275+ card = (struct lcs_card *) ptr;22762276+ daemonize("lcs_recover");22772277+22782278+ LCS_DBF_TEXT(4, trace, "recover1");22792279+ if (!lcs_do_run_thread(card, LCS_RECOVERY_THREAD))22802280+ return 0;22812281+ LCS_DBF_TEXT(4, trace, "recover2");22822282+ gdev = card->gdev;22832283+ PRINT_WARN("Recovery of device %s started...\n", gdev->dev.bus_id);22842284+ rc = __lcs_shutdown_device(gdev, 1);22852285+ rc = lcs_new_device(gdev);22862286+ if (!rc)22872287+ PRINT_INFO("Device %s successfully recovered!\n",22882288+ card->dev->name);22892289+ else22902290+ PRINT_INFO("Device %s could not be recovered!\n",22912291+ card->dev->name);22922292+ lcs_clear_thread_running_bit(card, LCS_RECOVERY_THREAD);22202293 return 0;22212294}22222295
···785785 }786786 if (card->options.large_send == type)787787 return count;788788- if ((rc = qeth_set_large_send(card, type))) 788788+ if ((rc = qeth_set_large_send(card, type)))789789 return rc;790790 return count;791791}···16821682 if (card->info.type == QETH_CARD_TYPE_OSN)16831683 return sysfs_create_group(&dev->kobj,16841684 &qeth_osn_device_attr_group);16851685-16851685+16861686 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_attr_group)))16871687 return ret;16881688 if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group))){···17131713 if (card->info.type == QETH_CARD_TYPE_OSN)17141714 return sysfs_remove_group(&dev->kobj,17151715 &qeth_osn_device_attr_group);17161716-17161716+17171717 sysfs_remove_group(&dev->kobj, &qeth_device_attr_group);17181718 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group);17191719 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group);
+2-2
drivers/s390/net/qeth_tso.h
···117117 int fragno;118118 unsigned long addr;119119 int element, cnt, dlen;120120-120120+121121 fragno = skb_shinfo(skb)->nr_frags;122122 element = *next_element_to_fill;123123 dlen = 0;124124-124124+125125 if (is_tso)126126 buffer->element[element].flags =127127 SBAL_FLAGS_MIDDLE_FRAG;
···416416 return retval;417417 }418418419419- retval = -EIO;420419 bh = affs_bread(sb, old_dentry->d_inode->i_ino);421420 if (!bh)422422- goto done;421421+ return -EIO;423422424423 /* Remove header from its parent directory. */425424 affs_lock_dir(old_dir);
+7
fs/cifs/CHANGES
···11+Version 1.4322+------------33+POSIX locking to servers which support CIFS POSIX Extensions44+(disabled by default controlled by proc/fs/cifs/Experimental).55+Handle conversion of long share names (especially Asian languages)66+to Unicode during mount. 77+18Version 1.4229------------310Fix slow oplock break when mounted to different servers at the same time and
···129129#if defined (CONFIG_CPU_R4300) \130130 || defined (CONFIG_CPU_R4X00) \131131 || defined (CONFIG_CPU_R5000) \132132+ || defined (CONFIG_CPU_RM7000) \132133 || defined (CONFIG_CPU_NEVADA) \133134 || defined (CONFIG_CPU_TX49XX) \134135 || defined (CONFIG_CPU_MIPS64)
+5-1
include/asm-mips/cpu.h
···5151#define PRID_IMP_R4300 0x0b005252#define PRID_IMP_VR41XX 0x0c005353#define PRID_IMP_R12000 0x0e005454+#define PRID_IMP_R14000 0x0f005455#define PRID_IMP_R8000 0x10005556#define PRID_IMP_PR4450 0x12005657#define PRID_IMP_R4600 0x2000···8887#define PRID_IMP_24K 0x93008988#define PRID_IMP_34K 0x95009089#define PRID_IMP_24KE 0x96009090+#define PRID_IMP_74K 0x970091919292/*9393 * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE···198196#define CPU_34K 60199197#define CPU_PR4450 61200198#define CPU_SB1A 62201201-#define CPU_LAST 62199199+#define CPU_74K 63200200+#define CPU_R14000 64201201+#define CPU_LAST 64202202203203/*204204 * ISA Level encodings
···5555struct sigcontext {5656 unsigned long sc_regs[32];5757 unsigned long sc_fpregs[32];5858- unsigned long sc_hi[4];5959- unsigned long sc_lo[4];5858+ unsigned long sc_mdhi;5959+ unsigned long sc_hi1;6060+ unsigned long sc_hi2;6161+ unsigned long sc_hi3;6262+ unsigned long sc_mdlo;6363+ unsigned long sc_lo1;6464+ unsigned long sc_lo2;6565+ unsigned long sc_lo3;6066 unsigned long sc_pc;6167 unsigned int sc_fpc_csr;6268 unsigned int sc_used_math;
+2-3
include/asm-mips/smp.h
···4848#define SMP_CALL_FUNCTION 0x249495050extern cpumask_t phys_cpu_present_map;5151-extern cpumask_t cpu_online_map;5251#define cpu_possible_map phys_cpu_present_map53525453extern cpumask_t cpu_callout_map;···8586extern void plat_smp_setup(void);86878788/*8888- * Called after init_IRQ but before __cpu_up.8989+ * Called in smp_prepare_cpus.8990 */9090-extern void prom_prepare_cpus(unsigned int max_cpus);9191+extern void plat_prepare_cpus(unsigned int max_cpus);91929293/*9394 * Last chance for the board code to finish SMP initialization before
+14
include/asm-mips/sparsemem.h
···11+#ifndef _MIPS_SPARSEMEM_H22+#define _MIPS_SPARSEMEM_H33+#ifdef CONFIG_SPARSEMEM44+55+/*66+ * SECTION_SIZE_BITS 2^N: how big each section will be77+ * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space88+ */99+#define SECTION_SIZE_BITS 281010+#define MAX_PHYSMEM_BITS 351111+1212+#endif /* CONFIG_SPARSEMEM */1313+#endif /* _MIPS_SPARSEMEM_H */1414+
+1
include/asm-powerpc/termbits.h
···153153#define HUPCL 00040000154154155155#define CLOCAL 00100000156156+#define CMSPAR 010000000000 /* mark or space (stick) parity */156157#define CRTSCTS 020000000000 /* flow control */157158158159/* c_lflag bits */
···456456457457 return ret;458458}459459+EXPORT_SYMBOL_GPL(hrtimer_start);459460460461/**461462 * hrtimer_try_to_cancel - try to deactivate a timer···485484 return ret;486485487486}487487+EXPORT_SYMBOL_GPL(hrtimer_try_to_cancel);488488489489/**490490 * hrtimer_cancel - cancel a timer and wait for the handler to finish.···506504 cpu_relax();507505 }508506}507507+EXPORT_SYMBOL_GPL(hrtimer_cancel);509508510509/**511510 * hrtimer_get_remaining - get remaining time for the timer···525522526523 return rem;527524}525525+EXPORT_SYMBOL_GPL(hrtimer_get_remaining);528526529527#ifdef CONFIG_NO_IDLE_HZ530528/**···584580 timer->base = &bases[clock_id];585581 timer->node.rb_parent = HRTIMER_INACTIVE;586582}583583+EXPORT_SYMBOL_GPL(hrtimer_init);587584588585/**589586 * hrtimer_get_res - get the timer resolution for a clock···604599605600 return 0;606601}602602+EXPORT_SYMBOL_GPL(hrtimer_get_res);607603608604/*609605 * Expire the per base hrtimer-queue:
+4-4
mm/memory_hotplug.c
···9191 if (start_pfn < zone->zone_start_pfn)9292 zone->zone_start_pfn = start_pfn;93939494- if (end_pfn > old_zone_end_pfn)9595- zone->spanned_pages = end_pfn - zone->zone_start_pfn;9494+ zone->spanned_pages = max(old_zone_end_pfn, end_pfn) -9595+ zone->zone_start_pfn;96969797 zone_span_writeunlock(zone);9898}···106106 if (start_pfn < pgdat->node_start_pfn)107107 pgdat->node_start_pfn = start_pfn;108108109109- if (end_pfn > old_pgdat_end_pfn)110110- pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn;109109+ pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) -110110+ pgdat->node_start_pfn;111111}112112113113int online_pages(unsigned long pfn, unsigned long nr_pages)
+13-14
mm/slab.c
···207207#define BUFCTL_ACTIVE (((kmem_bufctl_t)(~0U))-2)208208#define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-3)209209210210-/* Max number of objs-per-slab for caches which use off-slab slabs.211211- * Needed to avoid a possible looping condition in cache_grow().212212- */213213-static unsigned long offslab_limit;214214-215210/*216211 * struct slab217212 *···13511356 NULL, NULL);13521357 }1353135813541354- /* Inc off-slab bufctl limit until the ceiling is hit. */13551355- if (!(OFF_SLAB(sizes->cs_cachep))) {13561356- offslab_limit = sizes->cs_size - sizeof(struct slab);13571357- offslab_limit /= sizeof(kmem_bufctl_t);13581358- }13591359-13601359 sizes->cs_dmacachep = kmem_cache_create(names->name_dma,13611360 sizes->cs_size,13621361 ARCH_KMALLOC_MINALIGN,···17691780static size_t calculate_slab_order(struct kmem_cache *cachep,17701781 size_t size, size_t align, unsigned long flags)17711782{17831783+ unsigned long offslab_limit;17721784 size_t left_over = 0;17731785 int gfporder;17741786···17811791 if (!num)17821792 continue;1783179317841784- /* More than offslab_limit objects will cause problems */17851785- if ((flags & CFLGS_OFF_SLAB) && num > offslab_limit)17861786- break;17941794+ if (flags & CFLGS_OFF_SLAB) {17951795+ /*17961796+ * Max number of objs-per-slab for caches which17971797+ * use off-slab slabs. Needed to avoid a possible17981798+ * looping condition in cache_grow().17991799+ */18001800+ offslab_limit = size - sizeof(struct slab);18011801+ offslab_limit /= sizeof(kmem_bufctl_t);18021802+18031803+ if (num > offslab_limit)18041804+ break;18051805+ }1787180617881807 /* Found something acceptable - save it away */17891808 cachep->num = num;
+7-12
net/bridge/br_if.c
···300300 rtnl_lock();301301 if (strchr(dev->name, '%')) {302302 ret = dev_alloc_name(dev, dev->name);303303- if (ret < 0)304304- goto err1;303303+ if (ret < 0) {304304+ free_netdev(dev);305305+ goto out;306306+ }305307 }306308307309 ret = register_netdevice(dev);308310 if (ret)309309- goto err2;311311+ goto out;310312311313 ret = br_sysfs_addbr(dev);312314 if (ret)313313- goto err3;314314- rtnl_unlock();315315- return 0;316316-317317- err3:318318- unregister_netdev(dev);319319- err2:320320- free_netdev(dev);321321- err1:315315+ unregister_netdevice(dev);316316+ out:322317 rtnl_unlock();323318 return ret;324319}
+11-9
net/core/dev.c
···127127 * sure which should go first, but I bet it won't make much128128 * difference if we are running VLANs. The good news is that129129 * this protocol won't be in the list unless compiled in, so130130- * the average user (w/out VLANs) will not be adversly affected.130130+ * the average user (w/out VLANs) will not be adversely affected.131131 * --BLG132132 *133133 * 0800 IP···149149static struct list_head ptype_all; /* Taps */150150151151/*152152- * The @dev_base list is protected by @dev_base_lock and the rtln152152+ * The @dev_base list is protected by @dev_base_lock and the rtnl153153 * semaphore.154154 *155155 * Pure readers hold dev_base_lock for reading.···641641 * @name: name format string642642 *643643 * Passed a format string - eg "lt%d" it will try and find a suitable644644- * id. Not efficient for many devices, not called a lot. The caller645645- * must hold the dev_base or rtnl lock while allocating the name and646646- * adding the device in order to avoid duplicates. Returns the number647647- * of the unit assigned or a negative errno code.644644+ * id. It scans list of devices to build up a free map, then chooses645645+ * the first empty slot. The caller must hold the dev_base or rtnl lock646646+ * while allocating the name and adding the device in order to avoid647647+ * duplicates.648648+ * Limited to bits_per_byte * page size devices (ie 32K on most platforms).649649+ * Returns the number of the unit assigned or a negative errno code.648650 */649651650652int dev_alloc_name(struct net_device *dev, const char *name)···746744}747745748746/**749749- * netdev_features_change - device changes fatures747747+ * netdev_features_change - device changes features750748 * @dev: device to cause notification751749 *752750 * Called to indicate a device has changed features.···21982196 * @dev: device21992197 * @inc: modifier22002198 *22012201- * Add or remove promsicuity from a device. While the count in the device21992199+ * Add or remove promiscuity from a device. While the count in the device22022200 * remains above zero the interface remains promiscuous. Once it hits zero22032201 * the device reverts back to normal filtering operation. A negative inc22042202 * value is used to drop promiscuity on the device.···31243122void free_netdev(struct net_device *dev)31253123{31263124#ifdef CONFIG_SYSFS31273127- /* Compatiablity with error handling in drivers */31253125+ /* Compatibility with error handling in drivers */31283126 if (dev->reg_state == NETREG_UNINITIALIZED) {31293127 kfree((char *)dev - dev->padded);31303128 return;
···11-/* -*- linux-c -*-22- * sysctl_net_ether.c: sysctl interface to net Ethernet subsystem.33- *44- * Begun April 1, 1996, Mike Shaver.55- * Added /proc/sys/net/ether directory entry (empty =) ). [MS]66- */77-88-#include <linux/mm.h>99-#include <linux/sysctl.h>1010-#include <linux/if_ether.h>1111-1212-ctl_table ether_table[] = {1313- {0}1414-};
+2-2
net/ipv4/netfilter/Kconfig
···170170 Documentation/modules.txt. If unsure, say `N'.171171172172config IP_NF_H323173173- tristate 'H.323 protocol support'174174- depends on IP_NF_CONNTRACK173173+ tristate 'H.323 protocol support (EXPERIMENTAL)'174174+ depends on IP_NF_CONNTRACK && EXPERIMENTAL175175 help176176 H.323 is a VoIP signalling protocol from ITU-T. As one of the most177177 important VoIP protocols, it is widely used by voice hardware and
···469469 DEBUGP("%s but no session\n", pptp_msg_name[msg]);470470 break;471471 }472472- if (info->sstate != PPTP_CALL_IN_REP473473- && info->sstate != PPTP_CALL_IN_CONF) {472472+ if (info->cstate != PPTP_CALL_IN_REP473473+ && info->cstate != PPTP_CALL_IN_CONF) {474474 DEBUGP("%s but never sent IN_CALL_REPLY\n",475475 pptp_msg_name[msg]);476476 break;
···642642 * eventually). The difference is that pulled data not copied, but643643 * immediately discarded.644644 */645645-static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len)645645+static void __pskb_trim_head(struct sk_buff *skb, int len)646646{647647 int i, k, eat;648648···667667 skb->tail = skb->data;668668 skb->data_len -= len;669669 skb->len = skb->data_len;670670- return skb->tail;671670}672671673672int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len)···675676 pskb_expand_head(skb, 0, 0, GFP_ATOMIC))676677 return -ENOMEM;677678678678- if (len <= skb_headlen(skb)) {679679+ /* If len == headlen, we avoid __skb_pull to preserve alignment. */680680+ if (unlikely(len < skb_headlen(skb)))679681 __skb_pull(skb, len);680680- } else {681681- if (__pskb_trim_head(skb, len-skb_headlen(skb)) == NULL)682682- return -ENOMEM;683683- }682682+ else683683+ __pskb_trim_head(skb, len - skb_headlen(skb));684684685685 TCP_SKB_CB(skb)->seq += len;686686 skb->ip_summed = CHECKSUM_HW;
+11-5
net/ipv6/route.c
···280280{281281 struct neighbour *neigh = rt->rt6i_nexthop;282282 int m = 0;283283- if (neigh) {283283+ if (rt->rt6i_flags & RTF_NONEXTHOP ||284284+ !(rt->rt6i_flags & RTF_GATEWAY))285285+ m = 1;286286+ else if (neigh) {284287 read_lock_bh(&neigh->lock);285288 if (neigh->nud_state & NUD_VALID)286286- m = 1;289289+ m = 2;287290 read_unlock_bh(&neigh->lock);288291 }289292 return m;···295292static int rt6_score_route(struct rt6_info *rt, int oif,296293 int strict)297294{298298- int m = rt6_check_dev(rt, oif);295295+ int m, n;296296+297297+ m = rt6_check_dev(rt, oif);299298 if (!m && (strict & RT6_SELECT_F_IFACE))300299 return -1;301300#ifdef CONFIG_IPV6_ROUTER_PREF302301 m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2;303302#endif304304- if (rt6_check_neigh(rt))303303+ n = rt6_check_neigh(rt);304304+ if (n > 1)305305 m |= 16;306306- else if (strict & RT6_SELECT_F_REACHABLE)306306+ else if (!n && strict & RT6_SELECT_F_REACHABLE)307307 return -1;308308 return m;309309}
+2-1
net/irda/irlap.c
···884884 if (now) {885885 /* Send down empty frame to trigger speed change */886886 skb = dev_alloc_skb(0);887887- irlap_queue_xmit(self, skb);887887+ if (skb)888888+ irlap_queue_xmit(self, skb);888889 }889890}890891
···4422442244234423 /* Set up any superblocks initialized prior to the policy load. */44244424 printk(KERN_INFO "SELinux: Setting up existing superblocks.\n");44254425+ spin_lock(&sb_lock);44254426 spin_lock(&sb_security_lock);44264427next_sb:44274428 if (!list_empty(&superblock_security_head)) {···44314430 struct superblock_security_struct,44324431 list);44334432 struct super_block *sb = sbsec->sb;44344434- spin_lock(&sb_lock);44354433 sb->s_count++;44364436- spin_unlock(&sb_lock);44374434 spin_unlock(&sb_security_lock);44354435+ spin_unlock(&sb_lock);44384436 down_read(&sb->s_umount);44394437 if (sb->s_root)44404438 superblock_doinit(sb, NULL);44414439 drop_super(sb);44404440+ spin_lock(&sb_lock);44424441 spin_lock(&sb_security_lock);44434442 list_del_init(&sbsec->list);44444443 goto next_sb;44454444 }44464445 spin_unlock(&sb_security_lock);44464446+ spin_unlock(&sb_lock);44474447}4448444844494449/* SELinux requires early initialization in order to label