From bb597f80bd8b2b1125446cf3fb5b6c221dca3dee Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Wed, 10 Aug 2005 02:49:00 -0700 Subject: [PATCH] --- yaml --- r: 5839 b: refs/heads/master c: 1c53e4357ec72d6114c58d20c26d00a904f55da3 h: refs/heads/master i: 5837: 57bd98623f8cfa35c66203891249ad3dd9e502df 5835: 26511ed68e99842f691f11783805b92ef2b63c2a 5831: 942462239dca6a6b568973715ae171169c9b4110 5823: e134f1ea5d9cfe82e893f1d636ed89079b6e1302 v: v3 --- [refs] | 2 +- trunk/Documentation/acpi-hotkey.txt | 3 - trunk/Documentation/kernel-parameters.txt | 5 -- trunk/Documentation/pci.txt | 14 ++++ trunk/MAINTAINERS | 14 +--- trunk/arch/arm/kernel/calls.S | 6 -- trunk/arch/arm/mach-s3c2410/s3c2410.c | 4 +- trunk/arch/arm/mm/Kconfig | 2 +- trunk/arch/arm/mm/proc-v6.S | 2 +- trunk/arch/arm/nwfpe/softfloat.c | 34 ++++++--- trunk/arch/ia64/kernel/domain.c | 2 +- trunk/arch/ppc64/kernel/LparData.c | 79 +++++++++++++++++++- trunk/arch/ppc64/kernel/Makefile | 5 -- trunk/arch/ppc64/kernel/head.S | 6 -- trunk/arch/ppc64/kernel/lparmap.c | 31 -------- trunk/arch/x86_64/kernel/smpboot.c | 2 +- trunk/drivers/acpi/motherboard.c | 2 +- trunk/drivers/acpi/osl.c | 6 +- trunk/drivers/base/class.c | 10 +-- trunk/drivers/char/mem.c | 12 +-- trunk/drivers/net/e1000/e1000_main.c | 1 - trunk/drivers/pci/hotplug/pciehp.h | 2 +- trunk/drivers/pci/hotplug/pciehp_core.c | 2 +- trunk/drivers/pci/hotplug/pciehp_ctrl.c | 2 +- trunk/drivers/pci/hotplug/pciehp_hpc.c | 2 +- trunk/drivers/pci/hotplug/pciehp_pci.c | 2 +- trunk/drivers/pci/hotplug/pciehprm.h | 2 +- trunk/drivers/pci/hotplug/pciehprm_acpi.c | 2 +- trunk/drivers/pci/hotplug/pciehprm_nonacpi.c | 2 +- trunk/drivers/pci/hotplug/pciehprm_nonacpi.h | 2 +- trunk/drivers/pci/hotplug/shpchp.h | 2 +- trunk/drivers/pci/hotplug/shpchp_core.c | 2 +- trunk/drivers/pci/hotplug/shpchp_ctrl.c | 2 +- trunk/drivers/pci/hotplug/shpchp_hpc.c | 2 +- trunk/drivers/pci/hotplug/shpchp_pci.c | 2 +- trunk/drivers/pci/hotplug/shpchprm.h | 2 +- trunk/drivers/pci/hotplug/shpchprm_acpi.c | 2 +- trunk/drivers/pci/hotplug/shpchprm_legacy.c | 2 +- trunk/drivers/pci/hotplug/shpchprm_legacy.h | 2 +- trunk/drivers/pci/hotplug/shpchprm_nonacpi.c | 2 +- trunk/drivers/pci/hotplug/shpchprm_nonacpi.h | 2 +- trunk/drivers/pci/msi.c | 5 +- trunk/drivers/pci/pci.h | 6 -- trunk/drivers/pci/quirks.c | 21 ------ trunk/drivers/scsi/dc395x.c | 48 ++++++++---- trunk/drivers/usb/input/wacom.c | 21 +++--- trunk/drivers/usb/mon/mon_main.c | 4 +- trunk/drivers/usb/mon/usb_mon.h | 2 - trunk/drivers/video/fbmem.c | 4 +- trunk/drivers/video/intelfb/intelfbdrv.c | 50 ++++++------- trunk/drivers/w1/w1.c | 2 +- trunk/fs/cifs/CHANGES | 6 -- trunk/fs/cifs/cifssmb.c | 3 - trunk/fs/cifs/misc.c | 1 - trunk/fs/inotify.c | 2 +- trunk/fs/jfs/inode.c | 4 - trunk/fs/jfs/jfs_logmgr.c | 36 +++++---- trunk/fs/jfs/jfs_logmgr.h | 2 +- trunk/fs/jfs/jfs_txnmgr.c | 12 ++- trunk/fs/jfs/super.c | 4 +- trunk/fs/namei.c | 3 +- trunk/fs/nfs/inode.c | 37 ++++----- trunk/fs/nfs/nfs3proc.c | 4 - trunk/fs/nfs/nfs4proc.c | 10 +-- trunk/fs/nfs/proc.c | 2 - trunk/fs/nfs_common/nfsacl.c | 1 - trunk/fs/nfsd/nfssvc.c | 1 - trunk/fs/ntfs/ChangeLog | 3 - trunk/fs/ntfs/mft.c | 2 - trunk/fs/reiserfs/namei.c | 3 - trunk/include/asm-arm/unistd.h | 5 -- trunk/include/asm-i386/pci.h | 4 +- trunk/include/asm-i386/processor.h | 2 +- trunk/include/asm-ia64/iosapic.h | 4 +- trunk/include/asm-ppc64/iSeries/LparMap.h | 9 +-- trunk/include/asm-sh/unistd.h | 2 +- trunk/include/asm-um/page.h | 4 +- trunk/include/asm-x86_64/pci.h | 4 +- trunk/include/asm-x86_64/processor.h | 2 +- trunk/include/linux/fsnotify.h | 6 +- trunk/include/linux/inotify.h | 4 +- trunk/include/linux/netpoll.h | 20 ++--- trunk/include/linux/nfs_fs.h | 1 - trunk/include/linux/pci.h | 3 +- trunk/include/linux/pci_ids.h | 5 -- trunk/include/linux/skbuff.h | 2 +- trunk/include/linux/sunrpc/xdr.h | 1 - trunk/kernel/signal.c | 2 +- trunk/lib/zlib_inflate/inftrees.c | 2 +- trunk/net/core/dev.c | 9 +-- trunk/net/core/netpoll.c | 63 +++++++--------- trunk/net/ipv4/tcp_output.c | 53 ++++++------- trunk/net/ipv6/ip6_input.c | 9 +-- trunk/net/ipv6/raw.c | 2 - trunk/net/sunrpc/xdr.c | 1 - 95 files changed, 349 insertions(+), 451 deletions(-) delete mode 100644 trunk/arch/ppc64/kernel/lparmap.c diff --git a/[refs] b/[refs] index 008af1c0d755..7a970f413cb2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c231c7db30faf93419fc22d680f74d816bea70e2 +refs/heads/master: 1c53e4357ec72d6114c58d20c26d00a904f55da3 diff --git a/trunk/Documentation/acpi-hotkey.txt b/trunk/Documentation/acpi-hotkey.txt index 0acdc80c30c2..4c115a7bb826 100644 --- a/trunk/Documentation/acpi-hotkey.txt +++ b/trunk/Documentation/acpi-hotkey.txt @@ -33,6 +33,3 @@ The result of the execution of this aml method is attached to /proc/acpi/hotkey/poll_method, which is dnyamically created. Please use command "cat /proc/acpi/hotkey/polling_method" to retrieve it. - -Note: Use cmdline "acpi_generic_hotkey" to over-ride -loading any platform specific drivers. diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 3d5cd7a09b2f..a998a8c2f95b 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -159,11 +159,6 @@ running once the system is up. acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT - acpi_generic_hotkey [HW,ACPI] - Allow consolidated generic hotkey driver to - over-ride platform specific driver. - See also Documentation/acpi-hotkey.txt. - ad1816= [HW,OSS] Format: ,,, See also Documentation/sound/oss/AD1816. diff --git a/trunk/Documentation/pci.txt b/trunk/Documentation/pci.txt index 76d28d033657..62b1dc5d97e2 100644 --- a/trunk/Documentation/pci.txt +++ b/trunk/Documentation/pci.txt @@ -266,6 +266,20 @@ port an old driver to the new PCI interface. They are no longer present in the kernel as they aren't compatible with hotplug or PCI domains or having sane locking. +pcibios_present() and Since ages, you don't need to test presence +pci_present() of PCI subsystem when trying to talk to it. + If it's not there, the list of PCI devices + is empty and all functions for searching for + devices just return NULL. +pcibios_(read|write)_* Superseded by their pci_(read|write)_* + counterparts. +pcibios_find_* Superseded by their pci_get_* counterparts. +pci_for_each_dev() Superseded by pci_get_device() +pci_for_each_dev_reverse() Superseded by pci_find_device_reverse() +pci_for_each_bus() Superseded by pci_find_next_bus() pci_find_device() Superseded by pci_get_device() pci_find_subsys() Superseded by pci_get_subsys() pci_find_slot() Superseded by pci_get_slot() +pcibios_find_class() Superseded by pci_get_class() +pci_find_class() Superseded by pci_get_class() +pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*() diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 33122b1519ca..5fd00c075053 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -784,7 +784,7 @@ DVB SUBSYSTEM AND DRIVERS P: LinuxTV.org Project M: linux-dvb-maintainer@linuxtv.org L: linux-dvb@linuxtv.org (subscription required) -W: http://linuxtv.org/ +W: http://linuxtv.org/developer/dvb.xml S: Supported EATA-DMA SCSI DRIVER @@ -1825,12 +1825,6 @@ P: Greg Kroah-Hartman M: greg@kroah.com S: Maintained -PCIE HOTPLUG DRIVER -P: Kristen Carlson Accardi -M: kristen.c.accardi@intel.com -L: pcihpd-discuss@lists.sourceforge.net -S: Maintained - PCMCIA SUBSYSTEM P: Linux PCMCIA Team L: http://lists.infradead.org/mailman/listinfo/linux-pcmcia @@ -2207,12 +2201,6 @@ W: http://projects.buici.com/arm L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) S: Maintained -SHPC HOTPLUG DRIVER -P: Kristen Carlson Accardi -M: kristen.c.accardi@intel.com -L: pcihpd-discuss@lists.sourceforge.net -S: Maintained - SPARC (sparc32): P: William L. Irwin M: wli@holomorphy.com diff --git a/trunk/arch/arm/kernel/calls.S b/trunk/arch/arm/kernel/calls.S index 2b6b4c786e65..e5d370c235d7 100644 --- a/trunk/arch/arm/kernel/calls.S +++ b/trunk/arch/arm/kernel/calls.S @@ -327,12 +327,6 @@ __syscall_start: /* 310 */ .long sys_request_key .long sys_keyctl .long sys_semtimedop -/* vserver */ .long sys_ni_syscall - .long sys_ioprio_set -/* 315 */ .long sys_ioprio_get - .long sys_inotify_init - .long sys_inotify_add_watch - .long sys_inotify_rm_watch __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff --git a/trunk/arch/arm/mach-s3c2410/s3c2410.c b/trunk/arch/arm/mach-s3c2410/s3c2410.c index 0b88993dfd27..ff2f25409e44 100644 --- a/trunk/arch/arm/mach-s3c2410/s3c2410.c +++ b/trunk/arch/arm/mach-s3c2410/s3c2410.c @@ -18,7 +18,6 @@ * 28-Sep-2004 BJD Updates for new serial port bits * 04-Nov-2004 BJD Updated UART configuration process * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate - * 13-Aug-2005 DA Removed UART from initial I/O mappings */ #include @@ -50,9 +49,10 @@ static struct map_desc s3c2410_iodesc[] __initdata = { IODESC_ENT(USBHOST), IODESC_ENT(CLKPWR), IODESC_ENT(LCD), + IODESC_ENT(UART), IODESC_ENT(TIMER), IODESC_ENT(ADC), - IODESC_ENT(WATCHDOG), + IODESC_ENT(WATCHDOG) }; static struct resource s3c_uart0_resource[] = { diff --git a/trunk/arch/arm/mm/Kconfig b/trunk/arch/arm/mm/Kconfig index db5e47dfc303..afbbeb6f4658 100644 --- a/trunk/arch/arm/mm/Kconfig +++ b/trunk/arch/arm/mm/Kconfig @@ -384,7 +384,7 @@ config CPU_DCACHE_DISABLE config CPU_DCACHE_WRITETHROUGH bool "Force write through D-cache" - depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020) && !CPU_DCACHE_DISABLE + depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020) && !CPU_DISABLE_DCACHE default y if CPU_ARM925T help Say Y here to use the data cache in writethrough mode. Unless you diff --git a/trunk/arch/arm/mm/proc-v6.S b/trunk/arch/arm/mm/proc-v6.S index 139a38670c5d..3429ddcf65d1 100644 --- a/trunk/arch/arm/mm/proc-v6.S +++ b/trunk/arch/arm/mm/proc-v6.S @@ -105,7 +105,7 @@ ENTRY(cpu_v6_dcache_clean_area) ENTRY(cpu_v6_switch_mm) mov r2, #0 ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id - mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB + mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB mcr p15, 0, r2, c7, c10, 4 @ drain write buffer mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 mcr p15, 0, r1, c13, c0, 1 @ set context ID diff --git a/trunk/arch/arm/nwfpe/softfloat.c b/trunk/arch/arm/nwfpe/softfloat.c index f9f049132a17..8b75a6e7cb3a 100644 --- a/trunk/arch/arm/nwfpe/softfloat.c +++ b/trunk/arch/arm/nwfpe/softfloat.c @@ -1602,7 +1602,9 @@ flag float32_le_quiet( float32 a, float32 b ) if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) ) { - /* Do nothing, even if NaN as we're quiet */ + if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } return 0; } aSign = extractFloat32Sign( a ); @@ -1627,7 +1629,9 @@ flag float32_lt_quiet( float32 a, float32 b ) if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) ) { - /* Do nothing, even if NaN as we're quiet */ + if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } return 0; } aSign = extractFloat32Sign( a ); @@ -2489,7 +2493,9 @@ flag float64_le_quiet( float64 a, float64 b ) if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) ) { - /* Do nothing, even if NaN as we're quiet */ + if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } return 0; } aSign = extractFloat64Sign( a ); @@ -2514,7 +2520,9 @@ flag float64_lt_quiet( float64 a, float64 b ) if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) ) { - /* Do nothing, even if NaN as we're quiet */ + if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { + float_raise( float_flag_invalid ); + } return 0; } aSign = extractFloat64Sign( a ); @@ -3248,7 +3256,7 @@ flag floatx80_eq( floatx80 a, floatx80 b ) ) { if ( floatx80_is_signaling_nan( a ) || floatx80_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); + roundData->exception |= float_flag_invalid; } return 0; } @@ -3278,7 +3286,7 @@ flag floatx80_le( floatx80 a, floatx80 b ) || ( ( extractFloatx80Exp( b ) == 0x7FFF ) && (bits64) ( extractFloatx80Frac( b )<<1 ) ) ) { - float_raise( float_flag_invalid ); + roundData->exception |= float_flag_invalid; return 0; } aSign = extractFloatx80Sign( a ); @@ -3312,7 +3320,7 @@ flag floatx80_lt( floatx80 a, floatx80 b ) || ( ( extractFloatx80Exp( b ) == 0x7FFF ) && (bits64) ( extractFloatx80Frac( b )<<1 ) ) ) { - float_raise( float_flag_invalid ); + roundData->exception |= float_flag_invalid; return 0; } aSign = extractFloatx80Sign( a ); @@ -3345,7 +3353,7 @@ flag floatx80_eq_signaling( floatx80 a, floatx80 b ) || ( ( extractFloatx80Exp( b ) == 0x7FFF ) && (bits64) ( extractFloatx80Frac( b )<<1 ) ) ) { - float_raise( float_flag_invalid ); + roundData->exception |= float_flag_invalid; return 0; } return @@ -3374,7 +3382,10 @@ flag floatx80_le_quiet( floatx80 a, floatx80 b ) || ( ( extractFloatx80Exp( b ) == 0x7FFF ) && (bits64) ( extractFloatx80Frac( b )<<1 ) ) ) { - /* Do nothing, even if NaN as we're quiet */ + if ( floatx80_is_signaling_nan( a ) + || floatx80_is_signaling_nan( b ) ) { + roundData->exception |= float_flag_invalid; + } return 0; } aSign = extractFloatx80Sign( a ); @@ -3408,7 +3419,10 @@ flag floatx80_lt_quiet( floatx80 a, floatx80 b ) || ( ( extractFloatx80Exp( b ) == 0x7FFF ) && (bits64) ( extractFloatx80Frac( b )<<1 ) ) ) { - /* Do nothing, even if NaN as we're quiet */ + if ( floatx80_is_signaling_nan( a ) + || floatx80_is_signaling_nan( b ) ) { + roundData->exception |= float_flag_invalid; + } return 0; } aSign = extractFloatx80Sign( a ); diff --git a/trunk/arch/ia64/kernel/domain.c b/trunk/arch/ia64/kernel/domain.c index bbb8efe126b7..d65e87b6394f 100644 --- a/trunk/arch/ia64/kernel/domain.c +++ b/trunk/arch/ia64/kernel/domain.c @@ -341,7 +341,7 @@ void build_sched_domains(const cpumask_t *cpu_map) #endif /* Attach the domains */ - for_each_cpu_mask(i, *cpu_map) { + for_each_online_cpu(i) { struct sched_domain *sd; #ifdef CONFIG_SCHED_SMT sd = &per_cpu(cpu_domains, i); diff --git a/trunk/arch/ppc64/kernel/LparData.c b/trunk/arch/ppc64/kernel/LparData.c index 1c11031c838e..76cfd1449d52 100644 --- a/trunk/arch/ppc64/kernel/LparData.c +++ b/trunk/arch/ppc64/kernel/LparData.c @@ -32,12 +32,32 @@ /* The HvReleaseData is the root of the information shared between * the hypervisor and Linux. */ + +/* + * WARNING - magic here + * + * Ok, this is a horrid hack below, but marginally better than the + * alternatives. What we really want is just to initialize + * hvReleaseData in C as in the #if 0 section here. However, gcc + * refuses to believe that (u32)&x is a constant expression, so will + * not allow the xMsNucDataOffset field to be properly initialized. + * So, we declare hvReleaseData in inline asm instead. We use inline + * asm, rather than a .S file, because the assembler won't generate + * the necessary relocation for the LparMap either, unless that symbol + * is declared in the same source file. Finally, we put the asm in a + * dummy, attribute-used function, instead of at file scope, because + * file scope asms don't allow contraints. We want to use the "i" + * constraints to put sizeof() and offsetof() expressions in there, + * because including asm/offsets.h in C code then stringifying causes + * all manner of warnings. + */ +#if 0 struct HvReleaseData hvReleaseData = { .xDesc = 0xc8a5d9c4, /* "HvRD" ebcdic */ .xSize = sizeof(struct HvReleaseData), .xVpdAreasPtrOffset = offsetof(struct naca_struct, xItVpdAreas), .xSlicNacaAddr = &naca, /* 64-bit Naca address */ - .xMsNucDataOffset = LPARMAP_PHYS, + .xMsNucDataOffset = (u32)((unsigned long)&xLparMap - KERNELBASE), .xFlags = HVREL_TAGSINACTIVE /* tags inactive */ /* 64 bit */ /* shared processors */ @@ -50,6 +70,63 @@ struct HvReleaseData hvReleaseData = { 0xa7, 0x40, 0xf2, 0x4b, 0xf4, 0x4b, 0xf6, 0xf4 }, }; +#endif + + +extern struct HvReleaseData hvReleaseData; + +static void __attribute_used__ hvReleaseData_wrapper(void) +{ + /* This doesn't appear to need any alignment (even 4 byte) */ + asm volatile ( + " lparMapPhys = xLparMap - %3\n" + " .data\n" + " .globl hvReleaseData\n" + "hvReleaseData:\n" + " .long 0xc8a5d9c4\n" /* xDesc */ + /* "HvRD" in ebcdic */ + " .short %0\n" /* xSize */ + " .short %1\n" /* xVpdAreasPtrOffset */ + " .llong naca\n" /* xSlicNacaAddr */ + " .long lparMapPhys\n" /* xMsNucDataOffset */ + " .long 0\n" /* xRsvd1 */ + " .short %2\n" /* xFlags */ + " .short 4\n" /* xVrmIndex - v5r2m0 */ + " .short 3\n" /* xMinSupportedPlicVrmIndex - v5r1m0 */ + " .short 3\n" /* xMinCompatablePlicVrmIndex - v5r1m0 */ + " .long 0xd38995a4\n" /* xVrmName */ + " .long 0xa740f24b\n" /* "Linux 2.4.64" ebcdic */ + " .long 0xf44bf6f4\n" + " . = hvReleaseData + %0\n" + " .previous\n" + : : "i"(sizeof(hvReleaseData)), + "i"(offsetof(struct naca_struct, xItVpdAreas)), + "i"(HVREL_TAGSINACTIVE /* tags inactive, 64 bit, */ + /* shared processors, HMT allowed */ + | 6), /* TEMP: This allows non-GA drivers */ + "i"(KERNELBASE) + ); +} + +struct LparMap __attribute__((aligned (16))) xLparMap = { + .xNumberEsids = HvEsidsToMap, + .xNumberRanges = HvRangesToMap, + .xSegmentTableOffs = STAB0_PAGE, + + .xEsids = { + { .xKernelEsid = GET_ESID(KERNELBASE), + .xKernelVsid = KERNEL_VSID(KERNELBASE), }, + { .xKernelEsid = GET_ESID(VMALLOCBASE), + .xKernelVsid = KERNEL_VSID(VMALLOCBASE), }, + }, + + .xRanges = { + { .xPages = HvPagesToMap, + .xOffset = 0, + .xVPN = KERNEL_VSID(KERNELBASE) << (SID_SHIFT - PAGE_SHIFT), + }, + }, +}; extern void system_reset_iSeries(void); extern void machine_check_iSeries(void); diff --git a/trunk/arch/ppc64/kernel/Makefile b/trunk/arch/ppc64/kernel/Makefile index 2ecccb6b4f8c..d9b2660ef221 100644 --- a/trunk/arch/ppc64/kernel/Makefile +++ b/trunk/arch/ppc64/kernel/Makefile @@ -73,8 +73,3 @@ obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o obj-$(CONFIG_KPROBES) += kprobes.o CFLAGS_ioctl32.o += -Ifs/ - -ifeq ($(CONFIG_PPC_ISERIES),y) -arch/ppc64/kernel/head.o: arch/ppc64/kernel/lparmap.s -AFLAGS_head.o += -Iarch/ppc64/kernel -endif diff --git a/trunk/arch/ppc64/kernel/head.S b/trunk/arch/ppc64/kernel/head.S index accaa052d31f..784f56d4684c 100644 --- a/trunk/arch/ppc64/kernel/head.S +++ b/trunk/arch/ppc64/kernel/head.S @@ -38,7 +38,6 @@ #include #include #include -#include #ifdef CONFIG_PPC_ISERIES #define DO_SOFT_DISABLE @@ -680,11 +679,6 @@ hardware_interrupt_iSeries_masked: .globl fwnmi_data_area fwnmi_data_area: -#ifdef CONFIG_PPC_ISERIES - . = LPARMAP_PHYS -#include "lparmap.s" -#endif /* CONFIG_PPC_ISERIES */ - /* * Vectors for the FWNMI option. Share common code. */ diff --git a/trunk/arch/ppc64/kernel/lparmap.c b/trunk/arch/ppc64/kernel/lparmap.c deleted file mode 100644 index b81de286df5e..000000000000 --- a/trunk/arch/ppc64/kernel/lparmap.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2005 Stephen Rothwell IBM Corp. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#include -#include -#include - -const struct LparMap __attribute__((__section__(".text"))) xLparMap = { - .xNumberEsids = HvEsidsToMap, - .xNumberRanges = HvRangesToMap, - .xSegmentTableOffs = STAB0_PAGE, - - .xEsids = { - { .xKernelEsid = GET_ESID(KERNELBASE), - .xKernelVsid = KERNEL_VSID(KERNELBASE), }, - { .xKernelEsid = GET_ESID(VMALLOCBASE), - .xKernelVsid = KERNEL_VSID(VMALLOCBASE), }, - }, - - .xRanges = { - { .xPages = HvPagesToMap, - .xOffset = 0, - .xVPN = KERNEL_VSID(KERNELBASE) << (SID_SHIFT - PAGE_SHIFT), - }, - }, -}; diff --git a/trunk/arch/x86_64/kernel/smpboot.c b/trunk/arch/x86_64/kernel/smpboot.c index b15761ff4101..6e4807d64d46 100644 --- a/trunk/arch/x86_64/kernel/smpboot.c +++ b/trunk/arch/x86_64/kernel/smpboot.c @@ -334,7 +334,7 @@ static void __cpuinit tsc_sync_wait(void) { if (notscsync || !cpu_has_tsc) return; - sync_tsc(0); + sync_tsc(boot_cpu_id); } static __init int notscsync_setup(char *s) diff --git a/trunk/drivers/acpi/motherboard.c b/trunk/drivers/acpi/motherboard.c index 61ea70742d49..2934475d67d6 100644 --- a/trunk/drivers/acpi/motherboard.c +++ b/trunk/drivers/acpi/motherboard.c @@ -43,7 +43,7 @@ ACPI_MODULE_NAME ("acpi_motherboard") */ #define IS_RESERVED_ADDR(base, len) \ (((len) > 0) && ((base) > 0) && ((base) + (len) < IO_SPACE_LIMIT) \ - && ((base) + (len) > PCIBIOS_MIN_IO)) + && ((base) + (len) > 0x1000)) /* * Clearing the flag (IORESOURCE_BUSY) allows drivers to use diff --git a/trunk/drivers/acpi/osl.c b/trunk/drivers/acpi/osl.c index 0d11d6e6abd6..7289da3c4db6 100644 --- a/trunk/drivers/acpi/osl.c +++ b/trunk/drivers/acpi/osl.c @@ -71,7 +71,7 @@ EXPORT_SYMBOL(acpi_in_debugger); extern char line_buf[80]; #endif /*ENABLE_DEBUGGER*/ -int acpi_specific_hotkey_enabled = TRUE; +int acpi_specific_hotkey_enabled; EXPORT_SYMBOL(acpi_specific_hotkey_enabled); static unsigned int acpi_irq_irq; @@ -1162,11 +1162,11 @@ __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup); int __init acpi_hotkey_setup(char *str) { - acpi_specific_hotkey_enabled = FALSE; + acpi_specific_hotkey_enabled = TRUE; return 1; } -__setup("acpi_generic_hotkey", acpi_hotkey_setup); +__setup("acpi_specific_hotkey", acpi_hotkey_setup); /* * max_cstate is defined in the base kernel so modules can diff --git a/trunk/drivers/base/class.c b/trunk/drivers/base/class.c index 0154a1623b21..479c12570881 100644 --- a/trunk/drivers/base/class.c +++ b/trunk/drivers/base/class.c @@ -299,11 +299,6 @@ static void class_dev_release(struct kobject * kobj) pr_debug("device class '%s': release.\n", cd->class_id); - if (cd->devt_attr) { - kfree(cd->devt_attr); - cd->devt_attr = NULL; - } - if (cls->release) cls->release(cd); else { @@ -596,8 +591,11 @@ void class_device_del(struct class_device *class_dev) if (class_dev->dev) sysfs_remove_link(&class_dev->kobj, "device"); - if (class_dev->devt_attr) + if (class_dev->devt_attr) { class_device_remove_file(class_dev, class_dev->devt_attr); + kfree(class_dev->devt_attr); + class_dev->devt_attr = NULL; + } class_device_remove_attrs(class_dev); kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE); diff --git a/trunk/drivers/char/mem.c b/trunk/drivers/char/mem.c index 850a78c9c4bc..42187381506b 100644 --- a/trunk/drivers/char/mem.c +++ b/trunk/drivers/char/mem.c @@ -261,11 +261,7 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma) static int mmap_kmem(struct file * file, struct vm_area_struct * vma) { - unsigned long pfn; - - /* Turn a kernel-virtual address into a physical page frame */ - pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT; - + unsigned long long val; /* * RED-PEN: on some architectures there is more mapped memory * than available in mem_map which pfn_valid checks @@ -273,10 +269,10 @@ static int mmap_kmem(struct file * file, struct vm_area_struct * vma) * * RED-PEN: vmalloc is not supported right now. */ - if (!pfn_valid(pfn)) + if (!pfn_valid(vma->vm_pgoff)) return -EIO; - - vma->vm_pgoff = pfn; + val = (u64)vma->vm_pgoff << PAGE_SHIFT; + vma->vm_pgoff = __pa(val) >> PAGE_SHIFT; return mmap_mem(file, vma); } diff --git a/trunk/drivers/net/e1000/e1000_main.c b/trunk/drivers/net/e1000/e1000_main.c index b82fd15d0891..5e5d2c3c7ce4 100644 --- a/trunk/drivers/net/e1000/e1000_main.c +++ b/trunk/drivers/net/e1000/e1000_main.c @@ -3789,7 +3789,6 @@ e1000_netpoll(struct net_device *netdev) struct e1000_adapter *adapter = netdev_priv(netdev); disable_irq(adapter->pdev->irq); e1000_intr(adapter->pdev->irq, netdev, NULL); - e1000_clean_tx_irq(adapter); enable_irq(adapter->pdev->irq); } #endif diff --git a/trunk/drivers/pci/hotplug/pciehp.h b/trunk/drivers/pci/hotplug/pciehp.h index 2b92b9e8c910..46b294a12418 100644 --- a/trunk/drivers/pci/hotplug/pciehp.h +++ b/trunk/drivers/pci/hotplug/pciehp.h @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ #ifndef _PCIEHP_H diff --git a/trunk/drivers/pci/hotplug/pciehp_core.c b/trunk/drivers/pci/hotplug/pciehp_core.c index cafc7eadcf80..df4915dbc321 100644 --- a/trunk/drivers/pci/hotplug/pciehp_core.c +++ b/trunk/drivers/pci/hotplug/pciehp_core.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/pciehp_ctrl.c b/trunk/drivers/pci/hotplug/pciehp_ctrl.c index 0e0947601526..0dbcf04aa35e 100644 --- a/trunk/drivers/pci/hotplug/pciehp_ctrl.c +++ b/trunk/drivers/pci/hotplug/pciehp_ctrl.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/pciehp_hpc.c b/trunk/drivers/pci/hotplug/pciehp_hpc.c index 7a0e27f0e063..1cda30bd6e47 100644 --- a/trunk/drivers/pci/hotplug/pciehp_hpc.c +++ b/trunk/drivers/pci/hotplug/pciehp_hpc.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/pciehp_pci.c b/trunk/drivers/pci/hotplug/pciehp_pci.c index 33b539b34f7e..723b12c0bb7c 100644 --- a/trunk/drivers/pci/hotplug/pciehp_pci.c +++ b/trunk/drivers/pci/hotplug/pciehp_pci.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/pciehprm.h b/trunk/drivers/pci/hotplug/pciehprm.h index 05f20fbc5f50..966775ffb0ff 100644 --- a/trunk/drivers/pci/hotplug/pciehprm.h +++ b/trunk/drivers/pci/hotplug/pciehprm.h @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/pciehprm_acpi.c b/trunk/drivers/pci/hotplug/pciehprm_acpi.c index 305b47ec2f2c..57f4e6d1b27c 100644 --- a/trunk/drivers/pci/hotplug/pciehprm_acpi.c +++ b/trunk/drivers/pci/hotplug/pciehprm_acpi.c @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to + * Send feedback to * */ diff --git a/trunk/drivers/pci/hotplug/pciehprm_nonacpi.c b/trunk/drivers/pci/hotplug/pciehprm_nonacpi.c index 3622965f8961..79a0aa6238ef 100644 --- a/trunk/drivers/pci/hotplug/pciehprm_nonacpi.c +++ b/trunk/drivers/pci/hotplug/pciehprm_nonacpi.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/pciehprm_nonacpi.h b/trunk/drivers/pci/hotplug/pciehprm_nonacpi.h index b10603b0e958..87c90e85ede9 100644 --- a/trunk/drivers/pci/hotplug/pciehprm_nonacpi.h +++ b/trunk/drivers/pci/hotplug/pciehprm_nonacpi.h @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchp.h b/trunk/drivers/pci/hotplug/shpchp.h index fe4d653da188..67b6a3370ceb 100644 --- a/trunk/drivers/pci/hotplug/shpchp.h +++ b/trunk/drivers/pci/hotplug/shpchp.h @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ #ifndef _SHPCHP_H diff --git a/trunk/drivers/pci/hotplug/shpchp_core.c b/trunk/drivers/pci/hotplug/shpchp_core.c index 6f7d8a29957a..a70a5c5705f2 100644 --- a/trunk/drivers/pci/hotplug/shpchp_core.c +++ b/trunk/drivers/pci/hotplug/shpchp_core.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchp_ctrl.c b/trunk/drivers/pci/hotplug/shpchp_ctrl.c index 783b5abb0717..490a9553a062 100644 --- a/trunk/drivers/pci/hotplug/shpchp_ctrl.c +++ b/trunk/drivers/pci/hotplug/shpchp_ctrl.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchp_hpc.c b/trunk/drivers/pci/hotplug/shpchp_hpc.c index 8d98410bf1c0..38c5d9066697 100644 --- a/trunk/drivers/pci/hotplug/shpchp_hpc.c +++ b/trunk/drivers/pci/hotplug/shpchp_hpc.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchp_pci.c b/trunk/drivers/pci/hotplug/shpchp_pci.c index d867099114ec..90113e9cd69b 100644 --- a/trunk/drivers/pci/hotplug/shpchp_pci.c +++ b/trunk/drivers/pci/hotplug/shpchp_pci.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchprm.h b/trunk/drivers/pci/hotplug/shpchprm.h index 057b192ce589..88aeb978c911 100644 --- a/trunk/drivers/pci/hotplug/shpchprm.h +++ b/trunk/drivers/pci/hotplug/shpchprm.h @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchprm_acpi.c b/trunk/drivers/pci/hotplug/shpchprm_acpi.c index d37b31658edf..7957cdc72cd0 100644 --- a/trunk/drivers/pci/hotplug/shpchprm_acpi.c +++ b/trunk/drivers/pci/hotplug/shpchprm_acpi.c @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to + * Send feedback to * */ diff --git a/trunk/drivers/pci/hotplug/shpchprm_legacy.c b/trunk/drivers/pci/hotplug/shpchprm_legacy.c index ba6c549c9b9d..37fa77a98289 100644 --- a/trunk/drivers/pci/hotplug/shpchprm_legacy.c +++ b/trunk/drivers/pci/hotplug/shpchprm_legacy.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchprm_legacy.h b/trunk/drivers/pci/hotplug/shpchprm_legacy.h index 21bda74ddfa5..29ccea5e57e5 100644 --- a/trunk/drivers/pci/hotplug/shpchprm_legacy.h +++ b/trunk/drivers/pci/hotplug/shpchprm_legacy.h @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchprm_nonacpi.c b/trunk/drivers/pci/hotplug/shpchprm_nonacpi.c index 5f75ef7f3df2..88f4d9f41886 100644 --- a/trunk/drivers/pci/hotplug/shpchprm_nonacpi.c +++ b/trunk/drivers/pci/hotplug/shpchprm_nonacpi.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/hotplug/shpchprm_nonacpi.h b/trunk/drivers/pci/hotplug/shpchprm_nonacpi.h index cddaaa5ee1b3..6bc8668023c3 100644 --- a/trunk/drivers/pci/hotplug/shpchprm_nonacpi.h +++ b/trunk/drivers/pci/hotplug/shpchprm_nonacpi.h @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to , + * Send feedback to , * */ diff --git a/trunk/drivers/pci/msi.c b/trunk/drivers/pci/msi.c index 2b85aa39f954..b5ab9aa6ff7c 100644 --- a/trunk/drivers/pci/msi.c +++ b/trunk/drivers/pci/msi.c @@ -453,7 +453,7 @@ static void enable_msi_mode(struct pci_dev *dev, int pos, int type) } } -void disable_msi_mode(struct pci_dev *dev, int pos, int type) +static void disable_msi_mode(struct pci_dev *dev, int pos, int type) { u16 control; @@ -699,9 +699,6 @@ int pci_enable_msi(struct pci_dev* dev) if (!pci_msi_enable || !dev) return status; - if (dev->no_msi) - return status; - temp = dev->irq; if ((status = msi_init()) < 0) diff --git a/trunk/drivers/pci/pci.h b/trunk/drivers/pci/pci.h index d00168b1f662..d94d7af4f7a0 100644 --- a/trunk/drivers/pci/pci.h +++ b/trunk/drivers/pci/pci.h @@ -47,12 +47,6 @@ extern int pci_msi_quirk; #define pci_msi_quirk 0 #endif -#ifdef CONFIG_PCI_MSI -void disable_msi_mode(struct pci_dev *dev, int pos, int type); -#else -static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { } -#endif - extern int pcie_mch_quirk; extern struct device_attribute pci_dev_attrs[]; extern struct class_device_attribute class_device_attr_cpuaffinity; diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index bb36bb69803f..a9160ad16581 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -1291,27 +1291,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quir DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch ); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch ); - -/* - * It's possible for the MSI to get corrupted if shpc and acpi - * are used together on certain PXH-based systems. - */ -static void __devinit quirk_pcie_pxh(struct pci_dev *dev) -{ - disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI), - PCI_CAP_ID_MSI); - dev->no_msi = 1; - - printk(KERN_WARNING "PCI: PXH quirk detected, " - "disabling MSI for SHPC device\n"); -} -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHD_0, quirk_pcie_pxh); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHD_1, quirk_pcie_pxh); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0, quirk_pcie_pxh); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1, quirk_pcie_pxh); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh); - - static void __devinit quirk_netmos(struct pci_dev *dev) { unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; diff --git a/trunk/drivers/scsi/dc395x.c b/trunk/drivers/scsi/dc395x.c index 600ba1202864..929170dcd3cb 100644 --- a/trunk/drivers/scsi/dc395x.c +++ b/trunk/drivers/scsi/dc395x.c @@ -183,7 +183,7 @@ * cross a page boundy. */ #define SEGMENTX_LEN (sizeof(struct SGentry)*DC395x_MAX_SG_LISTENTRY) - +#define VIRTX_LEN (sizeof(void *) * DC395x_MAX_SG_LISTENTRY) struct SGentry { u32 address; /* bus! address */ @@ -235,6 +235,7 @@ struct ScsiReqBlk { u8 sg_count; /* No of HW sg entries for this request */ u8 sg_index; /* Index of HW sg entry for this request */ u32 total_xfer_length; /* Total number of bytes remaining to be transfered */ + void **virt_map; unsigned char *virt_addr; /* Virtual address of current transfer position */ /* @@ -1021,14 +1022,14 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, reqlen, cmd->request_buffer, cmd->use_sg, srb->sg_count); - srb->virt_addr = page_address(sl->page); for (i = 0; i < srb->sg_count; i++) { - u32 busaddr = (u32)sg_dma_address(&sl[i]); - u32 seglen = (u32)sl[i].length; - sgp[i].address = busaddr; + u32 seglen = (u32)sg_dma_len(sl + i); + sgp[i].address = (u32)sg_dma_address(sl + i); sgp[i].length = seglen; srb->total_xfer_length += seglen; + srb->virt_map[i] = kmap(sl[i].page); } + srb->virt_addr = srb->virt_map[0]; sgp += srb->sg_count - 1; /* @@ -1975,6 +1976,7 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) int segment = cmd->use_sg; u32 xferred = srb->total_xfer_length - left; /* bytes transfered */ struct SGentry *psge = srb->segment_x + srb->sg_index; + void **virt = srb->virt_map; dprintkdbg(DBG_0, "sg_update_list: Transfered %i of %i bytes, %i remain\n", @@ -2014,16 +2016,16 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) /* We have to walk the scatterlist to find it */ sg = (struct scatterlist *)cmd->request_buffer; + idx = 0; while (segment--) { unsigned long mask = ~((unsigned long)sg->length - 1) & PAGE_MASK; if ((sg_dma_address(sg) & mask) == (psge->address & mask)) { - srb->virt_addr = (page_address(sg->page) - + psge->address - - (psge->address & PAGE_MASK)); + srb->virt_addr = virt[idx] + (psge->address & ~PAGE_MASK); return; } ++sg; + ++idx; } dprintkl(KERN_ERR, "sg_update_list: sg_to_virt failed\n"); @@ -2149,7 +2151,7 @@ static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, DC395x_read32(acb, TRM_S1040_DMA_CXCNT)); } /* - * calculate all the residue data that not yet tranfered + * calculate all the residue data that not yet transfered * SCSI transfer counter + left in SCSI FIFO data * * .....TRM_S1040_SCSI_COUNTER (24bits) @@ -3267,6 +3269,7 @@ static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) struct scsi_cmnd *cmd = srb->cmd; enum dma_data_direction dir = cmd->sc_data_direction; if (cmd->use_sg && dir != PCI_DMA_NONE) { + int i; /* unmap DC395x SG list */ dprintkdbg(DBG_SG, "pci_unmap_srb: list=%08x(%05x)\n", srb->sg_bus_addr, SEGMENTX_LEN); @@ -3276,6 +3279,8 @@ static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) dprintkdbg(DBG_SG, "pci_unmap_srb: segs=%i buffer=%p\n", cmd->use_sg, cmd->request_buffer); /* unmap the sg segments */ + for (i = 0; i < srb->sg_count; i++) + kunmap(virt_to_page(srb->virt_map[i])); pci_unmap_sg(acb->dev, (struct scatterlist *)cmd->request_buffer, cmd->use_sg, dir); @@ -3322,7 +3327,7 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, if (cmd->use_sg) { struct scatterlist* sg = (struct scatterlist *)cmd->request_buffer; - ptr = (struct ScsiInqData *)(page_address(sg->page) + sg->offset); + ptr = (struct ScsiInqData *)(srb->virt_map[0] + sg->offset); } else { ptr = (struct ScsiInqData *)(cmd->request_buffer); } @@ -4257,8 +4262,9 @@ static void adapter_sg_tables_free(struct AdapterCtlBlk *acb) const unsigned srbs_per_page = PAGE_SIZE/SEGMENTX_LEN; for (i = 0; i < DC395x_MAX_SRB_CNT; i += srbs_per_page) - if (acb->srb_array[i].segment_x) - kfree(acb->srb_array[i].segment_x); + kfree(acb->srb_array[i].segment_x); + + vfree(acb->srb_array[0].virt_map); } @@ -4274,9 +4280,12 @@ static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) int srb_idx = 0; unsigned i = 0; struct SGentry *ptr; + void **virt_array; - for (i = 0; i < DC395x_MAX_SRB_CNT; i++) + for (i = 0; i < DC395x_MAX_SRB_CNT; i++) { acb->srb_array[i].segment_x = NULL; + acb->srb_array[i].virt_map = NULL; + } dprintkdbg(DBG_1, "Allocate %i pages for SG tables\n", pages); while (pages--) { @@ -4297,6 +4306,19 @@ static int __devinit adapter_sg_tables_alloc(struct AdapterCtlBlk *acb) ptr + (i * DC395x_MAX_SG_LISTENTRY); else dprintkl(KERN_DEBUG, "No space for tmsrb SG table reserved?!\n"); + + virt_array = vmalloc((DC395x_MAX_SRB_CNT + 1) * DC395x_MAX_SG_LISTENTRY * sizeof(void*)); + + if (!virt_array) { + adapter_sg_tables_free(acb); + return 1; + } + + for (i = 0; i < DC395x_MAX_SRB_CNT + 1; i++) { + acb->srb_array[i].virt_map = virt_array; + virt_array += DC395x_MAX_SG_LISTENTRY; + } + return 0; } diff --git a/trunk/drivers/usb/input/wacom.c b/trunk/drivers/usb/input/wacom.c index 3b266af3048a..02412e31a46b 100644 --- a/trunk/drivers/usb/input/wacom.c +++ b/trunk/drivers/usb/input/wacom.c @@ -342,6 +342,9 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) goto exit; } + x = le16_to_cpu(*(__le16 *) &data[2]); + y = le16_to_cpu(*(__le16 *) &data[4]); + input_regs(dev, regs); if (data[1] & 0x10) { /* in prox */ @@ -370,17 +373,15 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) } } - if (data[1] & 0x90) { - x = le16_to_cpu(*(__le16 *) &data[2]); - y = le16_to_cpu(*(__le16 *) &data[4]); + if (data[1] & 0x80) { input_report_abs(dev, ABS_X, x); input_report_abs(dev, ABS_Y, y); - if (wacom->tool[0] != BTN_TOOL_MOUSE) { - input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6])); - input_report_key(dev, BTN_TOUCH, data[1] & 0x01); - input_report_key(dev, BTN_STYLUS, data[1] & 0x02); - input_report_key(dev, BTN_STYLUS2, data[1] & 0x04); - } + } + if (wacom->tool[0] != BTN_TOOL_MOUSE) { + input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6])); + input_report_key(dev, BTN_TOUCH, data[1] & 0x01); + input_report_key(dev, BTN_STYLUS, data[1] & 0x02); + input_report_key(dev, BTN_STYLUS2, data[1] & 0x04); } input_report_key(dev, wacom->tool[0], data[1] & 0x10); @@ -567,7 +568,7 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) /* Cintiq doesn't send data when RDY bit isn't set */ if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40)) - goto exit; + return; if (wacom->features->type >= INTUOS3) { input_report_abs(dev, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1)); diff --git a/trunk/drivers/usb/mon/mon_main.c b/trunk/drivers/usb/mon/mon_main.c index 508a21028db4..aa9d00808e4e 100644 --- a/trunk/drivers/usb/mon/mon_main.c +++ b/trunk/drivers/usb/mon/mon_main.c @@ -2,8 +2,6 @@ * The USB Monitor, inspired by Dave Harding's USBMon. * * mon_main.c: Main file, module initiation and exit, registrations, etc. - * - * Copyright (C) 2005 Pete Zaitcev (zaitcev@redhat.com) */ #include @@ -313,7 +311,7 @@ static int __init mon_init(void) mondir = debugfs_create_dir("usbmon", NULL); if (IS_ERR(mondir)) { - printk(KERN_NOTICE TAG ": debugfs is not available\n"); + printk(KERN_NOTICE TAG ": debugs is not available\n"); return -ENODEV; } if (mondir == NULL) { diff --git a/trunk/drivers/usb/mon/usb_mon.h b/trunk/drivers/usb/mon/usb_mon.h index 9b06784d2c48..ed35c18a5c44 100644 --- a/trunk/drivers/usb/mon/usb_mon.h +++ b/trunk/drivers/usb/mon/usb_mon.h @@ -1,7 +1,5 @@ /* * The USB Monitor, inspired by Dave Harding's USBMon. - * - * Copyright (C) 2005 Pete Zaitcev (zaitcev@redhat.com) */ #ifndef __USB_MON_H diff --git a/trunk/drivers/video/fbmem.c b/trunk/drivers/video/fbmem.c index 4ff853fbe0be..d2e19f6dd72c 100644 --- a/trunk/drivers/video/fbmem.c +++ b/trunk/drivers/video/fbmem.c @@ -628,7 +628,7 @@ fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) int fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) { - int err, flags = info->flags; + int err; if (var->activate & FB_ACTIVATE_INV_MODE) { struct fb_videomode mode1, mode2; @@ -682,7 +682,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) !list_empty(&info->modelist)) err = fb_add_videomode(&mode, &info->modelist); - if (!err && (flags & FBINFO_MISC_USEREVENT)) { + if (!err && info->flags & FBINFO_MISC_USEREVENT) { struct fb_event event; info->flags &= ~FBINFO_MISC_USEREVENT; diff --git a/trunk/drivers/video/intelfb/intelfbdrv.c b/trunk/drivers/video/intelfb/intelfbdrv.c index a112a1786855..298bc9cd99e7 100644 --- a/trunk/drivers/video/intelfb/intelfbdrv.c +++ b/trunk/drivers/video/intelfb/intelfbdrv.c @@ -583,6 +583,23 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) return -ENODEV; } + /* Map the fb and MMIO regions */ + dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache + (dinfo->aperture.physical, dinfo->aperture.size); + if (!dinfo->aperture.virtual) { + ERR_MSG("Cannot remap FB region.\n"); + cleanup(dinfo); + return -ENODEV; + } + dinfo->mmio_base = + (u8 __iomem *)ioremap_nocache(dinfo->mmio_base_phys, + INTEL_REG_SIZE); + if (!dinfo->mmio_base) { + ERR_MSG("Cannot remap MMIO region.\n"); + cleanup(dinfo); + return -ENODEV; + } + /* Get the chipset info. */ dinfo->pci_chipset = pdev->device; @@ -613,15 +630,9 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) dinfo->accel = 0; } - if (MB(voffset) < stolen_size) - offset = (stolen_size >> 12); - else - offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; - /* Framebuffer parameters - Use all the stolen memory if >= vram */ - if (ROUND_UP_TO_PAGE(stolen_size) >= ((offset << 12) + MB(vram))) { + if (ROUND_UP_TO_PAGE(stolen_size) >= MB(vram)) { dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); - dinfo->fb.offset = 0; dinfo->fbmem_gart = 0; } else { dinfo->fb.size = MB(vram); @@ -652,6 +663,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) return -ENODEV; } + if (MB(voffset) < stolen_size) + offset = (stolen_size >> 12); + else + offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; + /* set the mem offsets - set them after the already used pages */ if (dinfo->accel) { dinfo->ring.offset = offset + gtt_info.current_memory; @@ -666,26 +682,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) + (dinfo->cursor.size >> 12); } - /* Map the fb and MMIO regions */ - /* ioremap only up to the end of used aperture */ - dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache - (dinfo->aperture.physical, (dinfo->fb.offset << 12) - + dinfo->fb.size); - if (!dinfo->aperture.virtual) { - ERR_MSG("Cannot remap FB region.\n"); - cleanup(dinfo); - return -ENODEV; - } - - dinfo->mmio_base = - (u8 __iomem *)ioremap_nocache(dinfo->mmio_base_phys, - INTEL_REG_SIZE); - if (!dinfo->mmio_base) { - ERR_MSG("Cannot remap MMIO region.\n"); - cleanup(dinfo); - return -ENODEV; - } - /* Allocate memories (which aren't stolen) */ if (dinfo->accel) { if (!(dinfo->gtt_ring_mem = diff --git a/trunk/drivers/w1/w1.c b/trunk/drivers/w1/w1.c index 0bbf029b1ef1..8a9c42822502 100644 --- a/trunk/drivers/w1/w1.c +++ b/trunk/drivers/w1/w1.c @@ -593,7 +593,7 @@ void w1_search(struct w1_master *dev, w1_slave_found_callback cb) * Return 0 - device(s) present, 1 - no devices present. */ if (w1_reset_bus(dev)) { - dev_dbg(&dev->dev, "No devices present on the wire.\n"); + dev_info(&dev->dev, "No devices present on the wire.\n"); break; } diff --git a/trunk/fs/cifs/CHANGES b/trunk/fs/cifs/CHANGES index 3196d4c4eed3..dab4774ee7bb 100644 --- a/trunk/fs/cifs/CHANGES +++ b/trunk/fs/cifs/CHANGES @@ -1,9 +1,3 @@ -Version 1.35 ------------- -Add writepage performance improvements. Fix path name conversions -for long filenames on mounts which were done with "mapchars" mount option -specified. - Version 1.34 ------------ Fix error mapping of the TOO_MANY_LINKS (hardlinks) case. diff --git a/trunk/fs/cifs/cifssmb.c b/trunk/fs/cifs/cifssmb.c index 0db0b313d715..3c628bf667a5 100644 --- a/trunk/fs/cifs/cifssmb.c +++ b/trunk/fs/cifs/cifssmb.c @@ -2602,9 +2602,6 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, if(name_len < PATH_MAX) { memcpy(pSMB->ResumeFileName, psrch_inf->presume_name, name_len); byte_count += name_len; - /* 14 byte parm len above enough for 2 byte null terminator */ - pSMB->ResumeFileName[name_len] = 0; - pSMB->ResumeFileName[name_len+1] = 0; } else { rc = -EINVAL; goto FNext2_err_exit; diff --git a/trunk/fs/cifs/misc.c b/trunk/fs/cifs/misc.c index 20ae4153f791..072b4ee8c53e 100644 --- a/trunk/fs/cifs/misc.c +++ b/trunk/fs/cifs/misc.c @@ -611,7 +611,6 @@ cifsConvertToUCS(__le16 * target, const char *source, int maxlen, src_char = source[i]; switch (src_char) { case 0: - target[j] = 0; goto ctoUCS_out; case ':': target[j] = cpu_to_le16(UNI_COLON); diff --git a/trunk/fs/inotify.c b/trunk/fs/inotify.c index 868901b1e779..27ebcac5e07f 100644 --- a/trunk/fs/inotify.c +++ b/trunk/fs/inotify.c @@ -402,7 +402,7 @@ static struct inotify_watch *create_watch(struct inotify_device *dev, return ERR_PTR(ret); } - dev->last_wd = watch->wd; + dev->last_wd = ret; watch->mask = mask; atomic_set(&watch->count, 0); INIT_LIST_HEAD(&watch->d_list); diff --git a/trunk/fs/jfs/inode.c b/trunk/fs/jfs/inode.c index 767c7ecb429e..2137138c59b0 100644 --- a/trunk/fs/jfs/inode.c +++ b/trunk/fs/jfs/inode.c @@ -128,10 +128,6 @@ void jfs_delete_inode(struct inode *inode) { jfs_info("In jfs_delete_inode, inode = 0x%p", inode); - if (is_bad_inode(inode) || - (JFS_IP(inode)->fileset != cpu_to_le32(FILESYSTEM_I))) - return; - if (test_cflag(COMMIT_Freewmap, inode)) jfs_free_zero_link(inode); diff --git a/trunk/fs/jfs/jfs_logmgr.c b/trunk/fs/jfs/jfs_logmgr.c index d27bac6acaa3..22815e88e7cc 100644 --- a/trunk/fs/jfs/jfs_logmgr.c +++ b/trunk/fs/jfs/jfs_logmgr.c @@ -191,7 +191,7 @@ static int lbmIOWait(struct lbuf * bp, int flag); static bio_end_io_t lbmIODone; static void lbmStartIO(struct lbuf * bp); static void lmGCwrite(struct jfs_log * log, int cant_block); -static int lmLogSync(struct jfs_log * log, int hard_sync); +static int lmLogSync(struct jfs_log * log, int nosyncwait); @@ -915,17 +915,19 @@ static void lmPostGC(struct lbuf * bp) * if new sync address is available * (normally the case if sync() is executed by back-ground * process). + * if not, explicitly run jfs_blogsync() to initiate + * getting of new sync address. * calculate new value of i_nextsync which determines when * this code is called again. * * PARAMETERS: log - log structure - * hard_sync - 1 to force all metadata to be written + * nosyncwait - 1 if called asynchronously * * RETURN: 0 * * serialization: LOG_LOCK() held on entry/exit */ -static int lmLogSync(struct jfs_log * log, int hard_sync) +static int lmLogSync(struct jfs_log * log, int nosyncwait) { int logsize; int written; /* written since last syncpt */ @@ -939,18 +941,11 @@ static int lmLogSync(struct jfs_log * log, int hard_sync) unsigned long flags; /* push dirty metapages out to disk */ - if (hard_sync) - list_for_each_entry(sbi, &log->sb_list, log_list) { - filemap_fdatawrite(sbi->ipbmap->i_mapping); - filemap_fdatawrite(sbi->ipimap->i_mapping); - filemap_fdatawrite(sbi->direct_inode->i_mapping); - } - else - list_for_each_entry(sbi, &log->sb_list, log_list) { - filemap_flush(sbi->ipbmap->i_mapping); - filemap_flush(sbi->ipimap->i_mapping); - filemap_flush(sbi->direct_inode->i_mapping); - } + list_for_each_entry(sbi, &log->sb_list, log_list) { + filemap_flush(sbi->ipbmap->i_mapping); + filemap_flush(sbi->ipimap->i_mapping); + filemap_flush(sbi->direct_inode->i_mapping); + } /* * forward syncpt @@ -1026,6 +1021,10 @@ static int lmLogSync(struct jfs_log * log, int hard_sync) /* next syncpt trigger = written + more */ log->nextsync = written + more; + /* return if lmLogSync() from outside of transaction, e.g., sync() */ + if (nosyncwait) + return lsn; + /* if number of bytes written from last sync point is more * than 1/4 of the log size, stop new transactions from * starting until all current transactions are completed @@ -1050,12 +1049,11 @@ static int lmLogSync(struct jfs_log * log, int hard_sync) * * FUNCTION: write log SYNCPT record for specified log * - * PARAMETERS: log - log structure - * hard_sync - set to 1 to force metadata to be written + * PARAMETERS: log - log structure */ -void jfs_syncpt(struct jfs_log *log, int hard_sync) +void jfs_syncpt(struct jfs_log *log) { LOG_LOCK(log); - lmLogSync(log, hard_sync); + lmLogSync(log, 1); LOG_UNLOCK(log); } diff --git a/trunk/fs/jfs/jfs_logmgr.h b/trunk/fs/jfs/jfs_logmgr.h index e4978b5b65ee..747114cd38b8 100644 --- a/trunk/fs/jfs/jfs_logmgr.h +++ b/trunk/fs/jfs/jfs_logmgr.h @@ -510,6 +510,6 @@ extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize); extern int lmGroupCommit(struct jfs_log *, struct tblock *); extern int jfsIOWait(void *); extern void jfs_flush_journal(struct jfs_log * log, int wait); -extern void jfs_syncpt(struct jfs_log *log, int hard_sync); +extern void jfs_syncpt(struct jfs_log *log); #endif /* _H_JFS_LOGMGR */ diff --git a/trunk/fs/jfs/jfs_txnmgr.c b/trunk/fs/jfs/jfs_txnmgr.c index c7a92f9deb2b..121c981ff453 100644 --- a/trunk/fs/jfs/jfs_txnmgr.c +++ b/trunk/fs/jfs/jfs_txnmgr.c @@ -552,11 +552,6 @@ void txEnd(tid_t tid) * synchronize with logsync barrier */ if (test_bit(log_SYNCBARRIER, &log->flag)) { - TXN_UNLOCK(); - - /* write dirty metadata & forward log syncpt */ - jfs_syncpt(log, 1); - jfs_info("log barrier off: 0x%x", log->lsn); /* enable new transactions start */ @@ -565,6 +560,11 @@ void txEnd(tid_t tid) /* wakeup all waitors for logsync barrier */ TXN_WAKEUP(&log->syncwait); + TXN_UNLOCK(); + + /* forward log syncpt */ + jfs_syncpt(log); + goto wakeup; } } @@ -657,9 +657,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, /* only anonymous txn. * Remove from anon_list */ - TXN_LOCK(); list_del_init(&jfs_ip->anon_inode_list); - TXN_UNLOCK(); } jfs_ip->atlhead = tlck->next; } else { diff --git a/trunk/fs/jfs/super.c b/trunk/fs/jfs/super.c index 9ff89720f93b..ee32211288ce 100644 --- a/trunk/fs/jfs/super.c +++ b/trunk/fs/jfs/super.c @@ -114,8 +114,6 @@ static void jfs_destroy_inode(struct inode *inode) { struct jfs_inode_info *ji = JFS_IP(inode); - BUG_ON(!list_empty(&ji->anon_inode_list)); - spin_lock_irq(&ji->ag_lock); if (ji->active_ag != -1) { struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; @@ -533,7 +531,7 @@ static int jfs_sync_fs(struct super_block *sb, int wait) /* log == NULL indicates read-only mount */ if (log) { jfs_flush_journal(log, wait); - jfs_syncpt(log, 0); + jfs_syncpt(log); } return 0; diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index b85f158aef0c..57046d98a746 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -2216,8 +2216,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); if (!error) { const char *new_name = old_dentry->d_name.name; - fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, - new_dentry->d_inode, old_dentry->d_inode); + fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, new_dentry->d_inode); } fsnotify_oldname_free(old_name); diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index bb7ca022bcb2..4845911f1c63 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -814,39 +814,28 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr) nfs_wb_all(inode); } error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr); - if (error == 0) + if (error == 0) { nfs_refresh_inode(inode, &fattr); - nfs_end_data_update(inode); - unlock_kernel(); - return error; -} - -/** - * nfs_setattr_update_inode - Update inode metadata after a setattr call. - * @inode: pointer to struct inode - * @attr: pointer to struct iattr - * - * Note: we do this in the *proc.c in order to ensure that - * it works for things like exclusive creates too. - */ -void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr) -{ - if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) { if ((attr->ia_valid & ATTR_MODE) != 0) { - int mode = attr->ia_mode & S_IALLUGO; - mode |= inode->i_mode & ~S_IALLUGO; + int mode; + mode = inode->i_mode & ~S_IALLUGO; + mode |= attr->ia_mode & S_IALLUGO; inode->i_mode = mode; } if ((attr->ia_valid & ATTR_UID) != 0) inode->i_uid = attr->ia_uid; if ((attr->ia_valid & ATTR_GID) != 0) inode->i_gid = attr->ia_gid; - NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; - } - if ((attr->ia_valid & ATTR_SIZE) != 0) { - inode->i_size = attr->ia_size; - vmtruncate(inode, attr->ia_size); + if ((attr->ia_valid & ATTR_SIZE) != 0) { + inode->i_size = attr->ia_size; + vmtruncate(inode, attr->ia_size); + } } + if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) + NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; + nfs_end_data_update(inode); + unlock_kernel(); + return error; } /* diff --git a/trunk/fs/nfs/nfs3proc.c b/trunk/fs/nfs/nfs3proc.c index 2681485cf2d0..7851569b31c6 100644 --- a/trunk/fs/nfs/nfs3proc.c +++ b/trunk/fs/nfs/nfs3proc.c @@ -120,8 +120,6 @@ nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, dprintk("NFS call setattr\n"); fattr->valid = 0; status = rpc_call(NFS_CLIENT(inode), NFS3PROC_SETATTR, &arg, fattr, 0); - if (status == 0) - nfs_setattr_update_inode(inode, sattr); dprintk("NFS reply setattr: %d\n", status); return status; } @@ -372,8 +370,6 @@ nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, * not sure this buys us anything (and I'd have * to revamp the NFSv3 XDR code) */ status = nfs3_proc_setattr(dentry, &fattr, sattr); - if (status == 0) - nfs_setattr_update_inode(dentry->d_inode, sattr); nfs_refresh_inode(dentry->d_inode, &fattr); dprintk("NFS reply setattr (post-create): %d\n", status); } diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c index 0c5a308e4963..1b76f80aedb9 100644 --- a/trunk/fs/nfs/nfs4proc.c +++ b/trunk/fs/nfs/nfs4proc.c @@ -753,7 +753,6 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr, .rpc_argp = &arg, .rpc_resp = &res, }; - int status; fattr->valid = 0; @@ -763,8 +762,7 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr, } else memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid)); - status = rpc_call_sync(server->client, &msg, 0); - return status; + return rpc_call_sync(server->client, &msg, 0); } static int nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr, @@ -1147,8 +1145,6 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, status = nfs4_do_setattr(NFS_SERVER(inode), fattr, NFS_FH(inode), sattr, state); - if (status == 0) - nfs_setattr_update_inode(inode, sattr); if (state != NULL) nfs4_close_state(state, FMODE_WRITE); put_rpccred(cred); @@ -1453,10 +1449,8 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, struct nfs_fattr fattr; status = nfs4_do_setattr(NFS_SERVER(dir), &fattr, NFS_FH(state->inode), sattr, state); - if (status == 0) { - nfs_setattr_update_inode(state->inode, sattr); + if (status == 0) goto out; - } } else if (flags != 0) goto out; nfs4_close_state(state, flags); diff --git a/trunk/fs/nfs/proc.c b/trunk/fs/nfs/proc.c index be23c3fb9260..cedf636bcf3c 100644 --- a/trunk/fs/nfs/proc.c +++ b/trunk/fs/nfs/proc.c @@ -114,8 +114,6 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, dprintk("NFS call setattr\n"); fattr->valid = 0; status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0); - if (status == 0) - nfs_setattr_update_inode(inode, sattr); dprintk("NFS reply setattr: %d\n", status); return status; } diff --git a/trunk/fs/nfs_common/nfsacl.c b/trunk/fs/nfs_common/nfsacl.c index 251e5a1bb1c4..18c58c32e326 100644 --- a/trunk/fs/nfs_common/nfsacl.c +++ b/trunk/fs/nfs_common/nfsacl.c @@ -239,7 +239,6 @@ nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, if (xdr_decode_word(buf, base, &entries) || entries > NFS_ACL_MAX_ENTRIES) return -EINVAL; - nfsacl_desc.desc.array_maxlen = entries; err = xdr_decode_array2(buf, base + 4, &nfsacl_desc.desc); if (err) return err; diff --git a/trunk/fs/nfsd/nfssvc.c b/trunk/fs/nfsd/nfssvc.c index 1697539a7171..07b9a065e9da 100644 --- a/trunk/fs/nfsd/nfssvc.c +++ b/trunk/fs/nfsd/nfssvc.c @@ -287,7 +287,6 @@ nfsd(struct svc_rqst *rqstp) svc_exit_thread(rqstp); /* Release module */ - unlock_kernel(); module_put_and_exit(0); } diff --git a/trunk/fs/ntfs/ChangeLog b/trunk/fs/ntfs/ChangeLog index 21e21fe519e2..9709fac6531d 100644 --- a/trunk/fs/ntfs/ChangeLog +++ b/trunk/fs/ntfs/ChangeLog @@ -174,9 +174,6 @@ ToDo/Notes: fact that the vfs and ntfs inodes are one struct in memory to find the ntfs inode in memory if present. Also, the ntfs inode has its own locking so it does not matter if the vfs inode is locked. - - Fix bug in mft record writing where we forgot to set the device in - the buffers when mapping them after the VM had discarded them - Thanks to Martin MOKREJŠ for the bug report. 2.1.22 - Many bug and race fixes and error handling improvements. diff --git a/trunk/fs/ntfs/mft.c b/trunk/fs/ntfs/mft.c index 317f7c679fd3..ac9ff39aa834 100644 --- a/trunk/fs/ntfs/mft.c +++ b/trunk/fs/ntfs/mft.c @@ -533,7 +533,6 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no, LCN lcn; unsigned int vcn_ofs; - bh->b_bdev = vol->sb->s_bdev; /* Obtain the vcn and offset of the current block. */ vcn = ((VCN)mft_no << vol->mft_record_size_bits) + (block_start - m_start); @@ -726,7 +725,6 @@ int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync) LCN lcn; unsigned int vcn_ofs; - bh->b_bdev = vol->sb->s_bdev; /* Obtain the vcn and offset of the current block. */ vcn = ((VCN)ni->mft_no << vol->mft_record_size_bits) + (block_start - m_start); diff --git a/trunk/fs/reiserfs/namei.c b/trunk/fs/reiserfs/namei.c index 3549067c42d9..a20bbc1642dc 100644 --- a/trunk/fs/reiserfs/namei.c +++ b/trunk/fs/reiserfs/namei.c @@ -593,9 +593,6 @@ static int new_inode_init(struct inode *inode, struct inode *dir, int mode) */ inode->i_uid = current->fsuid; inode->i_mode = mode; - /* Make inode invalid - just in case we are going to drop it before - * the initialization happens */ - INODE_PKEY(inode)->k_objectid = 0; if (dir->i_mode & S_ISGID) { inode->i_gid = dir->i_gid; diff --git a/trunk/include/asm-arm/unistd.h b/trunk/include/asm-arm/unistd.h index abb36e54c966..ace27480886e 100644 --- a/trunk/include/asm-arm/unistd.h +++ b/trunk/include/asm-arm/unistd.h @@ -350,11 +350,6 @@ #endif #define __NR_vserver (__NR_SYSCALL_BASE+313) -#define __NR_ioprio_set (__NR_SYSCALL_BASE+314) -#define __NR_ioprio_get (__NR_SYSCALL_BASE+315) -#define __NR_inotify_init (__NR_SYSCALL_BASE+316) -#define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) -#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) /* * The following SWIs are ARM private. diff --git a/trunk/include/asm-i386/pci.h b/trunk/include/asm-i386/pci.h index 78c85985aee3..2cbab30734d6 100644 --- a/trunk/include/asm-i386/pci.h +++ b/trunk/include/asm-i386/pci.h @@ -18,11 +18,9 @@ extern unsigned int pcibios_assign_all_busses(void); #define pcibios_scan_all_fns(a, b) 0 extern unsigned long pci_mem_start; -#define PCIBIOS_MIN_IO 0x1000 +#define PCIBIOS_MIN_IO 0x4000 #define PCIBIOS_MIN_MEM (pci_mem_start) -#define PCIBIOS_MIN_CARDBUS_IO 0x4000 - void pcibios_config_init(void); struct pci_bus * pcibios_scan_root(int bus); diff --git a/trunk/include/asm-i386/processor.h b/trunk/include/asm-i386/processor.h index d0d8b0160090..5d06e6bd6ba0 100644 --- a/trunk/include/asm-i386/processor.h +++ b/trunk/include/asm-i386/processor.h @@ -29,7 +29,7 @@ struct desc_struct { }; #define desc_empty(desc) \ - (!((desc)->a | (desc)->b)) + (!((desc)->a + (desc)->b)) #define desc_equal(desc1, desc2) \ (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) diff --git a/trunk/include/asm-ia64/iosapic.h b/trunk/include/asm-ia64/iosapic.h index 1093f35b3b90..a429fe225b07 100644 --- a/trunk/include/asm-ia64/iosapic.h +++ b/trunk/include/asm-ia64/iosapic.h @@ -75,6 +75,8 @@ extern int __devinit iosapic_init (unsigned long address, unsigned int gsi_base); #ifdef CONFIG_HOTPLUG extern int iosapic_remove (unsigned int gsi_base); +#else +#define iosapic_remove(gsi_base) (-EINVAL) #endif /* CONFIG_HOTPLUG */ extern int gsi_to_vector (unsigned int gsi); extern int gsi_to_irq (unsigned int gsi); @@ -102,9 +104,7 @@ extern void __devinit map_iosapic_to_node (unsigned int, int); #else #define iosapic_system_init(pcat_compat) do { } while (0) #define iosapic_init(address,gsi_base) (-EINVAL) -#ifdef CONFIG_HOTPLUG #define iosapic_remove(gsi_base) (-ENODEV) -#endif /* CONFIG_HOTPLUG */ #define iosapic_register_intr(gsi,polarity,trigger) (gsi) #define iosapic_unregister_intr(irq) do { } while (0) #define iosapic_override_isa_irq(isa_irq,gsi,polarity,trigger) do { } while (0) diff --git a/trunk/include/asm-ppc64/iSeries/LparMap.h b/trunk/include/asm-ppc64/iSeries/LparMap.h index a6840b186d03..5c32e38c1c01 100644 --- a/trunk/include/asm-ppc64/iSeries/LparMap.h +++ b/trunk/include/asm-ppc64/iSeries/LparMap.h @@ -19,8 +19,6 @@ #ifndef _LPARMAP_H #define _LPARMAP_H -#ifndef __ASSEMBLY__ - #include /* @@ -73,11 +71,6 @@ struct LparMap { } xRanges[HvRangesToMap]; }; -extern const struct LparMap xLparMap; - -#endif /* __ASSEMBLY__ */ - -/* the fixed address where the LparMap exists */ -#define LPARMAP_PHYS 0x7000 +extern struct LparMap xLparMap; #endif /* _LPARMAP_H */ diff --git a/trunk/include/asm-sh/unistd.h b/trunk/include/asm-sh/unistd.h index 4e7701d6d23c..245447081f0d 100644 --- a/trunk/include/asm-sh/unistd.h +++ b/trunk/include/asm-sh/unistd.h @@ -406,7 +406,7 @@ register long __sc6 __asm__ ("r6") = (long) arg3; \ register long __sc7 __asm__ ("r7") = (long) arg4; \ register long __sc0 __asm__ ("r0") = (long) arg5; \ register long __sc1 __asm__ ("r1") = (long) arg6; \ -__asm__ __volatile__ ("trapa #0x16" \ +__asm__ __volatile__ ("trapa #0x15" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \ "r" (__sc3), "r" (__sc1) \ diff --git a/trunk/include/asm-um/page.h b/trunk/include/asm-um/page.h index f58aedadeb4e..5afee8a8cdf3 100644 --- a/trunk/include/asm-um/page.h +++ b/trunk/include/asm-um/page.h @@ -104,8 +104,8 @@ extern void *to_virt(unsigned long phys); * casting is the right thing, but 32-bit UML can't have 64-bit virtual * addresses */ -#define __pa(virt) to_phys((void *) (unsigned long) (virt)) -#define __va(phys) to_virt((unsigned long) (phys)) +#define __pa(virt) to_phys((void *) (unsigned long) virt) +#define __va(phys) to_virt((unsigned long) phys) #define page_to_pfn(page) ((page) - mem_map) #define pfn_to_page(pfn) (mem_map + (pfn)) diff --git a/trunk/include/asm-x86_64/pci.h b/trunk/include/asm-x86_64/pci.h index eeb3088a1c9e..9c4527eb55e2 100644 --- a/trunk/include/asm-x86_64/pci.h +++ b/trunk/include/asm-x86_64/pci.h @@ -22,11 +22,9 @@ extern unsigned int pcibios_assign_all_busses(void); extern int no_iommu, force_iommu; extern unsigned long pci_mem_start; -#define PCIBIOS_MIN_IO 0x1000 +#define PCIBIOS_MIN_IO 0x4000 #define PCIBIOS_MIN_MEM (pci_mem_start) -#define PCIBIOS_MIN_CARDBUS_IO 0x4000 - void pcibios_config_init(void); struct pci_bus * pcibios_scan_root(int bus); extern int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int len, u32 *value); diff --git a/trunk/include/asm-x86_64/processor.h b/trunk/include/asm-x86_64/processor.h index 85549e656eeb..106f666517bb 100644 --- a/trunk/include/asm-x86_64/processor.h +++ b/trunk/include/asm-x86_64/processor.h @@ -32,7 +32,7 @@ #define ID_MASK 0x00200000 #define desc_empty(desc) \ - (!((desc)->a | (desc)->b)) + (!((desc)->a + (desc)->b)) #define desc_equal(desc1, desc2) \ (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) diff --git a/trunk/include/linux/fsnotify.h b/trunk/include/linux/fsnotify.h index 03b8e7932b83..602c305c8585 100644 --- a/trunk/include/linux/fsnotify.h +++ b/trunk/include/linux/fsnotify.h @@ -21,7 +21,7 @@ */ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, const char *old_name, const char *new_name, - int isdir, struct inode *target, struct inode *source) + int isdir, struct inode *target) { u32 cookie = inotify_get_cookie(); @@ -41,10 +41,6 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); inotify_inode_is_dead(target); } - - if (source) { - inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL); - } } /* diff --git a/trunk/include/linux/inotify.h b/trunk/include/linux/inotify.h index 93bb3afe646b..a40c2bf0408e 100644 --- a/trunk/include/linux/inotify.h +++ b/trunk/include/linux/inotify.h @@ -35,7 +35,6 @@ struct inotify_event { #define IN_CREATE 0x00000100 /* Subfile was created */ #define IN_DELETE 0x00000200 /* Subfile was deleted */ #define IN_DELETE_SELF 0x00000400 /* Self was deleted */ -#define IN_MOVE_SELF 0x00000800 /* Self was moved */ /* the following are legal events. they are sent as needed to any watch */ #define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */ @@ -57,8 +56,7 @@ struct inotify_event { */ #define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \ IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \ - IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \ - IN_MOVE_SELF) + IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF) #ifdef __KERNEL__ diff --git a/trunk/include/linux/netpoll.h b/trunk/include/linux/netpoll.h index 5ade54a78dbb..bcd0ac33f592 100644 --- a/trunk/include/linux/netpoll.h +++ b/trunk/include/linux/netpoll.h @@ -9,7 +9,6 @@ #include #include -#include #include struct netpoll; @@ -27,7 +26,6 @@ struct netpoll { struct netpoll_info { spinlock_t poll_lock; int poll_owner; - int tries; int rx_flags; spinlock_t rx_lock; struct netpoll *rx_np; /* netpoll that registered an rx_hook */ @@ -62,31 +60,25 @@ static inline int netpoll_rx(struct sk_buff *skb) return ret; } -static inline void *netpoll_poll_lock(struct net_device *dev) +static inline void netpoll_poll_lock(struct net_device *dev) { - rcu_read_lock(); /* deal with race on ->npinfo */ if (dev->npinfo) { spin_lock(&dev->npinfo->poll_lock); dev->npinfo->poll_owner = smp_processor_id(); - return dev->npinfo; } - return NULL; } -static inline void netpoll_poll_unlock(void *have) +static inline void netpoll_poll_unlock(struct net_device *dev) { - struct netpoll_info *npi = have; - - if (npi) { - npi->poll_owner = -1; - spin_unlock(&npi->poll_lock); + if (dev->npinfo) { + dev->npinfo->poll_owner = -1; + spin_unlock(&dev->npinfo->poll_lock); } - rcu_read_unlock(); } #else #define netpoll_rx(a) 0 -#define netpoll_poll_lock(a) 0 +#define netpoll_poll_lock(a) #define netpoll_poll_unlock(a) #endif diff --git a/trunk/include/linux/nfs_fs.h b/trunk/include/linux/nfs_fs.h index 7d78a783c64a..8ea249110fb0 100644 --- a/trunk/include/linux/nfs_fs.h +++ b/trunk/include/linux/nfs_fs.h @@ -292,7 +292,6 @@ extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); extern int nfs_setattr(struct dentry *, struct iattr *); -extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); extern void nfs_begin_attr_update(struct inode *); extern void nfs_end_attr_update(struct inode *); extern void nfs_begin_data_update(struct inode *); diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index bc4c40000c0d..8621cf42b46f 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -556,8 +556,7 @@ struct pci_dev { /* keep track of device state */ unsigned int is_enabled:1; /* pci_enable_device has been called */ unsigned int is_busmaster:1; /* device is busmaster */ - unsigned int no_msi:1; /* device may not use msi */ - + u32 saved_config_space[16]; /* config space saved at suspend time */ struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ int rom_attr_enabled; /* has display of the rom attribute been enabled? */ diff --git a/trunk/include/linux/pci_ids.h b/trunk/include/linux/pci_ids.h index 51e61e96051c..bc4cc10fabe9 100644 --- a/trunk/include/linux/pci_ids.h +++ b/trunk/include/linux/pci_ids.h @@ -2281,11 +2281,6 @@ #define PCI_VENDOR_ID_INTEL 0x8086 #define PCI_DEVICE_ID_INTEL_EESSC 0x0008 #define PCI_DEVICE_ID_INTEL_21145 0x0039 -#define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320 -#define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321 -#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 -#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A -#define PCI_DEVICE_ID_INTEL_PXHV 0x032C #define PCI_DEVICE_ID_INTEL_82375 0x0482 #define PCI_DEVICE_ID_INTEL_82424 0x0483 #define PCI_DEVICE_ID_INTEL_82378 0x0484 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index 948527e42a60..0061c9470482 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -255,7 +255,7 @@ struct sk_buff { nohdr:1; /* 3 bits spare */ __u8 pkt_type; - __be16 protocol; + __u16 protocol; void (*destructor)(struct sk_buff *skb); #ifdef CONFIG_NETFILTER diff --git a/trunk/include/linux/sunrpc/xdr.h b/trunk/include/linux/sunrpc/xdr.h index 23448d0fb5bc..34ec3e8d99b3 100644 --- a/trunk/include/linux/sunrpc/xdr.h +++ b/trunk/include/linux/sunrpc/xdr.h @@ -177,7 +177,6 @@ typedef int (*xdr_xcode_elem_t)(struct xdr_array2_desc *desc, void *elem); struct xdr_array2_desc { unsigned int elem_size; unsigned int array_len; - unsigned int array_maxlen; xdr_xcode_elem_t xcode; }; diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index d282fea81138..ca1186eef938 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -692,7 +692,7 @@ static void handle_stop_signal(int sig, struct task_struct *p) { struct task_struct *t; - if (p->signal->flags & SIGNAL_GROUP_EXIT) + if (p->flags & SIGNAL_GROUP_EXIT) /* * The process is in the middle of dying already. */ diff --git a/trunk/lib/zlib_inflate/inftrees.c b/trunk/lib/zlib_inflate/inftrees.c index 874950ec4858..c5f66fbb0dd0 100644 --- a/trunk/lib/zlib_inflate/inftrees.c +++ b/trunk/lib/zlib_inflate/inftrees.c @@ -141,7 +141,7 @@ static int huft_build( { *t = NULL; *m = 0; - return Z_OK; + return Z_DATA_ERROR; } diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index faf59b02c4bf..52a3bf7ae177 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -1696,8 +1696,7 @@ static void net_rx_action(struct softirq_action *h) struct softnet_data *queue = &__get_cpu_var(softnet_data); unsigned long start_time = jiffies; int budget = netdev_budget; - void *have; - + local_irq_disable(); while (!list_empty(&queue->poll_list)) { @@ -1710,10 +1709,10 @@ static void net_rx_action(struct softirq_action *h) dev = list_entry(queue->poll_list.next, struct net_device, poll_list); - have = netpoll_poll_lock(dev); + netpoll_poll_lock(dev); if (dev->quota <= 0 || dev->poll(dev, &budget)) { - netpoll_poll_unlock(have); + netpoll_poll_unlock(dev); local_irq_disable(); list_del(&dev->poll_list); list_add_tail(&dev->poll_list, &queue->poll_list); @@ -1722,7 +1721,7 @@ static void net_rx_action(struct softirq_action *h) else dev->quota = dev->weight; } else { - netpoll_poll_unlock(have); + netpoll_poll_unlock(dev); dev_put(dev); local_irq_disable(); } diff --git a/trunk/net/core/netpoll.c b/trunk/net/core/netpoll.c index a1a9a7abff50..c327c9edadc5 100644 --- a/trunk/net/core/netpoll.c +++ b/trunk/net/core/netpoll.c @@ -33,7 +33,6 @@ #define MAX_UDP_CHUNK 1460 #define MAX_SKBS 32 #define MAX_QUEUE_DEPTH (MAX_SKBS / 2) -#define MAX_RETRIES 20000 static DEFINE_SPINLOCK(skb_list_lock); static int nr_skbs; @@ -249,14 +248,14 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) int status; struct netpoll_info *npinfo; - if (!np || !np->dev || !netif_running(np->dev)) { +repeat: + if(!np || !np->dev || !netif_running(np->dev)) { __kfree_skb(skb); return; } - npinfo = np->dev->npinfo; - /* avoid recursion */ + npinfo = np->dev->npinfo; if (npinfo->poll_owner == smp_processor_id() || np->dev->xmit_lock_owner == smp_processor_id()) { if (np->drop) @@ -266,37 +265,30 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) return; } - do { - npinfo->tries--; - spin_lock(&np->dev->xmit_lock); - np->dev->xmit_lock_owner = smp_processor_id(); + spin_lock(&np->dev->xmit_lock); + np->dev->xmit_lock_owner = smp_processor_id(); - /* - * network drivers do not expect to be called if the queue is - * stopped. - */ - if (netif_queue_stopped(np->dev)) { - np->dev->xmit_lock_owner = -1; - spin_unlock(&np->dev->xmit_lock); - netpoll_poll(np); - udelay(50); - continue; - } - - status = np->dev->hard_start_xmit(skb, np->dev); + /* + * network drivers do not expect to be called if the queue is + * stopped. + */ + if (netif_queue_stopped(np->dev)) { np->dev->xmit_lock_owner = -1; spin_unlock(&np->dev->xmit_lock); - /* success */ - if(!status) { - npinfo->tries = MAX_RETRIES; /* reset */ - return; - } + netpoll_poll(np); + goto repeat; + } + + status = np->dev->hard_start_xmit(skb, np->dev); + np->dev->xmit_lock_owner = -1; + spin_unlock(&np->dev->xmit_lock); - /* transmit busy */ + /* transmit busy */ + if(status) { netpoll_poll(np); - udelay(50); - } while (npinfo->tries > 0); + goto repeat; + } } void netpoll_send_udp(struct netpoll *np, const char *msg, int len) @@ -357,11 +349,15 @@ static void arp_reply(struct sk_buff *skb) unsigned char *arp_ptr; int size, type = ARPOP_REPLY, ptype = ETH_P_ARP; u32 sip, tip; + unsigned long flags; struct sk_buff *send_skb; struct netpoll *np = NULL; + spin_lock_irqsave(&npinfo->rx_lock, flags); if (npinfo->rx_np && npinfo->rx_np->dev == skb->dev) np = npinfo->rx_np; + spin_unlock_irqrestore(&npinfo->rx_lock, flags); + if (!np) return; @@ -643,11 +639,9 @@ int netpoll_setup(struct netpoll *np) if (!npinfo) goto release; - npinfo->rx_flags = 0; npinfo->rx_np = NULL; npinfo->poll_lock = SPIN_LOCK_UNLOCKED; npinfo->poll_owner = -1; - npinfo->tries = MAX_RETRIES; npinfo->rx_lock = SPIN_LOCK_UNLOCKED; } else npinfo = ndev->npinfo; @@ -724,16 +718,9 @@ int netpoll_setup(struct netpoll *np) npinfo->rx_np = np; spin_unlock_irqrestore(&npinfo->rx_lock, flags); } - - /* fill up the skb queue */ - refill_skbs(); - /* last thing to do is link it to the net device structure */ ndev->npinfo = npinfo; - /* avoid racing with NAPI reading npinfo */ - synchronize_rcu(); - return 0; release: diff --git a/trunk/net/ipv4/tcp_output.c b/trunk/net/ipv4/tcp_output.c index 566045e58437..7d076f0db100 100644 --- a/trunk/net/ipv4/tcp_output.c +++ b/trunk/net/ipv4/tcp_output.c @@ -861,8 +861,7 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len, u16 flags; /* All of a TSO frame must be composed of paged data. */ - if (skb->len != skb->data_len) - return tcp_fragment(sk, skb, len, mss_now); + BUG_ON(skb->len != skb->data_len); buff = sk_stream_alloc_pskb(sk, 0, 0, GFP_ATOMIC); if (unlikely(buff == NULL)) @@ -975,8 +974,6 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle) sent_pkts = 0; while ((skb = sk->sk_send_head)) { - unsigned int limit; - tso_segs = tcp_init_tso_segs(sk, skb, mss_now); BUG_ON(!tso_segs); @@ -997,10 +994,9 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle) break; } - limit = mss_now; if (tso_segs > 1) { - limit = tcp_window_allows(tp, skb, - mss_now, cwnd_quota); + u32 limit = tcp_window_allows(tp, skb, + mss_now, cwnd_quota); if (skb->len < limit) { unsigned int trim = skb->len % mss_now; @@ -1008,12 +1004,15 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle) if (trim) limit = skb->len - trim; } + if (skb->len > limit) { + if (tso_fragment(sk, skb, limit, mss_now)) + break; + } + } else if (unlikely(skb->len > mss_now)) { + if (unlikely(tcp_fragment(sk, skb, mss_now, mss_now))) + break; } - if (skb->len > limit && - unlikely(tso_fragment(sk, skb, limit, mss_now))) - break; - TCP_SKB_CB(skb)->when = tcp_time_stamp; if (unlikely(tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)))) @@ -1065,14 +1064,11 @@ void tcp_push_one(struct sock *sk, unsigned int mss_now) cwnd_quota = tcp_snd_test(sk, skb, mss_now, TCP_NAGLE_PUSH); if (likely(cwnd_quota)) { - unsigned int limit; - BUG_ON(!tso_segs); - limit = mss_now; if (tso_segs > 1) { - limit = tcp_window_allows(tp, skb, - mss_now, cwnd_quota); + u32 limit = tcp_window_allows(tp, skb, + mss_now, cwnd_quota); if (skb->len < limit) { unsigned int trim = skb->len % mss_now; @@ -1080,12 +1076,15 @@ void tcp_push_one(struct sock *sk, unsigned int mss_now) if (trim) limit = skb->len - trim; } + if (skb->len > limit) { + if (unlikely(tso_fragment(sk, skb, limit, mss_now))) + return; + } + } else if (unlikely(skb->len > mss_now)) { + if (unlikely(tcp_fragment(sk, skb, mss_now, mss_now))) + return; } - if (skb->len > limit && - unlikely(tso_fragment(sk, skb, limit, mss_now))) - return; - /* Send it out now. */ TCP_SKB_CB(skb)->when = tcp_time_stamp; @@ -1371,21 +1370,15 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) if (skb->len > cur_mss) { int old_factor = tcp_skb_pcount(skb); - int diff; + int new_factor; if (tcp_fragment(sk, skb, cur_mss, cur_mss)) return -ENOMEM; /* We'll try again later. */ /* New SKB created, account for it. */ - diff = old_factor - tcp_skb_pcount(skb) - - tcp_skb_pcount(skb->next); - tp->packets_out -= diff; - - if (diff > 0) { - tp->fackets_out -= diff; - if ((int)tp->fackets_out < 0) - tp->fackets_out = 0; - } + new_factor = tcp_skb_pcount(skb); + tp->packets_out -= old_factor - new_factor; + tp->packets_out += tcp_skb_pcount(skb->next); } /* Collapse two adjacent packets if worthwhile and we can. */ diff --git a/trunk/net/ipv6/ip6_input.c b/trunk/net/ipv6/ip6_input.c index 10fbb50daea4..866f10726c58 100644 --- a/trunk/net/ipv6/ip6_input.c +++ b/trunk/net/ipv6/ip6_input.c @@ -198,13 +198,12 @@ static inline int ip6_input_finish(struct sk_buff *skb) if (!raw_sk) { if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS); - icmpv6_send(skb, ICMPV6_PARAMPROB, - ICMPV6_UNK_NEXTHDR, nhoff, - skb->dev); + icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhoff); } - } else + } else { IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS); - kfree_skb(skb); + kfree_skb(skb); + } } rcu_read_unlock(); return 0; diff --git a/trunk/net/ipv6/raw.c b/trunk/net/ipv6/raw.c index 1d4d75b34d32..e2b848ec9851 100644 --- a/trunk/net/ipv6/raw.c +++ b/trunk/net/ipv6/raw.c @@ -328,8 +328,6 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb) if (skb->ip_summed != CHECKSUM_UNNECESSARY) { if (skb->ip_summed == CHECKSUM_HW) { - skb_postpull_rcsum(skb, skb->nh.raw, - skb->h.raw - skb->nh.raw); skb->ip_summed = CHECKSUM_UNNECESSARY; if (csum_ipv6_magic(&skb->nh.ipv6h->saddr, &skb->nh.ipv6h->daddr, diff --git a/trunk/net/sunrpc/xdr.c b/trunk/net/sunrpc/xdr.c index fde16f40a581..8a4d9c106af1 100644 --- a/trunk/net/sunrpc/xdr.c +++ b/trunk/net/sunrpc/xdr.c @@ -993,7 +993,6 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base, return -EINVAL; } else { if (xdr_decode_word(buf, base, &desc->array_len) != 0 || - desc->array_len > desc->array_maxlen || (unsigned long) base + 4 + desc->array_len * desc->elem_size > buf->len) return -EINVAL;