]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Pull ngam-maule-steiner into release branch
authorTony Luck <tony.luck@intel.com>
Mon, 29 Aug 2005 22:48:51 +0000 (15:48 -0700)
committerTony Luck <tony.luck@intel.com>
Mon, 29 Aug 2005 22:48:51 +0000 (15:48 -0700)
323 files changed:
CREDITS
Documentation/acpi-hotkey.txt
Documentation/kernel-parameters.txt
Documentation/pci.txt
MAINTAINERS
Makefile
arch/alpha/Kconfig
arch/alpha/kernel/smp.c
arch/alpha/oprofile/common.c
arch/arm/Kconfig
arch/arm/kernel/calls.S
arch/arm/kernel/traps.c
arch/arm/mach-ixp4xx/coyote-setup.c
arch/arm/mach-ixp4xx/gtwx5715-setup.c
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-s3c2410/s3c2410.c
arch/arm/mm/Kconfig
arch/arm/mm/proc-v6.S
arch/arm/nwfpe/fpopcode.h
arch/arm/nwfpe/softfloat.c
arch/i386/kernel/apic.c
arch/i386/kernel/nmi.c
arch/i386/kernel/traps.c
arch/ia64/Kconfig
arch/ia64/configs/sn2_defconfig
arch/ia64/configs/tiger_defconfig
arch/ia64/configs/zx1_defconfig
arch/ia64/hp/sim/boot/boot_head.S
arch/ia64/hp/sim/boot/fw-emu.c
arch/ia64/ia32/ia32_signal.c
arch/ia64/kernel/Makefile
arch/ia64/kernel/cpufreq/Kconfig [new file with mode: 0644]
arch/ia64/kernel/cpufreq/Makefile [new file with mode: 0644]
arch/ia64/kernel/cpufreq/acpi-cpufreq.c [new file with mode: 0644]
arch/ia64/kernel/domain.c
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/salinfo.c
arch/ia64/lib/Makefile
arch/ia64/lib/swiotlb.c
arch/ia64/pci/pci.c
arch/ia64/sn/kernel/io_init.c
arch/ia64/sn/kernel/sn2/sn_hwperf.c
arch/m32r/Kconfig
arch/m32r/Kconfig.debug
arch/m32r/kernel/setup_m32700ut.c
arch/m32r/kernel/setup_opsput.c
arch/m32r/kernel/smpboot.c
arch/m32r/lib/csum_partial_copy.c
arch/m32r/mm/discontig.c
arch/ppc/Kconfig
arch/ppc/platforms/4xx/Kconfig
arch/ppc/syslib/m8xx_setup.c
arch/ppc/syslib/ppc4xx_dma.c
arch/ppc64/kernel/LparData.c
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/head.S
arch/ppc64/kernel/iommu.c
arch/ppc64/kernel/lparmap.c [new file with mode: 0644]
arch/ppc64/kernel/setup.c
arch/s390/kernel/cpcmd.c
arch/sh/kernel/entry.S
arch/sh64/kernel/syscalls.S
arch/sparc/kernel/sparc_ksyms.c
arch/sparc64/kernel/Makefile
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/traps.c
arch/sparc64/kernel/una_asm.S [new file with mode: 0644]
arch/sparc64/kernel/unaligned.c
arch/sparc64/kernel/us2e_cpufreq.c
arch/sparc64/kernel/us3_cpufreq.c
arch/um/drivers/mmapper_kern.c
arch/um/kernel/skas/process.c
arch/um/os-Linux/elf_aux.c
arch/x86_64/defconfig
arch/x86_64/kernel/e820.c
arch/x86_64/kernel/smpboot.c
arch/x86_64/mm/fault.c
arch/x86_64/mm/init.c
arch/x86_64/mm/numa.c
arch/x86_64/pci/k8-bus.c
drivers/acpi/motherboard.c
drivers/acpi/osl.c
drivers/acpi/sleep/poweroff.c
drivers/base/bus.c
drivers/base/class.c
drivers/block/cfq-iosched.c
drivers/char/Kconfig
drivers/char/mem.c
drivers/char/snsc_event.c
drivers/char/vt.c
drivers/hwmon/adm1026.c
drivers/hwmon/adm1031.c
drivers/hwmon/adm9240.c
drivers/hwmon/fscpos.c
drivers/hwmon/smsc47b397.c
drivers/hwmon/smsc47m1.c
drivers/ide/Kconfig
drivers/ide/ide-floppy.c
drivers/ide/pci/generic.c
drivers/ide/pci/serverworks.c
drivers/ide/ppc/pmac.c
drivers/ide/setup-pci.c
drivers/ieee1394/ohci1394.c
drivers/infiniband/Kconfig
drivers/infiniband/core/uverbs_main.c
drivers/isdn/capi/capifs.c
drivers/isdn/hisax/Kconfig
drivers/macintosh/Kconfig
drivers/md/md.c
drivers/media/dvb/dvb-usb/dibusb-common.c
drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
drivers/media/video/Kconfig
drivers/net/8139cp.c
drivers/net/Kconfig
drivers/net/dm9000.c
drivers/net/e1000/e1000_main.c
drivers/net/hamradio/6pack.c
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/ioc3-eth.c
drivers/net/loopback.c
drivers/net/tg3.c
drivers/net/tokenring/Kconfig
drivers/net/wireless/Kconfig
drivers/parport/Kconfig
drivers/pci/hotplug/pciehp.h
drivers/pci/hotplug/pciehp_core.c
drivers/pci/hotplug/pciehp_ctrl.c
drivers/pci/hotplug/pciehp_hpc.c
drivers/pci/hotplug/pciehp_pci.c
drivers/pci/hotplug/pciehprm.h
drivers/pci/hotplug/pciehprm_acpi.c
drivers/pci/hotplug/pciehprm_nonacpi.c
drivers/pci/hotplug/pciehprm_nonacpi.h
drivers/pci/hotplug/shpchp.h
drivers/pci/hotplug/shpchp_core.c
drivers/pci/hotplug/shpchp_ctrl.c
drivers/pci/hotplug/shpchp_hpc.c
drivers/pci/hotplug/shpchp_pci.c
drivers/pci/hotplug/shpchprm.h
drivers/pci/hotplug/shpchprm_acpi.c
drivers/pci/hotplug/shpchprm_legacy.c
drivers/pci/hotplug/shpchprm_legacy.h
drivers/pci/hotplug/shpchprm_nonacpi.c
drivers/pci/hotplug/shpchprm_nonacpi.h
drivers/pci/msi.c
drivers/pci/pci.h
drivers/pci/quirks.c
drivers/pci/setup-bus.c
drivers/pci/setup-res.c
drivers/pcmcia/pcmcia_resource.c
drivers/pnp/card.c
drivers/s390/cio/qdio.c
drivers/s390/crypto/z90crypt.h
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_ccw.c
drivers/s390/scsi/zfcp_def.h
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_scsi.c
drivers/s390/scsi/zfcp_sysfs_port.c
drivers/scsi/Kconfig
drivers/scsi/ahci.c
drivers/scsi/arm/Kconfig
drivers/scsi/ata_piix.c
drivers/scsi/dc395x.c
drivers/scsi/libata-core.c
drivers/scsi/libata.h
drivers/scsi/sata_promise.c
drivers/scsi/sg.c
drivers/serial/Kconfig
drivers/serial/m32r_sio.c
drivers/serial/sn_console.c
drivers/usb/input/wacom.c
drivers/usb/mon/mon_main.c
drivers/usb/mon/usb_mon.h
drivers/usb/net/usbnet.c
drivers/usb/net/zd1201.c
drivers/video/console/Kconfig
drivers/video/fbmem.c
drivers/video/intelfb/intelfbdrv.c
drivers/video/radeonfb.c
drivers/w1/w1.c
fs/afs/mntpt.c
fs/autofs/symlink.c
fs/autofs4/symlink.c
fs/befs/linuxvfs.c
fs/cifs/CHANGES
fs/cifs/cifsfs.h
fs/cifs/cifssmb.c
fs/cifs/file.c
fs/cifs/link.c
fs/cifs/misc.c
fs/devfs/base.c
fs/ext2/symlink.c
fs/ext3/symlink.c
fs/freevxfs/vxfs_immed.c
fs/hppfs/hppfs_kern.c
fs/inotify.c
fs/ioprio.c
fs/jffs2/symlink.c
fs/jfs/inode.c
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_logmgr.h
fs/jfs/jfs_txnmgr.c
fs/jfs/super.c
fs/jfs/symlink.c
fs/namei.c
fs/nfs/dir.c
fs/nfs/file.c
fs/nfs/inode.c
fs/nfs/nfs3acl.c
fs/nfs/nfs3proc.c
fs/nfs/nfs4proc.c
fs/nfs/proc.c
fs/nfs/read.c
fs/nfs/symlink.c
fs/nfs_common/nfsacl.c
fs/nfsd/nfssvc.c
fs/ntfs/ChangeLog
fs/ntfs/aops.c
fs/ntfs/mft.c
fs/proc/base.c
fs/proc/generic.c
fs/reiserfs/inode.c
fs/reiserfs/namei.c
fs/smbfs/symlink.c
fs/sysfs/inode.c
fs/sysfs/symlink.c
fs/sysv/symlink.c
fs/ufs/symlink.c
fs/xfs/linux-2.6/xfs_iops.c
include/asm-alpha/system.h
include/asm-arm/arch-ixp4xx/timex.h
include/asm-arm/bug.h
include/asm-arm/cpu-multi32.h
include/asm-arm/cpu-single.h
include/asm-arm/unistd.h
include/asm-i386/pci.h
include/asm-i386/processor.h
include/asm-ia64/acpi.h
include/asm-ia64/io.h
include/asm-ia64/iosapic.h
include/asm-ia64/mmu.h
include/asm-ia64/mmu_context.h
include/asm-ia64/pal.h
include/asm-ia64/rwsem.h
include/asm-ia64/spinlock.h
include/asm-m32r/smp.h
include/asm-m68k/page.h
include/asm-ppc/ibm44x.h
include/asm-ppc/ppc4xx_dma.h
include/asm-ppc/time.h
include/asm-ppc64/bug.h
include/asm-ppc64/iSeries/LparMap.h
include/asm-s390/uaccess.h
include/asm-sh/unistd.h
include/asm-sh64/unistd.h
include/asm-sparc64/thread_info.h
include/asm-um/page.h
include/asm-x86_64/e820.h
include/asm-x86_64/pci.h
include/asm-x86_64/processor.h
include/linux/fs.h
include/linux/fsnotify.h
include/linux/inotify.h
include/linux/netpoll.h
include/linux/nfs_fs.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/skbuff.h
include/linux/sunrpc/xdr.h
include/net/ax25.h
include/net/sock.h
include/sound/core.h
kernel/cpuset.c
kernel/sched.c
kernel/signal.c
kernel/timer.c
lib/idr.c
lib/vsprintf.c
lib/zlib_inflate/inftrees.c
mm/shmem.c
net/802/tr.c
net/ax25/af_ax25.c
net/ax25/ax25_route.c
net/ax25/ax25_uid.c
net/core/dev.c
net/core/netpoll.c
net/decnet/dn_neigh.c
net/ipv4/fib_trie.c
net/ipv4/icmp.c
net/ipv4/inetpeer.c
net/ipv4/ipcomp.c
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ipt_ECN.c
net/ipv4/netfilter/ipt_TCPMSS.c
net/ipv4/tcp.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_output.c
net/ipv6/ip6_input.c
net/ipv6/ipcomp6.c
net/ipv6/netfilter/ip6_queue.c
net/ipv6/raw.c
net/ipv6/tcp_ipv6.c
net/netrom/af_netrom.c
net/rose/af_rose.c
net/rose/rose_route.c
net/sched/sch_generic.c
net/sctp/proc.c
net/sunrpc/auth_gss/gss_krb5_crypto.c
net/sunrpc/xdr.c
scripts/mod/modpost.c
sound/Kconfig
sound/core/Makefile
sound/core/sound.c
sound/isa/Kconfig
sound/oss/Kconfig
sound/oss/Makefile
sound/oss/i810_audio.c
sound/oss/vidc.h
sound/pci/Kconfig
sound/ppc/pmac.c

diff --git a/CREDITS b/CREDITS
index 50121d432b629ffe78f627b666a19a8dd2570a8a..f553f8cfaa6266a54bc4081d448719d73abb5001 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -2423,8 +2423,7 @@ S: Toronto, Ontario
 S: Canada
 
 N: Zwane Mwaikambo
-E: zwane@linuxpower.ca
-W: http://function.linuxpower.ca
+E: zwane@arm.linux.org.uk
 D: Various driver hacking
 D: Lowlevel x86 kernel hacking
 D: General debugging
index 4c115a7bb8262a95080bbc36355ca77fcd3faa2e..0acdc80c30c2fab156a02238e6146afd6496425f 100644 (file)
@@ -33,3 +33,6 @@ 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.
index a998a8c2f95baee78ec3080a244a4ff8fa280fa6..3d5cd7a09b2fc1aa56b6c197ee8d35df7116ec4d 100644 (file)
@@ -159,6 +159,11 @@ 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: <io>,<irq>,<dma>,<dma2>
                        See also Documentation/sound/oss/AD1816.
index 62b1dc5d97e2e90523e8010b93054f81ef3ffe58..76d28d033657aac4158b8db93821553f332d6b11 100644 (file)
@@ -266,20 +266,6 @@ 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)_*()
index 5fd00c075053424e93a63e95bd0cdefe802464f8..564a03e61a0c4b2322136ab9d96b3f121391ee83 100644 (file)
@@ -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/developer/dvb.xml
+W:     http://linuxtv.org/
 S:     Supported
 
 EATA-DMA SCSI DRIVER
@@ -1739,7 +1739,7 @@ S:        Maintained
 
 OPL3-SA2, SA3, and SAx DRIVER
 P:     Zwane Mwaikambo
-M:     zwane@commfireservices.com
+M:     zwane@arm.linux.org.uk
 L:     linux-sound@vger.kernel.org
 S:     Maintained
 
@@ -1825,6 +1825,12 @@ 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
@@ -1989,7 +1995,7 @@ S:        Maintained
 
 SC1200 WDT DRIVER
 P:     Zwane Mwaikambo
-M:     zwane@commfireservices.com
+M:     zwane@arm.linux.org.uk
 S:     Maintained
 
 SCHEDULER
@@ -2201,6 +2207,12 @@ 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
index 2c1486159d8de480a7de20d905a8a9b47f8fb9aa..5acd1fc68d173000c1d3de42e4c3788d48c3fb10 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 13
-EXTRAVERSION =-rc6
+EXTRAVERSION =
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
index 083c5df42d35bea201f08e6875fe038b1596d44c..189d5eababa8d15708e15e354e0eb372d5e7fad1 100644 (file)
@@ -522,7 +522,7 @@ source "mm/Kconfig"
 
 config NUMA
        bool "NUMA Support (EXPERIMENTAL)"
-       depends on DISCONTIGMEM
+       depends on DISCONTIGMEM && BROKEN
        help
          Say Y to compile the kernel to support NUMA (Non-Uniform Memory
          Access).  This option is for configuring high-end multiprocessor
index 8f1e78551b1e39b669bf696284802ad216f2d065..e211aa7404e6152c4668277fdc03872547d8fab1 100644 (file)
@@ -1036,7 +1036,7 @@ debug_spin_lock(spinlock_t * lock, const char *base_file, int line_no)
        "       br      1b\n"
        ".previous"
        : "=r" (tmp), "=m" (lock->lock), "=r" (stuck)
-       : "1" (lock->lock), "2" (stuck) : "memory");
+       : "m" (lock->lock), "2" (stuck) : "memory");
 
        if (stuck < 0) {
                printk(KERN_WARNING
@@ -1115,7 +1115,7 @@ void _raw_write_lock(rwlock_t * lock)
        ".previous"
        : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy),
          "=&r" (stuck_lock), "=&r" (stuck_reader)
-       : "0" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory");
+       : "m" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory");
 
        if (stuck_lock < 0) {
                printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc);
@@ -1153,7 +1153,7 @@ void _raw_read_lock(rwlock_t * lock)
        "       br      1b\n"
        ".previous"
        : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock)
-       : "0" (*(volatile int *)lock), "2" (stuck_lock) : "memory");
+       : "m" (*(volatile int *)lock), "2" (stuck_lock) : "memory");
 
        if (stuck_lock < 0) {
                printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc);
index 908eb4af8decfe263e0908297256e7bfec5e73b3..ba788cfdc3c6cb00a31f31d82cd1f545420ff751 100644 (file)
@@ -65,7 +65,7 @@ op_axp_setup(void)
        model->reg_setup(&reg, ctr, &sys);
 
        /* Configure the registers on all cpus.  */
-       smp_call_function(model->cpu_setup, &reg, 0, 1);
+       (void)smp_call_function(model->cpu_setup, &reg, 0, 1);
        model->cpu_setup(&reg);
        return 0;
 }
@@ -86,7 +86,7 @@ op_axp_cpu_start(void *dummy)
 static int
 op_axp_start(void)
 {
-       smp_call_function(op_axp_cpu_start, NULL, 0, 1);
+       (void)smp_call_function(op_axp_cpu_start, NULL, 0, 1);
        op_axp_cpu_start(NULL);
        return 0;
 }
@@ -101,7 +101,7 @@ op_axp_cpu_stop(void *dummy)
 static void
 op_axp_stop(void)
 {
-       smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
+       (void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
        op_axp_cpu_stop(NULL);
 }
 
index 7bc4a583f4e101a01bfdc92707bf2f25f5048b61..c65c6eb9810d84b05267470cadfbf2efc9b0e682 100644 (file)
@@ -310,7 +310,7 @@ menu "Kernel Features"
 
 config SMP
        bool "Symmetric Multi-Processing (EXPERIMENTAL)"
-       depends on EXPERIMENTAL #&& n
+       depends on EXPERIMENTAL && BROKEN #&& n
        help
          This enables support for systems with more than one CPU. If you have
          a system with only one CPU, like most personal computers, say N. If
index e5d370c235d747575cf25a6f955c277c92df3957..2b6b4c786e654c125cfa62b750337bc5894b9731 100644 (file)
@@ -327,6 +327,12 @@ __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
index d571c37ac30c1f0b16fd8e81f5542aa35995d4d4..4554c961251c5871e0a05a2c6a74d1f660d0af73 100644 (file)
@@ -617,7 +617,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
        notify_die("unknown data abort code", regs, &info, instr, 0);
 }
 
-volatile void __bug(const char *file, int line, void *data)
+void __attribute__((noreturn)) __bug(const char *file, int line, void *data)
 {
        printk(KERN_CRIT"kernel BUG at %s:%d!", file, line);
        if (data)
index 7f58afb27e71c4b81471966a846d3c0021b0e0e0..411ea999619055a7b0e73bd3678ecd9ad8806989 100644 (file)
@@ -36,7 +36,7 @@ static struct flash_platform_data coyote_flash_data = {
 
 static struct resource coyote_flash_resource = {
        .start          = COYOTE_FLASH_BASE,
-       .end            = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE,
+       .end            = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1,
        .flags          = IORESOURCE_MEM,
 };
 
index 65e356bd10d6ec76312101280ad5d13ab3dedfa4..333459d6aa464bb5394fd46783e9b6690b6ed4aa 100644 (file)
@@ -114,7 +114,7 @@ static struct flash_platform_data gtwx5715_flash_data = {
 
 static struct resource gtwx5715_flash_resource = {
        .start          = GTWX5715_FLASH_BASE,
-       .end            = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE,
+       .end            = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1,
        .flags          = IORESOURCE_MEM,
 };
 
index 4633470a6a3738c5181d9dce7a2ccd02c041fe6d..fa0646c8693b096c7c1ee6b6a16dc3074bff2679 100644 (file)
@@ -36,7 +36,7 @@ static struct flash_platform_data ixdp425_flash_data = {
 
 static struct resource ixdp425_flash_resource = {
        .start          = IXDP425_FLASH_BASE,
-       .end            = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE,
+       .end            = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1,
        .flags          = IORESOURCE_MEM,
 };
 
index ff2f25409e446baf77b66390dad0928b7d3d773a..0b88993dfd27c514c181f6adc83aeb898aaf28d7 100644 (file)
@@ -18,6 +18,7 @@
  *     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 <linux/kernel.h>
@@ -49,10 +50,9 @@ 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[] = {
index afbbeb6f46582270b834ffa6e8da166a3d1bf014..db5e47dfc303dce4a49b9ca54db0ab1f0e3673af 100644 (file)
@@ -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_DISABLE_DCACHE
+       depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020) && !CPU_DCACHE_DISABLE
        default y if CPU_ARM925T
        help
          Say Y here to use the data cache in writethrough mode. Unless you
index 3429ddcf65d1837929a5eb87bae21f7938f8e74b..139a38670c5d07d35d37150adcd6358f64aefb22 100644 (file)
@@ -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
index 8035f4faafbfa4ce780649808cd0b8bffffdf361..1777e92a88e69c73db5a0fa67438ff8520a9d56a 100644 (file)
@@ -370,20 +370,20 @@ TABLE 5
 #define getRoundingMode(opcode)                ((opcode & MASK_ROUNDING_MODE) >> 5)
 
 #ifdef CONFIG_FPE_NWFPE_XP
-static inline const floatx80 getExtendedConstant(const unsigned int nIndex)
+static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex)
 {
        extern const floatx80 floatx80Constant[];
        return floatx80Constant[nIndex];
 }
 #endif
 
-static inline const float64 getDoubleConstant(const unsigned int nIndex)
+static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex)
 {
        extern const float64 float64Constant[];
        return float64Constant[nIndex];
 }
 
-static inline const float32 getSingleConstant(const unsigned int nIndex)
+static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex)
 {
        extern const float32 float32Constant[];
        return float32Constant[nIndex];
index 8b75a6e7cb3accd3023da61a3b0650da15c9e632..f9f049132a17bffb920acb8df278f5e91b514f7a 100644 (file)
@@ -1602,9 +1602,7 @@ flag float32_le_quiet( float32 a, float32 b )
     if (    ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
          || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
        ) {
-        if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) {
-            float_raise( float_flag_invalid );
-        }
+        /* Do nothing, even if NaN as we're quiet */
         return 0;
     }
     aSign = extractFloat32Sign( a );
@@ -1629,9 +1627,7 @@ flag float32_lt_quiet( float32 a, float32 b )
     if (    ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) )
          || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) )
        ) {
-        if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) {
-            float_raise( float_flag_invalid );
-        }
+        /* Do nothing, even if NaN as we're quiet */
         return 0;
     }
     aSign = extractFloat32Sign( a );
@@ -2493,9 +2489,7 @@ flag float64_le_quiet( float64 a, float64 b )
     if (    ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) )
          || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) )
        ) {
-        if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) {
-            float_raise( float_flag_invalid );
-        }
+        /* Do nothing, even if NaN as we're quiet */
         return 0;
     }
     aSign = extractFloat64Sign( a );
@@ -2520,9 +2514,7 @@ flag float64_lt_quiet( float64 a, float64 b )
     if (    ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) )
          || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) )
        ) {
-        if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) {
-            float_raise( float_flag_invalid );
-        }
+        /* Do nothing, even if NaN as we're quiet */
         return 0;
     }
     aSign = extractFloat64Sign( a );
@@ -3256,7 +3248,7 @@ flag floatx80_eq( floatx80 a, floatx80 b )
        ) {
         if (    floatx80_is_signaling_nan( a )
              || floatx80_is_signaling_nan( b ) ) {
-            roundData->exception |= float_flag_invalid;
+            float_raise( float_flag_invalid );
         }
         return 0;
     }
@@ -3286,7 +3278,7 @@ flag floatx80_le( floatx80 a, floatx80 b )
          || (    ( extractFloatx80Exp( b ) == 0x7FFF )
               && (bits64) ( extractFloatx80Frac( b )<<1 ) )
        ) {
-        roundData->exception |= float_flag_invalid;
+        float_raise( float_flag_invalid );
         return 0;
     }
     aSign = extractFloatx80Sign( a );
@@ -3320,7 +3312,7 @@ flag floatx80_lt( floatx80 a, floatx80 b )
          || (    ( extractFloatx80Exp( b ) == 0x7FFF )
               && (bits64) ( extractFloatx80Frac( b )<<1 ) )
        ) {
-        roundData->exception |= float_flag_invalid;
+        float_raise( float_flag_invalid );
         return 0;
     }
     aSign = extractFloatx80Sign( a );
@@ -3353,7 +3345,7 @@ flag floatx80_eq_signaling( floatx80 a, floatx80 b )
          || (    ( extractFloatx80Exp( b ) == 0x7FFF )
               && (bits64) ( extractFloatx80Frac( b )<<1 ) )
        ) {
-        roundData->exception |= float_flag_invalid;
+        float_raise( float_flag_invalid );
         return 0;
     }
     return
@@ -3382,10 +3374,7 @@ flag floatx80_le_quiet( floatx80 a, floatx80 b )
          || (    ( extractFloatx80Exp( b ) == 0x7FFF )
               && (bits64) ( extractFloatx80Frac( b )<<1 ) )
        ) {
-        if (    floatx80_is_signaling_nan( a )
-             || floatx80_is_signaling_nan( b ) ) {
-            roundData->exception |= float_flag_invalid;
-        }
+        /* Do nothing, even if NaN as we're quiet */
         return 0;
     }
     aSign = extractFloatx80Sign( a );
@@ -3419,10 +3408,7 @@ flag floatx80_lt_quiet( floatx80 a, floatx80 b )
          || (    ( extractFloatx80Exp( b ) == 0x7FFF )
               && (bits64) ( extractFloatx80Frac( b )<<1 ) )
        ) {
-        if (    floatx80_is_signaling_nan( a )
-             || floatx80_is_signaling_nan( b ) ) {
-            roundData->exception |= float_flag_invalid;
-        }
+        /* Do nothing, even if NaN as we're quiet */
         return 0;
     }
     aSign = extractFloatx80Sign( a );
index bd1dbf3bd223cfd51021b7eec43d89b206a8bb95..a22a866de8f9db44472cc65f933383ce6589591a 100644 (file)
@@ -726,15 +726,11 @@ __setup("apic=", apic_set_verbosity);
 static int __init detect_init_APIC (void)
 {
        u32 h, l, features;
-       extern void get_cpu_vendor(struct cpuinfo_x86*);
 
        /* Disabled by kernel option? */
        if (enable_local_apic < 0)
                return -1;
 
-       /* Workaround for us being called before identify_cpu(). */
-       get_cpu_vendor(&boot_cpu_data);
-
        switch (boot_cpu_data.x86_vendor) {
        case X86_VENDOR_AMD:
                if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) ||
index da6c46d667cb6fdc33d1b89dcdadfe4a41f0fe98..8c242bb1ef4571685cebeb2c11c0160a92bc9695 100644 (file)
@@ -195,7 +195,7 @@ static void disable_lapic_nmi_watchdog(void)
                        wrmsr(MSR_P6_EVNTSEL0, 0, 0);
                        break;
                case 15:
-                       if (boot_cpu_data.x86_model > 0x3)
+                       if (boot_cpu_data.x86_model > 0x4)
                                break;
 
                        wrmsr(MSR_P4_IQ_CCCR0, 0, 0);
@@ -432,7 +432,7 @@ void setup_apic_nmi_watchdog (void)
                        setup_p6_watchdog();
                        break;
                case 15:
-                       if (boot_cpu_data.x86_model > 0x3)
+                       if (boot_cpu_data.x86_model > 0x4)
                                return;
 
                        if (!setup_p4_watchdog())
index a61f33d06ea34313b9a36a271d9fd69f2b2034db..cd2d5d5514fe0ffcdf78cadfbabdf5863ede040c 100644 (file)
@@ -803,15 +803,17 @@ void math_error(void __user *eip)
         */
        cwd = get_fpu_cwd(task);
        swd = get_fpu_swd(task);
-       switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) {
+       switch (swd & ~cwd & 0x3f) {
                case 0x000:
                default:
                        break;
                case 0x001: /* Invalid Op */
-               case 0x041: /* Stack Fault */
-               case 0x241: /* Stack Fault | Direction */
+                       /*
+                        * swd & 0x240 == 0x040: Stack Underflow
+                        * swd & 0x240 == 0x240: Stack Overflow
+                        * User must clear the SF bit (0x40) if set
+                        */
                        info.si_code = FPE_FLTINV;
-                       /* Should we clear the SF or let user space do it ???? */
                        break;
                case 0x002: /* Denormalize */
                case 0x010: /* Underflow */
index cbb3e0cef93afa009b631d5dba79b1cdab790668..3deced637f07c814706698e6e90a10088aebe889 100644 (file)
@@ -383,6 +383,12 @@ source "drivers/acpi/Kconfig"
 
 endif
 
+if PM
+
+source "arch/ia64/kernel/cpufreq/Kconfig"
+
+endif
+
 endmenu
 
 if !IA64_HP_SIM
@@ -392,15 +398,8 @@ menu "Bus options (PCI, PCMCIA)"
 config PCI
        bool "PCI support"
        help
-         Find out whether you have a PCI motherboard. PCI is the name of a
-         bus system, i.e. the way the CPU talks to the other stuff inside
-         your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
-         VESA. If you have PCI, say Y, otherwise N.
-
-         The PCI-HOWTO, available from
-         <http://www.tldp.org/docs.html#howto>, contains valuable
-         information about which PCI hardware does work under Linux and which
-         doesn't.
+         Real IA-64 machines all have PCI/PCI-X/PCI Express busses.  Say Y
+         here unless you are using a simulator without PCI support.
 
 config PCI_DOMAINS
        bool
index 04d0b00a2b8c6aed16851e58009136fcaf54bc0b..dccf35c60b941845351262e42e87361993760de3 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10
-# Mon Jan 10 13:57:35 2005
+# Linux kernel version: 2.6.13-rc6
+# Tue Aug 16 14:40:41 2005
 #
 
 #
@@ -10,6 +10,7 @@
 CONFIG_EXPERIMENTAL=y
 CONFIG_CLEAN_COMPILE=y
 CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
 
 #
 # General setup
@@ -21,24 +22,26 @@ CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=20
 CONFIG_HOTPLUG=y
 CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
+CONFIG_CPUSETS=y
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-CONFIG_CPUSETS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
 CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
 # CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
 
 #
 # Loadable module support
@@ -63,9 +66,12 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_TIME_INTERPOLATION=y
 CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_IA64_UNCACHED_ALLOCATOR=y
 # CONFIG_IA64_GENERIC is not set
 # CONFIG_IA64_DIG is not set
 # CONFIG_IA64_HP_ZX1 is not set
+# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
 CONFIG_IA64_SGI_SN2=y
 # CONFIG_IA64_HP_SIM is not set
 # CONFIG_ITANIUM is not set
@@ -74,6 +80,10 @@ CONFIG_MCKINLEY=y
 # CONFIG_IA64_PAGE_SIZE_8KB is not set
 CONFIG_IA64_PAGE_SIZE_16KB=y
 # CONFIG_IA64_PAGE_SIZE_64KB is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
 CONFIG_IA64_L1_CACHE_SHIFT=7
 CONFIG_NUMA=y
 CONFIG_VIRTUAL_MEM_MAP=y
@@ -81,11 +91,20 @@ CONFIG_HOLES_IN_ZONE=y
 CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 # CONFIG_IA64_CYCLONE is not set
 CONFIG_IOSAPIC=y
+CONFIG_IA64_SGI_SN_XP=m
 CONFIG_FORCE_MAX_ZONEORDER=18
 CONFIG_SMP=y
 CONFIG_NR_CPUS=512
 # CONFIG_HOTPLUG_CPU is not set
+CONFIG_SCHED_SMT=y
 CONFIG_PREEMPT=y
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
 CONFIG_HAVE_DEC_LOCK=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
@@ -105,6 +124,7 @@ CONFIG_BINFMT_ELF=y
 #
 # Power management and ACPI
 #
+CONFIG_PM=y
 CONFIG_ACPI=y
 
 #
@@ -114,6 +134,7 @@ CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
 # CONFIG_ACPI_BUTTON is not set
 CONFIG_ACPI_VIDEO=m
+CONFIG_ACPI_HOTKEY=m
 # CONFIG_ACPI_FAN is not set
 # CONFIG_ACPI_PROCESSOR is not set
 CONFIG_ACPI_NUMA=y
@@ -133,6 +154,7 @@ CONFIG_PCI_DOMAINS=y
 # CONFIG_PCI_MSI is not set
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
+# CONFIG_PCI_DEBUG is not set
 
 #
 # PCI Hotplug Support
@@ -141,7 +163,6 @@ CONFIG_HOTPLUG_PCI=y
 # CONFIG_HOTPLUG_PCI_FAKE is not set
 # CONFIG_HOTPLUG_PCI_ACPI is not set
 # CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_PCIE is not set
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 CONFIG_HOTPLUG_PCI_SGI=y
 
@@ -151,8 +172,70 @@ CONFIG_HOTPLUG_PCI_SGI=y
 # CONFIG_PCCARD is not set
 
 #
-# PC-card bridges
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_INET6_AH is not set
+# CONFIG_INET6_ESP is not set
+# CONFIG_INET6_IPCOMP is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
 #
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
 
 #
 # Device Drivers
@@ -163,7 +246,7 @@ CONFIG_HOTPLUG_PCI_SGI=y
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=m
+CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
 
 #
@@ -188,6 +271,7 @@ CONFIG_FW_LOADER=m
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
@@ -252,6 +336,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_HPT366 is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT821X is not set
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_PDC202XX_OLD is not set
 # CONFIG_BLK_DEV_PDC202XX_NEW is not set
@@ -282,6 +367,7 @@ CONFIG_CHR_DEV_ST=m
 CONFIG_BLK_DEV_SR=m
 # CONFIG_BLK_DEV_SR_VENDOR is not set
 CONFIG_CHR_DEV_SG=m
+CONFIG_CHR_DEV_SCH=m
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -315,24 +401,20 @@ CONFIG_SCSI_SATA=y
 # CONFIG_SCSI_ATA_PIIX is not set
 # CONFIG_SCSI_SATA_NV is not set
 # CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_QSTOR is not set
 # CONFIG_SCSI_SATA_SX4 is not set
 # CONFIG_SCSI_SATA_SIL is not set
 # CONFIG_SCSI_SATA_SIS is not set
 # CONFIG_SCSI_SATA_ULI is not set
 # CONFIG_SCSI_SATA_VIA is not set
 CONFIG_SCSI_SATA_VITESSE=y
-# CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=y
 # CONFIG_SCSI_QLOGIC_1280_1040 is not set
@@ -342,6 +424,8 @@ CONFIG_SCSI_QLA22XX=y
 CONFIG_SCSI_QLA2300=y
 CONFIG_SCSI_QLA2322=y
 # CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA24XX is not set
+# CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
@@ -364,11 +448,15 @@ CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
 CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
 
 #
 # Fusion MPT device support
 #
 CONFIG_FUSION=y
+CONFIG_FUSION_SPI=y
+CONFIG_FUSION_FC=y
 CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 
@@ -383,82 +471,13 @@ CONFIG_FUSION_CTL=m
 # CONFIG_I2O is not set
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-CONFIG_IPV6=m
-# CONFIG_IPV6_PRIVACY is not set
-# CONFIG_INET6_AH is not set
-# CONFIG_INET6_ESP is not set
-# CONFIG_INET6_IPCOMP is not set
-# CONFIG_INET6_TUNNEL is not set
-# CONFIG_IPV6_TUNNEL is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
+# Network device support
 #
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-# CONFIG_ETHERTAP is not set
 
 #
 # ARCnet devices
@@ -480,8 +499,10 @@ CONFIG_NETDEVICES=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SKGE is not set
 # CONFIG_SK98LIN is not set
 CONFIG_TIGON3=y
+# CONFIG_BNX2 is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -512,6 +533,10 @@ CONFIG_S2IO=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_RX is not set
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
 
 #
 # ISDN subsystem
@@ -540,14 +565,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-# CONFIG_SERIO is not set
-# CONFIG_SERIO_I8042 is not set
-
 #
 # Input Device Drivers
 #
@@ -557,6 +574,12 @@ CONFIG_SOUND_GAMEPORT=y
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
 #
 # Character devices
 #
@@ -568,9 +591,10 @@ CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_CYCLADES is not set
 # CONFIG_MOXA_SMARTIO is not set
 # CONFIG_ISI is not set
-# CONFIG_SYNCLINK is not set
 # CONFIG_SYNCLINKMP is not set
 # CONFIG_N_HDLC is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
 # CONFIG_STALDRV is not set
 CONFIG_SGI_SNSC=y
 CONFIG_SGI_TIOCX=y
@@ -587,6 +611,7 @@ CONFIG_SGI_MBCS=m
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_SGI_L1_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
 CONFIG_SERIAL_SGI_IOC4=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
@@ -615,18 +640,30 @@ CONFIG_EFI_RTC=y
 CONFIG_RAW_DRIVER=m
 # CONFIG_HPET is not set
 CONFIG_MAX_RAW_DEVS=256
+# CONFIG_HANGCHECK_TIMER is not set
 CONFIG_MMTIMER=y
 
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
 #
 # I2C support
 #
 # CONFIG_I2C is not set
+# CONFIG_I2C_SENSOR is not set
 
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+
 #
 # Misc devices
 #
@@ -660,6 +697,8 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # USB support
 #
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB=m
 # CONFIG_USB_DEBUG is not set
 
@@ -669,9 +708,8 @@ CONFIG_USB=m
 # CONFIG_USB_DEVICEFS is not set
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
 # CONFIG_USB_OTG is not set
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
 
 #
 # USB Host Controller Drivers
@@ -679,7 +717,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 CONFIG_USB_UHCI_HCD=m
 # CONFIG_USB_SL811_HCD is not set
 
@@ -710,12 +751,15 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_MOUSE is not set
 # CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
 # CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
 # CONFIG_USB_MTOUCH is not set
+# CONFIG_USB_ITMTOUCH is not set
 # CONFIG_USB_EGALAX is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
 
 #
 # USB Imaging devices
@@ -740,6 +784,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
 # CONFIG_USB_USBNET is not set
+CONFIG_USB_MON=y
 
 #
 # USB port drivers
@@ -763,9 +808,12 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_CYTHERM is not set
 # CONFIG_USB_PHIDGETKIT is not set
 # CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
 
 #
-# USB ATM/DSL drivers
+# USB DSL modem support
 #
 
 #
@@ -782,6 +830,7 @@ CONFIG_USB_HIDINPUT=y
 # InfiniBand support
 #
 CONFIG_INFINIBAND=m
+CONFIG_INFINIBAND_USER_VERBS=m
 CONFIG_INFINIBAND_MTHCA=m
 # CONFIG_INFINIBAND_MTHCA_DEBUG is not set
 CONFIG_INFINIBAND_IPOIB=m
@@ -799,6 +848,7 @@ CONFIG_EXT2_FS=y
 CONFIG_EXT2_FS_XATTR=y
 CONFIG_EXT2_FS_POSIX_ACL=y
 CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
@@ -814,13 +864,19 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+
+#
+# XFS support
+#
 CONFIG_XFS_FS=y
+CONFIG_XFS_EXPORT=y
 CONFIG_XFS_RT=y
 CONFIG_XFS_QUOTA=y
 # CONFIG_XFS_SECURITY is not set
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
 CONFIG_QUOTA=y
 # CONFIG_QFMT_V1 is not set
 # CONFIG_QFMT_V2 is not set
@@ -854,7 +910,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
 CONFIG_TMPFS_XATTR=y
@@ -885,15 +940,18 @@ CONFIG_RAMFS=y
 #
 CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
 CONFIG_NFS_V4=y
 CONFIG_NFS_DIRECTIO=y
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
 CONFIG_NFSD_V4=y
 CONFIG_NFSD_TCP=y
 CONFIG_LOCKD=m
 CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
 CONFIG_RPCSEC_GSS_KRB5=m
@@ -980,6 +1038,9 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
 
 #
 # Profiling support
@@ -989,15 +1050,19 @@ CONFIG_ZLIB_DEFLATE=m
 #
 # Kernel hacking
 #
+# CONFIG_PRINTK_TIME is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_LOG_BUF_SHIFT=20
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_FS is not set
+# CONFIG_KPROBES is not set
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1019,11 +1084,12 @@ CONFIG_CRYPTO=y
 CONFIG_CRYPTO_HMAC=y
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_MD4 is not set
-CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_MD5=y
 CONFIG_CRYPTO_SHA1=m
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
 CONFIG_CRYPTO_DES=m
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
index 73454eee26f1968a319a4c91ba312c2cd02c1b9e..c853cfcd2d1123d6ef94271c0d8fab153e3c7c7a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.13-rc1-20050629
-# Wed Jun 29 15:28:12 2005
+# Linux kernel version: 2.6.13-rc6-tiger-smp
+# Wed Aug 17 10:19:51 2005
 #
 
 #
@@ -132,6 +132,7 @@ CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_BUTTON=m
 # CONFIG_ACPI_VIDEO is not set
+# CONFIG_ACPI_HOTKEY is not set
 CONFIG_ACPI_FAN=m
 CONFIG_ACPI_PROCESSOR=m
 # CONFIG_ACPI_HOTPLUG_CPU is not set
@@ -169,6 +170,66 @@ CONFIG_HOTPLUG_PCI_ACPI=m
 #
 # CONFIG_PCCARD is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+CONFIG_ARPD=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+
 #
 # Device Drivers
 #
@@ -178,7 +239,7 @@ CONFIG_HOTPLUG_PCI_ACPI=m
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
+CONFIG_FW_LOADER=m
 # CONFIG_DEBUG_DRIVER is not set
 
 #
@@ -348,6 +409,7 @@ CONFIG_SCSI_QLA22XX=m
 CONFIG_SCSI_QLA2300=m
 CONFIG_SCSI_QLA2322=m
 # CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA24XX is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -393,72 +455,8 @@ CONFIG_FUSION_CTL=y
 # CONFIG_I2O is not set
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
+# Network device support
 #
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_FIB_HASH=y
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-CONFIG_ARPD=y
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 CONFIG_DUMMY=m
 # CONFIG_BONDING is not set
@@ -555,6 +553,10 @@ CONFIG_TIGON3=y
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_RX is not set
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
 
 #
 # ISDN subsystem
@@ -680,6 +682,7 @@ CONFIG_DRM_R128=m
 CONFIG_DRM_RADEON=m
 CONFIG_DRM_MGA=m
 CONFIG_DRM_SIS=m
+# CONFIG_DRM_VIA is not set
 CONFIG_RAW_DRIVER=m
 CONFIG_HPET=y
 # CONFIG_HPET_RTC_IRQ is not set
@@ -696,12 +699,19 @@ CONFIG_MAX_RAW_DEVS=256
 # I2C support
 #
 # CONFIG_I2C is not set
+# CONFIG_I2C_SENSOR is not set
 
 #
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
 
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
 #
 # Misc devices
 #
@@ -800,6 +810,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_EGALAX is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
 
 #
 # USB Imaging devices
@@ -850,6 +861,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -910,6 +922,7 @@ CONFIG_XFS_EXPORT=y
 # CONFIG_XFS_POSIX_ACL is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
index b7755e4436d222e09d396d91bc924efc5a633b6f..88e8867fa8e82f65092a9e5e99e0f437a3f43191 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.13-rc1-20050629
-# Wed Jun 29 15:31:11 2005
+# Linux kernel version: 2.6.13-rc6
+# Wed Aug 17 10:02:43 2005
 #
 
 #
@@ -132,6 +132,7 @@ CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_BUTTON=y
 CONFIG_ACPI_VIDEO=m
+CONFIG_ACPI_HOTKEY=m
 CONFIG_ACPI_FAN=y
 CONFIG_ACPI_PROCESSOR=y
 CONFIG_ACPI_THERMAL=y
@@ -168,6 +169,83 @@ CONFIG_HOTPLUG_PCI_ACPI=y
 #
 # CONFIG_PCCARD is not set
 
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_IP_TCPDIAG is not set
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+CONFIG_IP_NF_ARPTABLES=y
+# CONFIG_IP_NF_ARPFILTER is not set
+# CONFIG_IP_NF_ARP_MANGLE is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+
 #
 # Device Drivers
 #
@@ -349,6 +427,7 @@ CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA2300 is not set
 # CONFIG_SCSI_QLA2322 is not set
 # CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA24XX is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -362,9 +441,11 @@ CONFIG_SCSI_QLA2XXX=y
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=y
+CONFIG_FUSION_FC=y
+CONFIG_FUSION_MAX_SGE=128
+CONFIG_FUSION_CTL=m
 
 #
 # IEEE 1394 (FireWire) support
@@ -377,87 +458,8 @@ CONFIG_SCSI_QLA2XXX=y
 # CONFIG_I2O is not set
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_FIB_HASH=y
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-# CONFIG_IP_TCPDIAG is not set
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-
-#
-# IP: Virtual Server Configuration
-#
-# CONFIG_IP_VS is not set
-# CONFIG_IPV6 is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-
-#
-# IP: Netfilter Configuration
+# Network device support
 #
-# CONFIG_IP_NF_CONNTRACK is not set
-# CONFIG_IP_NF_CONNTRACK_MARK is not set
-# CONFIG_IP_NF_QUEUE is not set
-# CONFIG_IP_NF_IPTABLES is not set
-CONFIG_IP_NF_ARPTABLES=y
-# CONFIG_IP_NF_ARPFILTER is not set
-# CONFIG_IP_NF_ARP_MANGLE is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 CONFIG_DUMMY=y
 # CONFIG_BONDING is not set
@@ -555,6 +557,8 @@ CONFIG_TIGON3=y
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -659,6 +663,7 @@ CONFIG_DRM=y
 CONFIG_DRM_RADEON=y
 # CONFIG_DRM_MGA is not set
 # CONFIG_DRM_SIS is not set
+# CONFIG_DRM_VIA is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_HPET is not set
 # CONFIG_HANGCHECK_TIMER is not set
@@ -706,47 +711,10 @@ CONFIG_I2C_ALGOPCF=y
 # CONFIG_I2C_VIAPRO is not set
 # CONFIG_I2C_VOODOO3 is not set
 # CONFIG_I2C_PCA_ISA is not set
+# CONFIG_I2C_SENSOR is not set
 
 #
-# Hardware Sensors Chip support
-#
-# CONFIG_I2C_SENSOR is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-
-#
-# Other I2C Chip support
+# Miscellaneous I2C Chip support
 #
 # CONFIG_SENSORS_DS1337 is not set
 # CONFIG_SENSORS_DS1374 is not set
@@ -766,6 +734,11 @@ CONFIG_I2C_ALGOPCF=y
 #
 # CONFIG_W1 is not set
 
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+
 #
 # Misc devices
 #
@@ -782,7 +755,6 @@ CONFIG_VIDEO_DEV=y
 #
 # Video Adapters
 #
-# CONFIG_TUNER_MULTI_I2C is not set
 # CONFIG_VIDEO_BT848 is not set
 # CONFIG_VIDEO_CPIA is not set
 # CONFIG_VIDEO_SAA5246A is not set
@@ -1025,6 +997,7 @@ CONFIG_USB_HIDDEV=y
 # CONFIG_USB_EGALAX is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
 
 #
 # USB Imaging devices
@@ -1080,6 +1053,7 @@ CONFIG_USB_MON=y
 # CONFIG_USB_PHIDGETSERVO is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
 
 #
 # USB DSL modem support
@@ -1121,6 +1095,7 @@ CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
 
 #
 # XFS support
@@ -1128,6 +1103,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+# CONFIG_INOTIFY is not set
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
index 9364199e56322b5614360a240a9bdc4495ded06b..1c8c7e6a9a5ecaba963c20ba69d2e93c76c0994a 100644 (file)
@@ -22,7 +22,7 @@ GLOBAL_ENTRY(_start)
        .save rp, r0
        .body
        movl gp = __gp
-       movl sp = stack_mem
+       movl sp = stack_mem+16384-16
        bsw.1
        br.call.sptk.many rp=start_bootloader
 END(_start)
index 5c46928e3dc655739bf0081ce19f503848930054..30fdfb1d0a53e3d08c9f817eaf34a0bd7b9a78f3 100644 (file)
@@ -237,17 +237,6 @@ sal_emulator (long index, unsigned long in1, unsigned long in2,
        return ((struct sal_ret_values) {status, r9, r10, r11});
 }
 
-
-/*
- * This is here to work around a bug in egcs-1.1.1b that causes the
- * compiler to crash (seems like a bug in the new alias analysis code.
- */
-void *
-id (long addr)
-{
-       return (void *) addr;
-}
-
 struct ia64_boot_param *
 sys_fw_init (const char *args, int arglen)
 {
index ebb89be2aa2dba5acbcaf7773414ff7ca51a1b87..aa891c9bc9b67ac268970391f49122f37af4b22a 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/uaccess.h>
 #include <asm/rse.h>
 #include <asm/sigcontext.h>
-#include <asm/segment.h>
 
 #include "ia32priv.h"
 
index e1fb68ddec26328f5ea7f19ce099628fea81b664..b242594be55b46716d0ddf0a08e01dab60df14dd 100644 (file)
@@ -20,6 +20,7 @@ obj-$(CONFIG_SMP)             += smp.o smpboot.o domain.o
 obj-$(CONFIG_NUMA)             += numa.o
 obj-$(CONFIG_PERFMON)          += perfmon_default_smpl.o
 obj-$(CONFIG_IA64_CYCLONE)     += cyclone.o
+obj-$(CONFIG_CPU_FREQ)         += cpufreq/
 obj-$(CONFIG_IA64_MCA_RECOVERY)        += mca_recovery.o
 obj-$(CONFIG_KPROBES)          += kprobes.o jprobes.o
 obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR)  += uncached.o
diff --git a/arch/ia64/kernel/cpufreq/Kconfig b/arch/ia64/kernel/cpufreq/Kconfig
new file mode 100644 (file)
index 0000000..2d9d527
--- /dev/null
@@ -0,0 +1,29 @@
+
+#
+# CPU Frequency scaling
+#
+
+menu "CPU Frequency scaling"
+
+source "drivers/cpufreq/Kconfig"
+
+if CPU_FREQ
+
+comment "CPUFreq processor drivers"
+
+config IA64_ACPI_CPUFREQ
+       tristate "ACPI Processor P-States driver"
+       select CPU_FREQ_TABLE
+       depends on ACPI_PROCESSOR
+       help
+       This driver adds a CPUFreq driver which utilizes the ACPI
+       Processor Performance States.
+
+       For details, take a look at <file:Documentation/cpu-freq/>.
+
+       If in doubt, say N.
+
+endif   # CPU_FREQ
+
+endmenu
+
diff --git a/arch/ia64/kernel/cpufreq/Makefile b/arch/ia64/kernel/cpufreq/Makefile
new file mode 100644 (file)
index 0000000..f748d34
--- /dev/null
@@ -0,0 +1 @@
+obj-$(CONFIG_IA64_ACPI_CPUFREQ)                += acpi-cpufreq.o
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
new file mode 100644 (file)
index 0000000..da4d5cf
--- /dev/null
@@ -0,0 +1,499 @@
+/*
+ * arch/ia64/kernel/cpufreq/acpi-cpufreq.c
+ * This file provides the ACPI based P-state support. This
+ * module works with generic cpufreq infrastructure. Most of
+ * the code is based on i386 version
+ * (arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c)
+ *
+ * Copyright (C) 2005 Intel Corp
+ *      Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/cpufreq.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/pal.h>
+
+#include <linux/acpi.h>
+#include <acpi/processor.h>
+
+#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "acpi-cpufreq", msg)
+
+MODULE_AUTHOR("Venkatesh Pallipadi");
+MODULE_DESCRIPTION("ACPI Processor P-States Driver");
+MODULE_LICENSE("GPL");
+
+
+struct cpufreq_acpi_io {
+       struct acpi_processor_performance       acpi_data;
+       struct cpufreq_frequency_table          *freq_table;
+       unsigned int                            resume;
+};
+
+static struct cpufreq_acpi_io  *acpi_io_data[NR_CPUS];
+
+static struct cpufreq_driver acpi_cpufreq_driver;
+
+
+static int
+processor_set_pstate (
+       u32     value)
+{
+       s64 retval;
+
+       dprintk("processor_set_pstate\n");
+
+       retval = ia64_pal_set_pstate((u64)value);
+
+       if (retval) {
+               dprintk("Failed to set freq to 0x%x, with error 0x%x\n",
+                       value, retval);
+               return -ENODEV;
+       }
+       return (int)retval;
+}
+
+
+static int
+processor_get_pstate (
+       u32     *value)
+{
+       u64     pstate_index = 0;
+       s64     retval;
+
+       dprintk("processor_get_pstate\n");
+
+       retval = ia64_pal_get_pstate(&pstate_index);
+       *value = (u32) pstate_index;
+
+       if (retval)
+               dprintk("Failed to get current freq with "
+                       "error 0x%x, idx 0x%x\n", retval, *value);
+
+       return (int)retval;
+}
+
+
+/* To be used only after data->acpi_data is initialized */
+static unsigned
+extract_clock (
+       struct cpufreq_acpi_io *data,
+       unsigned value,
+       unsigned int cpu)
+{
+       unsigned long i;
+
+       dprintk("extract_clock\n");
+
+       for (i = 0; i < data->acpi_data.state_count; i++) {
+               if (value >= data->acpi_data.states[i].control)
+                       return data->acpi_data.states[i].core_frequency;
+       }
+       return data->acpi_data.states[i-1].core_frequency;
+}
+
+
+static unsigned int
+processor_get_freq (
+       struct cpufreq_acpi_io  *data,
+       unsigned int            cpu)
+{
+       int                     ret = 0;
+       u32                     value = 0;
+       cpumask_t               saved_mask;
+       unsigned long           clock_freq;
+
+       dprintk("processor_get_freq\n");
+
+       saved_mask = current->cpus_allowed;
+       set_cpus_allowed(current, cpumask_of_cpu(cpu));
+       if (smp_processor_id() != cpu) {
+               ret = -EAGAIN;
+               goto migrate_end;
+       }
+
+       /*
+        * processor_get_pstate gets the average frequency since the
+        * last get. So, do two PAL_get_freq()...
+        */
+       ret = processor_get_pstate(&value);
+       ret = processor_get_pstate(&value);
+
+       if (ret) {
+               set_cpus_allowed(current, saved_mask);
+               printk(KERN_WARNING "get performance failed with error %d\n",
+                      ret);
+               ret = -EAGAIN;
+               goto migrate_end;
+       }
+       clock_freq = extract_clock(data, value, cpu);
+       ret = (clock_freq*1000);
+
+migrate_end:
+       set_cpus_allowed(current, saved_mask);
+       return ret;
+}
+
+
+static int
+processor_set_freq (
+       struct cpufreq_acpi_io  *data,
+       unsigned int            cpu,
+       int                     state)
+{
+       int                     ret = 0;
+       u32                     value = 0;
+       struct cpufreq_freqs    cpufreq_freqs;
+       cpumask_t               saved_mask;
+       int                     retval;
+
+       dprintk("processor_set_freq\n");
+
+       saved_mask = current->cpus_allowed;
+       set_cpus_allowed(current, cpumask_of_cpu(cpu));
+       if (smp_processor_id() != cpu) {
+               retval = -EAGAIN;
+               goto migrate_end;
+       }
+
+       if (state == data->acpi_data.state) {
+               if (unlikely(data->resume)) {
+                       dprintk("Called after resume, resetting to P%d\n", state);
+                       data->resume = 0;
+               } else {
+                       dprintk("Already at target state (P%d)\n", state);
+                       retval = 0;
+                       goto migrate_end;
+               }
+       }
+
+       dprintk("Transitioning from P%d to P%d\n",
+               data->acpi_data.state, state);
+
+       /* cpufreq frequency struct */
+       cpufreq_freqs.cpu = cpu;
+       cpufreq_freqs.old = data->freq_table[data->acpi_data.state].frequency;
+       cpufreq_freqs.new = data->freq_table[state].frequency;
+
+       /* notify cpufreq */
+       cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_PRECHANGE);
+
+       /*
+        * First we write the target state's 'control' value to the
+        * control_register.
+        */
+
+       value = (u32) data->acpi_data.states[state].control;
+
+       dprintk("Transitioning to state: 0x%08x\n", value);
+
+       ret = processor_set_pstate(value);
+       if (ret) {
+               unsigned int tmp = cpufreq_freqs.new;
+               cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
+               cpufreq_freqs.new = cpufreq_freqs.old;
+               cpufreq_freqs.old = tmp;
+               cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_PRECHANGE);
+               cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
+               printk(KERN_WARNING "Transition failed with error %d\n", ret);
+               retval = -ENODEV;
+               goto migrate_end;
+       }
+
+       cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
+
+       data->acpi_data.state = state;
+
+       retval = 0;
+
+migrate_end:
+       set_cpus_allowed(current, saved_mask);
+       return (retval);
+}
+
+
+static unsigned int
+acpi_cpufreq_get (
+       unsigned int            cpu)
+{
+       struct cpufreq_acpi_io *data = acpi_io_data[cpu];
+
+       dprintk("acpi_cpufreq_get\n");
+
+       return processor_get_freq(data, cpu);
+}
+
+
+static int
+acpi_cpufreq_target (
+       struct cpufreq_policy   *policy,
+       unsigned int target_freq,
+       unsigned int relation)
+{
+       struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu];
+       unsigned int next_state = 0;
+       unsigned int result = 0;
+
+       dprintk("acpi_cpufreq_setpolicy\n");
+
+       result = cpufreq_frequency_table_target(policy,
+                       data->freq_table, target_freq, relation, &next_state);
+       if (result)
+               return (result);
+
+       result = processor_set_freq(data, policy->cpu, next_state);
+
+       return (result);
+}
+
+
+static int
+acpi_cpufreq_verify (
+       struct cpufreq_policy   *policy)
+{
+       unsigned int result = 0;
+       struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu];
+
+       dprintk("acpi_cpufreq_verify\n");
+
+       result = cpufreq_frequency_table_verify(policy,
+                       data->freq_table);
+
+       return (result);
+}
+
+
+/*
+ * processor_init_pdc - let BIOS know about the SMP capabilities
+ * of this driver
+ * @perf: processor-specific acpi_io_data struct
+ * @cpu: CPU being initialized
+ *
+ * To avoid issues with legacy OSes, some BIOSes require to be informed of
+ * the SMP capabilities of OS P-state driver. Here we set the bits in _PDC
+ * accordingly. Actual call to _PDC is done in driver/acpi/processor.c
+ */
+static void
+processor_init_pdc (
+               struct acpi_processor_performance *perf,
+               unsigned int cpu,
+               struct acpi_object_list *obj_list
+               )
+{
+       union acpi_object *obj;
+       u32 *buf;
+
+       dprintk("processor_init_pdc\n");
+
+       perf->pdc = NULL;
+       /* Initialize pdc. It will be used later. */
+       if (!obj_list)
+               return;
+
+       if (!(obj_list->count && obj_list->pointer))
+               return;
+
+       obj = obj_list->pointer;
+       if ((obj->buffer.length == 12) && obj->buffer.pointer) {
+               buf = (u32 *)obj->buffer.pointer;
+                       buf[0] = ACPI_PDC_REVISION_ID;
+                       buf[1] = 1;
+                       buf[2] = ACPI_PDC_EST_CAPABILITY_SMP;
+               perf->pdc = obj_list;
+       }
+       return;
+}
+
+
+static int
+acpi_cpufreq_cpu_init (
+       struct cpufreq_policy   *policy)
+{
+       unsigned int            i;
+       unsigned int            cpu = policy->cpu;
+       struct cpufreq_acpi_io  *data;
+       unsigned int            result = 0;
+
+       union acpi_object               arg0 = {ACPI_TYPE_BUFFER};
+       u32                             arg0_buf[3];
+       struct acpi_object_list         arg_list = {1, &arg0};
+
+       dprintk("acpi_cpufreq_cpu_init\n");
+       /* setup arg_list for _PDC settings */
+        arg0.buffer.length = 12;
+        arg0.buffer.pointer = (u8 *) arg0_buf;
+
+       data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL);
+       if (!data)
+               return (-ENOMEM);
+
+       memset(data, 0, sizeof(struct cpufreq_acpi_io));
+
+       acpi_io_data[cpu] = data;
+
+       processor_init_pdc(&data->acpi_data, cpu, &arg_list);
+       result = acpi_processor_register_performance(&data->acpi_data, cpu);
+       data->acpi_data.pdc = NULL;
+
+       if (result)
+               goto err_free;
+
+       /* capability check */
+       if (data->acpi_data.state_count <= 1) {
+               dprintk("No P-States\n");
+               result = -ENODEV;
+               goto err_unreg;
+       }
+
+       if ((data->acpi_data.control_register.space_id !=
+                                       ACPI_ADR_SPACE_FIXED_HARDWARE) ||
+           (data->acpi_data.status_register.space_id !=
+                                       ACPI_ADR_SPACE_FIXED_HARDWARE)) {
+               dprintk("Unsupported address space [%d, %d]\n",
+                       (u32) (data->acpi_data.control_register.space_id),
+                       (u32) (data->acpi_data.status_register.space_id));
+               result = -ENODEV;
+               goto err_unreg;
+       }
+
+       /* alloc freq_table */
+       data->freq_table = kmalloc(sizeof(struct cpufreq_frequency_table) *
+                                  (data->acpi_data.state_count + 1),
+                                  GFP_KERNEL);
+       if (!data->freq_table) {
+               result = -ENOMEM;
+               goto err_unreg;
+       }
+
+       /* detect transition latency */
+       policy->cpuinfo.transition_latency = 0;
+       for (i=0; i<data->acpi_data.state_count; i++) {
+               if ((data->acpi_data.states[i].transition_latency * 1000) >
+                   policy->cpuinfo.transition_latency) {
+                       policy->cpuinfo.transition_latency =
+                           data->acpi_data.states[i].transition_latency * 1000;
+               }
+       }
+       policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
+
+       policy->cur = processor_get_freq(data, policy->cpu);
+
+       /* table init */
+       for (i = 0; i <= data->acpi_data.state_count; i++)
+       {
+               data->freq_table[i].index = i;
+               if (i < data->acpi_data.state_count) {
+                       data->freq_table[i].frequency =
+                             data->acpi_data.states[i].core_frequency * 1000;
+               } else {
+                       data->freq_table[i].frequency = CPUFREQ_TABLE_END;
+               }
+       }
+
+       result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table);
+       if (result) {
+               goto err_freqfree;
+       }
+
+       /* notify BIOS that we exist */
+       acpi_processor_notify_smm(THIS_MODULE);
+
+       printk(KERN_INFO "acpi-cpufreq: CPU%u - ACPI performance management "
+              "activated.\n", cpu);
+
+       for (i = 0; i < data->acpi_data.state_count; i++)
+               dprintk("     %cP%d: %d MHz, %d mW, %d uS, %d uS, 0x%x 0x%x\n",
+                       (i == data->acpi_data.state?'*':' '), i,
+                       (u32) data->acpi_data.states[i].core_frequency,
+                       (u32) data->acpi_data.states[i].power,
+                       (u32) data->acpi_data.states[i].transition_latency,
+                       (u32) data->acpi_data.states[i].bus_master_latency,
+                       (u32) data->acpi_data.states[i].status,
+                       (u32) data->acpi_data.states[i].control);
+
+       cpufreq_frequency_table_get_attr(data->freq_table, policy->cpu);
+
+       /* the first call to ->target() should result in us actually
+        * writing something to the appropriate registers. */
+       data->resume = 1;
+
+       return (result);
+
+ err_freqfree:
+       kfree(data->freq_table);
+ err_unreg:
+       acpi_processor_unregister_performance(&data->acpi_data, cpu);
+ err_free:
+       kfree(data);
+       acpi_io_data[cpu] = NULL;
+
+       return (result);
+}
+
+
+static int
+acpi_cpufreq_cpu_exit (
+       struct cpufreq_policy   *policy)
+{
+       struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu];
+
+       dprintk("acpi_cpufreq_cpu_exit\n");
+
+       if (data) {
+               cpufreq_frequency_table_put_attr(policy->cpu);
+               acpi_io_data[policy->cpu] = NULL;
+               acpi_processor_unregister_performance(&data->acpi_data,
+                                                     policy->cpu);
+               kfree(data);
+       }
+
+       return (0);
+}
+
+
+static struct freq_attr* acpi_cpufreq_attr[] = {
+       &cpufreq_freq_attr_scaling_available_freqs,
+       NULL,
+};
+
+
+static struct cpufreq_driver acpi_cpufreq_driver = {
+       .verify         = acpi_cpufreq_verify,
+       .target         = acpi_cpufreq_target,
+       .get            = acpi_cpufreq_get,
+       .init           = acpi_cpufreq_cpu_init,
+       .exit           = acpi_cpufreq_cpu_exit,
+       .name           = "acpi-cpufreq",
+       .owner          = THIS_MODULE,
+       .attr           = acpi_cpufreq_attr,
+};
+
+
+static int __init
+acpi_cpufreq_init (void)
+{
+       dprintk("acpi_cpufreq_init\n");
+
+       return cpufreq_register_driver(&acpi_cpufreq_driver);
+}
+
+
+static void __exit
+acpi_cpufreq_exit (void)
+{
+       dprintk("acpi_cpufreq_exit\n");
+
+       cpufreq_unregister_driver(&acpi_cpufreq_driver);
+       return;
+}
+
+
+late_initcall(acpi_cpufreq_init);
+module_exit(acpi_cpufreq_exit);
+
index d65e87b6394fa2c636f9593718f6e84f29c9804c..bbb8efe126b716b0851102f133480abc5729f57b 100644 (file)
@@ -341,7 +341,7 @@ next_sg:
 #endif
 
        /* Attach the domains */
-       for_each_online_cpu(i) {
+       for_each_cpu_mask(i, *cpu_map) {
                struct sched_domain *sd;
 #ifdef CONFIG_SCHED_SMT
                sd = &per_cpu(cpu_domains, i);
index b8ebb8e427efad319ddecadcee632b9c037eb56a..f1201ac8a11617b012ec9e8a25c1b6cf20863d80 100644 (file)
@@ -4312,6 +4312,7 @@ pfm_context_load(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
        DPRINT(("before cmpxchg() old_ctx=%p new_ctx=%p\n",
                thread->pfm_context, ctx));
 
+       ret = -EBUSY;
        old = ia64_cmpxchg(acq, &thread->pfm_context, NULL, ctx, sizeof(pfm_context_t *));
        if (old != NULL) {
                DPRINT(("load_pid [%d] already has a context\n", req->load_pid));
index d227fabecd023d741880d4fed93dcec60c012a3f..6f0cc7a6634ee84a00147630e0815c072a3edc4a 100644 (file)
@@ -143,7 +143,8 @@ struct salinfo_data {
 
 static struct salinfo_data salinfo_data[ARRAY_SIZE(salinfo_log_name)];
 
-static spinlock_t data_lock, data_saved_lock;
+static DEFINE_SPINLOCK(data_lock);
+static DEFINE_SPINLOCK(data_saved_lock);
 
 /** salinfo_platform_oemdata - optional callback to decode oemdata from an error
  * record.
index 1902c3c2ef923f57ff19b9550cd34bb75ce7a4bb..799407e7726f2a9c54f301ce50f71c253f514174 100644 (file)
@@ -6,7 +6,7 @@ obj-y := io.o
 
 lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o                 \
        __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o                   \
-       bitop.o checksum.o clear_page.o csum_partial_copy.o copy_page.o \
+       bitop.o checksum.o clear_page.o csum_partial_copy.o             \
        clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o   \
        flush.o ip_fast_csum.o do_csum.o                                \
        memset.o strlen.o swiotlb.o
index ab7b3ad99a7fa9f9c87c78474ee7fda27d3f01b0..dbc0b3e449c5fe7ad8e81c284d00c85b0bf600fe 100644 (file)
@@ -93,8 +93,7 @@ static int __init
 setup_io_tlb_npages(char *str)
 {
        if (isdigit(*str)) {
-               io_tlb_nslabs = simple_strtoul(str, &str, 0) <<
-                       (PAGE_SHIFT - IO_TLB_SHIFT);
+               io_tlb_nslabs = simple_strtoul(str, &str, 0);
                /* avoid tail segment of size < IO_TLB_SEGSIZE */
                io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
        }
@@ -117,7 +116,7 @@ swiotlb_init_with_default_size (size_t default_size)
        unsigned long i;
 
        if (!io_tlb_nslabs) {
-               io_tlb_nslabs = (default_size >> PAGE_SHIFT);
+               io_tlb_nslabs = (default_size >> IO_TLB_SHIFT);
                io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
        }
 
index 54d9ed444e4a11343a11674ac9c6d5e53d1b6729..9977c122e9fa2c1a314e2d90fb5260dba87b0cb7 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <asm/machvec.h>
 #include <asm/page.h>
-#include <asm/segment.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/sal.h>
@@ -380,6 +379,7 @@ void pcibios_bus_to_resource(struct pci_dev *dev,
        res->start = region->start + offset;
        res->end = region->end + offset;
 }
+EXPORT_SYMBOL(pcibios_bus_to_resource);
 
 static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
 {
index d1fc09b1d5185feb42bffccb1838f758ca88bb38..4564ed0b5ff31e32aab74c819369e3762382f512 100644 (file)
@@ -222,6 +222,7 @@ static void sn_fixup_ionodes(void)
                                continue;
                        }
 
+                       spin_lock_init(&sn_flush_device_list->sfdl_flush_lock);
                        hubdev->hdi_flush_nasid_list.widget_p[widget] =
                            sn_flush_device_list;
                }
@@ -341,7 +342,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
        struct pci_controller *controller;
        struct pcibus_bussoft *prom_bussoft_ptr;
        struct hubdev_info *hubdev_info;
-       void *provider_soft;
+       void *provider_soft = NULL;
        struct sn_pcibus_provider *provider;
 
        status = sal_get_pcibus_info((u64) segment, (u64) busnum,
@@ -358,7 +359,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
        if (bus == NULL) {
                bus = pci_scan_bus(busnum, &pci_root_ops, controller);
                if (bus == NULL)
-                       return; /* error, or bus already scanned */
+                       goto error_return; /* error, or bus already scanned */
                bus->sysdata = NULL;
        }
 
@@ -371,28 +372,30 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
         */
 
        if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES)
-               return;         /* unsupported asic type */
+               goto error_return; /* unsupported asic type */
 
        if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB)
                goto error_return; /* no further fixup necessary */
 
        provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type];
        if (provider == NULL)
-               return;         /* no provider registerd for this asic */
+               goto error_return; /* no provider registerd for this asic */
 
-       provider_soft = NULL;
+       bus->sysdata = controller;
        if (provider->bus_fixup)
                provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller);
 
-       if (provider_soft == NULL)
-               return;         /* fixup failed or not applicable */
+       if (provider_soft == NULL) {
+               /* fixup failed or not applicable */
+               bus->sysdata = NULL;
+               goto error_return;
+       }
 
        /*
         * Generic bus fixup goes here.  Don't reference prom_bussoft_ptr
         * after this point.
         */
 
-       bus->sysdata = controller;
        PCI_CONTROLLER(bus)->platform_data = provider_soft;
        nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);
        cnode = nasid_to_cnodeid(nasid);
index 0261452d08df2856d33f356c6da8ebea2d86ed5c..0513aacac8c13898a8e7edf57cfe9530b13e553d 100644 (file)
@@ -36,7 +36,6 @@
 #include <asm/topology.h>
 #include <asm/smp.h>
 #include <asm/semaphore.h>
-#include <asm/segment.h>
 #include <asm/uaccess.h>
 #include <asm/sal.h>
 #include <asm/sn/io.h>
index 7772951df313b9e9edec01dd2b2cb922b1e43d62..7622d4ec5f08d2ff995b9a05e10fdefb63630fbe 100644 (file)
@@ -269,7 +269,7 @@ config NR_CPUS
 # Common NUMA Features
 config NUMA
        bool "Numa Memory Allocation Support"
-       depends on SMP
+       depends on SMP && BROKEN
        default n
 
 # turning this on wastes a bunch of space.
@@ -286,6 +286,7 @@ menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
 
 config PCI
        bool "PCI support"
+       depends on BROKEN
        default n
        help
          Find out whether you have a PCI motherboard. PCI is the name of a
index 31039723804f95fa106c6eadc0a0393db8fba4d8..bbf711bab69e904bc9726314bd27b9df59d2c82b 100644 (file)
@@ -20,7 +20,7 @@ config DEBUG_STACK_USAGE
 
 config DEBUG_PAGEALLOC
        bool "Page alloc debugging"
-       depends on DEBUG_KERNEL
+       depends on DEBUG_KERNEL && BROKEN
        help
          Unmap pages from the kernel linear mapping after free_pages().
          This results in a large slowdown, but helps to find certain types
index a146b24a556b1aec6074728232347e9d79932bfc..708634b685e44ff925bb2d4eca7af5de8173e329 100644 (file)
 typedef struct {
        unsigned long icucr;  /* ICU Control Register */
 } icu_data_t;
+static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
+#else
+icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
 #endif /* CONFIG_SMP */
 
-static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
 
 static void disable_m32700ut_irq(unsigned int irq)
 {
index f0301f58bcce31e54e5150141af1d1c1aa9f37f5..d7b7ec6d30f88c3942eec68d520b05b0a66675a7 100644 (file)
 typedef struct {
        unsigned long icucr;  /* ICU Control Register */
 } icu_data_t;
+static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
+#else
+icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
 #endif /* CONFIG_SMP */
 
-static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
 
 static void disable_opsput_irq(unsigned int irq)
 {
index f9a0e723478dd58747945b9e5f7fe7b7b9578932..640d592ea07251207f59f4864cfd0ce9e1ad580d 100644 (file)
@@ -91,6 +91,7 @@ extern struct {
 
 /* which physical physical ID maps to which logical CPU number */
 static volatile int physid_2_cpu[NR_CPUS];
+#define physid_to_cpu(physid)  physid_2_cpu[physid]
 
 /* which logical CPU number maps to which physical ID */
 volatile int cpu_2_physid[NR_CPUS];
index c871b4606b07f9ba82f8f8be4944428fc831d6f6..ddb16a83a8ce4621af77840971e24e9868e8bb99 100644 (file)
@@ -58,3 +58,4 @@ csum_partial_copy_from_user (const unsigned char __user *src,
        return csum_partial(dst, len-missing, sum);
 }
 EXPORT_SYMBOL(csum_partial_copy_from_user);
+EXPORT_SYMBOL(csum_partial);
index 1d1a01e54b3fa233cd1f942c3d0b0e6cb6512885..08e727955555ca13b8b8eafcc5272db2edffcb8f 100644 (file)
 #include <linux/mmzone.h>
 #include <linux/initrd.h>
 #include <linux/nodemask.h>
+#include <linux/module.h>
 
 #include <asm/setup.h>
 
 extern char _end[];
 
 struct pglist_data *node_data[MAX_NUMNODES];
+EXPORT_SYMBOL(node_data);
 static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata;
 
 pg_data_t m32r_node_data[MAX_NUMNODES];
index f6db3b385fea4c02c4091371743c34e4ddb4facb..e6fa1d1cc03a210991b6b029cd9c6bb50106037e 100644 (file)
@@ -911,6 +911,7 @@ config PPCBUG_NVRAM
        default y if PPC_PREP
 
 config SMP
+       depends on PPC_STD_MMU
        bool "Symmetric multi-processing support"
        ---help---
          This enables support for systems with more than one CPU. If you have
@@ -930,7 +931,7 @@ config SMP
 
 config IRQ_ALL_CPUS
        bool "Distribute interrupts on all CPUs by default"
-       depends on SMP
+       depends on SMP && !MV64360
        help
          This option gives the kernel permission to distribute IRQs across
          multiple CPUs.  Saying N here will route all IRQs to the first
@@ -1121,7 +1122,9 @@ config PROC_HARDWARE
 
 source "drivers/zorro/Kconfig"
 
+if !44x || BROKEN
 source kernel/power/Kconfig
+endif
 
 config SECCOMP
        bool "Enable seccomp to safely compute untrusted bytecode"
index f7c045764e044766f1602726ce5b2ce494e40610..805dd98908a3cd4e90164f2e0c1cde80d0c8ef5e 100644 (file)
@@ -3,6 +3,11 @@ config 4xx
        depends on 40x || 44x
        default y
 
+config WANT_EARLY_SERIAL
+       bool
+       select SERIAL_8250
+       default n
+
 menu "IBM 4xx options"
        depends on 4xx
 
@@ -18,6 +23,7 @@ config ASH
 
 config BUBINGA
        bool "Bubinga"
+       select WANT_EARLY_SERIAL
        help
          This option enables support for the IBM 405EP evaluation board.
 
@@ -70,21 +76,25 @@ choice
 
 config BAMBOO
        bool "Bamboo"
+       select WANT_EARLY_SERIAL
        help
          This option enables support for the IBM PPC440EP evaluation board.
 
 config EBONY
        bool "Ebony"
+       select WANT_EARLY_SERIAL
        help
          This option enables support for the IBM PPC440GP evaluation board.
 
 config LUAN
        bool "Luan"
+       select WANT_EARLY_SERIAL
        help
          This option enables support for the IBM PPC440SP evaluation board.
 
 config OCOTEA
        bool "Ocotea"
+       select WANT_EARLY_SERIAL
        help
          This option enables support for the IBM PPC440GX evaluation board.
 
@@ -230,10 +240,6 @@ config PPC_GEN550
        depends on 4xx
        default y
 
-config PM
-       bool "Power Management support (EXPERIMENTAL)"
-       depends on 4xx && EXPERIMENTAL
-
 choice
        prompt "TTYS0 device and default console"
        depends on 40x
index 55a381af4e37f4cb8fdbb8a406f3031a5db52c52..a3702cfe8f7c70ff25c546b76f8b8cddc01e47eb 100644 (file)
@@ -423,7 +423,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.find_end_of_memory       = m8xx_find_end_of_memory;
        ppc_md.setup_io_mappings        = m8xx_map_io;
 
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+#if defined(CONFIG_BLK_DEV_MPC8xx_IDE)
        m8xx_ide_init();
 #endif
 }
index 5015ab99afd21b78416dc59b74883f4889b7ba29..f15e64285f9628e25465a55426cc3e88d3d5d737 100644 (file)
@@ -620,6 +620,7 @@ ppc4xx_clr_dma_status(unsigned int dmanr)
        return DMA_STATUS_GOOD;
 }
 
+#ifdef CONFIG_PPC4xx_EDMA
 /*
  * Enables the burst on the channel (BTEN bit in the control/count register)
  * Note:
@@ -685,6 +686,11 @@ ppc4xx_set_burst_size(unsigned int dmanr, unsigned int bsize)
        return DMA_STATUS_GOOD;
 }
 
+EXPORT_SYMBOL(ppc4xx_enable_burst);
+EXPORT_SYMBOL(ppc4xx_disable_burst);
+EXPORT_SYMBOL(ppc4xx_set_burst_size);
+#endif /* CONFIG_PPC4xx_EDMA */
+
 EXPORT_SYMBOL(ppc4xx_init_dma_channel);
 EXPORT_SYMBOL(ppc4xx_get_channel_config);
 EXPORT_SYMBOL(ppc4xx_set_channel_priority);
@@ -703,6 +709,4 @@ EXPORT_SYMBOL(ppc4xx_enable_dma_interrupt);
 EXPORT_SYMBOL(ppc4xx_disable_dma_interrupt);
 EXPORT_SYMBOL(ppc4xx_get_dma_status);
 EXPORT_SYMBOL(ppc4xx_clr_dma_status);
-EXPORT_SYMBOL(ppc4xx_enable_burst);
-EXPORT_SYMBOL(ppc4xx_disable_burst);
-EXPORT_SYMBOL(ppc4xx_set_burst_size);
+
index 76cfd1449d529542759064ef970b2f1af2a8548c..1c11031c838eea170eb02f7db638d4c23a71ef23 100644 (file)
 /* 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 = (u32)((unsigned long)&xLparMap - KERNELBASE),
+       .xMsNucDataOffset = LPARMAP_PHYS,
        .xFlags = HVREL_TAGSINACTIVE    /* tags inactive       */
                                        /* 64 bit              */
                                        /* shared processors   */
@@ -70,63 +50,6 @@ 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);
index d9b2660ef221f694e3b5a80c646b9fa508db0f41..2ecccb6b4f8cb51dd7c971547b376eb41a51f140 100644 (file)
@@ -73,3 +73,8 @@ 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
index 784f56d4684c5772a1939815095c81495c75d1ac..accaa052d31fbe3b861e048ee0eb3de0bd5e2845 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm/cputable.h>
 #include <asm/setup.h>
 #include <asm/hvcall.h>
+#include <asm/iSeries/LparMap.h>
 
 #ifdef CONFIG_PPC_ISERIES
 #define DO_SOFT_DISABLE
@@ -679,6 +680,11 @@ 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.
  */
index 8316426ccaf60036c59d3cd45e18835d8e19c88a..845eebd1e28de803904778c7ed1dc39fb61a7abc 100644 (file)
@@ -242,7 +242,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
        dma_addr_t dma_next = 0, dma_addr;
        unsigned long flags;
        struct scatterlist *s, *outs, *segstart;
-       int outcount;
+       int outcount, incount;
        unsigned long handle;
 
        BUG_ON(direction == DMA_NONE);
@@ -252,6 +252,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
 
        outs = s = segstart = &sglist[0];
        outcount = 1;
+       incount = nelems;
        handle = 0;
 
        /* Init first segment length for backout at failure */
@@ -338,10 +339,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
 
        DBG("mapped %d elements:\n", outcount);
 
-       /* For the sake of iommu_free_sg, we clear out the length in the
+       /* For the sake of iommu_unmap_sg, we clear out the length in the
         * next entry of the sglist if we didn't fill the list completely
         */
-       if (outcount < nelems) {
+       if (outcount < incount) {
                outs++;
                outs->dma_address = DMA_ERROR_CODE;
                outs->dma_length = 0;
diff --git a/arch/ppc64/kernel/lparmap.c b/arch/ppc64/kernel/lparmap.c
new file mode 100644 (file)
index 0000000..b81de28
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * 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 <asm/mmu.h>
+#include <asm/page.h>
+#include <asm/iSeries/LparMap.h>
+
+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),
+               },
+       },
+};
index 687e8559520839554eaf4d467d78a8d373eb2376..e9c24d2dbd91276407ba53d2abd9e4b2fc013b34 100644 (file)
@@ -706,6 +706,8 @@ void machine_power_off(void)
        local_irq_disable();
        while (1) ;
 }
+/* Used by the G5 thermal driver */
+EXPORT_SYMBOL_GPL(machine_power_off);
 
 void machine_halt(void)
 {
index 20062145e84e29bc1dcddcc258b7a29276991f84..d47fecb42cc5f24d5e2aeda18424fb60f37ffb25 100644 (file)
@@ -46,9 +46,9 @@ int  __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
                                "lra    3,0(%4)\n"
                                "lr     5,%5\n"
                                "diag   2,4,0x8\n"
-                               "brc    8, .Litfits\n"
+                               "brc    8, 1f\n"
                                "ar     5, %5\n"
-                               ".Litfits: \n"
+                               "1: \n"
                                "lr     %0,4\n"
                                "lr     %1,5\n"
                                : "=d" (return_code), "=d" (return_len)
@@ -64,9 +64,9 @@ int  __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
                                "sam31\n"
                                "diag   2,4,0x8\n"
                                "sam64\n"
-                               "brc    8, .Litfits\n"
+                               "brc    8, 1f\n"
                                "agr    5, %5\n"
-                               ".Litfits: \n"
+                               "1: \n"
                                "lgr    %0,4\n"
                                "lgr    %1,5\n"
                                : "=d" (return_code), "=d" (return_len)
index 6615e4838ee4cab03a4a72a552347ae768f38273..fb6368159dd08616da71a7fa788c4d663f7968b7 100644 (file)
@@ -1145,5 +1145,10 @@ ENTRY(sys_call_table)
        .long sys_add_key               /* 285 */
        .long sys_request_key
        .long sys_keyctl
+       .long sys_ioprio_set
+       .long sys_ioprio_get
+       .long sys_inotify_init          /* 290 */
+       .long sys_inotify_add_watch
+       .long sys_inotify_rm_watch
 
 /* End of entry.S */
index 6aabc63e451841ead9ebb431b332d5a4a65d9ae5..a3d037805f1cf7e7d418e328cca61555e79479dd 100644 (file)
@@ -342,4 +342,9 @@ sys_call_table:
        .long sys_add_key
        .long sys_request_key
        .long sys_keyctl                /* 315 */
+       .long sys_ioprio_set
+       .long sys_ioprio_get
+       .long sys_inotify_init
+       .long sys_inotify_add_watch
+       .long sys_inotify_rm_watch      /* 320 */
 
index 1bd430d0ca0629108135262bbcba06b986a6c005..8faa8dc4de435cd7850170a5ea266f19cd00ac6b 100644 (file)
@@ -98,8 +98,9 @@ extern void ___rw_write_enter(void);
  * The module references will be fixed up by module_frob_arch_sections.
  */
 #define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \
-       extern __ret __x(__arg1, __arg2) \
-                    __attribute__((weak, alias("." # __x)));
+       extern __ret __x(__arg1, __arg2); \
+       asm(".weak " #__x);\
+       asm(#__x "=." #__x);
 
 DOT_ALIAS2(int, div, int, int)
 DOT_ALIAS2(int, mul, int, int)
index 093281bdf85f688c7a867daf0283a2df90e921b9..6f00ab8b9d23ab6b79897acca6899b559c4dbaa4 100644 (file)
@@ -8,7 +8,7 @@ EXTRA_CFLAGS := -Werror
 extra-y                := head.o init_task.o vmlinux.lds
 
 obj-y          := process.o setup.o cpu.o idprom.o \
-                  traps.o devices.o auxio.o \
+                  traps.o devices.o auxio.o una_asm.o \
                   irq.o ptrace.o time.o sys_sparc.o signal.o \
                   unaligned.o central.o pci.o starfire.o semaphore.o \
                   power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o
index bba140d98b1b8c1802664f625b102fb532339f9d..f21c993f885616cf963e8fe804b7303ecdc1e6bc 100644 (file)
@@ -540,6 +540,7 @@ void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res,
 
        pbm->parent->resource_adjust(pdev, res, root);
 }
+EXPORT_SYMBOL(pcibios_bus_to_resource);
 
 char * __init pcibios_setup(char *str)
 {
index 100b0107c4be89b1484c8b370dd8898871cfe10f..0c9e54b2f0c8874d08d01159a5365a7f7afa9f2a 100644 (file)
@@ -2127,6 +2127,9 @@ void __init trap_init(void)
            TI_PRE_COUNT != offsetof(struct thread_info, preempt_count) ||
            TI_NEW_CHILD != offsetof(struct thread_info, new_child) ||
            TI_SYS_NOERROR != offsetof(struct thread_info, syscall_noerror) ||
+           TI_RESTART_BLOCK != offsetof(struct thread_info, restart_block) ||
+           TI_KUNA_REGS != offsetof(struct thread_info, kern_una_regs) ||
+           TI_KUNA_INSN != offsetof(struct thread_info, kern_una_insn) ||
            TI_FPREGS != offsetof(struct thread_info, fpregs) ||
            (TI_FPREGS & (64 - 1)))
                thread_info_offsets_are_bolixed_dave();
diff --git a/arch/sparc64/kernel/una_asm.S b/arch/sparc64/kernel/una_asm.S
new file mode 100644 (file)
index 0000000..cbb4058
--- /dev/null
@@ -0,0 +1,153 @@
+/* una_asm.S: Kernel unaligned trap assembler helpers.
+ *
+ * Copyright (C) 1996,2005 David S. Miller (davem@davemloft.net)
+ * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ */
+
+       .text
+
+kernel_unaligned_trap_fault:
+       call    kernel_mna_trap_fault
+        nop
+       retl
+        nop
+       .size   kern_unaligned_trap_fault, .-kern_unaligned_trap_fault
+
+       .globl  __do_int_store
+__do_int_store:
+       rd      %asi, %o4
+       wr      %o3, 0, %asi
+       ldx     [%o2], %g3
+       cmp     %o1, 2
+       be,pn   %icc, 2f
+        cmp    %o1, 4
+       be,pt   %icc, 1f
+        srlx   %g3, 24, %g2
+       srlx    %g3, 56, %g1
+       srlx    %g3, 48, %g7
+4:     stba    %g1, [%o0] %asi
+       srlx    %g3, 40, %g1
+5:     stba    %g7, [%o0 + 1] %asi
+       srlx    %g3, 32, %g7
+6:     stba    %g1, [%o0 + 2] %asi
+7:     stba    %g7, [%o0 + 3] %asi
+       srlx    %g3, 16, %g1
+8:     stba    %g2, [%o0 + 4] %asi
+       srlx    %g3, 8, %g7
+9:     stba    %g1, [%o0 + 5] %asi
+10:    stba    %g7, [%o0 + 6] %asi
+       ba,pt   %xcc, 0f
+11:     stba   %g3, [%o0 + 7] %asi
+1:     srl     %g3, 16, %g7
+12:    stba    %g2, [%o0] %asi
+       srl     %g3, 8, %g2
+13:    stba    %g7, [%o0 + 1] %asi
+14:    stba    %g2, [%o0 + 2] %asi
+       ba,pt   %xcc, 0f
+15:     stba   %g3, [%o0 + 3] %asi
+2:     srl     %g3, 8, %g2
+16:    stba    %g2, [%o0] %asi
+17:    stba    %g3, [%o0 + 1] %asi
+0:
+       wr      %o4, 0x0, %asi
+       retl
+        nop
+       .size   __do_int_store, .-__do_int_store
+
+       .section        __ex_table
+       .word           4b, kernel_unaligned_trap_fault
+       .word           5b, kernel_unaligned_trap_fault
+       .word           6b, kernel_unaligned_trap_fault
+       .word           7b, kernel_unaligned_trap_fault
+       .word           8b, kernel_unaligned_trap_fault
+       .word           9b, kernel_unaligned_trap_fault
+       .word           10b, kernel_unaligned_trap_fault
+       .word           11b, kernel_unaligned_trap_fault
+       .word           12b, kernel_unaligned_trap_fault
+       .word           13b, kernel_unaligned_trap_fault
+       .word           14b, kernel_unaligned_trap_fault
+       .word           15b, kernel_unaligned_trap_fault
+       .word           16b, kernel_unaligned_trap_fault
+       .word           17b, kernel_unaligned_trap_fault
+       .previous
+
+       .globl  do_int_load
+do_int_load:
+       rd      %asi, %o5
+       wr      %o4, 0, %asi
+       cmp     %o1, 8
+       bge,pn  %icc, 9f
+        cmp    %o1, 4
+       be,pt   %icc, 6f
+4:      lduba  [%o2] %asi, %g2
+5:     lduba   [%o2 + 1] %asi, %g3
+       sll     %g2, 8, %g2
+       brz,pt  %o3, 3f
+        add    %g2, %g3, %g2
+       sllx    %g2, 48, %g2
+       srax    %g2, 48, %g2
+3:     ba,pt   %xcc, 0f
+        stx    %g2, [%o0]
+6:     lduba   [%o2 + 1] %asi, %g3
+       sll     %g2, 24, %g2
+7:     lduba   [%o2 + 2] %asi, %g7
+       sll     %g3, 16, %g3
+8:     lduba   [%o2 + 3] %asi, %g1
+       sll     %g7, 8, %g7
+       or      %g2, %g3, %g2
+       or      %g7, %g1, %g7
+       or      %g2, %g7, %g2
+       brnz,a,pt %o3, 3f
+        sra    %g2, 0, %g2
+3:     ba,pt   %xcc, 0f
+        stx    %g2, [%o0]
+9:     lduba   [%o2] %asi, %g2
+10:    lduba   [%o2 + 1] %asi, %g3
+       sllx    %g2, 56, %g2
+11:    lduba   [%o2 + 2] %asi, %g7
+       sllx    %g3, 48, %g3
+12:    lduba   [%o2 + 3] %asi, %g1
+       sllx    %g7, 40, %g7
+       sllx    %g1, 32, %g1
+       or      %g2, %g3, %g2
+       or      %g7, %g1, %g7
+13:    lduba   [%o2 + 4] %asi, %g3
+       or      %g2, %g7, %g7
+14:    lduba   [%o2 + 5] %asi, %g1
+       sllx    %g3, 24, %g3
+15:    lduba   [%o2 + 6] %asi, %g2
+       sllx    %g1, 16, %g1
+       or      %g7, %g3, %g7
+16:    lduba   [%o2 + 7] %asi, %g3
+       sllx    %g2, 8, %g2
+       or      %g7, %g1, %g7
+       or      %g2, %g3, %g2
+       or      %g7, %g2, %g7
+       cmp     %o1, 8
+       be,a,pt %icc, 0f
+        stx    %g7, [%o0]
+       srlx    %g7, 32, %g2
+       sra     %g7, 0, %g7
+       stx     %g2, [%o0]
+       stx     %g7, [%o0 + 8]
+0:
+       wr      %o5, 0x0, %asi
+       retl
+        nop
+       .size   __do_int_load, .-__do_int_load
+
+       .section        __ex_table
+       .word           4b, kernel_unaligned_trap_fault
+       .word           5b, kernel_unaligned_trap_fault
+       .word           6b, kernel_unaligned_trap_fault
+       .word           7b, kernel_unaligned_trap_fault
+       .word           8b, kernel_unaligned_trap_fault
+       .word           9b, kernel_unaligned_trap_fault
+       .word           10b, kernel_unaligned_trap_fault
+       .word           11b, kernel_unaligned_trap_fault
+       .word           12b, kernel_unaligned_trap_fault
+       .word           13b, kernel_unaligned_trap_fault
+       .word           14b, kernel_unaligned_trap_fault
+       .word           15b, kernel_unaligned_trap_fault
+       .word           16b, kernel_unaligned_trap_fault
+       .previous
index 4372bf32ecf6f28eb69ff2b8e31b3e7197b5af5d..11c3e88732e482ba54da15452ea38c45f1b0c713 100644 (file)
@@ -180,169 +180,28 @@ static void __attribute_used__ unaligned_panic(char *str, struct pt_regs *regs)
        die_if_kernel(str, regs);
 }
 
-#define do_integer_load(dest_reg, size, saddr, is_signed, asi, errh) ({                \
-__asm__ __volatile__ (                                                         \
-       "wr     %4, 0, %%asi\n\t"                                               \
-       "cmp    %1, 8\n\t"                                                      \
-       "bge,pn %%icc, 9f\n\t"                                                  \
-       " cmp   %1, 4\n\t"                                                      \
-       "be,pt  %%icc, 6f\n"                                                    \
-"4:\t" " lduba [%2] %%asi, %%l1\n"                                             \
-"5:\t" "lduba  [%2 + 1] %%asi, %%l2\n\t"                                       \
-       "sll    %%l1, 8, %%l1\n\t"                                              \
-       "brz,pt %3, 3f\n\t"                                                     \
-       " add   %%l1, %%l2, %%l1\n\t"                                           \
-       "sllx   %%l1, 48, %%l1\n\t"                                             \
-       "srax   %%l1, 48, %%l1\n"                                               \
-"3:\t" "ba,pt  %%xcc, 0f\n\t"                                                  \
-       " stx   %%l1, [%0]\n"                                                   \
-"6:\t" "lduba  [%2 + 1] %%asi, %%l2\n\t"                                       \
-       "sll    %%l1, 24, %%l1\n"                                               \
-"7:\t" "lduba  [%2 + 2] %%asi, %%g7\n\t"                                       \
-       "sll    %%l2, 16, %%l2\n"                                               \
-"8:\t" "lduba  [%2 + 3] %%asi, %%g1\n\t"                                       \
-       "sll    %%g7, 8, %%g7\n\t"                                              \
-       "or     %%l1, %%l2, %%l1\n\t"                                           \
-       "or     %%g7, %%g1, %%g7\n\t"                                           \
-       "or     %%l1, %%g7, %%l1\n\t"                                           \
-       "brnz,a,pt %3, 3f\n\t"                                                  \
-       " sra   %%l1, 0, %%l1\n"                                                \
-"3:\t" "ba,pt  %%xcc, 0f\n\t"                                                  \
-       " stx   %%l1, [%0]\n"                                                   \
-"9:\t" "lduba  [%2] %%asi, %%l1\n"                                             \
-"10:\t"        "lduba  [%2 + 1] %%asi, %%l2\n\t"                                       \
-       "sllx   %%l1, 56, %%l1\n"                                               \
-"11:\t"        "lduba  [%2 + 2] %%asi, %%g7\n\t"                                       \
-       "sllx   %%l2, 48, %%l2\n"                                               \
-"12:\t"        "lduba  [%2 + 3] %%asi, %%g1\n\t"                                       \
-       "sllx   %%g7, 40, %%g7\n\t"                                             \
-       "sllx   %%g1, 32, %%g1\n\t"                                             \
-       "or     %%l1, %%l2, %%l1\n\t"                                           \
-       "or     %%g7, %%g1, %%g7\n"                                             \
-"13:\t"        "lduba  [%2 + 4] %%asi, %%l2\n\t"                                       \
-       "or     %%l1, %%g7, %%g7\n"                                             \
-"14:\t"        "lduba  [%2 + 5] %%asi, %%g1\n\t"                                       \
-       "sllx   %%l2, 24, %%l2\n"                                               \
-"15:\t"        "lduba  [%2 + 6] %%asi, %%l1\n\t"                                       \
-       "sllx   %%g1, 16, %%g1\n\t"                                             \
-       "or     %%g7, %%l2, %%g7\n"                                             \
-"16:\t"        "lduba  [%2 + 7] %%asi, %%l2\n\t"                                       \
-       "sllx   %%l1, 8, %%l1\n\t"                                              \
-       "or     %%g7, %%g1, %%g7\n\t"                                           \
-       "or     %%l1, %%l2, %%l1\n\t"                                           \
-       "or     %%g7, %%l1, %%g7\n\t"                                           \
-       "cmp    %1, 8\n\t"                                                      \
-       "be,a,pt %%icc, 0f\n\t"                                                 \
-       " stx   %%g7, [%0]\n\t"                                                 \
-       "srlx   %%g7, 32, %%l1\n\t"                                             \
-       "sra    %%g7, 0, %%g7\n\t"                                              \
-       "stx    %%l1, [%0]\n\t"                                                 \
-       "stx    %%g7, [%0 + 8]\n"                                               \
-"0:\n\t"                                                                       \
-       "wr     %%g0, %5, %%asi\n\n\t"                                          \
-       ".section __ex_table\n\t"                                               \
-       ".word  4b, " #errh "\n\t"                                              \
-       ".word  5b, " #errh "\n\t"                                              \
-       ".word  6b, " #errh "\n\t"                                              \
-       ".word  7b, " #errh "\n\t"                                              \
-       ".word  8b, " #errh "\n\t"                                              \
-       ".word  9b, " #errh "\n\t"                                              \
-       ".word  10b, " #errh "\n\t"                                             \
-       ".word  11b, " #errh "\n\t"                                             \
-       ".word  12b, " #errh "\n\t"                                             \
-       ".word  13b, " #errh "\n\t"                                             \
-       ".word  14b, " #errh "\n\t"                                             \
-       ".word  15b, " #errh "\n\t"                                             \
-       ".word  16b, " #errh "\n\n\t"                                           \
-       ".previous\n\t"                                                         \
-       : : "r" (dest_reg), "r" (size), "r" (saddr), "r" (is_signed),           \
-         "r" (asi), "i" (ASI_AIUS)                                             \
-       : "l1", "l2", "g7", "g1", "cc");                                        \
-})
+extern void do_int_load(unsigned long *dest_reg, int size,
+                       unsigned long *saddr, int is_signed, int asi);
        
-#define store_common(dst_addr, size, src_val, asi, errh) ({                    \
-__asm__ __volatile__ (                                                         \
-       "wr     %3, 0, %%asi\n\t"                                               \
-       "ldx    [%2], %%l1\n"                                                   \
-       "cmp    %1, 2\n\t"                                                      \
-       "be,pn  %%icc, 2f\n\t"                                                  \
-       " cmp   %1, 4\n\t"                                                      \
-       "be,pt  %%icc, 1f\n\t"                                                  \
-       " srlx  %%l1, 24, %%l2\n\t"                                             \
-       "srlx   %%l1, 56, %%g1\n\t"                                             \
-       "srlx   %%l1, 48, %%g7\n"                                               \
-"4:\t" "stba   %%g1, [%0] %%asi\n\t"                                           \
-       "srlx   %%l1, 40, %%g1\n"                                               \
-"5:\t" "stba   %%g7, [%0 + 1] %%asi\n\t"                                       \
-       "srlx   %%l1, 32, %%g7\n"                                               \
-"6:\t" "stba   %%g1, [%0 + 2] %%asi\n"                                         \
-"7:\t" "stba   %%g7, [%0 + 3] %%asi\n\t"                                       \
-       "srlx   %%l1, 16, %%g1\n"                                               \
-"8:\t" "stba   %%l2, [%0 + 4] %%asi\n\t"                                       \
-       "srlx   %%l1, 8, %%g7\n"                                                \
-"9:\t" "stba   %%g1, [%0 + 5] %%asi\n"                                         \
-"10:\t"        "stba   %%g7, [%0 + 6] %%asi\n\t"                                       \
-       "ba,pt  %%xcc, 0f\n"                                                    \
-"11:\t"        " stba  %%l1, [%0 + 7] %%asi\n"                                         \
-"1:\t" "srl    %%l1, 16, %%g7\n"                                               \
-"12:\t"        "stba   %%l2, [%0] %%asi\n\t"                                           \
-       "srl    %%l1, 8, %%l2\n"                                                \
-"13:\t"        "stba   %%g7, [%0 + 1] %%asi\n"                                         \
-"14:\t"        "stba   %%l2, [%0 + 2] %%asi\n\t"                                       \
-       "ba,pt  %%xcc, 0f\n"                                                    \
-"15:\t"        " stba  %%l1, [%0 + 3] %%asi\n"                                         \
-"2:\t" "srl    %%l1, 8, %%l2\n"                                                \
-"16:\t"        "stba   %%l2, [%0] %%asi\n"                                             \
-"17:\t"        "stba   %%l1, [%0 + 1] %%asi\n"                                         \
-"0:\n\t"                                                                       \
-       "wr     %%g0, %4, %%asi\n\n\t"                                          \
-       ".section __ex_table\n\t"                                               \
-       ".word  4b, " #errh "\n\t"                                              \
-       ".word  5b, " #errh "\n\t"                                              \
-       ".word  6b, " #errh "\n\t"                                              \
-       ".word  7b, " #errh "\n\t"                                              \
-       ".word  8b, " #errh "\n\t"                                              \
-       ".word  9b, " #errh "\n\t"                                              \
-       ".word  10b, " #errh "\n\t"                                             \
-       ".word  11b, " #errh "\n\t"                                             \
-       ".word  12b, " #errh "\n\t"                                             \
-       ".word  13b, " #errh "\n\t"                                             \
-       ".word  14b, " #errh "\n\t"                                             \
-       ".word  15b, " #errh "\n\t"                                             \
-       ".word  16b, " #errh "\n\t"                                             \
-       ".word  17b, " #errh "\n\n\t"                                           \
-       ".previous\n\t"                                                         \
-       : : "r" (dst_addr), "r" (size), "r" (src_val), "r" (asi), "i" (ASI_AIUS)\
-       : "l1", "l2", "g7", "g1", "cc");                                        \
-})
-
-#define do_integer_store(reg_num, size, dst_addr, regs, asi, errh) ({          \
-       unsigned long zero = 0;                                                 \
-       unsigned long *src_val = &zero;                                         \
-                                                                               \
-       if (size == 16) {                                                       \
-               size = 8;                                                       \
-               zero = (((long)(reg_num ?                                       \
-                       (unsigned)fetch_reg(reg_num, regs) : 0)) << 32) |       \
-                       (unsigned)fetch_reg(reg_num + 1, regs);                 \
-       } else if (reg_num) src_val = fetch_reg_addr(reg_num, regs);            \
-       store_common(dst_addr, size, src_val, asi, errh);                       \
-})
-
-extern void smp_capture(void);
-extern void smp_release(void);
-
-#define do_atomic(srcdest_reg, mem, errh) ({                                   \
-       unsigned long flags, tmp;                                               \
-                                                                               \
-       smp_capture();                                                          \
-       local_irq_save(flags);                                                  \
-       tmp = *srcdest_reg;                                                     \
-       do_integer_load(srcdest_reg, 4, mem, 0, errh);                          \
-       store_common(mem, 4, &tmp, errh);                                       \
-       local_irq_restore(flags);                                               \
-       smp_release();                                                          \
-})
+extern void __do_int_store(unsigned long *dst_addr, int size,
+                          unsigned long *src_val, int asi);
+
+static inline void do_int_store(int reg_num, int size, unsigned long *dst_addr,
+                               struct pt_regs *regs, int asi)
+{
+       unsigned long zero = 0;
+       unsigned long *src_val = &zero;
+
+       if (size == 16) {
+               size = 8;
+               zero = (((long)(reg_num ?
+                       (unsigned)fetch_reg(reg_num, regs) : 0)) << 32) |
+                       (unsigned)fetch_reg(reg_num + 1, regs);
+       } else if (reg_num) {
+               src_val = fetch_reg_addr(reg_num, regs);
+       }
+       __do_int_store(dst_addr, size, src_val, asi);
+}
 
 static inline void advance(struct pt_regs *regs)
 {
@@ -364,24 +223,29 @@ static inline int ok_for_kernel(unsigned int insn)
        return !floating_point_load_or_store_p(insn);
 }
 
-void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) __asm__ ("kernel_mna_trap_fault");
-
-void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
+void kernel_mna_trap_fault(void)
 {
-       unsigned long g2 = regs->u_regs [UREG_G2];
+       struct pt_regs *regs = current_thread_info()->kern_una_regs;
+       unsigned int insn = current_thread_info()->kern_una_insn;
+       unsigned long g2 = regs->u_regs[UREG_G2];
        unsigned long fixup = search_extables_range(regs->tpc, &g2);
 
        if (!fixup) {
-               unsigned long address = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f));
+               unsigned long address;
+
+               address = compute_effective_address(regs, insn,
+                                                   ((insn >> 25) & 0x1f));
                if (address < PAGE_SIZE) {
-                       printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference in mna handler");
+                       printk(KERN_ALERT "Unable to handle kernel NULL "
+                              "pointer dereference in mna handler");
                } else
-                       printk(KERN_ALERT "Unable to handle kernel paging request in mna handler");
+                       printk(KERN_ALERT "Unable to handle kernel paging "
+                              "request in mna handler");
                printk(KERN_ALERT " at virtual address %016lx\n",address);
-               printk(KERN_ALERT "current->{mm,active_mm}->context = %016lx\n",
+               printk(KERN_ALERT "current->{active_,}mm->context = %016lx\n",
                        (current->mm ? CTX_HWBITS(current->mm->context) :
                        CTX_HWBITS(current->active_mm->context)));
-               printk(KERN_ALERT "current->{mm,active_mm}->pgd = %016lx\n",
+               printk(KERN_ALERT "current->{active_,}mm->pgd = %016lx\n",
                        (current->mm ? (unsigned long) current->mm->pgd :
                        (unsigned long) current->active_mm->pgd));
                die_if_kernel("Oops", regs);
@@ -400,48 +264,41 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn, u
        enum direction dir = decode_direction(insn);
        int size = decode_access_size(insn);
 
+       current_thread_info()->kern_una_regs = regs;
+       current_thread_info()->kern_una_insn = insn;
+
        if (!ok_for_kernel(insn) || dir == both) {
-               printk("Unsupported unaligned load/store trap for kernel at <%016lx>.\n",
-                      regs->tpc);
-               unaligned_panic("Kernel does fpu/atomic unaligned load/store.", regs);
-
-               __asm__ __volatile__ ("\n"
-"kernel_unaligned_trap_fault:\n\t"
-               "mov    %0, %%o0\n\t"
-               "call   kernel_mna_trap_fault\n\t"
-               " mov   %1, %%o1\n\t"
-               :
-               : "r" (regs), "r" (insn)
-               : "o0", "o1", "o2", "o3", "o4", "o5", "o7",
-                 "g1", "g2", "g3", "g4", "g7", "cc");
+               printk("Unsupported unaligned load/store trap for kernel "
+                      "at <%016lx>.\n", regs->tpc);
+               unaligned_panic("Kernel does fpu/atomic "
+                               "unaligned load/store.", regs);
+
+               kernel_mna_trap_fault();
        } else {
-               unsigned long addr = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f));
+               unsigned long addr;
 
+               addr = compute_effective_address(regs, insn,
+                                                ((insn >> 25) & 0x1f));
 #ifdef DEBUG_MNA
-               printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] retpc[%016lx]\n",
-                      regs->tpc, dirstrings[dir], addr, size, regs->u_regs[UREG_RETPC]);
+               printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] "
+                      "retpc[%016lx]\n",
+                      regs->tpc, dirstrings[dir], addr, size,
+                      regs->u_regs[UREG_RETPC]);
 #endif
                switch (dir) {
                case load:
-                       do_integer_load(fetch_reg_addr(((insn>>25)&0x1f), regs),
-                                       size, (unsigned long *) addr,
-                                       decode_signedness(insn), decode_asi(insn, regs),
-                                       kernel_unaligned_trap_fault);
+                       do_int_load(fetch_reg_addr(((insn>>25)&0x1f), regs),
+                                   size, (unsigned long *) addr,
+                                   decode_signedness(insn),
+                                   decode_asi(insn, regs));
                        break;
 
                case store:
-                       do_integer_store(((insn>>25)&0x1f), size,
-                                        (unsigned long *) addr, regs,
-                                        decode_asi(insn, regs),
-                                        kernel_unaligned_trap_fault);
-                       break;
-#if 0 /* unsupported */
-               case both:
-                       do_atomic(fetch_reg_addr(((insn>>25)&0x1f), regs),
-                                 (unsigned long *) addr,
-                                 kernel_unaligned_trap_fault);
+                       do_int_store(((insn>>25)&0x1f), size,
+                                    (unsigned long *) addr, regs,
+                                    decode_asi(insn, regs));
                        break;
-#endif
+
                default:
                        panic("Impossible kernel unaligned trap.");
                        /* Not reached... */
index 7aae0a18aabe2e7e305453ddaa537e853ba521a9..686e526bec04c91ffe1e7c145537b1a74680fb20 100644 (file)
@@ -88,7 +88,6 @@ static void frob_mem_refresh(int cpu_slowing_down,
 {
        unsigned long old_refr_count, refr_count, mctrl;
 
-
        refr_count  = (clock_tick * MCTRL0_REFR_INTERVAL);
        refr_count /= (MCTRL0_REFR_CLKS_P_CNT * divisor * 1000000000UL);
 
@@ -230,6 +229,25 @@ static unsigned long estar_to_divisor(unsigned long estar)
        return ret;
 }
 
+static unsigned int us2e_freq_get(unsigned int cpu)
+{
+       cpumask_t cpus_allowed;
+       unsigned long clock_tick, estar;
+
+       if (!cpu_online(cpu))
+               return 0;
+
+       cpus_allowed = current->cpus_allowed;
+       set_cpus_allowed(current, cpumask_of_cpu(cpu));
+
+       clock_tick = sparc64_get_clock_tick(cpu) / 1000;
+       estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR);
+
+       set_cpus_allowed(current, cpus_allowed);
+
+       return clock_tick / estar_to_divisor(estar);
+}
+
 static void us2e_set_cpu_divider_index(unsigned int cpu, unsigned int index)
 {
        unsigned long new_bits, new_freq;
@@ -243,7 +261,7 @@ static void us2e_set_cpu_divider_index(unsigned int cpu, unsigned int index)
        cpus_allowed = current->cpus_allowed;
        set_cpus_allowed(current, cpumask_of_cpu(cpu));
 
-       new_freq = clock_tick = sparc64_get_clock_tick(cpu);
+       new_freq = clock_tick = sparc64_get_clock_tick(cpu) / 1000;
        new_bits = index_to_estar_mode(index);
        divisor = index_to_divisor(index);
        new_freq /= divisor;
@@ -258,7 +276,8 @@ static void us2e_set_cpu_divider_index(unsigned int cpu, unsigned int index)
        cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 
        if (old_divisor != divisor)
-               us2e_transition(estar, new_bits, clock_tick, old_divisor, divisor);
+               us2e_transition(estar, new_bits, clock_tick * 1000,
+                               old_divisor, divisor);
 
        cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 
@@ -272,10 +291,8 @@ static int us2e_freq_target(struct cpufreq_policy *policy,
        unsigned int new_index = 0;
 
        if (cpufreq_frequency_table_target(policy,
-                                             &us2e_freq_table[policy->cpu].table[0],
-                                             target_freq,
-                                             relation,
-                                             &new_index))
+                                          &us2e_freq_table[policy->cpu].table[0],
+                                          target_freq, relation, &new_index))
                return -EINVAL;
 
        us2e_set_cpu_divider_index(policy->cpu, new_index);
@@ -292,7 +309,7 @@ static int us2e_freq_verify(struct cpufreq_policy *policy)
 static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy)
 {
        unsigned int cpu = policy->cpu;
-       unsigned long clock_tick = sparc64_get_clock_tick(cpu);
+       unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;
        struct cpufreq_frequency_table *table =
                &us2e_freq_table[cpu].table[0];
 
@@ -351,9 +368,10 @@ static int __init us2e_freq_init(void)
                memset(us2e_freq_table, 0,
                       (NR_CPUS * sizeof(struct us2e_freq_percpu_info)));
 
+               driver->init = us2e_freq_cpu_init;
                driver->verify = us2e_freq_verify;
                driver->target = us2e_freq_target;
-               driver->init = us2e_freq_cpu_init;
+               driver->get = us2e_freq_get;
                driver->exit = us2e_freq_cpu_exit;
                driver->owner = THIS_MODULE,
                strcpy(driver->name, "UltraSPARC-IIe");
index 18fe54b8aa551c5eb94a2e414f0b0b619a329a25..9080e7cd4bb0b8506ceea663c6e4e0d5a4f8a87e 100644 (file)
@@ -56,7 +56,7 @@ static void write_safari_cfg(unsigned long val)
 
 static unsigned long get_current_freq(unsigned int cpu, unsigned long safari_cfg)
 {
-       unsigned long clock_tick = sparc64_get_clock_tick(cpu);
+       unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;
        unsigned long ret;
 
        switch (safari_cfg & SAFARI_CFG_DIV_MASK) {
@@ -76,6 +76,26 @@ static unsigned long get_current_freq(unsigned int cpu, unsigned long safari_cfg
        return ret;
 }
 
+static unsigned int us3_freq_get(unsigned int cpu)
+{
+       cpumask_t cpus_allowed;
+       unsigned long reg;
+       unsigned int ret;
+
+       if (!cpu_online(cpu))
+               return 0;
+
+       cpus_allowed = current->cpus_allowed;
+       set_cpus_allowed(current, cpumask_of_cpu(cpu));
+
+       reg = read_safari_cfg();
+       ret = get_current_freq(cpu, reg);
+
+       set_cpus_allowed(current, cpus_allowed);
+
+       return ret;
+}
+
 static void us3_set_cpu_divider_index(unsigned int cpu, unsigned int index)
 {
        unsigned long new_bits, new_freq, reg;
@@ -88,7 +108,7 @@ static void us3_set_cpu_divider_index(unsigned int cpu, unsigned int index)
        cpus_allowed = current->cpus_allowed;
        set_cpus_allowed(current, cpumask_of_cpu(cpu));
 
-       new_freq = sparc64_get_clock_tick(cpu);
+       new_freq = sparc64_get_clock_tick(cpu) / 1000;
        switch (index) {
        case 0:
                new_bits = SAFARI_CFG_DIV_1;
@@ -150,7 +170,7 @@ static int us3_freq_verify(struct cpufreq_policy *policy)
 static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
 {
        unsigned int cpu = policy->cpu;
-       unsigned long clock_tick = sparc64_get_clock_tick(cpu);
+       unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000;
        struct cpufreq_frequency_table *table =
                &us3_freq_table[cpu].table[0];
 
@@ -206,9 +226,10 @@ static int __init us3_freq_init(void)
                memset(us3_freq_table, 0,
                       (NR_CPUS * sizeof(struct us3_freq_percpu_info)));
 
+               driver->init = us3_freq_cpu_init;
                driver->verify = us3_freq_verify;
                driver->target = us3_freq_target;
-               driver->init = us3_freq_cpu_init;
+               driver->get = us3_freq_get;
                driver->exit = us3_freq_cpu_exit;
                driver->owner = THIS_MODULE,
                strcpy(driver->name, "UltraSPARC-III");
index a37a5ac13c22b8fb709d0ced7ec5db0a2629ce63..022f67bb687364f2934b388fca57f703f53c2bfe 100644 (file)
@@ -9,19 +9,11 @@
  *
  */
 
-#include <linux/types.h>
-#include <linux/kdev_t.h>
-#include <linux/time.h>
-#include <linux/devfs_fs_kernel.h>
+#include <linux/init.h> 
 #include <linux/module.h>
 #include <linux/mm.h> 
-#include <linux/slab.h>
-#include <linux/init.h> 
-#include <linux/smp_lock.h>
 #include <linux/miscdevice.h>
 #include <asm/uaccess.h>
-#include <asm/irq.h>
-#include <asm/pgtable.h>
 #include "mem_user.h"
 #include "user_util.h"
  
@@ -31,35 +23,22 @@ static unsigned long p_buf = 0;
 static char *v_buf = NULL;
 
 static ssize_t
-mmapper_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+mmapper_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 {
-       if(*ppos > mmapper_size)
-               return -EINVAL;
-
-       if(count + *ppos > mmapper_size)
-               count = count + *ppos - mmapper_size;
-
-       if(count < 0)
-               return -EINVAL;
-       copy_to_user(buf,&v_buf[*ppos],count);
-       
-       return count;
+       return simple_read_from_buffer(buf, count, ppos, v_buf, mmapper_size);
 }
 
 static ssize_t
-mmapper_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+mmapper_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
 {
-       if(*ppos > mmapper_size)
+       if (*ppos > mmapper_size)
                return -EINVAL;
 
-       if(count + *ppos > mmapper_size)
-               count = count + *ppos - mmapper_size;
-
-       if(count < 0)
-               return -EINVAL;
+       if (count > mmapper_size - *ppos)
+               count = mmapper_size - *ppos;
 
-       copy_from_user(&v_buf[*ppos],buf,count);
+       if (copy_from_user(&v_buf[*ppos], buf, count))
+               return -EFAULT;
        
        return count;
 }
@@ -77,7 +56,6 @@ mmapper_mmap(struct file *file, struct vm_area_struct * vma)
        int ret = -EINVAL;
        int size;
 
-       lock_kernel();
        if (vma->vm_pgoff != 0)
                goto out;
        
@@ -92,7 +70,6 @@ mmapper_mmap(struct file *file, struct vm_area_struct * vma)
                goto out;
        ret = 0;
 out:
-       unlock_kernel();
        return ret;
 }
 
index 6dd9e5bf18ed7e92f38bb89a08ceafca56d8b757..f228f8b54194f3216b5382e83fea567af1471a2c 100644 (file)
@@ -61,7 +61,11 @@ void wait_stub_done(int pid, int sig, char * fname)
 
                 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
         } while((n >= 0) && WIFSTOPPED(status) &&
-                (WSTOPSIG(status) == SIGVTALRM));
+                ((WSTOPSIG(status) == SIGVTALRM) ||
+                /* running UML inside a detached screen can cause
+                 * SIGWINCHes
+                 */
+                (WSTOPSIG(status) == SIGWINCH)));
 
         if((n < 0) || !WIFSTOPPED(status) ||
            (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){
index 9416e1c299269d6f988c9f75f8e6f8ae94e41575..4cca3e9c23fe065c3fb2c5a84464d7cd7ab44178 100644 (file)
@@ -9,7 +9,6 @@
  */
 #include <elf.h>
 #include <stddef.h>
-#include <asm/elf.h>
 #include "init.h"
 #include "elf_user.h"
 #include "mem_user.h"
index 776f3c866b7092d30dfa515f61deea41ff0cef04..b97a61e1c71ccd0f73a964d3db5cecb647c58a49 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.13-rc3
-# Fri Jul 22 16:47:31 2005
+# Linux kernel version: 2.6.13-rc6-git3
+# Fri Aug 12 16:40:34 2005
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -284,10 +284,6 @@ CONFIG_IPV6=y
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
@@ -463,6 +459,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 CONFIG_SCSI_SATA=y
+# CONFIG_SCSI_SATA_AHCI is not set
 # CONFIG_SCSI_SATA_SVW is not set
 CONFIG_SCSI_ATA_PIIX=y
 # CONFIG_SCSI_SATA_NV is not set
@@ -492,6 +489,7 @@ CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA2300 is not set
 # CONFIG_SCSI_QLA2322 is not set
 # CONFIG_SCSI_QLA6312 is not set
+# CONFIG_SCSI_QLA24XX is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -512,9 +510,11 @@ CONFIG_BLK_DEV_DM=y
 #
 # Fusion MPT device support
 #
-# CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=y
 # CONFIG_FUSION_FC is not set
+CONFIG_FUSION_MAX_SGE=128
+# CONFIG_FUSION_CTL is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -585,6 +585,7 @@ CONFIG_8139TOO=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
+# CONFIG_E1000_NAPI is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -624,6 +625,10 @@ CONFIG_S2IO=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_RX is not set
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
 
 #
 # ISDN subsystem
index 6ded3a50dfe63682174470acc3e78e2cfdbfd8b5..b548dea4e5b95e30c01f369f0c95dcd06db67551 100644 (file)
@@ -185,6 +185,40 @@ unsigned long __init e820_end_of_ram(void)
 }
 
 /* 
+ * Compute how much memory is missing in a range.
+ * Unlike the other functions in this file the arguments are in page numbers.
+ */
+unsigned long __init
+e820_hole_size(unsigned long start_pfn, unsigned long end_pfn)
+{
+       unsigned long ram = 0;
+       unsigned long start = start_pfn << PAGE_SHIFT;
+       unsigned long end = end_pfn << PAGE_SHIFT;
+       int i;
+       for (i = 0; i < e820.nr_map; i++) {
+               struct e820entry *ei = &e820.map[i];
+               unsigned long last, addr;
+
+               if (ei->type != E820_RAM ||
+                   ei->addr+ei->size <= start ||
+                   ei->addr >= end)
+                       continue;
+
+               addr = round_up(ei->addr, PAGE_SIZE);
+               if (addr < start)
+                       addr = start;
+
+               last = round_down(ei->addr + ei->size, PAGE_SIZE);
+               if (last >= end)
+                       last = end;
+
+               if (last > addr)
+                       ram += last - addr;
+       }
+       return ((end - start) - ram) >> PAGE_SHIFT;
+}
+
+/*
  * Mark e820 reserved areas as busy for the resource manager.
  */
 void __init e820_reserve_resources(void)
index 6e4807d64d4618180f100befb9854299d742f0c4..fa25e39fe54dfc4aab4390c95b45039da0202558 100644 (file)
@@ -334,7 +334,7 @@ static void __cpuinit tsc_sync_wait(void)
 {
        if (notscsync || !cpu_has_tsc)
                return;
-       sync_tsc(boot_cpu_id);
+       sync_tsc(0);
 }
 
 static __init int notscsync_setup(char *s)
@@ -492,6 +492,14 @@ void __cpuinit start_secondary(void)
         */
        set_cpu_sibling_map(smp_processor_id());
 
+       /* 
+        * Wait for TSC sync to not schedule things before.
+        * We still process interrupts, which could see an inconsistent
+        * time in that window unfortunately. 
+        * Do this here because TSC sync has global unprotected state.
+        */
+       tsc_sync_wait();
+
        /*
         * We need to hold call_lock, so there is no inconsistency
         * between the time smp_call_function() determines number of
@@ -509,13 +517,6 @@ void __cpuinit start_secondary(void)
        per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
        unlock_ipi_call_lock();
 
-       mb();
-
-       /* Wait for TSC sync to not schedule things before.
-          We still process interrupts, which could see an inconsistent
-          time in that window unfortunately. */
-       tsc_sync_wait();
-
        cpu_idle();
 }
 
index 493819e543a5e9b876617855ee07b71e1e1234ad..ca914c3bd49cf9ee3042a06426facc57516830fe 100644 (file)
@@ -211,9 +211,7 @@ int unhandled_signal(struct task_struct *tsk, int sig)
 {
        if (tsk->pid == 1)
                return 1;
-       /* Warn for strace, but not for gdb */
-       if (!test_ti_thread_flag(tsk->thread_info, TIF_SYSCALL_TRACE) &&
-           (tsk->ptrace & PT_PTRACED))
+       if (tsk->ptrace & PT_PTRACED)
                return 0;
        return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) ||
                (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL);
index 72e4b364ed739bd25a4c31800664445801d8cc3b..aa4a5189ecee2640503d053bf6c79b233aa99f99 100644 (file)
@@ -322,18 +322,26 @@ void zap_low_mappings(void)
 void __init paging_init(void)
 {
        {
-               unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
+               unsigned long zones_size[MAX_NR_ZONES];
+               unsigned long holes[MAX_NR_ZONES];
                unsigned int max_dma;
 
+               memset(zones_size, 0, sizeof(zones_size));
+               memset(holes, 0, sizeof(holes));
+
                max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 
-               if (end_pfn < max_dma)
+               if (end_pfn < max_dma) {
                        zones_size[ZONE_DMA] = end_pfn;
-               else {
+                       holes[ZONE_DMA] = e820_hole_size(0, end_pfn);
+               } else {
                        zones_size[ZONE_DMA] = max_dma;
+                       holes[ZONE_DMA] = e820_hole_size(0, max_dma);
                        zones_size[ZONE_NORMAL] = end_pfn - max_dma;
+                       holes[ZONE_NORMAL] = e820_hole_size(max_dma, end_pfn);
                }
-               free_area_init(zones_size);
+               free_area_init_node(0, NODE_DATA(0), zones_size,
+                        __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes);
        }
        return;
 }
index 70cb2904a90f9dd8c9310bb368976bc67124d784..6a156f5692ae78a520a4dc0694a78f70b4a6c71a 100644 (file)
@@ -126,9 +126,11 @@ void __init setup_node_zones(int nodeid)
 { 
        unsigned long start_pfn, end_pfn; 
        unsigned long zones[MAX_NR_ZONES];
+       unsigned long holes[MAX_NR_ZONES];
        unsigned long dma_end_pfn;
 
        memset(zones, 0, sizeof(unsigned long) * MAX_NR_ZONES); 
+       memset(holes, 0, sizeof(unsigned long) * MAX_NR_ZONES);
 
        start_pfn = node_start_pfn(nodeid);
        end_pfn = node_end_pfn(nodeid);
@@ -139,13 +141,17 @@ void __init setup_node_zones(int nodeid)
        dma_end_pfn = __pa(MAX_DMA_ADDRESS) >> PAGE_SHIFT; 
        if (start_pfn < dma_end_pfn) { 
                zones[ZONE_DMA] = dma_end_pfn - start_pfn;
+               holes[ZONE_DMA] = e820_hole_size(start_pfn, dma_end_pfn);
                zones[ZONE_NORMAL] = end_pfn - dma_end_pfn; 
+               holes[ZONE_NORMAL] = e820_hole_size(dma_end_pfn, end_pfn);
+
        } else { 
                zones[ZONE_NORMAL] = end_pfn - start_pfn; 
+               holes[ZONE_NORMAL] = e820_hole_size(start_pfn, end_pfn);
        } 
     
        free_area_init_node(nodeid, NODE_DATA(nodeid), zones,
-                           start_pfn, NULL); 
+                           start_pfn, holes);
 } 
 
 void __init numa_init_array(void)
index c2c38b579939432627a006cb8b2307ca6b9cd6c1..d80c323669e0c5e741a33f8c5700b2c8b8784007 100644 (file)
@@ -47,13 +47,22 @@ fill_mp_bus_to_cpumask(void)
                         * if there are no busses hanging off of the current
                         * ldt link then both the secondary and subordinate
                         * bus number fields are set to 0.
+                        * 
+                        * RED-PEN
+                        * This is slightly broken because it assumes
+                        * HT node IDs == Linux node ids, which is not always
+                        * true. However it is probably mostly true.
                         */
                        if (!(SECONDARY_LDT_BUS_NUMBER(ldtbus) == 0
                                && SUBORDINATE_LDT_BUS_NUMBER(ldtbus) == 0)) {
                                for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus);
                                     j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus);
-                                    j++)
-                                       pci_bus_to_node[j] = NODE_ID(nid);
+                                    j++) { 
+                                       int node = NODE_ID(nid);
+                                       if (!node_online(node))
+                                               node = 0;
+                                       pci_bus_to_node[j] = node;
+                               }               
                        }
                }
        }
index 2934475d67d605a540ee4a58d3ef11ccda10c3c8..61ea70742d4912863df0fe4a25f01c1a98d54829 100644 (file)
@@ -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) > 0x1000))
+       && ((base) + (len) > PCIBIOS_MIN_IO))
 
 /*
  * Clearing the flag (IORESOURCE_BUSY) allows drivers to use
index 7289da3c4db6a28778628337f26e79015de7139d..0d11d6e6abd6d652efab6c2831a81b340c7a50f7 100644 (file)
@@ -71,7 +71,7 @@ EXPORT_SYMBOL(acpi_in_debugger);
 extern char line_buf[80];
 #endif /*ENABLE_DEBUGGER*/
 
-int acpi_specific_hotkey_enabled;
+int acpi_specific_hotkey_enabled = TRUE;
 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 = TRUE;
+       acpi_specific_hotkey_enabled = FALSE;
        return 1;
 }
 
-__setup("acpi_specific_hotkey", acpi_hotkey_setup);
+__setup("acpi_generic_hotkey", acpi_hotkey_setup);
 
 /*
  * max_cstate is defined in the base kernel so modules can
index 186b182c582522810c22fd44cecf88afd87c97f1..f93d2ee54800517590d28f2d77767124962eb89f 100644 (file)
@@ -55,7 +55,11 @@ void acpi_power_off(void)
 
 static int acpi_shutdown(struct sys_device *x)
 {
-       return acpi_sleep_prepare(ACPI_STATE_S5);
+       if (system_state == SYSTEM_POWER_OFF) {
+               /* Prepare if we are going to power off the system */
+               return acpi_sleep_prepare(ACPI_STATE_S5);
+       }
+       return 0;
 }
 
 static struct sysdev_class acpi_sysclass = {
index 96fe2f956754a38a2bfcde9299fe9b5223109466..ab53832d57e5eff507b8e4552983446641f02d51 100644 (file)
@@ -180,7 +180,9 @@ static ssize_t driver_bind(struct device_driver *drv,
                up(&dev->sem);
                put_device(dev);
        }
-       return err;
+       if (err)
+               return err;
+       return count;
 }
 static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);
 
index 479c12570881374f9bdb6fafb172879b583b20bc..0154a1623b2198965be09dbf4bd9552b5525ba4e 100644 (file)
@@ -299,6 +299,11 @@ 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 {
@@ -591,11 +596,8 @@ 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);
index 2435a7c99b2b6cd20300a78b15eb35b54e786eee..cd056e7e64ec15d5cf81f16068623e29e07ad187 100644 (file)
@@ -47,7 +47,7 @@ static int cfq_slice_idle = HZ / 100;
 /*
  * disable queueing at the driver/hardware level
  */
-static int cfq_max_depth = 1;
+static int cfq_max_depth = 2;
 
 /*
  * for the hash of cfqq inside the cfqd
@@ -385,9 +385,15 @@ cfq_choose_req(struct cfq_data *cfqd, struct cfq_rq *crq1, struct cfq_rq *crq2)
                return crq2;
        if (crq2 == NULL)
                return crq1;
-       if (cfq_crq_requeued(crq1))
+
+       if (cfq_crq_requeued(crq1) && !cfq_crq_requeued(crq2))
                return crq1;
-       if (cfq_crq_requeued(crq2))
+       else if (cfq_crq_requeued(crq2) && !cfq_crq_requeued(crq1))
+               return crq2;
+
+       if (cfq_crq_is_sync(crq1) && !cfq_crq_is_sync(crq2))
+               return crq1;
+       else if (cfq_crq_is_sync(crq2) && !cfq_crq_is_sync(crq1))
                return crq2;
 
        s1 = crq1->request->sector;
@@ -1769,18 +1775,23 @@ static void
 cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
                 struct cfq_rq *crq)
 {
-       const int sync = cfq_crq_is_sync(crq);
+       struct cfq_io_context *cic;
 
        cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq);
 
-       if (sync) {
-               struct cfq_io_context *cic = crq->io_context;
+       /*
+        * we never wait for an async request and we don't allow preemption
+        * of an async request. so just return early
+        */
+       if (!cfq_crq_is_sync(crq))
+               return;
 
-               cfq_update_io_thinktime(cfqd, cic);
-               cfq_update_idle_window(cfqd, cfqq, cic);
+       cic = crq->io_context;
 
-               cic->last_queue = jiffies;
-       }
+       cfq_update_io_thinktime(cfqd, cic);
+       cfq_update_idle_window(cfqd, cfqq, cic);
+
+       cic->last_queue = jiffies;
 
        if (cfqq == cfqd->active_queue) {
                /*
index 4f27e5519296f9a2866e9b59ba49fc3001855bd2..7333b41d4224240b19f683e12010c261b94417cd 100644 (file)
@@ -80,7 +80,7 @@ config SERIAL_NONSTANDARD
 
 config COMPUTONE
        tristate "Computone IntelliPort Plus serial support"
-       depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP
+       depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (BROKEN || !SPARC32)
        ---help---
          This driver supports the entire family of Intelliport II/Plus
          controllers with the exception of the MicroChannel controllers and
@@ -138,7 +138,7 @@ config CYZ_INTR
 
 config DIGIEPCA
        tristate "Digiboard Intelligent Async Support"
-       depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP
+       depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (!64BIT || BROKEN)
        ---help---
          This is a driver for Digi International's Xx, Xeve, and Xem series
          of cards which provide multiple serial ports. You would need
@@ -208,7 +208,7 @@ config SYNCLINK
 
 config SYNCLINKMP
        tristate "SyncLink Multiport support"
-       depends on SERIAL_NONSTANDARD
+       depends on SERIAL_NONSTANDARD && (BROKEN || !SPARC32)
        help
          Enable support for the SyncLink Multiport (2 or 4 ports)
          serial adapter, running asynchronous and HDLC communications up
@@ -735,7 +735,7 @@ config SGI_IP27_RTC
 
 config GEN_RTC
        tristate "Generic /dev/rtc emulation"
-       depends on RTC!=y && !IA64 && !ARM && !PPC64
+       depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R && !SPARC32
        ---help---
          If you say Y here and create a character special file /dev/rtc with
          major number 10 and minor number 135 using mknod ("man mknod"), you
index 42187381506b7d0ff45dcdcc4df5dc2be7a2867f..850a78c9c4bc9c639dd5b2c5816a4c89e7568eb1 100644 (file)
@@ -261,7 +261,11 @@ 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 long val;
+       unsigned long pfn;
+
+       /* Turn a kernel-virtual address into a physical page frame */
+       pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;
+
        /*
         * RED-PEN: on some architectures there is more mapped memory
         * than available in mem_map which pfn_valid checks
@@ -269,10 +273,10 @@ static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
         *
         * RED-PEN: vmalloc is not supported right now.
         */
-       if (!pfn_valid(vma->vm_pgoff))
+       if (!pfn_valid(pfn))
                return -EIO;
-       val = (u64)vma->vm_pgoff << PAGE_SHIFT;
-       vma->vm_pgoff = __pa(val) >> PAGE_SHIFT;
+
+       vma->vm_pgoff = pfn;
        return mmap_mem(file, vma);
 }
 
index d692af57213a7cbfac0a7e884749c94a35fb4b73..baaa365285fa973776beddcb0ae5c09389ffbe65 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/sched.h>
 #include <linux/byteorder/generic.h>
 #include <asm/sn/sn_sal.h>
+#include <asm/unaligned.h>
 #include "snsc.h"
 
 static struct subch_data_s *event_sd;
@@ -62,13 +63,16 @@ static int
 scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
 {
        char *desc_end;
+       __be32 from_buf;
 
        /* record event source address */
-       *src = be32_to_cpup((__be32 *)event);
+       from_buf = get_unaligned((__be32 *)event);
+       *src = be32_to_cpup(&from_buf);
        event += 4;                     /* move on to event code */
 
        /* record the system controller's event code */
-       *code = be32_to_cpup((__be32 *)event);
+       from_buf = get_unaligned((__be32 *)event);
+       *code = be32_to_cpup(&from_buf);
        event += 4;                     /* move on to event arguments */
 
        /* how many arguments are in the packet? */
@@ -82,7 +86,8 @@ scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
                /* not an integer argument, so give up */
                return -1;
        }
-       *esp_code = be32_to_cpup((__be32 *)event);
+       from_buf = get_unaligned((__be32 *)event);
+       *esp_code = be32_to_cpup(&from_buf);
        event += 4;
 
        /* parse out the event description */
index 30d96739fb2379b1f73d5d6dbbabb899eaf09456..665103ccaee83b69b6ca30a7fda0f40eec8983f7 100644 (file)
@@ -2433,7 +2433,7 @@ static int con_open(struct tty_struct *tty, struct file *filp)
        int ret = 0;
 
        acquire_console_sem();
-       if (tty->count == 1) {
+       if (tty->driver_data == NULL) {
                ret = vc_allocate(currcons);
                if (ret == 0) {
                        struct vc_data *vc = vc_cons[currcons].d;
index 4fa17c76eea2247dae603e5ca124cfe58775b0f1..c8a7f47911f99f315189cc60cb73ba23e888b5fb 100644 (file)
@@ -325,7 +325,7 @@ int adm1026_attach_adapter(struct i2c_adapter *adapter)
 int adm1026_detach_client(struct i2c_client *client)
 {
        i2c_detach_client(client);
-       kfree(client);
+       kfree(i2c_get_clientdata(client));
        return 0;
 }
 
@@ -1691,7 +1691,7 @@ int adm1026_detect(struct i2c_adapter *adapter, int address,
 
        /* Error out and cleanup code */
 exitfree:
-       kfree(new_client);
+       kfree(data);
 exit:
        return err;
 }
index 9168e983ca1d53b4a946316e22da7a362ca89c8e..9362509572709596d92849a666199f4cf1bcb46a 100644 (file)
@@ -834,7 +834,7 @@ static int adm1031_detect(struct i2c_adapter *adapter, int address, int kind)
        return 0;
 
 exit_free:
-       kfree(new_client);
+       kfree(data);
 exit:
        return err;
 }
@@ -845,7 +845,7 @@ static int adm1031_detach_client(struct i2c_client *client)
        if ((ret = i2c_detach_client(client)) != 0) {
                return ret;
        }
-       kfree(client);
+       kfree(i2c_get_clientdata(client));
        return 0;
 }
 
index 5c68e9c311aa232abce025caaea75e9a7d5f860c..ce2a6eb93f6e5d4c7baed6fc26797b86988559e4 100644 (file)
@@ -616,7 +616,7 @@ static int adm9240_detect(struct i2c_adapter *adapter, int address, int kind)
 
        return 0;
 exit_free:
-       kfree(new_client);
+       kfree(data);
 exit:
        return err;
 }
index 270015b626adefcc3fe66cd41fefc2391bb33706..301ae98bd0adb1fca9d0f0e6687a538019439a0b 100644 (file)
@@ -167,7 +167,7 @@ static ssize_t set_temp_reset(struct i2c_client *client, struct fscpos_data
                                "experience to the module author.\n");
 
        /* Supported value: 2 (clears the status) */
-       fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr], 2);
+       fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr - 1], 2);
        return count;
 }
 
index 251ac2659554d8fd77351cf54ef2ad955a7237be..fdeeb3ab6f2f3e9146b607ddc00c5d3ffd239bed 100644 (file)
@@ -298,7 +298,7 @@ static int smsc47b397_detect(struct i2c_adapter *adapter, int addr, int kind)
        return 0;
 
 error_free:
-       kfree(new_client);
+       kfree(data);
 error_release:
        release_region(addr, SMSC_EXTENT);
        return err;
index 897117a7213f0624a04e55deaaf46de38aaab88e..7166ad0b2fda666e5ace936c0b3960de9bbdd7b0 100644 (file)
@@ -495,7 +495,7 @@ static int smsc47m1_detect(struct i2c_adapter *adapter, int address, int kind)
        return 0;
 
 error_free:
-       kfree(new_client);
+       kfree(data);
 error_release:
        release_region(address, SMSC_EXTENT);
        return err;
index 5f33df47aa7432806e6f97ba6de93f74b6ea1f9a..1cadd2c3caddce3ab3cb0d26bfc7160ad70e7d5c 100644 (file)
@@ -764,6 +764,7 @@ config BLK_DEV_IDE_PMAC_ATA100FIRST
 config BLK_DEV_IDEDMA_PMAC
        bool "PowerMac IDE DMA support"
        depends on BLK_DEV_IDE_PMAC
+       select BLK_DEV_IDEDMA_PCI
        help
          This option allows the driver for the built-in IDE controller on
          Power Macintoshes and PowerBooks to use DMA (direct memory access)
index 9eab6426148e2372940c432ec2c647da8c14dd78..29c22fc278c6510b75209ea6fea80649fe23fe77 100644 (file)
@@ -317,7 +317,7 @@ typedef struct ide_floppy_obj {
        unsigned long flags;
 } idefloppy_floppy_t;
 
-#define IDEFLOPPY_TICKS_DELAY  3       /* default delay for ZIP 100 */
+#define IDEFLOPPY_TICKS_DELAY  HZ/20   /* default delay for ZIP 100 (50ms) */
 
 /*
  *     Floppy flag bits values.
index da46577380f327dacd56a68afa9a369bd51882fe..6e3ab0c38c4d672e0c332be3ec88895957187124 100644 (file)
@@ -173,6 +173,12 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
                .channels       = 2,
                .autodma        = NOAUTODMA,
                .bootable       = ON_BOARD,
+       },{     /* 14 */
+               .name           = "Revolution",
+               .init_hwif      = init_hwif_generic,
+               .channels       = 2,
+               .autodma        = AUTODMA,
+               .bootable       = OFF_BOARD,
        }
 };
 
@@ -231,6 +237,7 @@ static struct pci_device_id generic_pci_tbl[] = {
        { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11},
        { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12},
        { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13},
+       { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION,          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14},
        /* Must come last. If you add entries adjust this table appropriately and the init_one code */
        { PCI_ANY_ID,           PCI_ANY_ID,                        PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0},
        { 0, },
index c6f5fa4b4ca6b74b1ab3dc77cc5775d5a3c08b6a..ff2e217a8c84f883b85399faca8787b099c7a492 100644 (file)
@@ -21,6 +21,9 @@
  *
  *   CSB6: `Champion South Bridge' IDE Interface (optional: third channel)
  *
+ *   HT1000: AKA BCM5785 - Hypertransport Southbridge for Opteron systems. IDE
+ *   controller same as the CSB6. Single channel ATA100 only.
+ *
  * Documentation:
  *     Available under NDA only. Errata info very hard to get.
  *
@@ -71,6 +74,8 @@ static u8 svwks_ratemask (ide_drive_t *drive)
        if (!svwks_revision)
                pci_read_config_byte(dev, PCI_REVISION_ID, &svwks_revision);
 
+       if (dev->device == PCI_DEVICE_ID_SERVERWORKS_HT1000IDE)
+               return 2;
        if (dev->device == PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) {
                u32 reg = 0;
                if (isa_dev)
@@ -109,6 +114,7 @@ static u8 svwks_csb_check (struct pci_dev *dev)
                case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE:
                case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE:
                case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2:
+               case PCI_DEVICE_ID_SERVERWORKS_HT1000IDE:
                        return 1;
                default:
                        break;
@@ -438,6 +444,13 @@ static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const cha
                        btr |= (svwks_revision >= SVWKS_CSB5_REVISION_NEW) ? 0x3 : 0x2;
                pci_write_config_byte(dev, 0x5A, btr);
        }
+       /* Setup HT1000 SouthBridge Controller - Single Channel Only */
+       else if (dev->device == PCI_DEVICE_ID_SERVERWORKS_HT1000IDE) {
+               pci_read_config_byte(dev, 0x5A, &btr);
+               btr &= ~0x40;
+               btr |= 0x3;
+               pci_write_config_byte(dev, 0x5A, btr);
+       }
 
        return (dev->irq) ? dev->irq : 0;
 }
@@ -629,6 +642,15 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
                .channels       = 1,    /* 2 */
                .autodma        = AUTODMA,
                .bootable       = ON_BOARD,
+       },{     /* 4 */
+               .name           = "SvrWks HT1000",
+               .init_setup     = init_setup_svwks,
+               .init_chipset   = init_chipset_svwks,
+               .init_hwif      = init_hwif_svwks,
+               .init_dma       = init_dma_svwks,
+               .channels       = 1,    /* 2 */
+               .autodma        = AUTODMA,
+               .bootable       = ON_BOARD,
        }
 };
 
@@ -653,6 +675,7 @@ static struct pci_device_id svwks_pci_tbl[] = {
        { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
        { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
        { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
+       { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
        { 0, },
 };
 MODULE_DEVICE_TABLE(pci, svwks_pci_tbl);
index be0fcc8f4b155be497ffed8c1f767ac923bc100f..ea65b070a3675b2e3c3f2b6e1e1840f93adb6cb8 100644 (file)
@@ -1664,7 +1664,7 @@ static struct macio_driver pmac_ide_macio_driver =
 };
 
 static struct pci_device_id pmac_ide_pci_match[] = {
-       { PCI_VENDOR_ID_APPLE, PCI_DEVIEC_ID_APPLE_UNI_N_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_ATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_IPID_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_K2_ATA100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_SH_ATA,
index 77da827b2898362527c776486290df2f75821b31..18ed7765417ce7a649a987ac0b8438bbdea184ea 100644 (file)
@@ -229,6 +229,7 @@ second_chance_to_dma:
                        case PCI_DEVICE_ID_AMD_VIPER_7409:
                        case PCI_DEVICE_ID_CMD_643:
                        case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE:
+                       case PCI_DEVICE_ID_REVOLUTION:
                                simplex_stat = hwif->INB(dma_base + 2);
                                hwif->OUTB((simplex_stat&0x60),(dma_base + 2));
                                simplex_stat = hwif->INB(dma_base + 2);
index b12a970cc9a30669f75413ed32fac0337e7ba6d2..27018c8efc242ee0a660c5be9d8449597e551c42 100644 (file)
@@ -478,7 +478,6 @@ static void ohci_initialize(struct ti_ohci *ohci)
        int num_ports, i;
 
        spin_lock_init(&ohci->phy_reg_lock);
-       spin_lock_init(&ohci->event_lock);
 
        /* Put some defaults to these undefined bus options */
        buf = reg_read(ohci, OHCI1394_BusOptions);
@@ -3402,7 +3401,14 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
        /* We hopefully don't have to pre-allocate IT DMA like we did
         * for IR DMA above. Allocate it on-demand and mark inactive. */
        ohci->it_legacy_context.ohci = NULL;
+       spin_lock_init(&ohci->event_lock);
 
+       /*
+        * interrupts are disabled, all right, but... due to SA_SHIRQ we
+        * might get called anyway.  We'll see no event, of course, but
+        * we need to get to that "no event", so enough should be initialized
+        * by that point.
+        */
        if (request_irq(dev->irq, ohci_irq_handler, SA_SHIRQ,
                         OHCI1394_DRIVER_NAME, ohci))
                FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq);
index 79c8e2dd9c33cfdc0618b228067c0c1261140cb7..32cdfb30e9b46e1cead064e74f7a06ded25495e1 100644 (file)
@@ -1,6 +1,7 @@
 menu "InfiniBand support"
 
 config INFINIBAND
+       depends on PCI || BROKEN
        tristate "InfiniBand support"
        ---help---
          Core support for InfiniBand (IB).  Make sure to also select
index eb99e693dec23b6d7cc2e5dcc38e79fa4f741fac..5f6e9ea29cd772f1f819ea21d2a2ad47840b5c81 100644 (file)
@@ -130,13 +130,14 @@ static int ib_dealloc_ucontext(struct ib_ucontext *context)
 
        list_for_each_entry_safe(uobj, tmp, &context->mr_list, list) {
                struct ib_mr *mr = idr_find(&ib_uverbs_mr_idr, uobj->id);
+               struct ib_device *mrdev = mr->device;
                struct ib_umem_object *memobj;
 
                idr_remove(&ib_uverbs_mr_idr, uobj->id);
                ib_dereg_mr(mr);
 
                memobj = container_of(uobj, struct ib_umem_object, uobject);
-               ib_umem_release_on_close(mr->device, &memobj->umem);
+               ib_umem_release_on_close(mrdev, &memobj->umem);
 
                list_del(&uobj->list);
                kfree(memobj);
index f8570fd9d2abb6ec707d007a4080d91cd5b2fceb..3abd7fc6e5ef3e0331cc080a61a214b2be27066f 100644 (file)
@@ -191,8 +191,10 @@ static int __init capifs_init(void)
        err = register_filesystem(&capifs_fs_type);
        if (!err) {
                capifs_mnt = kern_mount(&capifs_fs_type);
-               if (IS_ERR(capifs_mnt))
+               if (IS_ERR(capifs_mnt)) {
                        err = PTR_ERR(capifs_mnt);
+                       unregister_filesystem(&capifs_fs_type);
+               }
        }
        if (!err)
                printk(KERN_NOTICE "capifs: Rev %s\n", rev);
index 6c7b8bffc6fdb10da595c30dd04ecb4154418685..801c98f30e5c7c767e1a39822033d68b81540626 100644 (file)
@@ -134,6 +134,7 @@ config HISAX_AVM_A1
 
 config HISAX_FRITZPCI
        bool "AVM PnP/PCI (Fritz!PnP/PCI)"
+       depends on BROKEN || !PPC64
        help
          This enables HiSax support for the AVM "Fritz!PnP" and "Fritz!PCI".
          See <file:Documentation/isdn/README.HiSax> on how to configure it.
index 65ab64c43b3e59ea16d59844064178bb4f62b2b7..bc3e096d84f75a5660e1c98ba9db99d955a1a075 100644 (file)
@@ -103,7 +103,7 @@ config PMAC_MEDIABAY
 # on non-powerbook machines (but only on PMU based ones AFAIK)
 config PMAC_BACKLIGHT
        bool "Backlight control for LCD screens"
-       depends on ADB_PMU
+       depends on ADB_PMU && (BROKEN || !PPC64)
        help
          Say Y here to build in code to manage the LCD backlight on a
          Macintosh PowerBook.  With this code, the backlight will be turned
index 480f658db6f21f11809216e905c90eb676f76268..20ca80b7dc20611de86d418faf8da69140fd764a 100644 (file)
@@ -256,8 +256,7 @@ static inline void mddev_unlock(mddev_t * mddev)
 {
        up(&mddev->reconfig_sem);
 
-       if (mddev->thread)
-               md_wakeup_thread(mddev->thread);
+       md_wakeup_thread(mddev->thread);
 }
 
 mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr)
@@ -623,6 +622,7 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev)
                mddev->raid_disks = sb->raid_disks;
                mddev->size = sb->size;
                mddev->events = md_event(sb);
+               mddev->bitmap_offset = 0;
 
                if (sb->state & (1<<MD_SB_CLEAN))
                        mddev->recovery_cp = MaxSector;
@@ -938,6 +938,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
                mddev->raid_disks = le32_to_cpu(sb->raid_disks);
                mddev->size = le64_to_cpu(sb->size)/2;
                mddev->events = le64_to_cpu(sb->events);
+               mddev->bitmap_offset = 0;
                
                mddev->recovery_cp = le64_to_cpu(sb->resync_offset);
                memcpy(mddev->uuid, sb->set_uuid, 16);
@@ -1688,6 +1689,7 @@ static int do_md_run(mddev_t * mddev)
        mddev->pers = pers[pnum];
        spin_unlock(&pers_lock);
 
+       mddev->recovery = 0;
        mddev->resync_max_sectors = mddev->size << 1; /* may be over-ridden by personality */
 
        /* before we start the array running, initialise the bitmap */
@@ -1712,6 +1714,7 @@ static int do_md_run(mddev_t * mddev)
        mddev->in_sync = 1;
        
        set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
+       md_wakeup_thread(mddev->thread);
        
        if (mddev->sb_dirty)
                md_update_sb(mddev);
@@ -1824,6 +1827,7 @@ static int do_md_stop(mddev_t * mddev, int ro)
                fput(mddev->bitmap_file);
                mddev->bitmap_file = NULL;
        }
+       mddev->bitmap_offset = 0;
 
        /*
         * Free resources if final stop
@@ -2233,8 +2237,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
                        export_rdev(rdev);
 
                set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
-               if (mddev->thread)
-                       md_wakeup_thread(mddev->thread);
+               md_wakeup_thread(mddev->thread);
                return err;
        }
 
@@ -4009,3 +4012,4 @@ EXPORT_SYMBOL(md_print_devices);
 EXPORT_SYMBOL(md_check_recovery);
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("md");
+MODULE_ALIAS_BLOCKDEV_MAJOR(MD_MAJOR);
index 63b626f70c81e1fc2769d91c3141e26d6c89d2d7..9b9d6f8ee74eb768d919297c82a9818cbeac8987 100644 (file)
@@ -70,13 +70,22 @@ EXPORT_SYMBOL(dibusb_power_ctrl);
 
 int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff)
 {
-       u8 b[2];
-       b[0] = DIBUSB_REQ_SET_IOCTL;
-       b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM;
+       u8 b[3] = { 0 };
+       int ret;
+
+       if ((ret = dibusb_streaming_ctrl(d,onoff)) < 0)
+               return ret;
 
-       dvb_usb_generic_write(d,b,3);
+       if (onoff) {
+               b[0] = DIBUSB_REQ_SET_STREAMING_MODE;
+               b[1] = 0x00;
+               if ((ret = dvb_usb_generic_write(d,b,2)) < 0)
+                       return ret;
+       }
 
-       return dibusb_streaming_ctrl(d,onoff);
+       b[0] = DIBUSB_REQ_SET_IOCTL;
+       b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM;
+       return dvb_usb_generic_write(d,b,3);
 }
 EXPORT_SYMBOL(dibusb2_0_streaming_ctrl);
 
index 3491ff40885c0f4ff7c0d550196a477f240b05a3..6fa92100248b8291b7353b070dc7347bfea67d38 100644 (file)
@@ -23,12 +23,12 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
         */
        if (newfeedcount == 0) {
                deb_ts("stop feeding\n");
+               dvb_usb_urb_kill(d);
 
                if (d->props.streaming_ctrl != NULL)
                        if ((ret = d->props.streaming_ctrl(d,0)))
                                err("error while stopping stream.");
 
-               dvb_usb_urb_kill(d);
        }
 
        d->feedcount = newfeedcount;
@@ -44,6 +44,8 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
         * for reception.
         */
        if (d->feedcount == onoff && d->feedcount > 0) {
+               deb_ts("submitting all URBs\n");
+               dvb_usb_urb_submit(d);
 
                deb_ts("controlling pid parser\n");
                if (d->props.caps & DVB_USB_HAS_PID_FILTER &&
@@ -59,7 +61,6 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
                                return -ENODEV;
                        }
 
-               dvb_usb_urb_submit(d);
        }
        return 0;
 }
index ac81e5e01a9a7b135a6aef6f155492c08333d4b2..3f5742396096dd61cbc49648c63d763bb530b84e 100644 (file)
@@ -356,7 +356,7 @@ config VIDEO_M32R_AR
 
 config VIDEO_M32R_AR_M64278
        tristate "Use Colour AR module M64278(VGA)"
-       depends on VIDEO_M32R_AR
+       depends on VIDEO_M32R_AR && PLAT_M32700UT
        ---help---
          Say Y here to use the Renesas M64278E-800 camera module,
          which supports VGA(640x480 pixcels) size of images.
index 7b293f01c9ed1309b67d0523c18191e91c5fc1ba..34b80de34faec69fa86927f501214377279d5c83 100644 (file)
@@ -1897,6 +1897,7 @@ static int cp_resume (struct pci_dev *pdev)
 {
        struct net_device *dev;
        struct cp_private *cp;
+       unsigned long flags;
 
        dev = pci_get_drvdata (pdev);
        cp  = netdev_priv(dev);
@@ -1910,6 +1911,12 @@ static int cp_resume (struct pci_dev *pdev)
        
        cp_init_hw (cp);
        netif_start_queue (dev);
+
+       spin_lock_irqsave (&cp->lock, flags);
+
+       mii_check_media(&cp->mii_if, netif_msg_link(cp), FALSE);
+
+       spin_unlock_irqrestore (&cp->lock, flags);
        
        return 0;
 }
index 8a835eb58808726eb8c7c478f6bfd3c3a450db6f..8edb6936fb9b846810645f6f3f6de4164dec172a 100644 (file)
@@ -1145,7 +1145,7 @@ config IBMVETH
          be called ibmveth.
 
 config IBM_EMAC
-       tristate "IBM PPC4xx EMAC driver support"
+       bool "IBM PPC4xx EMAC driver support"
        depends on 4xx
        select CRC32
        ---help---
@@ -1154,7 +1154,7 @@ config IBM_EMAC
 
 config IBM_EMAC_ERRMSG
        bool "Verbose error messages"
-       depends on IBM_EMAC
+       depends on IBM_EMAC && BROKEN
 
 config IBM_EMAC_RXB
        int "Number of receive buffers"
index 5fddc0ff887822fde5cbf904e3db8e46b4becca1..6440a892bb813ca4a08e0a1878cf0dedb43b254d 100644 (file)
  *                        net_device_stats
  *                      * introduced tx_timeout function
  *                      * reworked locking
+ *
+ *       01-Jul-2005   Ben Dooks <ben@simtec.co.uk>
+ *                     * fixed spinlock call without pointer
+ *                     * ensure spinlock is initialised
  */
 
 #include <linux/module.h>
@@ -148,7 +152,6 @@ static int dm9000_probe(struct device *);
 static int dm9000_open(struct net_device *);
 static int dm9000_start_xmit(struct sk_buff *, struct net_device *);
 static int dm9000_stop(struct net_device *);
-static int dm9000_do_ioctl(struct net_device *, struct ifreq *, int);
 
 
 static void dm9000_timer(unsigned long);
@@ -322,7 +325,7 @@ static void dm9000_timeout(struct net_device *dev)
 
        /* Save previous register address */
        reg_save = readb(db->io_addr);
-       spin_lock_irqsave(db->lock,flags);
+       spin_lock_irqsave(&db->lock,flags);
 
        netif_stop_queue(dev);
        dm9000_reset(db);
@@ -333,7 +336,7 @@ static void dm9000_timeout(struct net_device *dev)
 
        /* Restore previous register address */
        writeb(reg_save, db->io_addr);
-       spin_unlock_irqrestore(db->lock,flags);
+       spin_unlock_irqrestore(&db->lock,flags);
 }
 
 
@@ -387,8 +390,6 @@ dm9000_probe(struct device *dev)
        int i;
        u32 id_val;
 
-       printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME);
-
        /* Init network device */
        ndev = alloc_etherdev(sizeof (struct board_info));
        if (!ndev) {
@@ -405,6 +406,8 @@ dm9000_probe(struct device *dev)
        db = (struct board_info *) ndev->priv;
        memset(db, 0, sizeof (*db));
 
+       spin_lock_init(&db->lock);
+
        if (pdev->num_resources < 2) {
                ret = -ENODEV;
                goto out;
@@ -541,7 +544,6 @@ dm9000_probe(struct device *dev)
        ndev->stop               = &dm9000_stop;
        ndev->get_stats          = &dm9000_get_stats;
        ndev->set_multicast_list = &dm9000_hash_table;
-       ndev->do_ioctl           = &dm9000_do_ioctl;
 
 #ifdef DM9000_PROGRAM_EEPROM
        program_eeprom(db);
@@ -612,7 +614,7 @@ dm9000_open(struct net_device *dev)
 
        /* set and active a timer process */
        init_timer(&db->timer);
-       db->timer.expires  = DM9000_TIMER_WUT * 2;
+       db->timer.expires  = DM9000_TIMER_WUT;
        db->timer.data     = (unsigned long) dev;
        db->timer.function = &dm9000_timer;
        add_timer(&db->timer);
@@ -845,15 +847,6 @@ dm9000_get_stats(struct net_device *dev)
        return &db->stats;
 }
 
-/*
- *  Process the upper socket ioctl command
- */
-static int
-dm9000_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
-       PRINTK1("entering %s\n",__FUNCTION__);
-       return 0;
-}
 
 /*
  *  A periodic timer routine
@@ -864,21 +857,11 @@ dm9000_timer(unsigned long data)
 {
        struct net_device *dev = (struct net_device *) data;
        board_info_t *db = (board_info_t *) dev->priv;
-       u8 reg_save;
-       unsigned long flags;
 
        PRINTK3("dm9000_timer()\n");
 
-       spin_lock_irqsave(db->lock,flags);
-       /* Save previous register address */
-       reg_save = readb(db->io_addr);
-
        mii_check_media(&db->mii, netif_msg_link(db), 0);
 
-       /* Restore previous register address */
-       writeb(reg_save, db->io_addr);
-       spin_unlock_irqrestore(db->lock,flags);
-
        /* Set timer again */
        db->timer.expires = DM9000_TIMER_WUT;
        add_timer(&db->timer);
@@ -1098,9 +1081,14 @@ dm9000_phy_read(struct net_device *dev, int phy_reg_unused, int reg)
 {
        board_info_t *db = (board_info_t *) dev->priv;
        unsigned long flags;
+       unsigned int reg_save;
        int ret;
 
        spin_lock_irqsave(&db->lock,flags);
+
+       /* Save previous register address */
+       reg_save = readb(db->io_addr);
+
        /* Fill the phyxcer register into REG_0C */
        iow(db, DM9000_EPAR, DM9000_PHY | reg);
 
@@ -1111,6 +1099,9 @@ dm9000_phy_read(struct net_device *dev, int phy_reg_unused, int reg)
        /* The read data keeps on REG_0D & REG_0E */
        ret = (ior(db, DM9000_EPDRH) << 8) | ior(db, DM9000_EPDRL);
 
+       /* restore the previous address */
+       writeb(reg_save, db->io_addr);
+
        spin_unlock_irqrestore(&db->lock,flags);
 
        return ret;
@@ -1124,9 +1115,13 @@ dm9000_phy_write(struct net_device *dev, int phyaddr_unused, int reg, int value)
 {
        board_info_t *db = (board_info_t *) dev->priv;
        unsigned long flags;
+       unsigned long reg_save;
 
        spin_lock_irqsave(&db->lock,flags);
 
+       /* Save previous register address */
+       reg_save = readb(db->io_addr);
+
        /* Fill the phyxcer register into REG_0C */
        iow(db, DM9000_EPAR, DM9000_PHY | reg);
 
@@ -1138,6 +1133,9 @@ dm9000_phy_write(struct net_device *dev, int phyaddr_unused, int reg, int value)
        udelay(500);            /* Wait write complete */
        iow(db, DM9000_EPCR, 0x0);      /* Clear phyxcer write command */
 
+       /* restore the previous address */
+       writeb(reg_save, db->io_addr);
+
        spin_unlock_irqrestore(&db->lock,flags);
 }
 
@@ -1202,6 +1200,8 @@ static struct device_driver dm9000_driver = {
 static int __init
 dm9000_init(void)
 {
+       printk(KERN_INFO "%s Ethernet Driver\n", CARDNAME);
+
        return driver_register(&dm9000_driver); /* search board and register */
 }
 
index 5e5d2c3c7ce4a130fd0b72c014f72f903b5c597b..b82fd15d08911f3f004485c060986bc7a338d464 100644 (file)
@@ -3789,6 +3789,7 @@ 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
index f9e3be96963cde79ded8cd0b556294a6bd9987ec..0b230222bfeab592fa23ec7836accddc79df7a62 100644 (file)
@@ -308,12 +308,6 @@ static int sp_set_mac_address(struct net_device *dev, void *addr)
 {
        struct sockaddr_ax25 *sa = addr;
 
-       if (sa->sax25_family != AF_AX25)
-               return -EINVAL;
-
-       if (!sa->sax25_ndigis)
-               return -EINVAL;
-
        spin_lock_irq(&dev->xmit_lock);
        memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN);
        spin_unlock_irq(&dev->xmit_lock);
@@ -668,6 +662,9 @@ static int sixpack_open(struct tty_struct *tty)
        netif_start_queue(dev);
 
        init_timer(&sp->tx_t);
+       sp->tx_t.function = sp_xmit_on_air;
+       sp->tx_t.data = (unsigned long) sp;
+
        init_timer(&sp->resync_t);
 
        spin_unlock_bh(&sp->lock);
index 6482d994d4899aef539f2639bd70703c306d3c90..0de3bb9061741bca16cf853d89941b27355354a9 100644 (file)
@@ -1253,7 +1253,7 @@ static int emac_init_tah(struct ocp_enet_private *fep)
                 TAH_MR_CVR | TAH_MR_ST_768 | TAH_MR_TFS_10KB | TAH_MR_DTFP |
                 TAH_MR_DIG);
 
-       iounmap(&tahp);
+       iounmap(tahp);
 
        return 0;
 }
@@ -1712,11 +1712,10 @@ struct mal_commac_ops emac_commac_ops = {
 };
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
-static int emac_netpoll(struct net_device *ndev)
+static void emac_netpoll(struct net_device *ndev)
 {
        emac_rxeob_dev((void *)ndev, 0);
        emac_txeob_dev((void *)ndev, 0);
-       return 0;
 }
 #endif
 
index d520b5920d6cc866053dc23b3df7887839f52f4f..49e5467bdd7336a34dc9cb5bd5928291c683b408 100644 (file)
@@ -499,7 +499,7 @@ static int ioc3_mdio_read(struct net_device *dev, int phy, int reg)
        ioc3_w_micr((phy << MICR_PHYADDR_SHIFT) | reg | MICR_READTRIG);
        while (ioc3_r_micr() & MICR_BUSY);
 
-       return ioc3_r_micr() & MIDR_DATA_MASK;
+       return ioc3_r_midr_r() & MIDR_DATA_MASK;
 }
 
 static void ioc3_mdio_write(struct net_device *dev, int phy, int reg, int data)
@@ -1291,7 +1291,6 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        dev->features           = NETIF_F_IP_CSUM;
 #endif
 
-       ioc3_setup_duplex(ip);
        sw_physid1 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID1);
        sw_physid2 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID2);
 
@@ -1300,6 +1299,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                goto out_stop;
 
        mii_check_media(&ip->mii, 1, 1);
+       ioc3_setup_duplex(ip);
 
        vendor = (sw_physid1 << 12) | (sw_physid2 >> 4);
        model  = (sw_physid2 >> 4) & 0x3f;
@@ -1524,7 +1524,7 @@ static void ioc3_get_drvinfo (struct net_device *dev,
        struct ethtool_drvinfo *info)
 {
        struct ioc3_private *ip = netdev_priv(dev);
-                                                                                
+
         strcpy (info->driver, IOC3_NAME);
         strcpy (info->version, IOC3_VERSION);
         strcpy (info->bus_info, pci_name(ip->pdev));
@@ -1550,7 +1550,7 @@ static int ioc3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
        spin_lock_irq(&ip->ioc3_lock);
        rc = mii_ethtool_sset(&ip->mii, cmd);
        spin_unlock_irq(&ip->ioc3_lock);
-                                                                        
+
        return rc;
 }
 
index b33111e2131310e1d6b891772bcca697b2be2435..1f61f0cc95d81238a4120df48dc8a9afe2e067c0 100644 (file)
@@ -214,7 +214,7 @@ struct net_device loopback_dev = {
        .ethtool_ops            = &loopback_ethtool_ops,
 };
 
-/* Setup and register the of the LOOPBACK device. */
+/* Setup and register the loopback device. */
 int __init loopback_init(void)
 {
        struct net_device_stats *stats;
index 368b8fb140234e130baebca89121d1d47f7e43cb..6d4ab1e333b55a6579baa4362501a873f86899c2 100644 (file)
@@ -66,8 +66,8 @@
 
 #define DRV_MODULE_NAME                "tg3"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "3.35"
-#define DRV_MODULE_RELDATE     "August 6, 2005"
+#define DRV_MODULE_VERSION     "3.37"
+#define DRV_MODULE_RELDATE     "August 25, 2005"
 
 #define TG3_DEF_MAC_MODE       0
 #define TG3_DEF_RX_MODE                0
@@ -7865,8 +7865,6 @@ static int tg3_test_loopback(struct tg3 *tp)
 
        err = -EIO;
 
-       tg3_abort_hw(tp, 1);
-
        tg3_reset_hw(tp);
 
        mac_mode = (tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK) |
@@ -8970,6 +8968,8 @@ static int __devinit tg3_phy_probe(struct tg3 *tp)
                tp->phy_id = hw_phy_id;
                if (hw_phy_id_masked == PHY_ID_BCM8002)
                        tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES;
+               else
+                       tp->tg3_flags2 &= ~TG3_FLG2_PHY_SERDES;
        } else {
                if (tp->phy_id != PHY_ID_INVALID) {
                        /* Do nothing, phy ID already set up in
index 23d0fa4bbceb7bccebcdfc6acf0bbc266861bf22..7e99e9f8045e176213949a534178ada137b342d9 100644 (file)
@@ -84,7 +84,7 @@ config 3C359
 
 config TMS380TR
        tristate "Generic TMS380 Token Ring ISA/PCI adapter support"
-       depends on TR && (PCI || ISA)
+       depends on TR && (PCI || ISA && ISA_DMA_API)
        select FW_LOADER
        ---help---
          This driver provides generic support for token ring adapters
index 1d3231cc471acff346ef9dd6425d66c1b96c4276..ec3f75a030d2073248791d443d9f432027dd35bf 100644 (file)
@@ -270,7 +270,7 @@ config PCMCIA_HERMES
 
 config AIRO_CS
        tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
-       depends on NET_RADIO && PCMCIA
+       depends on NET_RADIO && PCMCIA && (BROKEN || !M32R)
        ---help---
          This is the standard Linux driver to support Cisco/Aironet PCMCIA
          802.11 wireless cards.  This driver is the same as the Aironet
index 16a2e6ae37f4b579bad45b50617d0ab62f524e4f..725a14119f2a4358706c068c6031ba8d7d64da72 100644 (file)
@@ -34,7 +34,7 @@ config PARPORT
 
 config PARPORT_PC
        tristate "PC-style hardware"
-       depends on PARPORT && (!SPARC64 || PCI) && !SPARC32
+       depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 && !M32R
        ---help---
          You should say Y here if you have a PC-style parallel port. All
          IBM PC compatible computers and some Alphas have PC-style
index 46b294a12418a65eb58055c2535a9e2f23bd39d5..2b92b9e8c910a34ddf9e118e292c583ec84b2b37 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 #ifndef _PCIEHP_H
index df4915dbc321ca21622dd187b1a8ebc852b5bfae..cafc7eadcf8056e36bcbc7dd6e7d7a1da580df52 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 0dbcf04aa35e4683a94f5d0779027a44aa4fb9a1..0e0947601526e8df2c4069609feab765cd2ce3dc 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 1cda30bd6e47c90020fec4290f15aee624f95a4f..7a0e27f0e063d40eebb4c02a3bd67b2177fb59d4 100644 (file)
@@ -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 <greg@kroah.com>,<dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com>
  *
  */
 
index 723b12c0bb7c81bbbe6b4374166d69876ad7b31d..33b539b34f7efd8e6f19f72bbd85018d25b247d9 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 966775ffb0ffcde90b3d3add9dd6b71bc72af1e5..05f20fbc5f509d6a0f9171ae8f6bf30c64fbbc0e 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 57f4e6d1b27cb39c5c40704789f39a6693a04925..305b47ec2f2cde3a8d796a0860b8793bce29f446 100644 (file)
@@ -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 <dely.l.sy@intel.com>
+ * Send feedback to <kristen.c.accardi@intel.com>
  *
  */
 
index 79a0aa6238ef1aa418994b90d5ed3b2045c0ad24..3622965f89611cda42aef572a22dc30c091140e7 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 87c90e85ede9a16e0cbd874792fda590034b353d..b10603b0e95861163f049d2f72f9b5296510ec47 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 67b6a3370ceba60697bd7da6c16be669e64f69e0..fe4d653da18849f9a7793b62630c45ec009e2139 100644 (file)
@@ -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 <greg@kroah.com>,<dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com>
  *
  */
 #ifndef _SHPCHP_H
index a70a5c5705f2dee83f0da960c3a836269735e43d..6f7d8a29957abee6e5375aac85241b23524487f1 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 490a9553a0625175d7ba02783988f6915fbc57b7..783b5abb07172e70b2f376658fce051ba4dd57c0 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 38c5d90666975ead9937347d2d3189de78bd1898..8d98410bf1c07a06a19e0c5a032acec8f27c30c7 100644 (file)
@@ -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 <greg@kroah.com>,<dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com>
  *
  */
 
index 90113e9cd69b9a1cebbf436ff227ad404b807bd3..d867099114ecfa6a973bc74dd2de2b4bf79fd102 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 88aeb978c91187111dc0430ffdb5ccd33416a5e9..057b192ce589532092798fe08ae09b5a850aa9bd 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 7957cdc72cd0464869096ffe9b59298953fdc539..d37b31658edf68590fba02176a6667222c901ed8 100644 (file)
@@ -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 <dely.l.sy@intel.com>
+ * Send feedback to <kristen.c.accardi@intel.com>
  *
  */
 
index 37fa77a98289e038b54d19f6a7c8008431b46428..ba6c549c9b9d1e9cac52709bc9b532508ed63d7c 100644 (file)
@@ -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 <greg@kroah.com>,<dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com>
  *
  */
 
index 29ccea5e57e567d41d28ea8ec2f5ee6a82d80621..21bda74ddfa53de25c6298ce75ae474282440e7e 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 88f4d9f418864cd65c64824ceb6b7ed38144156d..5f75ef7f3df293b1c01d6f9a4fe185575af51852 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index 6bc8668023c38a1180b5574ab2c6754c7c002c28..cddaaa5ee1b3d0f16dee981e3ab39609032b3813 100644 (file)
@@ -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 <greg@kroah.com>, <dely.l.sy@intel.com>
+ * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com>
  *
  */
 
index b5ab9aa6ff7c8703f842901e02497bc05dd3100d..2b85aa39f9544dd4069f5f9ef2b2abaca4ee145b 100644 (file)
@@ -453,7 +453,7 @@ static void enable_msi_mode(struct pci_dev *dev, int pos, int type)
        }
 }
 
-static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+void disable_msi_mode(struct pci_dev *dev, int pos, int type)
 {
        u16 control;
 
@@ -699,6 +699,9 @@ 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)
index d94d7af4f7a0ce850134688a4407dc95c686f44e..d00168b1f66286f8f897a0f19ea0c44e977e5361 100644 (file)
@@ -47,6 +47,12 @@ 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;
index a9160ad16581fb5bc4b1d6179c5b639d6361cc77..bb36bb69803f44dfee260410aa2f2bf89c712c0c 100644 (file)
@@ -1291,6 +1291,27 @@ 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;
index a2eebc6eaacca5a7fc6750b76c8fc180f13dbe71..6d864c502a1f71f7c1ce57ab14718bc81b11fe9c 100644 (file)
@@ -40,7 +40,7 @@
  * FIXME: IO should be max 256 bytes.  However, since we may
  * have a P2P bridge below a cardbus bridge, we need 4K.
  */
-#define CARDBUS_IO_SIZE                (4096)
+#define CARDBUS_IO_SIZE                (256)
 #define CARDBUS_MEM_SIZE       (32*1024*1024)
 
 static void __devinit
index 84eedc965688da31f9c6131104e7d52c7a9c0631..5598b4714f77ac2efaf0f545e404b4c9163c4fcf 100644 (file)
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
        if (resno < 6) {
                reg = PCI_BASE_ADDRESS_0 + 4 * resno;
        } else if (resno == PCI_ROM_RESOURCE) {
-               new |= res->flags & IORESOURCE_ROM_ENABLE;
+               if (!(res->flags & IORESOURCE_ROM_ENABLE))
+                       return;
+               new |= PCI_ROM_ADDRESS_ENABLE;
                reg = dev->rom_base_reg;
        } else {
                /* Hmm, non-standard resource. */
index 6f9fdb276402935bec47e407d014dbf30f921dff..599b116d9747211514a6522625e6830756f0d492 100644 (file)
@@ -41,6 +41,7 @@ module_param(io_speed, int, 0444);
 
 
 #ifdef CONFIG_PCMCIA_PROBE
+#include <asm/irq.h>
 /* mask of IRQs already reserved by other cards, we should avoid using them */
 static u8 pcmcia_used_irq[NR_IRQS];
 #endif
index add12f7c489a9666b53983c13077505465c33bd4..6e5229e92fbc7bc9fa6a443a9f78fff7f9867b32 100644 (file)
@@ -312,6 +312,8 @@ found:
        if (drv->link.driver.probe) {
                if (drv->link.driver.probe(&dev->dev)) {
                        dev->dev.driver = NULL;
+                       dev->card_link = NULL;
+                       up_write(&dev->dev.bus->subsys.rwsem);
                        return NULL;
                }
        }
index d36258d6665f5a697fc970630af2c436532899fa..381f339e3200a9d98d2031d1d30495c18e713a62 100644 (file)
@@ -112,7 +112,7 @@ qdio_min(int a,int b)
 
 /***************** SCRUBBER HELPER ROUTINES **********************/
 
-static inline volatile __u64 
+static inline __u64 
 qdio_get_micros(void)
 {
         return (get_clock() >> 10); /* time>>12 is microseconds */
@@ -230,7 +230,7 @@ qdio_siga_input(struct qdio_q *q)
 }
 
 /* locked by the locks in qdio_activate and qdio_cleanup */
-static __u32 * volatile 
+static __u32 volatile *
 qdio_get_indicator(void)
 {
        int i;
index 82a1d97001d77c2d37b58ac97c92a1e6fb450f43..0a3bb5a10dd48662cad66997b52814fa3a74f278 100644 (file)
 #define z90crypt_RELEASE 3     // 2 = PCIXCC, 3 = rewrite for coding standards
 #define z90crypt_VARIANT 2     // 2 = added PCIXCC MCL3 and CEX2C support
 
-/**
- * If we are not using the sparse checker, __user has no use.
- */
-#ifdef __CHECKER__
-# define __user                __attribute__((noderef, address_space(1)))
-#else
-# define __user
-#endif
-
 /**
  * struct ica_rsa_modexpo
  *
index e17b4d58a9f6d6a5b1d3009c141fdaf26123d6cd..bfe3ba73bc0f65310f58caa67e2b46412992d0c1 100644 (file)
@@ -1299,13 +1299,10 @@ struct zfcp_port *
 zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status,
                  u32 d_id)
 {
-       struct zfcp_port *port, *tmp_port;
+       struct zfcp_port *port;
        int check_wwpn;
-       scsi_id_t scsi_id;
-       int found;
 
        check_wwpn = !(status & ZFCP_STATUS_PORT_NO_WWPN);
-
        /*
         * check that there is no port with this WWPN already in list
         */
@@ -1368,7 +1365,7 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status,
        } else {
                snprintf(port->sysfs_device.bus_id,
                         BUS_ID_SIZE, "0x%016llx", wwpn);
-       port->sysfs_device.parent = &adapter->ccw_device->dev;
+               port->sysfs_device.parent = &adapter->ccw_device->dev;
        }
        port->sysfs_device.release = zfcp_sysfs_port_release;
        dev_set_drvdata(&port->sysfs_device, port);
@@ -1388,24 +1385,8 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status,
 
        zfcp_port_get(port);
 
-       scsi_id = 1;
-       found = 0;
        write_lock_irq(&zfcp_data.config_lock);
-       list_for_each_entry(tmp_port, &adapter->port_list_head, list) {
-               if (atomic_test_mask(ZFCP_STATUS_PORT_NO_SCSI_ID,
-                                    &tmp_port->status))
-                       continue;
-               if (tmp_port->scsi_id != scsi_id) {
-                       found = 1;
-                       break;
-               }
-               scsi_id++;
-       }
-       port->scsi_id = scsi_id;
-       if (found)
-               list_add_tail(&port->list, &tmp_port->list);
-       else
-               list_add_tail(&port->list, &adapter->port_list_head);
+       list_add_tail(&port->list, &adapter->port_list_head);
        atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status);
        atomic_set_mask(ZFCP_STATUS_COMMON_RUNNING, &port->status);
        if (d_id == ZFCP_DID_DIRECTORY_SERVICE)
@@ -1427,6 +1408,9 @@ zfcp_port_dequeue(struct zfcp_port *port)
        list_del(&port->list);
        port->adapter->ports--;
        write_unlock_irq(&zfcp_data.config_lock);
+       if (port->rport)
+               fc_remote_port_delete(port->rport);
+       port->rport = NULL;
        zfcp_adapter_put(port->adapter);
        zfcp_sysfs_port_remove_files(&port->sysfs_device,
                                     atomic_read(&port->status));
index 0fc46381fc22735d1a884fe24f913e200dfbb770..b30abab77da39841b8c0db3f37545fd3ae540b07 100644 (file)
@@ -202,9 +202,19 @@ static int
 zfcp_ccw_set_offline(struct ccw_device *ccw_device)
 {
        struct zfcp_adapter *adapter;
+       struct zfcp_port *port;
+       struct fc_rport *rport;
 
        down(&zfcp_data.config_sema);
        adapter = dev_get_drvdata(&ccw_device->dev);
+       /* might be racy, but we cannot take config_lock due to the fact that
+          fc_remote_port_delete might sleep */
+       list_for_each_entry(port, &adapter->port_list_head, list)
+               if (port->rport) {
+                       rport = port->rport;
+                       port->rport = NULL;
+                       fc_remote_port_delete(rport);
+               }
        zfcp_erp_adapter_shutdown(adapter, 0);
        zfcp_erp_wait(adapter);
        zfcp_adapter_scsi_unregister(adapter);
index 4103b5be768376376ae941d20e6b4feae7983f45..455e902533a9d9c8fb56a73ce932d813537d5421 100644 (file)
@@ -906,6 +906,7 @@ struct zfcp_adapter {
  */
 struct zfcp_port {
        struct device          sysfs_device;   /* sysfs device */
+       struct fc_rport        *rport;         /* rport of fc transport class */
        struct list_head       list;           /* list of remote ports */
        atomic_t               refcount;       /* reference count */
        wait_queue_head_t      remove_wq;      /* can be used to wait for
@@ -916,7 +917,6 @@ struct zfcp_port {
                                                  list */
        u32                    units;          /* # of logical units in list */
        atomic_t               status;         /* status of this remote port */
-       scsi_id_t              scsi_id;        /* own SCSI ID */
        wwn_t                  wwnn;           /* WWNN if known */
        wwn_t                  wwpn;           /* WWPN */
        fc_id_t                d_id;           /* D_ID */
index 0cf31f7d1c0f9fd1c4ec80af137e1b5d8dc9ca61..cb4f612550baf459ed752ba385dbeca823574958 100644 (file)
@@ -3360,13 +3360,32 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter,
                if ((result == ZFCP_ERP_SUCCEEDED)
                    && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY,
                                          &unit->status))
-                   && (!unit->device))
-                       scsi_add_device(unit->port->adapter->scsi_host, 0,
-                                       unit->port->scsi_id, unit->scsi_lun);
+                   && !unit->device
+                   && port->rport)
+                       scsi_add_device(port->adapter->scsi_host, 0,
+                                       port->rport->scsi_target_id,
+                                       unit->scsi_lun);
                zfcp_unit_put(unit);
                break;
        case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
        case ZFCP_ERP_ACTION_REOPEN_PORT:
+               if ((result == ZFCP_ERP_SUCCEEDED)
+                   && !atomic_test_mask(ZFCP_STATUS_PORT_NO_WWPN,
+                                        &port->status)
+                   && !port->rport) {
+                       struct fc_rport_identifiers ids;
+                       ids.node_name = port->wwnn;
+                       ids.port_name = port->wwpn;
+                       ids.port_id = port->d_id;
+                       ids.roles = FC_RPORT_ROLE_FCP_TARGET;
+                       port->rport =
+                               fc_remote_port_add(adapter->scsi_host, 0, &ids);
+                       if (!port->rport)
+                               ZFCP_LOG_NORMAL("failed registration of rport"
+                                               "(adapter %s, wwpn=0x%016Lx)\n",
+                                               zfcp_get_busid_by_port(port),
+                                               port->wwpn);
+               }
                zfcp_port_put(port);
                break;
        case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
index 42df7e57eeae48f1414e0948b3720e8b30e20d16..cd98a2de9f8fa4d997ae12d3058d186efe9e2b74 100644 (file)
@@ -143,6 +143,8 @@ extern int zfcp_scsi_command_async(struct zfcp_adapter *,struct zfcp_unit *,
                                   struct scsi_cmnd *, struct timer_list *);
 extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *,
                                  struct timer_list *);
+extern void zfcp_set_fc_host_attrs(struct zfcp_adapter *);
+extern void zfcp_set_fc_rport_attrs(struct zfcp_port *);
 extern struct scsi_transport_template *zfcp_transport_template;
 extern struct fc_function_template zfcp_transport_functions;
 
index 0d9f20edc490f8c5702e46953f8c357796eaf46d..c007b6424e746cd63854ca8b69bfefbddcfc5802 100644 (file)
@@ -2062,6 +2062,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
                zfcp_erp_adapter_shutdown(adapter, 0);
                return -EIO;
        }
+       zfcp_set_fc_host_attrs(adapter);
        return 0;
 }
 
index b61d309352c38e5ae02536e271784c030d5fb4e2..31a76065cf2838104e1ace600eea2b39775e337f 100644 (file)
@@ -389,7 +389,7 @@ zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id,
        struct zfcp_unit *unit, *retval = NULL;
 
        list_for_each_entry(port, &adapter->port_list_head, list) {
-               if (id != port->scsi_id)
+               if (!port->rport || (id != port->rport->scsi_target_id))
                        continue;
                list_for_each_entry(unit, &port->unit_list_head, list) {
                        if (lun == unit->scsi_lun) {
@@ -408,7 +408,7 @@ zfcp_port_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id)
        struct zfcp_port *port;
 
        list_for_each_entry(port, &adapter->port_list_head, list) {
-               if (id == port->scsi_id)
+               if (port->rport && (id == port->rport->scsi_target_id))
                        return port;
        }
        return (struct zfcp_port *) NULL;
@@ -634,7 +634,6 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
 {
        int retval;
        struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata;
-       struct Scsi_Host *scsi_host = scpnt->device->host;
 
        if (!unit) {
                ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n");
@@ -729,7 +728,6 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt)
 {
        int retval = 0;
        struct zfcp_unit *unit;
-       struct Scsi_Host *scsi_host = scpnt->device->host;
 
        unit = (struct zfcp_unit *) scpnt->device->hostdata;
        ZFCP_LOG_NORMAL("bus reset because of problems with "
@@ -753,7 +751,6 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
 {
        int retval = 0;
        struct zfcp_unit *unit;
-       struct Scsi_Host *scsi_host = scpnt->device->host;
 
        unit = (struct zfcp_unit *) scpnt->device->hostdata;
        ZFCP_LOG_NORMAL("host reset because of problems with "
@@ -833,6 +830,7 @@ zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter)
        shost = adapter->scsi_host;
        if (!shost)
                return;
+       fc_remove_host(shost);
        scsi_remove_host(shost);
        scsi_host_put(shost);
        adapter->scsi_host = NULL;
@@ -906,6 +904,18 @@ zfcp_get_node_name(struct scsi_target *starget)
        read_unlock_irqrestore(&zfcp_data.config_lock, flags);
 }
 
+void
+zfcp_set_fc_host_attrs(struct zfcp_adapter *adapter)
+{
+       struct Scsi_Host *shost = adapter->scsi_host;
+
+       fc_host_node_name(shost) = adapter->wwnn;
+       fc_host_port_name(shost) = adapter->wwpn;
+       strncpy(fc_host_serial_number(shost), adapter->serial_number,
+                min(FC_SERIAL_NUMBER_SIZE, 32));
+       fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3;
+}
+
 struct fc_function_template zfcp_transport_functions = {
        .get_starget_port_id = zfcp_get_port_id,
        .get_starget_port_name = zfcp_get_port_name,
@@ -913,6 +923,11 @@ struct fc_function_template zfcp_transport_functions = {
        .show_starget_port_id = 1,
        .show_starget_port_name = 1,
        .show_starget_node_name = 1,
+       .show_rport_supported_classes = 1,
+       .show_host_node_name = 1,
+       .show_host_port_name = 1,
+       .show_host_supported_classes = 1,
+       .show_host_serial_number = 1,
 };
 
 /**
index 7a84c7d474d961e25985a9cfefa8417ad0e7d6f1..c55e82d91deb103133047d823ce3b122de097271 100644 (file)
@@ -67,7 +67,6 @@ static DEVICE_ATTR(_name, S_IRUGO, zfcp_sysfs_port_##_name##_show, NULL);
 ZFCP_DEFINE_PORT_ATTR(status, "0x%08x\n", atomic_read(&port->status));
 ZFCP_DEFINE_PORT_ATTR(wwnn, "0x%016llx\n", port->wwnn);
 ZFCP_DEFINE_PORT_ATTR(d_id, "0x%06x\n", port->d_id);
-ZFCP_DEFINE_PORT_ATTR(scsi_id, "0x%x\n", port->scsi_id);
 ZFCP_DEFINE_PORT_ATTR(in_recovery, "%d\n", atomic_test_mask
                      (ZFCP_STATUS_COMMON_ERP_INUSE, &port->status));
 ZFCP_DEFINE_PORT_ATTR(access_denied, "%d\n", atomic_test_mask
@@ -263,7 +262,6 @@ static struct attribute_group zfcp_port_common_attr_group = {
 static struct attribute *zfcp_port_no_ns_attrs[] = {
        &dev_attr_unit_add.attr,
        &dev_attr_unit_remove.attr,
-       &dev_attr_scsi_id.attr,
        NULL
 };
 
index f1e8c4223ed1d2f11d1ee3485875502cf9bf2629..12c208fb18c516de702cb575cf82c8348480b53c 100644 (file)
@@ -1696,7 +1696,7 @@ config TT_DMA_EMUL
 
 config MAC_SCSI
        bool "Macintosh NCR5380 SCSI"
-       depends on MAC && SCSI
+       depends on MAC && SCSI=y
        help
          This is the NCR 5380 SCSI controller included on most of the 68030
          based Macintoshes.  If you have one of these say Y and read the
@@ -1717,7 +1717,7 @@ config SCSI_MAC_ESP
 
 config MVME147_SCSI
        bool "WD33C93 SCSI driver for MVME147"
-       depends on MVME147 && SCSI
+       depends on MVME147 && SCSI=y
        help
          Support for the on-board SCSI controller on the Motorola MVME147
          single-board computer.
@@ -1758,7 +1758,7 @@ config SUN3_SCSI
 
 config SUN3X_ESP
        bool "Sun3x ESP SCSI"
-       depends on SUN3X && SCSI
+       depends on SUN3X && SCSI=y
        help
          The ESP was an on-board SCSI controller used on Sun 3/80
          machines.  Say Y here to compile in support for it.
index c5623694d10f56a25ddc1c6f6073deaa3f250232..e3b9692b9688063e28e098617fed3980645a3f9b 100644 (file)
@@ -1105,6 +1105,7 @@ MODULE_AUTHOR("Jeff Garzik");
 MODULE_DESCRIPTION("AHCI SATA low-level driver");
 MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(pci, ahci_pci_tbl);
+MODULE_VERSION(DRV_VERSION);
 
 module_init(ahci_init);
 module_exit(ahci_exit);
index 54b32868aaf7aa6835cae3a183d115a6e9b76f8c..13f23043c8a370f507fc5e8599e5735a4c265c6f 100644 (file)
@@ -3,7 +3,7 @@
 #
 config SCSI_ACORNSCSI_3
        tristate "Acorn SCSI card (aka30) support"
-       depends on ARCH_ACORN && SCSI
+       depends on ARCH_ACORN && SCSI && BROKEN
        help
          This enables support for the Acorn SCSI card (aka30). If you have an
          Acorn system with one of these, say Y. If unsure, say N.
index a2cfade2c1c655b70b0078cdcfbbd1dd050831df..d96ebf9d22280944dccefbb78e2e60f2029694d6 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "ata_piix"
-#define DRV_VERSION    "1.03"
+#define DRV_VERSION    "1.04"
 
 enum {
        PIIX_IOCFG              = 0x54, /* IDE I/O configuration register */
index 929170dcd3cbda7bf739ca8d5dbe4b68379cd453..600ba120286468e63f0df8240e08613dee24fdf5 100644 (file)
  * 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,7 +235,6 @@ 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 */
 
        /*
@@ -1022,14 +1021,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 seglen = (u32)sg_dma_len(sl + i);
-                       sgp[i].address = (u32)sg_dma_address(sl + i);
+                       u32 busaddr = (u32)sg_dma_address(&sl[i]);
+                       u32 seglen = (u32)sl[i].length;
+                       sgp[i].address = busaddr;
                        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;
 
                /*
@@ -1976,7 +1975,6 @@ 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",
@@ -2016,16 +2014,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 = virt[idx] + (psge->address & ~PAGE_MASK);
+                       srb->virt_addr = (page_address(sg->page)
+                                          + psge->address -
+                                          (psge->address & PAGE_MASK));
                        return;
                }
                ++sg;
-               ++idx;
        }
 
        dprintkl(KERN_ERR, "sg_update_list: sg_to_virt failed\n");
@@ -2151,7 +2149,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 transfered
+                * calculate all the residue data that not yet tranfered
                 * SCSI transfer counter + left in SCSI FIFO data
                 *
                 * .....TRM_S1040_SCSI_COUNTER (24bits)
@@ -3269,7 +3267,6 @@ 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);
@@ -3279,8 +3276,6 @@ 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);
@@ -3327,7 +3322,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 *)(srb->virt_map[0] + sg->offset);
+               ptr = (struct ScsiInqData *)(page_address(sg->page) + sg->offset);
        } else {
                ptr = (struct ScsiInqData *)(cmd->request_buffer);
        }
@@ -4262,9 +4257,8 @@ 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)
-               kfree(acb->srb_array[i].segment_x);
-
-       vfree(acb->srb_array[0].virt_map);
+               if (acb->srb_array[i].segment_x)
+                       kfree(acb->srb_array[i].segment_x);
 }
 
 
@@ -4280,12 +4274,9 @@ 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--) {
@@ -4306,19 +4297,6 @@ 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;
 }
 
index 73b1f72b7e430989b261f1dd0c825d9ec02ad18e..f4e7dcb6492bcdbfed7d9dced994caf44d24d38b 100644 (file)
@@ -2268,19 +2268,6 @@ void ata_qc_prep(struct ata_queued_cmd *qc)
  *     spin_lock_irqsave(host_set lock)
  */
 
-
-
-/**
- *     ata_sg_init_one - Prepare a one-entry scatter-gather list.
- *     @qc:  Queued command
- *     @buf:  transfer buffer
- *     @buflen:  length of buf
- *
- *     Builds a single-entry scatter-gather list to initiate a
- *     transfer utilizing the specified buffer.
- *
- *     LOCKING:
- */
 void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
 {
        struct scatterlist *sg;
@@ -2312,18 +2299,6 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
  *     spin_lock_irqsave(host_set lock)
  */
 
-
-/**
- *     ata_sg_init - Assign a scatter gather list to a queued command
- *     @qc:  Queued command
- *     @sg:  Scatter-gather list
- *     @n_elem:  length of sg list
- *
- *     Attaches a scatter-gather list to a queued command.
- *
- *     LOCKING:
- */
-
 void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
                 unsigned int n_elem)
 {
index d90430bbb0de1032bc40e6835550962ac4dbdd5f..3e7f4843020f50eb58744d6dbacc1d9cb592aeb6 100644 (file)
@@ -26,7 +26,7 @@
 #define __LIBATA_H__
 
 #define DRV_NAME       "libata"
-#define DRV_VERSION    "1.11"  /* must be exactly four chars */
+#define DRV_VERSION    "1.12"  /* must be exactly four chars */
 
 struct ata_scsi_args {
        u16                     *id;
index 5c1d4411457a4a09ab2b6ad814b9d53fb9ea0b07..919fb314ad10c226ebaccdd1c8ace32980fc55d0 100644 (file)
@@ -40,7 +40,7 @@
 #include "sata_promise.h"
 
 #define DRV_NAME       "sata_promise"
-#define DRV_VERSION    "1.01"
+#define DRV_VERSION    "1.02"
 
 
 enum {
index 51292f269ce52c0fb034d6e77485b532adcb217b..e822ca0e97cf441ca7ea407266dec3a8aee132f9 100644 (file)
@@ -2971,23 +2971,22 @@ static void * dev_seq_start(struct seq_file *s, loff_t *pos)
 {
        struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL);
 
+       s->private = it;
        if (! it)
                return NULL;
+
        if (NULL == sg_dev_arr)
-               goto err1;
+               return NULL;
        it->index = *pos;
        it->max = sg_last_dev();
        if (it->index >= it->max)
-               goto err1;
+               return NULL;
        return it;
-err1:
-       kfree(it);
-       return NULL;
 }
 
 static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos)
 {
-       struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
+       struct sg_proc_deviter * it = s->private;
 
        *pos = ++it->index;
        return (it->index < it->max) ? it : NULL;
@@ -2995,7 +2994,7 @@ static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos)
 
 static void dev_seq_stop(struct seq_file *s, void *v)
 {
-       kfree (v);
+       kfree(s->private);
 }
 
 static int sg_proc_open_dev(struct inode *inode, struct file *file)
index 97034d3937fd11a1e6d80be2558b7b3f51ef9743..d5797618a3b918cc41e89187780d8d641fe49207 100644 (file)
@@ -211,7 +211,7 @@ comment "Non-8250 serial port support"
 
 config SERIAL_AMBA_PL010
        tristate "ARM AMBA PL010 serial port support"
-       depends on ARM_AMBA
+       depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE)
        select SERIAL_CORE
        help
          This selects the ARM(R) AMBA(R) PrimeCell PL010 UART.  If you have
@@ -819,7 +819,7 @@ config SERIAL_M32R_SIO_CONSOLE
 
 config SERIAL_M32R_PLDSIO
        bool "M32R SIO I/F on a PLD"
-       depends on SERIAL_M32R_SIO=y
+       depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PALT_USRV || PLAT_M32700UT)
        default n
        help
          Say Y here if you want to use the M32R serial controller
index 0301feacbde49f0b57ca842767c8df4086ea1357..9b50560b9d1625d36658f3015424e7099b438ea5 100644 (file)
@@ -1123,7 +1123,7 @@ static int __init m32r_sio_console_setup(struct console *co, char *options)
        return uart_set_options(port, co, baud, parity, bits, flow);
 }
 
-extern struct uart_driver m32r_sio_reg;
+static struct uart_driver m32r_sio_reg;
 static struct console m32r_sio_console = {
        .name           = "ttyS",
        .write          = m32r_sio_console_write,
index 840815fde49b7e92f099e1e979413691b9a6975c..12d1f14e78ce3a036da34e508fc513b28ce2af1f 100644 (file)
@@ -1093,6 +1093,7 @@ int __init sn_serial_console_early_setup(void)
                return -1;
 
        sal_console_port.sc_ops = &poll_ops;
+       spin_lock_init(&sal_console_port.sc_port.lock);
        early_sn_setup();       /* Find SAL entry points */
        register_console(&sal_console_early);
 
index 02412e31a46b18b085ef3dab1d09e01a97140b4f..3b266af3048a11d5b0510fcc381ffd1530216d04 100644 (file)
@@ -342,9 +342,6 @@ 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 */
@@ -373,15 +370,17 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs)
                }
        }
 
-       if (data[1] & 0x80) {
+       if (data[1] & 0x90) {
+               x = le16_to_cpu(*(__le16 *) &data[2]);
+               y = le16_to_cpu(*(__le16 *) &data[4]);
                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);
@@ -568,7 +567,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))
-               return;
+               goto exit;
 
        if (wacom->features->type >= INTUOS3) {
                input_report_abs(dev, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1));
index aa9d00808e4e3565ae9bd7efd079b2824c79d0aa..508a21028db420c41a3d188155d3cfb0410146e3 100644 (file)
@@ -2,6 +2,8 @@
  * 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 <linux/kernel.h>
@@ -311,7 +313,7 @@ static int __init mon_init(void)
 
        mondir = debugfs_create_dir("usbmon", NULL);
        if (IS_ERR(mondir)) {
-               printk(KERN_NOTICE TAG ": debugs is not available\n");
+               printk(KERN_NOTICE TAG ": debugfs is not available\n");
                return -ENODEV;
        }
        if (mondir == NULL) {
index ed35c18a5c44bbae2fcd5cf977ae98aeccbf8966..9b06784d2c481055368bdd92f171d68801886d3f 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * The USB Monitor, inspired by Dave Harding's USBMon.
+ *
+ * Copyright (C) 2005 Pete Zaitcev (zaitcev@redhat.com)
  */
 
 #ifndef __USB_MON_H
index 576f3b852fce39ccfff151704c1447b883e1703f..4528a00c45b010f8ad6ef103e5eaae6ba8ae83a1 100644 (file)
@@ -1922,7 +1922,7 @@ static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
 
                        // copy the packet data to the new skb
                        memcpy(skb_put(gl_skb, size), packet->packet_data, size);
-                       skb_return (dev, skb);
+                       skb_return (dev, gl_skb);
                }
 
                // advance to the next packet
index 29cd801eb958461592a5359cc7c06f0fd181138c..e32a80b39182b5dbbc06d15b2f96abf1897f9e7f 100644 (file)
@@ -346,8 +346,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs)
                        if (datalen<14)
                                goto resubmit;
                        if ((seq & IEEE802_11_SCTL_FRAG) == 0) {
-                               frag = kmalloc(sizeof(struct zd1201_frag*),
-                                   GFP_ATOMIC);
+                               frag = kmalloc(sizeof(*frag), GFP_ATOMIC);
                                if (!frag)
                                        goto resubmit;
                                skb = dev_alloc_skb(IEEE802_11_DATA_LEN +14+2);
index cbff98337aa6b37069e62bd03d4fc67c7e5eb15a..5fe182d6e4ab44bc09dc605b5980da37a915e67f 100644 (file)
@@ -6,7 +6,7 @@ menu "Console display driver support"
 
 config VGA_CONSOLE
        bool "VGA text console" if EMBEDDED || !X86
-       depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC
+       depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE
        default y
        help
          Saying Y here will allow you to use Linux in text mode through a
index d2e19f6dd72c21e57a2eeea7c97fd3ced88d52b8..4ff853fbe0bea8352bf6df8346af90d613b06031 100644 (file)
@@ -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;
+       int err, flags = info->flags;
 
        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 && info->flags & FBINFO_MISC_USEREVENT) {
+                       if (!err && (flags & FBINFO_MISC_USEREVENT)) {
                                struct fb_event event;
 
                                info->flags &= ~FBINFO_MISC_USEREVENT;
index 298bc9cd99e7f59772a8d551307ec3b9d77032d4..a112a1786855feb07b581fb184517e5622ff6762 100644 (file)
@@ -583,23 +583,6 @@ 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;
 
@@ -630,9 +613,15 @@ 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) >= MB(vram)) {
+       if (ROUND_UP_TO_PAGE(stolen_size) >= ((offset << 12) +  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);
@@ -663,11 +652,6 @@ 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;
@@ -682,6 +666,26 @@ 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 =
index c46387024b1d55717f4a8deaf5cd71dd71179a70..a78b9bd8f89752c856d05e06dc4e74c25faecdad 100644 (file)
@@ -80,7 +80,7 @@
 #include <video/radeon.h>
 #include <linux/radeonfb.h>
 
-#define DEBUG  1
+#define DEBUG  0
 
 #if DEBUG
 #define RTRACE         printk
index 8a9c4282250225c7a431ea62b3c5e87c98777f30..0bbf029b1ef1658f99b537fa690a10186275b486 100644 (file)
@@ -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_info(&dev->dev, "No devices present on the wire.\n");
+                       dev_dbg(&dev->dev, "No devices present on the wire.\n");
                        break;
                }
 
index bfc28abe1cb1c13b6a11497ff0cb0ca1ae3705e3..31ee06590de549d833be410c742da32240187d22 100644 (file)
@@ -30,7 +30,7 @@ static struct dentry *afs_mntpt_lookup(struct inode *dir,
                                       struct dentry *dentry,
                                       struct nameidata *nd);
 static int afs_mntpt_open(struct inode *inode, struct file *file);
-static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd);
+static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd);
 
 struct file_operations afs_mntpt_file_operations = {
        .open           = afs_mntpt_open,
@@ -233,7 +233,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
 /*
  * follow a link from a mountpoint directory, thus causing it to be mounted
  */
-static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct vfsmount *newmnt;
        struct dentry *old_dentry;
@@ -249,7 +249,7 @@ static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
        newmnt = afs_mntpt_do_automount(dentry);
        if (IS_ERR(newmnt)) {
                path_release(nd);
-               return PTR_ERR(newmnt);
+               return (void *)newmnt;
        }
 
        old_dentry = nd->dentry;
@@ -267,7 +267,7 @@ static int afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
        }
 
        kleave(" = %d", err);
-       return err;
+       return ERR_PTR(err);
 } /* end afs_mntpt_follow_link() */
 
 /*****************************************************************************/
index f028396f138395a3b5f2958bbf858fc1c6d27e21..52e8772b066e33fece33d73ae5ddf30568c5b4ca 100644 (file)
 
 #include "autofs_i.h"
 
-static int autofs_follow_link(struct dentry *dentry, struct nameidata *nd)
+/* Nothing to release.. */
+static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data;
        nd_set_link(nd, s);
-       return 0;
+       return NULL;
 }
 
 struct inode_operations autofs_symlink_inode_operations = {
index c265a66edf0f76555c793eb3ba463a7116b20d80..2ea2c98fd84bdc6ee03e3fda05a1d66425204caf 100644 (file)
 
 #include "autofs_i.h"
 
-static int autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct autofs_info *ino = autofs4_dentry_ino(dentry);
        nd_set_link(nd, (char *)ino->u.symlink);
-       return 0;
+       return NULL;
 }
 
 struct inode_operations autofs4_symlink_inode_operations = {
index de5bb280a82895939c6cd9cce29005b5030689ab..e0a6025f1d06a72a6423984ab838739ed0bf2bf6 100644 (file)
@@ -41,8 +41,8 @@ static struct inode *befs_alloc_inode(struct super_block *sb);
 static void befs_destroy_inode(struct inode *inode);
 static int befs_init_inodecache(void);
 static void befs_destroy_inodecache(void);
-static int befs_follow_link(struct dentry *, struct nameidata *);
-static void befs_put_link(struct dentry *, struct nameidata *);
+static void *befs_follow_link(struct dentry *, struct nameidata *);
+static void befs_put_link(struct dentry *, struct nameidata *, void *);
 static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
                        char **out, int *out_len);
 static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
@@ -461,7 +461,7 @@ befs_destroy_inodecache(void)
  * The data stream become link name. Unless the LONG_SYMLINK
  * flag is set.
  */
-static int
+static void *
 befs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
@@ -487,10 +487,10 @@ befs_follow_link(struct dentry *dentry, struct nameidata *nd)
        }
 
        nd_set_link(nd, link);
-       return 0;
+       return NULL;
 }
 
-static void befs_put_link(struct dentry *dentry, struct nameidata *nd)
+static void befs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 {
        befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
        if (befs_ino->i_flags & BEFS_LONG_SYMLINK) {
index dab4774ee7bbb6c7d9a92655a4a600d80c0da896..3196d4c4eed36fde53bc857563b2dff2d403abb9 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 78af5850c558127bde1a5c929e72f90cf7470403..1fd21f66f2435198e33eca7a2919ef42b08ef6ce 100644 (file)
@@ -83,8 +83,8 @@ extern int cifs_dir_notify(struct file *, unsigned long arg);
 extern struct dentry_operations cifs_dentry_ops;
 
 /* Functions related to symlinks */
-extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd);
-extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd);
+extern void *cifs_follow_link(struct dentry *direntry, struct nameidata *nd);
+extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *);
 extern int cifs_readlink(struct dentry *direntry, char __user *buffer, 
                         int buflen);
 extern int cifs_symlink(struct inode *inode, struct dentry *direntry,
index 3c628bf667a5f010ff17c14d2ffc04f499d80c7d..0db0b313d7150f49795c0cc2a765d1abe298f0b0 100644 (file)
@@ -2602,6 +2602,9 @@ 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;
index 30ab70ce554716df92739f0b1643ce79053497e7..3497125189dfde1a8b19506216954495fd061c7b 100644 (file)
@@ -643,7 +643,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
                         netfid, length,
                         pfLock->fl_start, numUnlock, numLock, lockType,
                         wait_flag);
-       if (rc == 0 && (pfLock->fl_flags & FL_POSIX))
+       if (pfLock->fl_flags & FL_POSIX)
                posix_lock_file_wait(file, pfLock);
        FreeXid(xid);
        return rc;
index bde0fabfece0aeeaecd9ab4b1c2cf733009975b1..ab925ef4f863c9696b9ed0a1832e9d3d6a0c0d07 100644 (file)
@@ -92,7 +92,7 @@ cifs_hl_exit:
        return rc;
 }
 
-int
+void *
 cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
 {
        struct inode *inode = direntry->d_inode;
@@ -148,7 +148,7 @@ out:
 out_no_free:
        FreeXid(xid);
        nd_set_link(nd, target_path);
-       return 0;
+       return NULL;    /* No cookie */
 }
 
 int
@@ -330,7 +330,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
        return rc;
 }
 
-void cifs_put_link(struct dentry *direntry, struct nameidata *nd)
+void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie)
 {
        char *p = nd_get_link(nd);
        if (!IS_ERR(p))
index 072b4ee8c53e1a28c51002d8a331c497a0b8c05c..20ae4153f791673d4137bf885db2b8b92cda8852 100644 (file)
@@ -611,6 +611,7 @@ 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);
index 1ecfe1f184d4fd85ca38d4f02cd2c20189572902..8b679b67e5e0f78e18dbd25015f7990cfa6f1f5a 100644 (file)
@@ -2491,11 +2491,11 @@ static int devfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
        return 0;
 }                              /*  End Function devfs_mknod  */
 
-static int devfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *devfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode);
        nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV));
-       return 0;
+       return NULL;
 }                              /*  End Function devfs_follow_link  */
 
 static struct inode_operations devfs_iops = {
index 9f7bac01d557631e5bcebde72220305dbb3dafcb..1e67d87cfa913b58c648a586235816350481fed5 100644 (file)
 #include "xattr.h"
 #include <linux/namei.h>
 
-static int ext2_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *ext2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct ext2_inode_info *ei = EXT2_I(dentry->d_inode);
        nd_set_link(nd, (char *)ei->i_data);
-       return 0;
+       return NULL;
 }
 
 struct inode_operations ext2_symlink_inode_operations = {
index 8c3e72818fb0893e0ddee74c33f46b7e09da57c4..4f79122cde670558c39a6886623c7522286b9854 100644 (file)
 #include <linux/namei.h>
 #include "xattr.h"
 
-static int ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void * ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct ext3_inode_info *ei = EXT3_I(dentry->d_inode);
        nd_set_link(nd, (char*)ei->i_data);
-       return 0;
+       return NULL;
 }
 
 struct inode_operations ext3_symlink_inode_operations = {
index ac677ab262b2b47a9581a44d730942b11b9276a3..d0401dc68d41306cef3781de18e9ac18ef7ad306 100644 (file)
@@ -38,7 +38,7 @@
 #include "vxfs_inode.h"
 
 
-static int     vxfs_immed_follow_link(struct dentry *, struct nameidata *);
+static void *  vxfs_immed_follow_link(struct dentry *, struct nameidata *);
 
 static int     vxfs_immed_readpage(struct file *, struct page *);
 
@@ -72,12 +72,12 @@ struct address_space_operations vxfs_immed_aops = {
  * Returns:
  *   Zero on success, else a negative error code.
  */
-static int
+static void *
 vxfs_immed_follow_link(struct dentry *dp, struct nameidata *np)
 {
        struct vxfs_inode_info          *vip = VXFS_INO(dp->d_inode);
        nd_set_link(np, vip->vii_immed.vi_immed);
-       return 0;
+       return NULL;
 }
 
 /**
index ff150fedb98150882dabf0b1b0af844bfe016cc7..52930915bad8c8d66eefdb4bfd4863b645ac5a21 100644 (file)
@@ -38,7 +38,7 @@ struct hppfs_inode_info {
 
 static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode)
 {
-       return(list_entry(inode, struct hppfs_inode_info, vfs_inode));
+       return container_of(inode, struct hppfs_inode_info, vfs_inode);
 }
 
 #define HPPFS_SUPER_MAGIC 0xb00000ee
@@ -662,42 +662,36 @@ static int hppfs_readlink(struct dentry *dentry, char *buffer, int buflen)
 {
        struct file *proc_file;
        struct dentry *proc_dentry;
-       int (*readlink)(struct dentry *, char *, int);
-       int err, n;
+       int ret;
 
        proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
        proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY);
-       err = PTR_ERR(proc_dentry);
-       if(IS_ERR(proc_dentry))
-               return(err);
+       if (IS_ERR(proc_file))
+               return PTR_ERR(proc_file);
 
-       readlink = proc_dentry->d_inode->i_op->readlink;
-       n = (*readlink)(proc_dentry, buffer, buflen);
+       ret = proc_dentry->d_inode->i_op->readlink(proc_dentry, buffer, buflen);
 
        fput(proc_file);
 
-       return(n);
+       return ret;
 }
 
-static int hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct file *proc_file;
        struct dentry *proc_dentry;
-       int (*follow_link)(struct dentry *, struct nameidata *);
-       int err, n;
+       void *ret;
 
        proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
        proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY);
-       err = PTR_ERR(proc_dentry);
-       if(IS_ERR(proc_dentry))
-               return(err);
+       if (IS_ERR(proc_file))
+               return proc_file;
 
-       follow_link = proc_dentry->d_inode->i_op->follow_link;
-       n = (*follow_link)(proc_dentry, nd);
+       ret = proc_dentry->d_inode->i_op->follow_link(proc_dentry, nd);
 
        fput(proc_file);
 
-       return(n);
+       return ret;
 }
 
 static struct inode_operations hppfs_dir_iops = {
index 27ebcac5e07ff8f67afe7594d25aa5d384814951..2e4e2a57708cf95dcdf348235376ef901f4dc295 100644 (file)
@@ -353,7 +353,7 @@ static int inotify_dev_get_wd(struct inotify_device *dev,
        do {
                if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL)))
                        return -ENOSPC;
-               ret = idr_get_new_above(&dev->idr, watch, dev->last_wd, &watch->wd);
+               ret = idr_get_new_above(&dev->idr, watch, dev->last_wd+1, &watch->wd);
        } while (ret == -EAGAIN);
 
        return ret;
@@ -402,7 +402,7 @@ static struct inotify_watch *create_watch(struct inotify_device *dev,
                return ERR_PTR(ret);
        }
 
-       dev->last_wd = ret;
+       dev->last_wd = watch->wd;
        watch->mask = mask;
        atomic_set(&watch->count, 0);
        INIT_LIST_HEAD(&watch->d_list);
index 97e1f088ba00b3b63f7f9ea594b756781fcf6596..d1c1f2b2c9da9796affc6be18b8793489b9f2873 100644 (file)
@@ -62,6 +62,8 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
 
                        break;
                case IOPRIO_CLASS_IDLE:
+                       if (!capable(CAP_SYS_ADMIN))
+                               return -EPERM;
                        break;
                default:
                        return -EINVAL;
index 65ab6b001dcac9d24d9d40aa8bc8527980a0587b..82ef484f5e12337ba1cc190e30275e0ebe7a9e16 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/namei.h>
 #include "nodelist.h"
 
-static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd);
+static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd);
 
 struct inode_operations jffs2_symlink_inode_operations =
 {      
@@ -27,9 +27,10 @@ struct inode_operations jffs2_symlink_inode_operations =
        .setattr =      jffs2_setattr
 };
 
-static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode);
+       char *p = (char *)f->dents;
        
        /*
         * We don't acquire the f->sem mutex here since the only data we
@@ -45,19 +46,20 @@ static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
         * nd_set_link() call.
         */
        
-       if (!f->dents) {
+       if (!p) {
                printk(KERN_ERR "jffs2_follow_link(): can't find symlink taerget\n");
-               return -EIO;
+               p = ERR_PTR(-EIO);
+       } else {
+               D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->dents));
        }
-       D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->dents));
 
-       nd_set_link(nd, (char *)f->dents);
+       nd_set_link(nd, p);
        
        /*
         * We unlock the f->sem mutex but VFS will use the f->dents string. This is safe
         * since the only way that may cause f->dents to be changed is iput() operation.
         * But VFS will not use f->dents after iput() has been called.
         */
-       return 0;
+       return NULL;
 }
 
index 2137138c59b0a4c08839121f0b89c5a55699a9b0..767c7ecb429ed6f044e1954873c73c1d719eaab8 100644 (file)
@@ -128,6 +128,10 @@ 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);
 
index 22815e88e7cc0caa85ccdf4220d2777b1929b363..d27bac6acaa346118b39bb02517987130b5cdcfb 100644 (file)
@@ -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 nosyncwait);
+static int lmLogSync(struct jfs_log * log, int hard_sync);
 
 
 
@@ -915,19 +915,17 @@ 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
- *             nosyncwait - 1 if called asynchronously
+ *             hard_sync - 1 to force all metadata to be written
  *
  * RETURN:     0
  *                     
  * serialization: LOG_LOCK() held on entry/exit
  */
-static int lmLogSync(struct jfs_log * log, int nosyncwait)
+static int lmLogSync(struct jfs_log * log, int hard_sync)
 {
        int logsize;
        int written;            /* written since last syncpt */
@@ -941,11 +939,18 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
        unsigned long flags;
 
        /* push dirty metapages out to disk */
-       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);
-       }
+       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);
+               }
 
        /*
         *      forward syncpt
@@ -1021,10 +1026,6 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
                /* 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
@@ -1049,11 +1050,12 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
  *
  * FUNCTION:   write log SYNCPT record for specified log
  *
- * PARAMETERS: log     - log structure
+ * PARAMETERS: log       - log structure
+ *             hard_sync - set to 1 to force metadata to be written
  */
-void jfs_syncpt(struct jfs_log *log)
+void jfs_syncpt(struct jfs_log *log, int hard_sync)
 {      LOG_LOCK(log);
-       lmLogSync(log, 1);
+       lmLogSync(log, hard_sync);
        LOG_UNLOCK(log);
 }
 
index 747114cd38b878c3e57f90070fa0207e36207dd5..e4978b5b65ee05000e877209b733dfb1c1355a82 100644 (file)
@@ -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);
+extern void jfs_syncpt(struct jfs_log *log, int hard_sync);
 
 #endif                         /* _H_JFS_LOGMGR */
index 121c981ff45363bef9af40c859132ba3e03007f0..c7a92f9deb2b93c269d2b945418030f37f53ba51 100644 (file)
@@ -552,6 +552,11 @@ 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 */
@@ -560,11 +565,6 @@ 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,7 +657,9 @@ 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 {
index ee32211288cefadc7b86c7d33129f6d279950ee3..9ff89720f93bab8bfeaee75ac656e04f6a0de3ee 100644 (file)
@@ -114,6 +114,8 @@ 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;
@@ -531,7 +533,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);
+               jfs_syncpt(log, 0);
        }
 
        return 0;
index 287d8d6c3cfd6fd8fd147b1c67ffa4c946ab2e69..16477b3835e1d62235ff939bcab6f32b6be454bb 100644 (file)
 #include "jfs_inode.h"
 #include "jfs_xattr.h"
 
-static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        char *s = JFS_IP(dentry->d_inode)->i_inline;
        nd_set_link(nd, s);
-       return 0;
+       return NULL;
 }
 
 struct inode_operations jfs_symlink_inode_operations = {
index 57046d98a746f06d9ce51b2321a417de7955391f..6ec1f0fefc5b017aa321738f7d3581370a91fad3 100644 (file)
@@ -501,6 +501,7 @@ struct path {
 static inline int __do_follow_link(struct path *path, struct nameidata *nd)
 {
        int error;
+       void *cookie;
        struct dentry *dentry = path->dentry;
 
        touch_atime(path->mnt, dentry);
@@ -508,13 +509,15 @@ static inline int __do_follow_link(struct path *path, struct nameidata *nd)
 
        if (path->mnt == nd->mnt)
                mntget(path->mnt);
-       error = dentry->d_inode->i_op->follow_link(dentry, nd);
-       if (!error) {
+       cookie = dentry->d_inode->i_op->follow_link(dentry, nd);
+       error = PTR_ERR(cookie);
+       if (!IS_ERR(cookie)) {
                char *s = nd_get_link(nd);
+               error = 0;
                if (s)
                        error = __vfs_follow_link(nd, s);
                if (dentry->d_inode->i_op->put_link)
-                       dentry->d_inode->i_op->put_link(dentry, nd);
+                       dentry->d_inode->i_op->put_link(dentry, nd, cookie);
        }
        dput(dentry);
        mntput(path->mnt);
@@ -2216,7 +2219,8 @@ 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);
+               fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir,
+                             new_dentry->d_inode, old_dentry->d_inode);
        }
        fsnotify_oldname_free(old_name);
 
@@ -2343,15 +2347,17 @@ out:
 int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
 {
        struct nameidata nd;
-       int res;
+       void *cookie;
+
        nd.depth = 0;
-       res = dentry->d_inode->i_op->follow_link(dentry, &nd);
-       if (!res) {
-               res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd));
+       cookie = dentry->d_inode->i_op->follow_link(dentry, &nd);
+       if (!IS_ERR(cookie)) {
+               int res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd));
                if (dentry->d_inode->i_op->put_link)
-                       dentry->d_inode->i_op->put_link(dentry, &nd);
+                       dentry->d_inode->i_op->put_link(dentry, &nd, cookie);
+               cookie = ERR_PTR(res);
        }
-       return res;
+       return PTR_ERR(cookie);
 }
 
 int vfs_follow_link(struct nameidata *nd, const char *link)
@@ -2394,23 +2400,20 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
        return res;
 }
 
-int page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
+void *page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
 {
-       struct page *page;
+       struct page *page = NULL;
        nd_set_link(nd, page_getlink(dentry, &page));
-       return 0;
+       return page;
 }
 
-void page_put_link(struct dentry *dentry, struct nameidata *nd)
+void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
 {
-       if (!IS_ERR(nd_get_link(nd))) {
-               struct page *page;
-               page = find_get_page(dentry->d_inode->i_mapping, 0);
-               if (!page)
-                       BUG();
+       struct page *page = cookie;
+
+       if (page) {
                kunmap(page);
                page_cache_release(page);
-               page_cache_release(page);
        }
 }
 
index b38a57e78a63d8fd91866b2649e58c410d2a50ec..2df639f143e8065cdd647044a4283e28fe89d092 100644 (file)
@@ -182,14 +182,16 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page)
                /* We requested READDIRPLUS, but the server doesn't grok it */
                if (error == -ENOTSUPP && desc->plus) {
                        NFS_SERVER(inode)->caps &= ~NFS_CAP_READDIRPLUS;
-                       NFS_FLAGS(inode) &= ~NFS_INO_ADVISE_RDPLUS;
+                       clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode));
                        desc->plus = 0;
                        goto again;
                }
                goto error;
        }
        SetPageUptodate(page);
-       NFS_FLAGS(inode) |= NFS_INO_INVALID_ATIME;
+       spin_lock(&inode->i_lock);
+       NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME;
+       spin_unlock(&inode->i_lock);
        /* Ensure consistent page alignment of the data.
         * Note: assumes we have exclusive access to this mapping either
         *       through inode->i_sem or some other mechanism.
@@ -462,7 +464,9 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
                                                page,
                                                NFS_SERVER(inode)->dtsize,
                                                desc->plus);
-       NFS_FLAGS(inode) |= NFS_INO_INVALID_ATIME;
+       spin_lock(&inode->i_lock);
+       NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME;
+       spin_unlock(&inode->i_lock);
        desc->page = page;
        desc->ptr = kmap(page);         /* matching kunmap in nfs_do_filldir */
        if (desc->error >= 0) {
@@ -545,7 +549,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
                        break;
                }
                if (res == -ETOOSMALL && desc->plus) {
-                       NFS_FLAGS(inode) &= ~NFS_INO_ADVISE_RDPLUS;
+                       clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode));
                        nfs_zap_caches(inode);
                        desc->plus = 0;
                        desc->entry->eof = 0;
@@ -608,7 +612,7 @@ static inline int nfs_check_verifier(struct inode *dir, struct dentry *dentry)
 {
        if (IS_ROOT(dentry))
                return 1;
-       if ((NFS_FLAGS(dir) & NFS_INO_INVALID_ATTR) != 0
+       if ((NFS_I(dir)->cache_validity & NFS_INO_INVALID_ATTR) != 0
                        || nfs_attribute_timeout(dir))
                return 0;
        return nfs_verify_change_attribute(dir, (unsigned long)dentry->d_fsdata);
@@ -935,6 +939,7 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry
        error = nfs_revalidate_inode(NFS_SERVER(dir), dir);
        if (error < 0) {
                res = ERR_PTR(error);
+               unlock_kernel();
                goto out;
        }
 
@@ -1575,11 +1580,12 @@ out:
 
 int nfs_access_get_cached(struct inode *inode, struct rpc_cred *cred, struct nfs_access_entry *res)
 {
-       struct nfs_access_entry *cache = &NFS_I(inode)->cache_access;
+       struct nfs_inode *nfsi = NFS_I(inode);
+       struct nfs_access_entry *cache = &nfsi->cache_access;
 
        if (cache->cred != cred
                        || time_after(jiffies, cache->jiffies + NFS_ATTRTIMEO(inode))
-                       || (NFS_FLAGS(inode) & NFS_INO_INVALID_ACCESS))
+                       || (nfsi->cache_validity & NFS_INO_INVALID_ACCESS))
                return -ENOENT;
        memcpy(res, cache, sizeof(*res));
        return 0;
@@ -1587,14 +1593,18 @@ int nfs_access_get_cached(struct inode *inode, struct rpc_cred *cred, struct nfs
 
 void nfs_access_add_cache(struct inode *inode, struct nfs_access_entry *set)
 {
-       struct nfs_access_entry *cache = &NFS_I(inode)->cache_access;
+       struct nfs_inode *nfsi = NFS_I(inode);
+       struct nfs_access_entry *cache = &nfsi->cache_access;
 
        if (cache->cred != set->cred) {
                if (cache->cred)
                        put_rpccred(cache->cred);
                cache->cred = get_rpccred(set->cred);
        }
-       NFS_FLAGS(inode) &= ~NFS_INO_INVALID_ACCESS;
+       /* FIXME: replace current access_cache BKL reliance with inode->i_lock */
+       spin_lock(&inode->i_lock);
+       nfsi->cache_validity &= ~NFS_INO_INVALID_ACCESS;
+       spin_unlock(&inode->i_lock);
        cache->jiffies = set->jiffies;
        cache->mask = set->mask;
 }
index 5621ba9885f48aeec57595b4003764d683b9cd04..f6b9eda925c526d18c2a1606c1e12568380a557f 100644 (file)
@@ -134,9 +134,10 @@ nfs_file_release(struct inode *inode, struct file *filp)
  */
 static int nfs_revalidate_file(struct inode *inode, struct file *filp)
 {
+       struct nfs_inode *nfsi = NFS_I(inode);
        int retval = 0;
 
-       if ((NFS_FLAGS(inode) & NFS_INO_REVAL_PAGECACHE) || nfs_attribute_timeout(inode))
+       if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE) || nfs_attribute_timeout(inode))
                retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
        nfs_revalidate_mapping(inode, filp->f_mapping);
        return 0;
@@ -164,7 +165,7 @@ static int nfs_revalidate_file_size(struct inode *inode, struct file *filp)
                goto force_reval;
        if (nfsi->npages != 0)
                return 0;
-       if (!(NFS_FLAGS(inode) & NFS_INO_REVAL_PAGECACHE) && !nfs_attribute_timeout(inode))
+       if (!(nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE) && !nfs_attribute_timeout(inode))
                return 0;
 force_reval:
        return __nfs_revalidate_inode(server, inode);
index 4845911f1c63f3e3436e5591be1b8c08b006a181..541b418327c8b18b8f30d294beca9c10d3ca732e 100644 (file)
@@ -615,14 +615,18 @@ nfs_zap_caches(struct inode *inode)
        struct nfs_inode *nfsi = NFS_I(inode);
        int mode = inode->i_mode;
 
+       spin_lock(&inode->i_lock);
+
        NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode);
        NFS_ATTRTIMEO_UPDATE(inode) = jiffies;
 
        memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode)));
        if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
-               nfsi->flags |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
+               nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
        else
-               nfsi->flags |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
+               nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
+
+       spin_unlock(&inode->i_lock);
 }
 
 static void nfs_zap_acl_cache(struct inode *inode)
@@ -632,7 +636,9 @@ static void nfs_zap_acl_cache(struct inode *inode)
        clear_acl_cache = NFS_PROTO(inode)->clear_acl_cache;
        if (clear_acl_cache != NULL)
                clear_acl_cache(inode);
-       NFS_I(inode)->flags &= ~NFS_INO_INVALID_ACL;
+       spin_lock(&inode->i_lock);
+       NFS_I(inode)->cache_validity &= ~NFS_INO_INVALID_ACL;
+       spin_unlock(&inode->i_lock);
 }
 
 /*
@@ -739,7 +745,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
                        inode->i_fop = &nfs_dir_operations;
                        if (nfs_server_capable(inode, NFS_CAP_READDIRPLUS)
                            && fattr->size <= NFS_LIMIT_READDIRPLUS)
-                               NFS_FLAGS(inode) |= NFS_INO_ADVISE_RDPLUS;
+                               set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode));
                } else if (S_ISLNK(inode->i_mode))
                        inode->i_op = &nfs_symlink_inode_operations;
                else
@@ -814,55 +820,84 @@ 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;
-                       mode = inode->i_mode & ~S_IALLUGO;
-                       mode |= attr->ia_mode & S_IALLUGO;
+                       int mode = attr->ia_mode & S_IALLUGO;
+                       mode |= inode->i_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;
-               if ((attr->ia_valid & ATTR_SIZE) != 0) {
-                       inode->i_size = attr->ia_size;
-                       vmtruncate(inode, attr->ia_size);
-               }
+               spin_lock(&inode->i_lock);
+               NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
+               spin_unlock(&inode->i_lock);
        }
-       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;
+       if ((attr->ia_valid & ATTR_SIZE) != 0) {
+               inode->i_size = attr->ia_size;
+               vmtruncate(inode, attr->ia_size);
+       }
+}
+
+static int nfs_wait_schedule(void *word)
+{
+       if (signal_pending(current))
+               return -ERESTARTSYS;
+       schedule();
+       return 0;
 }
 
 /*
  * Wait for the inode to get unlocked.
- * (Used for NFS_INO_LOCKED and NFS_INO_REVALIDATING).
  */
-static int
-nfs_wait_on_inode(struct inode *inode, int flag)
+static int nfs_wait_on_inode(struct inode *inode)
 {
        struct rpc_clnt *clnt = NFS_CLIENT(inode);
        struct nfs_inode *nfsi = NFS_I(inode);
-
+       sigset_t oldmask;
        int error;
-       if (!(NFS_FLAGS(inode) & flag))
-               return 0;
+
        atomic_inc(&inode->i_count);
-       error = nfs_wait_event(clnt, nfsi->nfs_i_wait,
-                               !(NFS_FLAGS(inode) & flag));
+       rpc_clnt_sigmask(clnt, &oldmask);
+       error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING,
+                                       nfs_wait_schedule, TASK_INTERRUPTIBLE);
+       rpc_clnt_sigunmask(clnt, &oldmask);
        iput(inode);
+
        return error;
 }
 
+static void nfs_wake_up_inode(struct inode *inode)
+{
+       struct nfs_inode *nfsi = NFS_I(inode);
+
+       clear_bit(NFS_INO_REVALIDATING, &nfsi->flags);
+       smp_mb__after_clear_bit();
+       wake_up_bit(&nfsi->flags, NFS_INO_REVALIDATING);
+}
+
 int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
 {
        struct inode *inode = dentry->d_inode;
-       struct nfs_inode *nfsi = NFS_I(inode);
-       int need_atime = nfsi->flags & NFS_INO_INVALID_ATIME;
+       int need_atime = NFS_I(inode)->cache_validity & NFS_INO_INVALID_ATIME;
        int err;
 
        if (__IS_FLG(inode, MS_NOATIME))
@@ -1008,7 +1043,7 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
        struct nfs_fattr fattr;
        struct nfs_inode *nfsi = NFS_I(inode);
        unsigned long verifier;
-       unsigned int flags;
+       unsigned long cache_validity;
 
        dfprintk(PAGECACHE, "NFS: revalidating (%s/%Ld)\n",
                inode->i_sb->s_id, (long long)NFS_FILEID(inode));
@@ -1019,18 +1054,19 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
        if (NFS_STALE(inode))
                goto out_nowait;
 
-       while (NFS_REVALIDATING(inode)) {
-               status = nfs_wait_on_inode(inode, NFS_INO_REVALIDATING);
-               if (status < 0)
-                       goto out_nowait;
-               if (NFS_ATTRTIMEO(inode) == 0)
-                       continue;
-               if (NFS_FLAGS(inode) & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ATIME))
-                       continue;
-               status = NFS_STALE(inode) ? -ESTALE : 0;
-               goto out_nowait;
+       status = nfs_wait_on_inode(inode);
+       if (status < 0)
+               goto out;
+       if (NFS_STALE(inode)) {
+               status = -ESTALE;
+               /* Do we trust the cached ESTALE? */
+               if (NFS_ATTRTIMEO(inode) != 0) {
+                       if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ATIME)) {
+                               /* no */
+                       } else
+                               goto out;
+               }
        }
-       NFS_FLAGS(inode) |= NFS_INO_REVALIDATING;
 
        /* Protect against RPC races by saving the change attribute */
        verifier = nfs_save_change_attribute(inode);
@@ -1042,7 +1078,7 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
                if (status == -ESTALE) {
                        nfs_zap_caches(inode);
                        if (!S_ISDIR(inode->i_mode))
-                               NFS_FLAGS(inode) |= NFS_INO_STALE;
+                               set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
                }
                goto out;
        }
@@ -1054,25 +1090,30 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
                         (long long)NFS_FILEID(inode), status);
                goto out;
        }
-       flags = nfsi->flags;
-       nfsi->flags &= ~NFS_INO_REVAL_PAGECACHE;
+       spin_lock(&inode->i_lock);
+       cache_validity = nfsi->cache_validity;
+       nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE;
+
        /*
         * We may need to keep the attributes marked as invalid if
         * we raced with nfs_end_attr_update().
         */
        if (verifier == nfsi->cache_change_attribute)
-               nfsi->flags &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME);
-       /* Do the page cache invalidation */
+               nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME);
+       spin_unlock(&inode->i_lock);
+
        nfs_revalidate_mapping(inode, inode->i_mapping);
-       if (flags & NFS_INO_INVALID_ACL)
+
+       if (cache_validity & NFS_INO_INVALID_ACL)
                nfs_zap_acl_cache(inode);
+
        dfprintk(PAGECACHE, "NFS: (%s/%Ld) revalidation complete\n",
                inode->i_sb->s_id,
                (long long)NFS_FILEID(inode));
 
-out:
-       NFS_FLAGS(inode) &= ~NFS_INO_REVALIDATING;
-       wake_up(&nfsi->nfs_i_wait);
+ out:
+       nfs_wake_up_inode(inode);
+
  out_nowait:
        unlock_kernel();
        return status;
@@ -1096,7 +1137,7 @@ int nfs_attribute_timeout(struct inode *inode)
  */
 int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
 {
-       if (!(NFS_FLAGS(inode) & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA))
+       if (!(NFS_I(inode)->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA))
                        && !nfs_attribute_timeout(inode))
                return NFS_STALE(inode) ? -ESTALE : 0;
        return __nfs_revalidate_inode(server, inode);
@@ -1111,19 +1152,23 @@ void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
 {
        struct nfs_inode *nfsi = NFS_I(inode);
 
-       if (nfsi->flags & NFS_INO_INVALID_DATA) {
+       if (nfsi->cache_validity & NFS_INO_INVALID_DATA) {
                if (S_ISREG(inode->i_mode)) {
                        if (filemap_fdatawrite(mapping) == 0)
                                filemap_fdatawait(mapping);
                        nfs_wb_all(inode);
                }
                invalidate_inode_pages2(mapping);
-               nfsi->flags &= ~NFS_INO_INVALID_DATA;
+
+               spin_lock(&inode->i_lock);
+               nfsi->cache_validity &= ~NFS_INO_INVALID_DATA;
                if (S_ISDIR(inode->i_mode)) {
                        memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf));
                        /* This ensures we revalidate child dentries */
                        nfsi->cache_change_attribute++;
                }
+               spin_unlock(&inode->i_lock);
+
                dfprintk(PAGECACHE, "NFS: (%s/%Ld) data cache invalidated\n",
                                inode->i_sb->s_id,
                                (long long)NFS_FILEID(inode));
@@ -1153,10 +1198,12 @@ void nfs_end_data_update(struct inode *inode)
 
        if (!nfs_have_delegation(inode, FMODE_READ)) {
                /* Mark the attribute cache for revalidation */
-               nfsi->flags |= NFS_INO_INVALID_ATTR;
+               spin_lock(&inode->i_lock);
+               nfsi->cache_validity |= NFS_INO_INVALID_ATTR;
                /* Directories and symlinks: invalidate page cache too */
                if (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))
-                       nfsi->flags |= NFS_INO_INVALID_DATA;
+                       nfsi->cache_validity |= NFS_INO_INVALID_DATA;
+               spin_unlock(&inode->i_lock);
        }
        nfsi->cache_change_attribute ++;
        atomic_dec(&nfsi->data_updates);
@@ -1181,6 +1228,8 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
        if (nfs_have_delegation(inode, FMODE_READ))
                return 0;
 
+       spin_lock(&inode->i_lock);
+
        /* Are we in the process of updating data on the server? */
        data_unstable = nfs_caches_unstable(inode);
 
@@ -1189,19 +1238,23 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
                                && nfsi->change_attr == fattr->pre_change_attr)
                        nfsi->change_attr = fattr->change_attr;
                if (nfsi->change_attr != fattr->change_attr) {
-                       nfsi->flags |= NFS_INO_INVALID_ATTR;
+                       nfsi->cache_validity |= NFS_INO_INVALID_ATTR;
                        if (!data_unstable)
-                               nfsi->flags |= NFS_INO_REVAL_PAGECACHE;
+                               nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE;
                }
        }
 
-       if ((fattr->valid & NFS_ATTR_FATTR) == 0)
+       if ((fattr->valid & NFS_ATTR_FATTR) == 0) {
+               spin_unlock(&inode->i_lock);
                return 0;
+       }
 
        /* Has the inode gone and changed behind our back? */
        if (nfsi->fileid != fattr->fileid
-                       || (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT))
+                       || (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) {
+               spin_unlock(&inode->i_lock);
                return -EIO;
+       }
 
        cur_size = i_size_read(inode);
        new_isize = nfs_size_to_loff_t(fattr->size);
@@ -1216,30 +1269,31 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
 
        /* Verify a few of the more important attributes */
        if (!timespec_equal(&inode->i_mtime, &fattr->mtime)) {
-               nfsi->flags |= NFS_INO_INVALID_ATTR;
+               nfsi->cache_validity |= NFS_INO_INVALID_ATTR;
                if (!data_unstable)
-                       nfsi->flags |= NFS_INO_REVAL_PAGECACHE;
+                       nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE;
        }
        if (cur_size != new_isize) {
-               nfsi->flags |= NFS_INO_INVALID_ATTR;
+               nfsi->cache_validity |= NFS_INO_INVALID_ATTR;
                if (nfsi->npages == 0)
-                       nfsi->flags |= NFS_INO_REVAL_PAGECACHE;
+                       nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE;
        }
 
        /* Have any file permissions changed? */
        if ((inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO)
                        || inode->i_uid != fattr->uid
                        || inode->i_gid != fattr->gid)
-               nfsi->flags |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL;
+               nfsi->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL;
 
        /* Has the link count changed? */
        if (inode->i_nlink != fattr->nlink)
-               nfsi->flags |= NFS_INO_INVALID_ATTR;
+               nfsi->cache_validity |= NFS_INO_INVALID_ATTR;
 
        if (!timespec_equal(&inode->i_atime, &fattr->atime))
-               nfsi->flags |= NFS_INO_INVALID_ATIME;
+               nfsi->cache_validity |= NFS_INO_INVALID_ATIME;
 
        nfsi->read_cache_jiffies = fattr->timestamp;
+       spin_unlock(&inode->i_lock);
        return 0;
 }
 
@@ -1278,11 +1332,15 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
                goto out_err;
        }
 
+       spin_lock(&inode->i_lock);
+
        /*
         * Make sure the inode's type hasn't changed.
         */
-       if ((inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT))
+       if ((inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) {
+               spin_unlock(&inode->i_lock);
                goto out_changed;
+       }
 
        /*
         * Update the read time so we don't revalidate too often.
@@ -1373,8 +1431,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
                                || S_ISLNK(inode->i_mode)))
                invalid &= ~NFS_INO_INVALID_DATA;
        if (!nfs_have_delegation(inode, FMODE_READ))
-               nfsi->flags |= invalid;
+               nfsi->cache_validity |= invalid;
 
+       spin_unlock(&inode->i_lock);
        return 0;
  out_changed:
        /*
@@ -1391,7 +1450,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
         */
        nfs_invalidate_inode(inode);
  out_err:
-       NFS_FLAGS(inode) |= NFS_INO_STALE;
+       set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
        return -ESTALE;
 }
 
@@ -1950,7 +2009,8 @@ static struct inode *nfs_alloc_inode(struct super_block *sb)
        nfsi = (struct nfs_inode *)kmem_cache_alloc(nfs_inode_cachep, SLAB_KERNEL);
        if (!nfsi)
                return NULL;
-       nfsi->flags = 0;
+       nfsi->flags = 0UL;
+       nfsi->cache_validity = 0UL;
 #ifdef CONFIG_NFS_V3_ACL
        nfsi->acl_access = ERR_PTR(-EAGAIN);
        nfsi->acl_default = ERR_PTR(-EAGAIN);
@@ -1982,7 +2042,6 @@ static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
                nfsi->ndirty = 0;
                nfsi->ncommit = 0;
                nfsi->npages = 0;
-               init_waitqueue_head(&nfsi->nfs_i_wait);
                nfs4_init_once(nfsi);
        }
 }
index 1b7a3ef2f8131f4f9c02534f55d5a42de4633f67..6a5bbc0ae941aa690e1f73137cbce4af38902092 100644 (file)
@@ -308,7 +308,9 @@ static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
        nfs_begin_data_update(inode);
        status = rpc_call(server->client_acl, ACLPROC3_SETACL,
                          &args, &fattr, 0);
-       NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS;
+       spin_lock(&inode->i_lock);
+       NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS;
+       spin_unlock(&inode->i_lock);
        nfs_end_data_update(inode);
        dprintk("NFS reply setacl: %d\n", status);
 
index 7851569b31c63f03a5095f503d0b1b18183273d4..2681485cf2d00f9f9fdd647a8bf1cd9861299104 100644 (file)
@@ -120,6 +120,8 @@ 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;
 }
@@ -370,6 +372,8 @@ again:
                 * 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);
        }
index 1b76f80aedb921c737586fbca6ceeac3f0f522f2..0c5a308e49638171291d22aa3630fc431ac74528 100644 (file)
@@ -753,6 +753,7 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
                 .rpc_argp       = &arg,
                 .rpc_resp       = &res,
         };
+       int status;
 
         fattr->valid = 0;
 
@@ -762,7 +763,8 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
        } else
                memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid));
 
-       return rpc_call_sync(server->client, &msg, 0);
+       status = rpc_call_sync(server->client, &msg, 0);
+       return status;
 }
 
 static int nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
@@ -1145,6 +1147,8 @@ 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);
@@ -1449,8 +1453,10 @@ 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)
+               if (status == 0) {
+                       nfs_setattr_update_inode(state->inode, sattr);
                        goto out;
+               }
        } else if (flags != 0)
                goto out;
        nfs4_close_state(state, flags);
index cedf636bcf3c9f68b53b6c979d2116f5f4a4511d..be23c3fb9260051b8069ad4afbf2257bed1ca502 100644 (file)
@@ -114,6 +114,8 @@ 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;
 }
index 6f866b8aa2d56908553972bb18ed6b700ebebfa2..6ceb1d471f2064952d8b4727a28711e821f5aba9 100644 (file)
@@ -140,7 +140,9 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode,
                if (rdata->res.eof != 0 || result == 0)
                        break;
        } while (count);
-       NFS_FLAGS(inode) |= NFS_INO_INVALID_ATIME;
+       spin_lock(&inode->i_lock);
+       NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME;
+       spin_unlock(&inode->i_lock);
 
        if (count)
                memclear_highpage_flush(page, rdata->args.pgbase, count);
@@ -473,7 +475,9 @@ void nfs_readpage_result(struct rpc_task *task)
                }
                task->tk_status = -EIO;
        }
-       NFS_FLAGS(data->inode) |= NFS_INO_INVALID_ATIME;
+       spin_lock(&data->inode->i_lock);
+       NFS_I(data->inode)->cache_validity |= NFS_INO_INVALID_ATIME;
+       spin_unlock(&data->inode->i_lock);
        data->complete(data, status);
 }
 
index 35f1065991441c3f3d02f6749692da739b8492b3..18dc95b0b64638695a9dfa9b6db1983875d9a757 100644 (file)
 
 /* Symlink caching in the page cache is even more simplistic
  * and straight-forward than readdir caching.
- *
- * At the beginning of the page we store pointer to struct page in question,
- * simplifying nfs_put_link() (if inode got invalidated we can't find the page
- * to be freed via pagecache lookup).
- * The NUL-terminated string follows immediately thereafter.
  */
 
-struct nfs_symlink {
-       struct page *page;
-       char body[0];
-};
-
 static int nfs_symlink_filler(struct inode *inode, struct page *page)
 {
-       const unsigned int pgbase = offsetof(struct nfs_symlink, body);
-       const unsigned int pglen = PAGE_SIZE - pgbase;
        int error;
 
        lock_kernel();
-       error = NFS_PROTO(inode)->readlink(inode, page, pgbase, pglen);
+       error = NFS_PROTO(inode)->readlink(inode, page, 0, PAGE_SIZE);
        unlock_kernel();
        if (error < 0)
                goto error;
@@ -60,11 +48,10 @@ error:
        return -EIO;
 }
 
-static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct inode *inode = dentry->d_inode;
        struct page *page;
-       struct nfs_symlink *p;
        void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode));
        if (err)
                goto read_failed;
@@ -78,28 +65,20 @@ static int nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
                err = ERR_PTR(-EIO);
                goto getlink_read_error;
        }
-       p = kmap(page);
-       p->page = page;
-       nd_set_link(nd, p->body);
-       return 0;
+       nd_set_link(nd, kmap(page));
+       return page;
 
 getlink_read_error:
        page_cache_release(page);
 read_failed:
        nd_set_link(nd, err);
-       return 0;
+       return NULL;
 }
 
-static void nfs_put_link(struct dentry *dentry, struct nameidata *nd)
+static void nfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
 {
-       char *s = nd_get_link(nd);
-       if (!IS_ERR(s)) {
-               struct nfs_symlink *p;
-               struct page *page;
-
-               p = container_of(s, struct nfs_symlink, body[0]);
-               page = p->page;
-
+       if (cookie) {
+               struct page *page = cookie;
                kunmap(page);
                page_cache_release(page);
        }
index 18c58c32e326281bfa7226edbaaec135b45c2b70..251e5a1bb1c4cbe0308c042073b0d83cfe71d73d 100644 (file)
@@ -239,6 +239,7 @@ 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;
index 07b9a065e9daa75ebb35fcff48e5f441376cc6f8..1697539a7171777815cf6e54bd7738e3e3fdacde 100644 (file)
@@ -287,6 +287,7 @@ out:
        svc_exit_thread(rqstp);
 
        /* Release module */
+       unlock_kernel();
        module_put_and_exit(0);
 }
 
index 9709fac6531dd7e044aee7973870e86137b51fb9..9eecc9939dfe59c5c8a22db8ff596e01eca86bec 100644 (file)
@@ -174,6 +174,9 @@ 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.
 
index 3f43bfe6184ea2b344b426313972347b0cf6fb0e..78adad7a988d981a22f61b739cc082071ddc8513 100644 (file)
@@ -924,6 +924,7 @@ static int ntfs_write_mst_block(struct page *page,
                        LCN lcn;
                        unsigned int vcn_ofs;
 
+                       bh->b_bdev = vol->sb->s_bdev;
                        /* Obtain the vcn and offset of the current block. */
                        vcn = (VCN)block << bh_size_bits;
                        vcn_ofs = vcn & vol->cluster_size_mask;
index ac9ff39aa8343eb843bb4f0ee2bb7730f969c76e..317f7c679fd3bb6edc89eee24b18e2243d3cf03e 100644 (file)
@@ -533,6 +533,7 @@ 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);
@@ -725,6 +726,7 @@ 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);
index ace151fa487865fd160546d27c07e31384fa17c9..491f2d9f89acd93fabb0d0067ee76f329bc14c2b 100644 (file)
@@ -890,7 +890,7 @@ static struct file_operations proc_seccomp_operations = {
 };
 #endif /* CONFIG_SECCOMP */
 
-static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct inode *inode = dentry->d_inode;
        int error = -EACCES;
@@ -907,7 +907,7 @@ static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
        error = PROC_I(inode)->op.proc_get_link(inode, &nd->dentry, &nd->mnt);
        nd->last_type = LAST_BIND;
 out:
-       return error;
+       return ERR_PTR(error);
 }
 
 static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt,
@@ -1692,11 +1692,11 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
        return vfs_readlink(dentry,buffer,buflen,tmp);
 }
 
-static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        char tmp[30];
        sprintf(tmp, "%d", current->tgid);
-       return vfs_follow_link(nd,tmp);
+       return ERR_PTR(vfs_follow_link(nd,tmp));
 }      
 
 static struct inode_operations proc_self_inode_operations = {
index 6c6315d04028711151627a09a29c186fec7d856a..abe8920313fb32b84ad65b78861325727ae5ce45 100644 (file)
@@ -329,10 +329,10 @@ static void release_inode_number(unsigned int inum)
        spin_unlock(&proc_inum_lock);
 }
 
-static int proc_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *proc_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        nd_set_link(nd, PDE(dentry->d_inode)->data);
-       return 0;
+       return NULL;
 }
 
 static struct inode_operations proc_link_inode_operations = {
index d9f614a57731bd08bad340ab08b0662dc99cfd58..ff291c973a567f4d9226c3840c98ea002c4ed823 100644 (file)
@@ -1985,7 +1985,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
         * iput doesn't deadlock in reiserfs_delete_xattrs. The locking
         * code really needs to be reworked, but this will take care of it
         * for now. -jeffm */
-       if (REISERFS_I(dir)->i_acl_default) {
+       if (REISERFS_I(dir)->i_acl_default && !IS_ERR(REISERFS_I(dir)->i_acl_default)) {
                reiserfs_write_unlock_xattrs(dir->i_sb);
                iput(inode);
                reiserfs_write_lock_xattrs(dir->i_sb);
index a20bbc1642dcdac2f4cfa608db569eb46e2ea66d..3549067c42d941546f4fa12ad266612a9f9f4413 100644 (file)
@@ -593,6 +593,9 @@ 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;
index 8b069e06433d567e70c3c55b4ec2c2df7f25c337..0c64bc3a0127e9c15c6f76921ea688f7eee73b6f 100644 (file)
@@ -34,7 +34,7 @@ int smb_symlink(struct inode *inode, struct dentry *dentry, const char *oldname)
        return smb_proc_symlink(server_from_dentry(dentry), dentry, oldname);
 }
 
-static int smb_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *smb_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        char *link = __getname();
        DEBUG1("followlink of %s/%s\n", DENTRY_PATH(dentry));
@@ -52,10 +52,10 @@ static int smb_follow_link(struct dentry *dentry, struct nameidata *nd)
                }
        }
        nd_set_link(nd, link);
-       return 0;
+       return NULL;
 }
 
-static void smb_put_link(struct dentry *dentry, struct nameidata *nd)
+static void smb_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 {
        char *s = nd_get_link(nd);
        if (!IS_ERR(s))
index d727dc960634a28de3df914ccb26cdc63fac98a9..970a33f03299b12731401a55dbdbe2a1c547c3c0 100644 (file)
@@ -228,6 +228,10 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name)
        struct sysfs_dirent * sd;
        struct sysfs_dirent * parent_sd = dir->d_fsdata;
 
+       if (dir->d_inode == NULL)
+               /* no inode means this hasn't been made visible yet */
+               return;
+
        down(&dir->d_inode->i_sem);
        list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
                if (!sd->s_element)
index fae57c83a722f4e782a2651e7dc0b74a66dfee76..de402fa915f2778e010d20bfeca2c6ebc05f6ddd 100644 (file)
@@ -151,17 +151,17 @@ static int sysfs_getlink(struct dentry *dentry, char * path)
 
 }
 
-static int sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        int error = -ENOMEM;
        unsigned long page = get_zeroed_page(GFP_KERNEL);
        if (page)
                error = sysfs_getlink(dentry, (char *) page); 
        nd_set_link(nd, error ? ERR_PTR(error) : (char *)page);
-       return 0;
+       return NULL;
 }
 
-static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd)
+static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
 {
        char *page = nd_get_link(nd);
        if (!IS_ERR(page))
index ed637db2dcb10293769768cb0b75ca3d6b619815..b85ce61d635ce2a41865f3f324d5fdd9095244ca 100644 (file)
@@ -8,10 +8,10 @@
 #include "sysv.h"
 #include <linux/namei.h>
 
-static int sysv_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data);
-       return 0;
+       return NULL;
 }
 
 struct inode_operations sysv_fast_symlink_inode_operations = {
index a0e49149098f2d19bb8ffec6373136758b2ce60d..337512ed57814ac1949c440ef89c2e1389ad2cfc 100644 (file)
 #include <linux/namei.h>
 #include <linux/ufs_fs.h>
 
-static int ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct ufs_inode_info *p = UFS_I(dentry->d_inode);
        nd_set_link(nd, (char*)p->i_u1.i_symlink);
-       return 0;
+       return NULL;
 }
 
 struct inode_operations ufs_fast_symlink_inode_operations = {
index 407e99359391ce68beffd4bc176f147231859f0c..f252605514eb1dce23393e4f904d6f5789c3d535 100644 (file)
@@ -374,7 +374,7 @@ linvfs_rename(
  * we need to be very careful about how much stack we use.
  * uio is kmalloced for this reason...
  */
-STATIC int
+STATIC void *
 linvfs_follow_link(
        struct dentry           *dentry,
        struct nameidata        *nd)
@@ -391,14 +391,14 @@ linvfs_follow_link(
        link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL);
        if (!link) {
                nd_set_link(nd, ERR_PTR(-ENOMEM));
-               return 0;
+               return NULL;
        }
 
        uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL);
        if (!uio) {
                kfree(link);
                nd_set_link(nd, ERR_PTR(-ENOMEM));
-               return 0;
+               return NULL;
        }
 
        vp = LINVFS_GET_VP(dentry->d_inode);
@@ -422,10 +422,10 @@ linvfs_follow_link(
        kfree(uio);
 
        nd_set_link(nd, link);
-       return 0;
+       return NULL;
 }
 
-static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd)
+static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 {
        char *s = nd_get_link(nd);
        if (!IS_ERR(s))
index c08ce970ff8c95a203bddcdfb5f82a7e1bf0c892..bdb4d66418f188767d89de67d1f4478ebbe41247 100644 (file)
@@ -443,22 +443,19 @@ __xchg_u64(volatile long *m, unsigned long val)
    if something tries to do an invalid xchg().  */
 extern void __xchg_called_with_bad_pointer(void);
 
-static inline unsigned long
-__xchg(volatile void *ptr, unsigned long x, int size)
-{
-       switch (size) {
-               case 1:
-                       return __xchg_u8(ptr, x);
-               case 2:
-                       return __xchg_u16(ptr, x);
-               case 4:
-                       return __xchg_u32(ptr, x);
-               case 8:
-                       return __xchg_u64(ptr, x);
-       }
-       __xchg_called_with_bad_pointer();
-       return x;
-}
+#define __xchg(ptr, x, size) \
+({ \
+       unsigned long __xchg__res; \
+       volatile void *__xchg__ptr = (ptr); \
+       switch (size) { \
+               case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \
+               case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \
+               case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \
+               case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \
+               default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
+       } \
+       __xchg__res; \
+})
 
 #define xchg(ptr,x)                                                         \
   ({                                                                        \
index 38c9d77d37276c6167ae6aafe0b28425fe087d7c..3745e35cc030b31f77b1ebbc07ef5d70e18e0e90 100644 (file)
@@ -7,7 +7,9 @@
 
 /*
  * We use IXP425 General purpose timer for our timer needs, it runs at 
- * 66.66... MHz
+ * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
+ * timer register ignores the bottom 2 bits of the LATCH value.
  */
-#define CLOCK_TICK_RATE (66666666)
+#define FREQ 66666666
+#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
 
index 24d11672eb601979d2ca64e3adf60dc923dfe22a..7fb02138f585985dd810407a82a8643bb3874d9f 100644 (file)
@@ -5,7 +5,7 @@
 
 #ifdef CONFIG_BUG
 #ifdef CONFIG_DEBUG_BUGVERBOSE
-extern volatile void __bug(const char *file, int line, void *data);
+extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
 
 /* give file/line information */
 #define BUG()          __bug(__FILE__, __LINE__, NULL)
index ff48022e472011a0ade2725ebc6e1cdba5028368..4679f63688e99c1471b2699a8f99ae163306edf3 100644 (file)
@@ -31,7 +31,7 @@ extern struct processor {
        /*
         * Special stuff for a reset
         */
-       volatile void (*reset)(unsigned long addr);
+       void (*reset)(unsigned long addr) __attribute__((noreturn));
        /*
         * Idle the processor
         */
index b5ec5d54665df03fe8f4fd6f3b17db687a6ae160..6723e67244fa1ef0f3b38d0fba23820438860855 100644 (file)
@@ -41,4 +41,4 @@ extern int cpu_do_idle(void);
 extern void cpu_dcache_clean_area(void *, int);
 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
-extern volatile void cpu_reset(unsigned long addr);
+extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
index ace27480886e226cdebc6c00fa55bb355da94dee..abb36e54c966b4cbed6c1b8f7fef60a60ab5e81b 100644 (file)
 #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.
index 2cbab30734d6d3e655ebd74fc3333a1d0234beed..78c85985aee36901c8b6369372643b52f3d94b65 100644 (file)
@@ -18,9 +18,11 @@ 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         0x4000
+#define PCIBIOS_MIN_IO         0x1000
 #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);
 
index 5d06e6bd6ba0bff037197c5ff047d66f47faa9fd..d0d8b0160090427328fc384baed9ab77872ecb88 100644 (file)
@@ -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))
index 4c06d455139c776f0cc2f78838dfcbeb2e24d48c..3a544ffc500860f5f1c166e3e2b9bff57e7e11b5 100644 (file)
@@ -116,6 +116,11 @@ extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
 
 extern u16 ia64_acpiid_to_sapicid[];
 
+/*
+ * Refer Intel ACPI _PDC support document for bit definitions
+ */
+#define ACPI_PDC_EST_CAPABILITY_SMP     0x8
+
 #endif /*__KERNEL__*/
 
 #endif /*_ASM_ACPI_H*/
index 491e9d1fc538d0e31cbc2ecbbf15016cd6d7d194..a2f92edd717d8aa677a1deaa8b9d0703fe2b1d12 100644 (file)
@@ -41,7 +41,7 @@
 #define IO_SPACE_BASE(space)           ((space) << IO_SPACE_BITS)
 #define IO_SPACE_PORT(port)            ((port) & (IO_SPACE_SIZE - 1))
 
-#define IO_SPACE_SPARSE_ENCODING(p)    ((((p) >> 2) << 12) | (p & 0xfff))
+#define IO_SPACE_SPARSE_ENCODING(p)    ((((p) >> 2) << 12) | ((p) & 0xfff))
 
 struct io_space {
        unsigned long mmio_base;        /* base in MMIO space */
@@ -120,14 +120,6 @@ static inline void ___ia64_mmiowb(void)
        ia64_mfa();
 }
 
-static inline const unsigned long
-__ia64_get_io_port_base (void)
-{
-       extern unsigned long ia64_iobase;
-
-       return ia64_iobase;
-}
-
 static inline void*
 __ia64_mk_io_addr (unsigned long port)
 {
index 1093f35b3b906a32f4c9fa0a01df8ab1384a25fd..a429fe225b07b4fb85de63f623640c6b2355f23e 100644 (file)
@@ -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)
index ae1525352a25fb569c3243e475aafde7e53e81c2..611432ba579c0d91f64c402c2fc115f0ef1fe487 100644 (file)
@@ -2,10 +2,12 @@
 #define __MMU_H
 
 /*
- * Type for a context number.  We declare it volatile to ensure proper ordering when it's
- * accessed outside of spinlock'd critical sections (e.g., as done in activate_mm() and
- * init_new_context()).
+ * Type for a context number.  We declare it volatile to ensure proper
+ * ordering when it's accessed outside of spinlock'd critical sections
+ * (e.g., as done in activate_mm() and init_new_context()).
  */
 typedef volatile unsigned long mm_context_t;
 
+typedef unsigned long nv_mm_context_t;
+
 #endif
index e3e5fededb04c4c63301afd1e309c1f022d749b0..0680d163be9733ee6fd45522d6e9dcf61de228d9 100644 (file)
@@ -55,34 +55,46 @@ static inline void
 delayed_tlb_flush (void)
 {
        extern void local_flush_tlb_all (void);
+       unsigned long flags;
 
        if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) {
-               local_flush_tlb_all();
-               __ia64_per_cpu_var(ia64_need_tlb_flush) = 0;
+               spin_lock_irqsave(&ia64_ctx.lock, flags);
+               {
+                       if (__ia64_per_cpu_var(ia64_need_tlb_flush)) {
+                               local_flush_tlb_all();
+                               __ia64_per_cpu_var(ia64_need_tlb_flush) = 0;
+                       }
+               }
+               spin_unlock_irqrestore(&ia64_ctx.lock, flags);
        }
 }
 
-static inline mm_context_t
+static inline nv_mm_context_t
 get_mmu_context (struct mm_struct *mm)
 {
        unsigned long flags;
-       mm_context_t context = mm->context;
-
-       if (context)
-               return context;
-
-       spin_lock_irqsave(&ia64_ctx.lock, flags);
-       {
-               /* re-check, now that we've got the lock: */
-               context = mm->context;
-               if (context == 0) {
-                       cpus_clear(mm->cpu_vm_mask);
-                       if (ia64_ctx.next >= ia64_ctx.limit)
-                               wrap_mmu_context(mm);
-                       mm->context = context = ia64_ctx.next++;
+       nv_mm_context_t context = mm->context;
+
+       if (unlikely(!context)) {
+               spin_lock_irqsave(&ia64_ctx.lock, flags);
+               {
+                       /* re-check, now that we've got the lock: */
+                       context = mm->context;
+                       if (context == 0) {
+                               cpus_clear(mm->cpu_vm_mask);
+                               if (ia64_ctx.next >= ia64_ctx.limit)
+                                       wrap_mmu_context(mm);
+                               mm->context = context = ia64_ctx.next++;
+                       }
                }
+               spin_unlock_irqrestore(&ia64_ctx.lock, flags);
        }
-       spin_unlock_irqrestore(&ia64_ctx.lock, flags);
+       /*
+        * Ensure we're not starting to use "context" before any old
+        * uses of it are gone from our TLB.
+        */
+       delayed_tlb_flush();
+
        return context;
 }
 
@@ -104,7 +116,7 @@ destroy_context (struct mm_struct *mm)
 }
 
 static inline void
-reload_context (mm_context_t context)
+reload_context (nv_mm_context_t context)
 {
        unsigned long rid;
        unsigned long rid_incr = 0;
@@ -138,7 +150,7 @@ reload_context (mm_context_t context)
 static inline void
 activate_context (struct mm_struct *mm)
 {
-       mm_context_t context;
+       nv_mm_context_t context;
 
        do {
                context = get_mmu_context(mm);
@@ -157,8 +169,6 @@ activate_context (struct mm_struct *mm)
 static inline void
 activate_mm (struct mm_struct *prev, struct mm_struct *next)
 {
-       delayed_tlb_flush();
-
        /*
         * We may get interrupts here, but that's OK because interrupt handlers cannot
         * touch user-space.
index 2303a10ee595405455d4f4520d3a334fd2fdfe56..e828377ad295cec5d77dd3a06b1bbdf06f014737 100644 (file)
@@ -75,6 +75,8 @@
 #define PAL_CACHE_READ         259     /* read tag & data of cacheline for diagnostic testing */
 #define PAL_CACHE_WRITE                260     /* write tag & data of cacheline for diagnostic testing */
 #define PAL_VM_TR_READ         261     /* read contents of translation register */
+#define PAL_GET_PSTATE         262     /* get the current P-state */
+#define PAL_SET_PSTATE         263     /* set the P-state */
 
 #ifndef __ASSEMBLY__
 
@@ -1111,6 +1113,25 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf)
        return iprv.status;
 }
 
+/* Get the current P-state information */
+static inline s64
+ia64_pal_get_pstate (u64 *pstate_index)
+{
+       struct ia64_pal_retval iprv;
+       PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0);
+       *pstate_index = iprv.v0;
+       return iprv.status;
+}
+
+/* Set the P-state */
+static inline s64
+ia64_pal_set_pstate (u64 pstate_index)
+{
+       struct ia64_pal_retval iprv;
+       PAL_CALL_STK(iprv, PAL_SET_PSTATE, pstate_index, 0, 0);
+       return iprv.status;
+}
+
 /* Cause the processor to enter LIGHT HALT state, where prefetching and execution are
  * suspended, but cache and TLB coherency is maintained.
  */
index 6ece5061dc1904256c13f062bb1de4679b4e8511..e18b5ab0cb75c0cd6ee7014260cf23bdd79a59a6 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 2003 Ken Chen <kenneth.w.chen@intel.com>
  * Copyright (C) 2003 Asit Mallick <asit.k.mallick@intel.com>
+ * Copyright (C) 2005 Christoph Lameter <clameter@sgi.com>
  *
  * Based on asm-i386/rwsem.h and other architecture implementation.
  *
@@ -11,9 +12,9 @@
  *
  * The lock count is initialized to 0 (no active and no waiting lockers).
  *
- * When a writer subtracts WRITE_BIAS, it'll get 0xffff0001 for the case
- * of an uncontended lock. Readers increment by 1 and see a positive value
- * when uncontended, negative if there are writers (and maybe) readers
+ * When a writer subtracts WRITE_BIAS, it'll get 0xffffffff00000001 for
+ * the case of an uncontended lock. Readers increment by 1 and see a positive
+ * value when uncontended, negative if there are writers (and maybe) readers
  * waiting (in which case it goes to sleep).
  */
 
@@ -29,7 +30,7 @@
  * the semaphore definition
  */
 struct rw_semaphore {
-       signed int              count;
+       signed long             count;
        spinlock_t              wait_lock;
        struct list_head        wait_list;
 #if RWSEM_DEBUG
@@ -37,10 +38,10 @@ struct rw_semaphore {
 #endif
 };
 
-#define RWSEM_UNLOCKED_VALUE           0x00000000
-#define RWSEM_ACTIVE_BIAS              0x00000001
-#define RWSEM_ACTIVE_MASK              0x0000ffff
-#define RWSEM_WAITING_BIAS             (-0x00010000)
+#define RWSEM_UNLOCKED_VALUE           __IA64_UL_CONST(0x0000000000000000)
+#define RWSEM_ACTIVE_BIAS              __IA64_UL_CONST(0x0000000000000001)
+#define RWSEM_ACTIVE_MASK              __IA64_UL_CONST(0x00000000ffffffff)
+#define RWSEM_WAITING_BIAS             -__IA64_UL_CONST(0x0000000100000000)
 #define RWSEM_ACTIVE_READ_BIAS         RWSEM_ACTIVE_BIAS
 #define RWSEM_ACTIVE_WRITE_BIAS                (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
 
@@ -83,7 +84,7 @@ init_rwsem (struct rw_semaphore *sem)
 static inline void
 __down_read (struct rw_semaphore *sem)
 {
-       int result = ia64_fetchadd4_acq((unsigned int *)&sem->count, 1);
+       long result = ia64_fetchadd8_acq((unsigned long *)&sem->count, 1);
 
        if (result < 0)
                rwsem_down_read_failed(sem);
@@ -95,7 +96,7 @@ __down_read (struct rw_semaphore *sem)
 static inline void
 __down_write (struct rw_semaphore *sem)
 {
-       int old, new;
+       long old, new;
 
        do {
                old = sem->count;
@@ -112,7 +113,7 @@ __down_write (struct rw_semaphore *sem)
 static inline void
 __up_read (struct rw_semaphore *sem)
 {
-       int result = ia64_fetchadd4_rel((unsigned int *)&sem->count, -1);
+       long result = ia64_fetchadd8_rel((unsigned long *)&sem->count, -1);
 
        if (result < 0 && (--result & RWSEM_ACTIVE_MASK) == 0)
                rwsem_wake(sem);
@@ -124,7 +125,7 @@ __up_read (struct rw_semaphore *sem)
 static inline void
 __up_write (struct rw_semaphore *sem)
 {
-       int old, new;
+       long old, new;
 
        do {
                old = sem->count;
@@ -141,7 +142,7 @@ __up_write (struct rw_semaphore *sem)
 static inline int
 __down_read_trylock (struct rw_semaphore *sem)
 {
-       int tmp;
+       long tmp;
        while ((tmp = sem->count) >= 0) {
                if (tmp == cmpxchg_acq(&sem->count, tmp, tmp+1)) {
                        return 1;
@@ -156,7 +157,7 @@ __down_read_trylock (struct rw_semaphore *sem)
 static inline int
 __down_write_trylock (struct rw_semaphore *sem)
 {
-       int tmp = cmpxchg_acq(&sem->count, RWSEM_UNLOCKED_VALUE,
+       long tmp = cmpxchg_acq(&sem->count, RWSEM_UNLOCKED_VALUE,
                              RWSEM_ACTIVE_WRITE_BIAS);
        return tmp == RWSEM_UNLOCKED_VALUE;
 }
@@ -167,7 +168,7 @@ __down_write_trylock (struct rw_semaphore *sem)
 static inline void
 __downgrade_write (struct rw_semaphore *sem)
 {
-       int old, new;
+       long old, new;
 
        do {
                old = sem->count;
@@ -182,7 +183,7 @@ __downgrade_write (struct rw_semaphore *sem)
  * Implement atomic add functionality.  These used to be "inline" functions, but GCC v3.1
  * doesn't quite optimize this stuff right and ends up with bad calls to fetchandadd.
  */
-#define rwsem_atomic_add(delta, sem)   atomic_add(delta, (atomic_t *)(&(sem)->count))
-#define rwsem_atomic_update(delta, sem)        atomic_add_return(delta, (atomic_t *)(&(sem)->count))
+#define rwsem_atomic_add(delta, sem)   atomic64_add(delta, (atomic64_t *)(&(sem)->count))
+#define rwsem_atomic_update(delta, sem)        atomic64_add_return(delta, (atomic64_t *)(&(sem)->count))
 
 #endif /* _ASM_IA64_RWSEM_H */
index 909936f25512e8ebbc3967d0eb775a12c989dd03..d2430aa0d49db76db4b6c771bc1eb9a9bc402d36 100644 (file)
@@ -93,7 +93,15 @@ _raw_spin_lock_flags (spinlock_t *lock, unsigned long flags)
 # endif /* CONFIG_MCKINLEY */
 #endif
 }
+
 #define _raw_spin_lock(lock) _raw_spin_lock_flags(lock, 0)
+
+/* Unlock by doing an ordered store and releasing the cacheline with nta */
+static inline void _raw_spin_unlock(spinlock_t *x) {
+       barrier();
+       asm volatile ("st4.rel.nta [%0] = r0\n\t" :: "r"(x));
+}
+
 #else /* !ASM_SUPPORTED */
 #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
 # define _raw_spin_lock(x)                                                             \
@@ -109,16 +117,16 @@ do {                                                                                      \
                } while (ia64_spinlock_val);                                            \
        }                                                                               \
 } while (0)
+#define _raw_spin_unlock(x)    do { barrier(); ((spinlock_t *) x)->lock = 0; } while (0)
 #endif /* !ASM_SUPPORTED */
 
 #define spin_is_locked(x)      ((x)->lock != 0)
-#define _raw_spin_unlock(x)    do { barrier(); ((spinlock_t *) x)->lock = 0; } while (0)
 #define _raw_spin_trylock(x)   (cmpxchg_acq(&(x)->lock, 0, 1) == 0)
 #define spin_unlock_wait(x)    do { barrier(); } while ((x)->lock)
 
 typedef struct {
-       volatile unsigned int read_counter      : 31;
-       volatile unsigned int write_lock        :  1;
+       volatile unsigned int read_counter      : 24;
+       volatile unsigned int write_lock        :  8;
 #ifdef CONFIG_PREEMPT
        unsigned int break_lock;
 #endif
@@ -174,6 +182,13 @@ do {                                                                               \
        (result == 0);                                                          \
 })
 
+static inline void _raw_write_unlock(rwlock_t *x)
+{
+       u8 *y = (u8 *)x;
+       barrier();
+       asm volatile ("st1.rel.nta [%0] = r0\n\t" :: "r"(y+3) : "memory" );
+}
+
 #else /* !ASM_SUPPORTED */
 
 #define _raw_write_lock(l)                                                             \
@@ -195,14 +210,14 @@ do {                                                                              \
        (ia64_val == 0);                                                \
 })
 
+static inline void _raw_write_unlock(rwlock_t *x)
+{
+       barrier();
+       x->write_lock = 0;
+}
+
 #endif /* !ASM_SUPPORTED */
 
 #define _raw_read_trylock(lock) generic_raw_read_trylock(lock)
 
-#define _raw_write_unlock(x)                                                           \
-({                                                                                     \
-       smp_mb__before_clear_bit();     /* need barrier before releasing lock... */     \
-       clear_bit(31, (x));                                                             \
-})
-
 #endif /*  _ASM_IA64_SPINLOCK_H */
index b9a20cdad65f4a7c4208e6407b1bc2fdd7218f0d..7885b7df84a2b5209d26bfd639f28082999f9728 100644 (file)
@@ -61,9 +61,7 @@ extern physid_mask_t phys_cpu_present_map;
  * Some lowlevel functions might want to know about
  * the real CPU ID <-> CPU # mapping.
  */
-extern volatile int physid_2_cpu[NR_CPUS];
 extern volatile int cpu_2_physid[NR_CPUS];
-#define physid_to_cpu(physid)  physid_2_cpu[physid]
 #define cpu_to_physid(cpu_id)  cpu_2_physid[cpu_id]
 
 #define raw_smp_processor_id() (current_thread_info()->cpu)
index 99a51670921089fb3a30b9a95ff8e005febe8d92..206313e2a817798a3e6eb8d77f52230d19fa59b7 100644 (file)
@@ -138,13 +138,13 @@ extern unsigned long m68k_memoffset;
 #define __pa(vaddr)            ((unsigned long)(vaddr)+m68k_memoffset)
 #define __va(paddr)            ((void *)((unsigned long)(paddr)-m68k_memoffset))
 #else
-#define __pa(vaddr)            virt_to_phys((void *)vaddr)
-#define __va(paddr)            phys_to_virt((unsigned long)paddr)
+#define __pa(vaddr)            virt_to_phys((void *)(vaddr))
+#define __va(paddr)            phys_to_virt((unsigned long)(paddr))
 #endif
 
 #else  /* !CONFIG_SUN3 */
 /* This #define is a horrible hack to suppress lots of warnings. --m */
-#define __pa(x) ___pa((unsigned long)x)
+#define __pa(x) ___pa((unsigned long)(x))
 static inline unsigned long ___pa(unsigned long x)
 {
      if(x == 0)
index 21e41c9b7267e42ea25232ebd58c93daf3f01954..e5374be86aefb90a39e608ef09ed002eab7decfe 100644 (file)
 #define MQ0_CONFIG_SIZE_2G             0x0000c000
 
 /* Internal SRAM Controller 440GX/440SP */
-#ifdef CONFIG_440SP
-#define DCRN_SRAM0_BASE                0x100
-#else /* 440GX */
 #define DCRN_SRAM0_BASE                0x000
-#endif
 
 #define DCRN_SRAM0_SB0CR       (DCRN_SRAM0_BASE + 0x020)
 #define DCRN_SRAM0_SB1CR       (DCRN_SRAM0_BASE + 0x021)
index 8636cdbf6f8f36428b49346d86e8604a2481d314..a415001165fabd74f1d53f3c1c5dcbc07674ef7c 100644 (file)
@@ -285,7 +285,7 @@ typedef uint32_t sgl_handle_t;
 
 #define GET_DMA_POLARITY(chan) (DMAReq_ActiveLow(chan) | DMAAck_ActiveLow(chan) | EOT_ActiveLow(chan))
 
-#elif defined(CONFIG_STBXXX_DMA)               /* stb03xxx */
+#elif defined(CONFIG_STB03xxx)         /* stb03xxx */
 
 #define DMA_PPC4xx_SIZE        4096
 
index ce09b47fa819c64333e1fd3a576d93714cbffe0c..321fb75b5f222f7a20ca3841fedf5b040ba823cf 100644 (file)
@@ -58,7 +58,7 @@ static __inline__ void set_dec(unsigned int val)
 /* Accessor functions for the timebase (RTC on 601) registers. */
 /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
 #ifdef CONFIG_6xx
-extern __inline__ int const __USE_RTC(void) {
+extern __inline__ int __attribute_pure__ __USE_RTC(void) {
        return (mfspr(SPRN_PVR)>>16) == 1;
 }
 #else
index 169868fa307defa30c7782cea4b96b2ab278ac54..1601782788610748de11a46dd6cfa288f3dc7a5e 100644 (file)
@@ -43,8 +43,8 @@ struct bug_entry *find_bug(unsigned long bugaddr);
                ".section __bug_table,\"a\"\n\t"                \
                "       .llong 1b,%1,%2,%3\n"                   \
                ".previous"                                     \
-               : : "r" (x), "i" (__LINE__), "i" (__FILE__),    \
-                   "i" (__FUNCTION__));                        \
+               : : "r" ((long long)(x)), "i" (__LINE__),       \
+                   "i" (__FILE__), "i" (__FUNCTION__));        \
 } while (0)
 
 #define WARN_ON(x) do {                                                \
@@ -53,7 +53,8 @@ struct bug_entry *find_bug(unsigned long bugaddr);
                ".section __bug_table,\"a\"\n\t"                \
                "       .llong 1b,%1,%2,%3\n"                   \
                ".previous"                                     \
-               : : "r" (x), "i" (__LINE__ + BUG_WARNING_TRAP), \
+               : : "r" ((long long)(x)),                       \
+                   "i" (__LINE__ + BUG_WARNING_TRAP),          \
                    "i" (__FILE__), "i" (__FUNCTION__));        \
 } while (0)
 
index 5c32e38c1c0168aab1fa9fc202f3e9f6973709d8..a6840b186d03b87c1967ddb9cf945a3a8be53fb1 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef _LPARMAP_H
 #define _LPARMAP_H
 
+#ifndef __ASSEMBLY__
+
 #include <asm/types.h>
 
 /*
@@ -71,6 +73,11 @@ struct LparMap {
        } xRanges[HvRangesToMap];
 };
 
-extern struct LparMap          xLparMap;
+extern const struct LparMap    xLparMap;
+
+#endif /* __ASSEMBLY__ */
+
+/* the fixed address where the LparMap exists */
+#define LPARMAP_PHYS           0x7000
 
 #endif /* _LPARMAP_H */
index a7f43a251f81b5e4feb14e3c84428f4a99d1bd82..3e3bfe6a8fa84188f86f1acef2d17e84814771c3 100644 (file)
@@ -149,11 +149,11 @@ struct exception_table_entry
 })
 #endif
 
-#ifndef __CHECKER__
 #define __put_user(x, ptr) \
 ({                                                             \
        __typeof__(*(ptr)) __x = (x);                           \
        int __pu_err;                                           \
+        __chk_user_ptr(ptr);                                    \
        switch (sizeof (*(ptr))) {                              \
        case 1:                                                 \
        case 2:                                                 \
@@ -167,14 +167,6 @@ struct exception_table_entry
         }                                                      \
        __pu_err;                                               \
 })
-#else
-#define __put_user(x, ptr)                     \
-({                                             \
-       void __user *p;                         \
-       p = (ptr);                              \
-       0;                                      \
-})
-#endif
 
 #define put_user(x, ptr)                                       \
 ({                                                             \
@@ -213,11 +205,11 @@ extern int __put_user_bad(void) __attribute__((noreturn));
 })
 #endif
 
-#ifndef __CHECKER__
 #define __get_user(x, ptr)                                     \
 ({                                                             \
        __typeof__(*(ptr)) __x;                                 \
        int __gu_err;                                           \
+        __chk_user_ptr(ptr);                                    \
        switch (sizeof(*(ptr))) {                               \
        case 1:                                                 \
        case 2:                                                 \
@@ -232,15 +224,6 @@ extern int __put_user_bad(void) __attribute__((noreturn));
        (x) = __x;                                              \
        __gu_err;                                               \
 })
-#else
-#define __get_user(x, ptr)                     \
-({                                             \
-       void __user *p;                         \
-       p = (ptr);                              \
-       0;                                      \
-})
-#endif
-
 
 #define get_user(x, ptr)                                       \
 ({                                                             \
index 245447081f0d42693bfb52b47d216fc5ef26b61f..ea89e8f223eae1264e6a8fb29e7fb92e6eec6a97 100644 (file)
 #define __NR_add_key           285
 #define __NR_request_key       286
 #define __NR_keyctl            287
+#define __NR_ioprio_set                288
+#define __NR_ioprio_get                289
+#define __NR_inotify_init      290
+#define __NR_inotify_add_watch 291
+#define __NR_inotify_rm_watch  292
 
-#define NR_syscalls 288
+
+#define NR_syscalls 293
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */
 
@@ -406,7 +412,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   #0x15" \
+__asm__ __volatile__ ("trapa   #0x16" \
        : "=z" (__sc0) \
        : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7),  \
          "r" (__sc3), "r" (__sc1) \
index 95f0b130405c420a23d52618fa8dc854cb4e245b..2a1cfa404ea4b1b432c41eef1395882e4aabf465 100644 (file)
 #define __NR_add_key           313
 #define __NR_request_key       314
 #define __NR_keyctl            315
+#define __NR_ioprio_set                316
+#define __NR_ioprio_get                317
+#define __NR_inotify_init      318
+#define __NR_inotify_add_watch 319
+#define __NR_inotify_rm_watch  320
 
-#define NR_syscalls 316
+#define NR_syscalls 321
 
 /* user-visible error numbers are in the range -1 - -125: see <asm-sh64/errno.h> */
 
index 352d9943661af3738a05c0b29748a8937692f44f..c94d8b3991bdde0cf93be99e258f8798298db7e3 100644 (file)
@@ -68,6 +68,9 @@ struct thread_info {
 
        struct restart_block    restart_block;
 
+       struct pt_regs          *kern_una_regs;
+       unsigned int            kern_una_insn;
+
        unsigned long           fpregs[0] __attribute__ ((aligned(64)));
 };
 
@@ -103,6 +106,8 @@ struct thread_info {
 #define TI_PCR         0x00000490
 #define TI_CEE_STUFF   0x00000498
 #define TI_RESTART_BLOCK 0x000004a0
+#define TI_KUNA_REGS   0x000004c8
+#define TI_KUNA_INSN   0x000004d0
 #define TI_FPREGS      0x00000500
 
 /* We embed this in the uppermost byte of thread_info->flags */
index 5afee8a8cdf39ea0ec3135feab5b45c269daccdd..f58aedadeb4e3d88e222dcfeccfc7745a3cba5d4 100644 (file)
@@ -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))
index 8e94edf0b9844096c99bf808b34270bcceefe0d1..e682edc24a68072c97da7611be582f92b9000425 100644 (file)
@@ -51,6 +51,8 @@ extern int e820_mapped(unsigned long start, unsigned long end, unsigned type);
 
 extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end);
 extern void e820_setup_gap(void);
+extern unsigned long e820_hole_size(unsigned long start_pfn,
+                                   unsigned long end_pfn);
 
 extern void __init parse_memopt(char *p, char **end);
 
index 9c4527eb55e270ef3106ca447def0a25a1cf83e8..eeb3088a1c9e3d2fbbff1140b94fad85c69777f9 100644 (file)
@@ -22,9 +22,11 @@ extern unsigned int pcibios_assign_all_busses(void);
 extern int no_iommu, force_iommu;
 
 extern unsigned long pci_mem_start;
-#define PCIBIOS_MIN_IO         0x4000
+#define PCIBIOS_MIN_IO         0x1000
 #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);
index 106f666517bb47eedd3983d8bf72dcdc4fd8d63e..85549e656eeb26aad35a50c973f8ea8b9a441bd2 100644 (file)
@@ -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))
index f9adf75fd9b4badc81b1e5d61df8ba211615f579..67e6732d4fdc736ec39f4c57324e4d64064e063e 100644 (file)
@@ -993,8 +993,8 @@ struct inode_operations {
        int (*rename) (struct inode *, struct dentry *,
                        struct inode *, struct dentry *);
        int (*readlink) (struct dentry *, char __user *,int);
-       int (*follow_link) (struct dentry *, struct nameidata *);
-       void (*put_link) (struct dentry *, struct nameidata *);
+       void * (*follow_link) (struct dentry *, struct nameidata *);
+       void (*put_link) (struct dentry *, struct nameidata *, void *);
        void (*truncate) (struct inode *);
        int (*permission) (struct inode *, int, struct nameidata *);
        int (*setattr) (struct dentry *, struct iattr *);
@@ -1602,8 +1602,8 @@ extern struct file_operations generic_ro_fops;
 extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
 extern int vfs_follow_link(struct nameidata *, const char *);
 extern int page_readlink(struct dentry *, char __user *, int);
-extern int page_follow_link_light(struct dentry *, struct nameidata *);
-extern void page_put_link(struct dentry *, struct nameidata *);
+extern void *page_follow_link_light(struct dentry *, struct nameidata *);
+extern void page_put_link(struct dentry *, struct nameidata *, void *);
 extern int page_symlink(struct inode *inode, const char *symname, int len);
 extern struct inode_operations page_symlink_inode_operations;
 extern int generic_readlink(struct dentry *, char __user *, int);
index 602c305c8585fcb6b175bfd27750fe09ca718da8..03b8e7932b830a3f1bfffcc531ec4ee9b1662b1e 100644 (file)
@@ -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)
+                                int isdir, struct inode *target, struct inode *source)
 {
        u32 cookie = inotify_get_cookie();
 
@@ -41,6 +41,10 @@ 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);
+       }
 }
 
 /*
index a40c2bf0408e0b7014388e26d0f2ae83592a51ee..93bb3afe646bc315d1ce17849acdad149e9b8684 100644 (file)
@@ -35,6 +35,7 @@ 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 */
@@ -56,7 +57,8 @@ 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_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \
+                        IN_MOVE_SELF)
 
 #ifdef __KERNEL__
 
index bcd0ac33f592543b9af4fefc95d10471010201d9..5ade54a78dbbb3a3618d10d5e3d21d5d67a5b2fe 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <linux/netdevice.h>
 #include <linux/interrupt.h>
+#include <linux/rcupdate.h>
 #include <linux/list.h>
 
 struct netpoll;
@@ -26,6 +27,7 @@ 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 */
@@ -60,25 +62,31 @@ 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(struct net_device *dev)
+static inline void netpoll_poll_unlock(void *have)
 {
-       if (dev->npinfo) {
-               dev->npinfo->poll_owner = -1;
-               spin_unlock(&dev->npinfo->poll_lock);
+       struct netpoll_info *npi = have;
+
+       if (npi) {
+               npi->poll_owner = -1;
+               spin_unlock(&npi->poll_lock);
        }
+       rcu_read_unlock();
 }
 
 #else
 #define netpoll_rx(a) 0
-#define netpoll_poll_lock(a)
+#define netpoll_poll_lock(a) 0
 #define netpoll_poll_unlock(a)
 #endif
 
index 8ea249110fb0b5029c88b35717f2ce3e5387f507..9a6047ff1b25b198a869678463ed0561cbf417cc 100644 (file)
@@ -112,7 +112,8 @@ struct nfs_inode {
        /*
         * Various flags
         */
-       unsigned int            flags;
+       unsigned long           flags;                  /* atomic bit ops */
+       unsigned long           cache_validity;         /* bit mask */
 
        /*
         * read_cache_jiffies is when we started read-caching this inode,
@@ -174,8 +175,6 @@ struct nfs_inode {
        /* Open contexts for shared mmap writes */
        struct list_head        open_files;
 
-       wait_queue_head_t       nfs_i_wait;
-
 #ifdef CONFIG_NFS_V4
        struct nfs4_cached_acl  *nfs4_acl;
         /* NFSv4 state */
@@ -188,17 +187,21 @@ struct nfs_inode {
 };
 
 /*
- * Legal inode flag values
+ * Cache validity bit flags
  */
-#define NFS_INO_STALE          0x0001          /* possible stale inode */
-#define NFS_INO_ADVISE_RDPLUS   0x0002          /* advise readdirplus */
-#define NFS_INO_REVALIDATING   0x0004          /* revalidating attrs */
-#define NFS_INO_INVALID_ATTR   0x0008          /* cached attrs are invalid */
-#define NFS_INO_INVALID_DATA   0x0010          /* cached data is invalid */
-#define NFS_INO_INVALID_ATIME  0x0020          /* cached atime is invalid */
-#define NFS_INO_INVALID_ACCESS 0x0040          /* cached access cred invalid */
-#define NFS_INO_INVALID_ACL    0x0080          /* cached acls are invalid */
-#define NFS_INO_REVAL_PAGECACHE        0x1000          /* must revalidate pagecache */
+#define NFS_INO_INVALID_ATTR   0x0001          /* cached attrs are invalid */
+#define NFS_INO_INVALID_DATA   0x0002          /* cached data is invalid */
+#define NFS_INO_INVALID_ATIME  0x0004          /* cached atime is invalid */
+#define NFS_INO_INVALID_ACCESS 0x0008          /* cached access cred invalid */
+#define NFS_INO_INVALID_ACL    0x0010          /* cached acls are invalid */
+#define NFS_INO_REVAL_PAGECACHE        0x0020          /* must revalidate pagecache */
+
+/*
+ * Bit offsets in flags field
+ */
+#define NFS_INO_REVALIDATING   (0)             /* revalidating attrs */
+#define NFS_INO_ADVISE_RDPLUS  (1)             /* advise readdirplus */
+#define NFS_INO_STALE          (2)             /* possible stale inode */
 
 static inline struct nfs_inode *NFS_I(struct inode *inode)
 {
@@ -224,8 +227,7 @@ static inline struct nfs_inode *NFS_I(struct inode *inode)
 #define NFS_ATTRTIMEO_UPDATE(inode)    (NFS_I(inode)->attrtimeo_timestamp)
 
 #define NFS_FLAGS(inode)               (NFS_I(inode)->flags)
-#define NFS_REVALIDATING(inode)                (NFS_FLAGS(inode) & NFS_INO_REVALIDATING)
-#define NFS_STALE(inode)               (NFS_FLAGS(inode) & NFS_INO_STALE)
+#define NFS_STALE(inode)               (test_bit(NFS_INO_STALE, &NFS_FLAGS(inode)))
 
 #define NFS_FILEID(inode)              (NFS_I(inode)->fileid)
 
@@ -236,8 +238,11 @@ static inline int nfs_caches_unstable(struct inode *inode)
 
 static inline void NFS_CACHEINV(struct inode *inode)
 {
-       if (!nfs_caches_unstable(inode))
-               NFS_FLAGS(inode) |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS;
+       if (!nfs_caches_unstable(inode)) {
+               spin_lock(&inode->i_lock);
+               NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS;
+               spin_unlock(&inode->i_lock);
+       }
 }
 
 static inline int nfs_server_capable(struct inode *inode, int cap)
@@ -247,7 +252,7 @@ static inline int nfs_server_capable(struct inode *inode, int cap)
 
 static inline int NFS_USE_READDIRPLUS(struct inode *inode)
 {
-       return NFS_FLAGS(inode) & NFS_INO_ADVISE_RDPLUS;
+       return test_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode));
 }
 
 /**
@@ -292,6 +297,7 @@ 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 *);
index 8621cf42b46f36777fba25b1bf408e338d72af71..bc4c40000c0d7350b1ca9e5ce3f97e917c89aa5b 100644 (file)
@@ -556,7 +556,8 @@ 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? */
index bc4cc10fabe9521bd855fe4f9c5fc21dc88b801f..927ed487630de4cf06ee698a63b7d88742942790 100644 (file)
 #define PCI_DEVICE_ID_APPLE_UNI_N_PCI15        0x002e
 #define PCI_DEVICE_ID_APPLE_UNI_N_FW2  0x0030
 #define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2        0x0032
-#define PCI_DEVIEC_ID_APPLE_UNI_N_ATA  0x0033
+#define PCI_DEVICE_ID_APPLE_UNI_N_ATA  0x0033
 #define PCI_DEVICE_ID_APPLE_UNI_N_AGP2 0x0034
 #define PCI_DEVICE_ID_APPLE_IPID_ATA100        0x003b
 #define PCI_DEVICE_ID_APPLE_KEYLARGO_I 0x003e
 #define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211
 #define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212
 #define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE 0x0213
+#define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214
 #define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217
 #define PCI_DEVICE_ID_SERVERWORKS_OSB4USB 0x0220
 #define PCI_DEVICE_ID_SERVERWORKS_CSB5USB PCI_DEVICE_ID_SERVERWORKS_OSB4USB
 #define PCI_VENDOR_ID_SIBYTE           0x166d
 #define PCI_DEVICE_ID_BCM1250_HT       0x0002
 
+#define PCI_VENDOR_ID_NETCELL          0x169c
+#define PCI_DEVICE_ID_REVOLUTION       0x0044
+
 #define PCI_VENDOR_ID_LINKSYS          0x1737
 #define PCI_DEVICE_ID_LINKSYS_EG1032   0x1032
 #define PCI_DEVICE_ID_LINKSYS_EG1064   0x1064
 #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
index 0061c9470482df8e91ad877e7348dad4db731f5e..948527e42a60db205cdb88d458f11d4c39b22248 100644 (file)
@@ -255,7 +255,7 @@ struct sk_buff {
                                nohdr:1;
                                /* 3 bits spare */
        __u8                    pkt_type;
-       __u16                   protocol;
+       __be16                  protocol;
 
        void                    (*destructor)(struct sk_buff *skb);
 #ifdef CONFIG_NETFILTER
index 34ec3e8d99b3f04fb4e23631f84ce9d497529cf3..23448d0fb5bc522324f176859170874c6f2d0a1a 100644 (file)
@@ -177,6 +177,7 @@ 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;
 };
 
index 828a3a93dda10e07ce851476894296f5b7e4a68f..3696f988a9f109710f8f947880eda11283fe449d 100644 (file)
@@ -139,11 +139,25 @@ enum {
 #define AX25_DEF_DS_TIMEOUT    (3 * 60 * HZ)           /* DAMA timeout 3 minutes */
 
 typedef struct ax25_uid_assoc {
-       struct ax25_uid_assoc   *next;
+       struct hlist_node       uid_node;
+       atomic_t                refcount;
        uid_t                   uid;
        ax25_address            call;
 } ax25_uid_assoc;
 
+#define ax25_uid_for_each(__ax25, node, list) \
+       hlist_for_each_entry(__ax25, node, list, uid_node)
+
+#define ax25_uid_hold(ax25) \
+       atomic_inc(&((ax25)->refcount))
+
+static inline void ax25_uid_put(ax25_uid_assoc *assoc)
+{
+       if (atomic_dec_and_test(&assoc->refcount)) {
+               kfree(assoc);
+       }
+}
+
 typedef struct {
        ax25_address            calls[AX25_MAX_DIGIS];
        unsigned char           repeated[AX25_MAX_DIGIS];
@@ -376,7 +390,7 @@ extern unsigned long ax25_display_timer(struct timer_list *);
 
 /* ax25_uid.c */
 extern int  ax25_uid_policy;
-extern ax25_address *ax25_findbyuid(uid_t);
+extern ax25_uid_assoc *ax25_findbyuid(uid_t);
 extern int  ax25_uid_ioctl(int, struct sockaddr_ax25 *);
 extern struct file_operations ax25_uid_fops;
 extern void ax25_uid_free(void);
index a1042d08becd538c4bb330d32ee64cd550ca2f39..e9b1dbab90d007fec58e666d98205c1b8ca6a114 100644 (file)
@@ -384,6 +384,11 @@ enum sock_flags {
        SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */
 };
 
+static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
+{
+       nsk->sk_flags = osk->sk_flags;
+}
+
 static inline void sock_set_flag(struct sock *sk, enum sock_flags flag)
 {
        __set_bit(flag, &sk->sk_flags);
index 38b357fc8958e991ef4cb53abdc4e6c01993ba88..f72b3ef515e25e7d8ca1ee64f7f063a7b8d84f9f 100644 (file)
@@ -360,11 +360,13 @@ int snd_device_free_all(snd_card_t *card, snd_device_cmd_t cmd);
 
 /* isadma.c */
 
+#ifdef CONFIG_ISA_DMA_API
 #define DMA_MODE_NO_ENABLE     0x0100
 
 void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode);
 void snd_dma_disable(unsigned long dma);
 unsigned int snd_dma_pointer(unsigned long dma, unsigned int size);
+#endif
 
 /* misc.c */
 
index 21a4e3b2cbda63c3b6e80c19df832f8b0016544d..8ab1b4e518b8909a867595534957dbf3c12cf3d8 100644 (file)
@@ -627,6 +627,14 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial)
  * Call with cpuset_sem held.  May nest a call to the
  * lock_cpu_hotplug()/unlock_cpu_hotplug() pair.
  */
+
+/*
+ * Hack to avoid 2.6.13 partial node dynamic sched domain bug.
+ * Disable letting 'cpu_exclusive' cpusets define dynamic sched
+ * domains, until the sched domain can handle partial nodes.
+ * Remove this #if hackery when sched domains fixed.
+ */
+#if 0
 static void update_cpu_domains(struct cpuset *cur)
 {
        struct cpuset *c, *par = cur->parent;
@@ -667,6 +675,11 @@ static void update_cpu_domains(struct cpuset *cur)
        partition_sched_domains(&pspan, &cspan);
        unlock_cpu_hotplug();
 }
+#else
+static void update_cpu_domains(struct cpuset *cur)
+{
+}
+#endif
 
 static int update_cpumask(struct cpuset *cs, char *buf)
 {
index a646e4f36c4136d49d3ba1444cc22133e21b4d92..5f889d0cbfcc2e614aef87963ec0bea5ea6a5f21 100644 (file)
@@ -3378,8 +3378,8 @@ EXPORT_SYMBOL(set_user_nice);
  */
 int can_nice(const task_t *p, const int nice)
 {
-       /* convert nice value [19,-20] to rlimit style value [0,39] */
-       int nice_rlim = 19 - nice;
+       /* convert nice value [19,-20] to rlimit style value [1,40] */
+       int nice_rlim = 20 - nice;
        return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur ||
                capable(CAP_SYS_NICE));
 }
index ca1186eef9380cd5e633f644a0891d1dacc5bd16..d282fea8113815c441417f91c8c0a5374879a4a3 100644 (file)
@@ -692,7 +692,7 @@ static void handle_stop_signal(int sig, struct task_struct *p)
 {
        struct task_struct *t;
 
-       if (p->flags & SIGNAL_GROUP_EXIT)
+       if (p->signal->flags & SIGNAL_GROUP_EXIT)
                /*
                 * The process is in the middle of dying already.
                 */
index f2a11887a72680605bc9af158132a4fd104fbe24..5377f40723ff0dc37f13897847ea040f8c317292 100644 (file)
@@ -1023,7 +1023,7 @@ asmlinkage long sys_getppid(void)
        parent = me->group_leader->real_parent;
        for (;;) {
                pid = parent->tgid;
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
 {
                struct task_struct *old = parent;
 
index c5be889de449555dc31b5c5d50a061f34187fdb6..6415d053e2bfa838e3a95313137d07a944261fd8 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -207,7 +207,7 @@ build_up:
 }
 
 /**
- * idr_get_new_above - allocate new idr entry above a start id
+ * idr_get_new_above - allocate new idr entry above or equal to a start id
  * @idp: idr handle
  * @ptr: pointer you want associated with the ide
  * @start_id: id to start search at
index a9bda0a361f39cfd9de38914894cd182545f6bd6..e4e9031dd9c38709b82fd7de2da931ada0cec248 100644 (file)
@@ -269,6 +269,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
        int qualifier;          /* 'h', 'l', or 'L' for integer fields */
                                /* 'z' support added 23/7/1999 S.H.    */
                                /* 'z' changed to 'Z' --davidm 1/25/99 */
+                               /* 't' added for ptrdiff_t */
 
        /* Reject out-of-range values early */
        if (unlikely((int) size < 0)) {
@@ -339,7 +340,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
                /* get the conversion qualifier */
                qualifier = -1;
                if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' ||
-                   *fmt =='Z' || *fmt == 'z') {
+                   *fmt =='Z' || *fmt == 'z' || *fmt == 't') {
                        qualifier = *fmt;
                        ++fmt;
                        if (qualifier == 'l' && *fmt == 'l') {
@@ -467,6 +468,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
                                num = (signed long) num;
                } else if (qualifier == 'Z' || qualifier == 'z') {
                        num = va_arg(args, size_t);
+               } else if (qualifier == 't') {
+                       num = va_arg(args, ptrdiff_t);
                } else if (qualifier == 'h') {
                        num = (unsigned short) va_arg(args, int);
                        if (flags & SIGN)
index c5f66fbb0dd0b427a355b76c378786705b3ec6bd..874950ec48582e4b85c48ba6f1be7cb1f04cc659 100644 (file)
@@ -141,7 +141,7 @@ static int huft_build(
   {
     *t = NULL;
     *m = 0;
-    return Z_DATA_ERROR;
+    return Z_OK;
   }
 
 
index e64fa726a790e0c4162fec88db0e1032dd8a5be0..5a81b1ee4f7a43fc972d7ec762f2d51d7ac8aa42 100644 (file)
@@ -1773,32 +1773,27 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
        return 0;
 }
 
-static int shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd)
+static void *shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd)
 {
        nd_set_link(nd, (char *)SHMEM_I(dentry->d_inode));
-       return 0;
+       return NULL;
 }
 
-static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct page *page = NULL;
        int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL);
        nd_set_link(nd, res ? ERR_PTR(res) : kmap(page));
-       return 0;
+       return page;
 }
 
-static void shmem_put_link(struct dentry *dentry, struct nameidata *nd)
+static void shmem_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
 {
        if (!IS_ERR(nd_get_link(nd))) {
-               struct page *page;
-
-               page = find_get_page(dentry->d_inode->i_mapping, 0);
-               if (!page)
-                       BUG();
+               struct page *page = cookie;
                kunmap(page);
                mark_page_accessed(page);
                page_cache_release(page);
-               page_cache_release(page);
        }
 }
 
index a755e880f4bafa1d8847ab622d83ec189c95f5b4..1bb7dc1b85cd448d4de0b47485dd54b9212b535d 100644 (file)
@@ -251,10 +251,11 @@ void tr_source_route(struct sk_buff *skb,struct trh_hdr *trh,struct net_device *
        unsigned int hash;
        struct rif_cache *entry;
        unsigned char *olddata;
+       unsigned long flags;
        static const unsigned char mcast_func_addr[] 
                = {0xC0,0x00,0x00,0x04,0x00,0x00};
        
-       spin_lock_bh(&rif_lock);
+       spin_lock_irqsave(&rif_lock, flags);
 
        /*
         *      Broadcasts are single route as stated in RFC 1042 
@@ -323,7 +324,7 @@ printk("source routing for %02X:%02X:%02X:%02X:%02X:%02X\n",trh->daddr[0],
        else 
                slack = 18 - ((ntohs(trh->rcf) & TR_RCF_LEN_MASK)>>8);
        olddata = skb->data;
-       spin_unlock_bh(&rif_lock);
+       spin_unlock_irqrestore(&rif_lock, flags);
 
        skb_pull(skb, slack);
        memmove(skb->data, olddata, sizeof(struct trh_hdr) - slack);
@@ -337,10 +338,11 @@ printk("source routing for %02X:%02X:%02X:%02X:%02X:%02X\n",trh->daddr[0],
 static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev)
 {
        unsigned int hash, rii_p = 0;
+       unsigned long flags;
        struct rif_cache *entry;
 
 
-       spin_lock_bh(&rif_lock);
+       spin_lock_irqsave(&rif_lock, flags);
        
        /*
         *      Firstly see if the entry exists
@@ -378,7 +380,7 @@ printk("adding rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n",
                if(!entry) 
                {
                        printk(KERN_DEBUG "tr.c: Couldn't malloc rif cache entry !\n");
-                       spin_unlock_bh(&rif_lock);
+                       spin_unlock_irqrestore(&rif_lock, flags);
                        return;
                }
 
@@ -420,7 +422,7 @@ printk("updating rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n",
                    }                                         
                entry->last_used=jiffies;               
        }
-       spin_unlock_bh(&rif_lock);
+       spin_unlock_irqrestore(&rif_lock, flags);
 }
 
 /*
@@ -430,9 +432,9 @@ printk("updating rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n",
 static void rif_check_expire(unsigned long dummy) 
 {
        int i;
-       unsigned long next_interval = jiffies + sysctl_tr_rif_timeout/2;
+       unsigned long flags, next_interval = jiffies + sysctl_tr_rif_timeout/2;
 
-       spin_lock_bh(&rif_lock);
+       spin_lock_irqsave(&rif_lock, flags);
        
        for(i =0; i < RIF_TABLE_SIZE; i++) {
                struct rif_cache *entry, **pentry;
@@ -454,7 +456,7 @@ static void rif_check_expire(unsigned long dummy)
                }
        }
        
-       spin_unlock_bh(&rif_lock);
+       spin_unlock_irqrestore(&rif_lock, flags);
 
        mod_timer(&rif_timer, next_interval);
 
@@ -485,7 +487,7 @@ static struct rif_cache *rif_get_idx(loff_t pos)
 
 static void *rif_seq_start(struct seq_file *seq, loff_t *pos)
 {
-       spin_lock_bh(&rif_lock);
+       spin_lock_irq(&rif_lock);
 
        return *pos ? rif_get_idx(*pos - 1) : SEQ_START_TOKEN;
 }
@@ -516,7 +518,7 @@ static void *rif_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 
 static void rif_seq_stop(struct seq_file *seq, void *v)
 {
-       spin_unlock_bh(&rif_lock);
+       spin_unlock_irq(&rif_lock);
 }
 
 static int rif_seq_show(struct seq_file *seq, void *v)
index 707097deac3deb4957741204c7944e01521f3c0f..a5c94f11547c8e5319086f64a894f76f98994cbd 100644 (file)
@@ -875,12 +875,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
        sk->sk_sndbuf   = osk->sk_sndbuf;
        sk->sk_state    = TCP_ESTABLISHED;
        sk->sk_sleep    = osk->sk_sleep;
-
-       if (sock_flag(osk, SOCK_DBG))
-               sock_set_flag(sk, SOCK_DBG);
-
-       if (sock_flag(osk, SOCK_ZAPPED))
-               sock_set_flag(sk, SOCK_ZAPPED);
+       sock_copy_flags(sk, osk);
 
        oax25 = ax25_sk(osk);
 
@@ -1007,7 +1002,8 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
        struct sock *sk = sock->sk;
        struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr;
        ax25_dev *ax25_dev = NULL;
-       ax25_address *call;
+       ax25_uid_assoc *user;
+       ax25_address call;
        ax25_cb *ax25;
        int err = 0;
 
@@ -1026,9 +1022,15 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
        if (addr->fsa_ax25.sax25_family != AF_AX25)
                return -EINVAL;
 
-       call = ax25_findbyuid(current->euid);
-       if (call == NULL && ax25_uid_policy && !capable(CAP_NET_ADMIN)) {
-               return -EACCES;
+       user = ax25_findbyuid(current->euid);
+       if (user) {
+               call = user->call;
+               ax25_uid_put(user);
+       } else {
+               if (ax25_uid_policy && !capable(CAP_NET_ADMIN))
+                       return -EACCES;
+
+               call = addr->fsa_ax25.sax25_call;
        }
 
        lock_sock(sk);
@@ -1039,10 +1041,7 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
                goto out;
        }
 
-       if (call == NULL)
-               ax25->source_addr = addr->fsa_ax25.sax25_call;
-       else
-               ax25->source_addr = *call;
+       ax25->source_addr = call;
 
        /*
         * User already set interface with SO_BINDTODEVICE
index 44b99b1ff9f8c7c8a92568d0d4a665979288a268..c288526da4ce194c65f49878f40cd686cedd1216 100644 (file)
@@ -422,8 +422,8 @@ static inline void ax25_adjust_path(ax25_address *addr, ax25_digi *digipeat)
  */
 int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
 {
+       ax25_uid_assoc *user;
        ax25_route *ax25_rt;
-       ax25_address *call;
        int err;
 
        if ((ax25_rt = ax25_get_route(addr, NULL)) == NULL)
@@ -434,16 +434,18 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
                goto put;
        }
 
-       if ((call = ax25_findbyuid(current->euid)) == NULL) {
+       user = ax25_findbyuid(current->euid);
+       if (user) {
+               ax25->source_addr = user->call;
+               ax25_uid_put(user);
+       } else {
                if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) {
                        err = -EPERM;
                        goto put;
                }
-               call = (ax25_address *)ax25->ax25_dev->dev->dev_addr;
+               ax25->source_addr = *(ax25_address *)ax25->ax25_dev->dev->dev_addr;
        }
 
-       ax25->source_addr = *call;
-
        if (ax25_rt->digipeat != NULL) {
                if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
                        err = -ENOMEM;
index cea6b7d1972905ddeb17d3f5c6ab8b38b8b30c30..a8b3822f3ee42155032c914c31e80e1354b1fbfb 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/fcntl.h>
 #include <linux/mm.h>
 #include <linux/interrupt.h>
+#include <linux/list.h>
 #include <linux/notifier.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
  *     Callsign/UID mapper. This is in kernel space for security on multi-amateur machines.
  */
 
-static ax25_uid_assoc *ax25_uid_list;
+HLIST_HEAD(ax25_uid_list);
 static DEFINE_RWLOCK(ax25_uid_lock);
 
 int ax25_uid_policy = 0;
 
-ax25_address *ax25_findbyuid(uid_t uid)
+ax25_uid_assoc *ax25_findbyuid(uid_t uid)
 {
-       ax25_uid_assoc *ax25_uid;
-       ax25_address *res = NULL;
+       ax25_uid_assoc *ax25_uid, *res = NULL;
+       struct hlist_node *node;
 
        read_lock(&ax25_uid_lock);
-       for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) {
+       ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
                if (ax25_uid->uid == uid) {
-                       res = &ax25_uid->call;
+                       ax25_uid_hold(ax25_uid);
+                       res = ax25_uid;
                        break;
                }
        }
        read_unlock(&ax25_uid_lock);
 
-       return NULL;
+       return res;
 }
 
 int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax)
 {
-       ax25_uid_assoc *s, *ax25_uid;
+       ax25_uid_assoc *ax25_uid;
+       struct hlist_node *node;
+       ax25_uid_assoc *user;
        unsigned long res;
 
        switch (cmd) {
        case SIOCAX25GETUID:
                res = -ENOENT;
                read_lock(&ax25_uid_lock);
-               for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) {
+               ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
                        if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) {
                                res = ax25_uid->uid;
                                break;
@@ -85,19 +89,22 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax)
        case SIOCAX25ADDUID:
                if (!capable(CAP_NET_ADMIN))
                        return -EPERM;
-               if (ax25_findbyuid(sax->sax25_uid))
+               user = ax25_findbyuid(sax->sax25_uid);
+               if (user) {
+                       ax25_uid_put(user);
                        return -EEXIST;
+               }
                if (sax->sax25_uid == 0)
                        return -EINVAL;
                if ((ax25_uid = kmalloc(sizeof(*ax25_uid), GFP_KERNEL)) == NULL)
                        return -ENOMEM;
 
+               atomic_set(&ax25_uid->refcount, 1);
                ax25_uid->uid  = sax->sax25_uid;
                ax25_uid->call = sax->sax25_call;
 
                write_lock(&ax25_uid_lock);
-               ax25_uid->next = ax25_uid_list;
-               ax25_uid_list  = ax25_uid;
+               hlist_add_head(&ax25_uid->uid_node, &ax25_uid_list);
                write_unlock(&ax25_uid_lock);
 
                return 0;
@@ -106,34 +113,21 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax)
                if (!capable(CAP_NET_ADMIN))
                        return -EPERM;
 
+               ax25_uid = NULL;
                write_lock(&ax25_uid_lock);
-               for (ax25_uid = ax25_uid_list; ax25_uid != NULL; ax25_uid = ax25_uid->next) {
-                       if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0) {
+               ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
+                       if (ax25cmp(&sax->sax25_call, &ax25_uid->call) == 0)
                                break;
-                       }
                }
                if (ax25_uid == NULL) {
                        write_unlock(&ax25_uid_lock);
                        return -ENOENT;
                }
-               if ((s = ax25_uid_list) == ax25_uid) {
-                       ax25_uid_list = s->next;
-                       write_unlock(&ax25_uid_lock);
-                       kfree(ax25_uid);
-                       return 0;
-               }
-               while (s != NULL && s->next != NULL) {
-                       if (s->next == ax25_uid) {
-                               s->next = ax25_uid->next;
-                               write_unlock(&ax25_uid_lock);
-                               kfree(ax25_uid);
-                               return 0;
-                       }
-                       s = s->next;
-               }
+               hlist_del_init(&ax25_uid->uid_node);
+               ax25_uid_put(ax25_uid);
                write_unlock(&ax25_uid_lock);
 
-               return -ENOENT;
+               return 0;
 
        default:
                return -EINVAL;
@@ -147,13 +141,11 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax)
 static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos)
 {
        struct ax25_uid_assoc *pt;
-       int i = 1;
+       struct hlist_node *node;
+       int i = 0;
 
        read_lock(&ax25_uid_lock);
-       if (*pos == 0)
-               return SEQ_START_TOKEN;
-
-       for (pt = ax25_uid_list; pt != NULL; pt = pt->next) {
+       ax25_uid_for_each(pt, node, &ax25_uid_list) {
                if (i == *pos)
                        return pt;
                ++i;
@@ -164,8 +156,9 @@ static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos)
 static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 {
        ++*pos;
-       return (v == SEQ_START_TOKEN) ? ax25_uid_list : 
-               ((struct ax25_uid_assoc *) v)->next;
+
+       return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next,
+                          ax25_uid_assoc, uid_node);
 }
 
 static void ax25_uid_seq_stop(struct seq_file *seq, void *v)
@@ -179,7 +172,6 @@ static int ax25_uid_seq_show(struct seq_file *seq, void *v)
                seq_printf(seq, "Policy: %d\n", ax25_uid_policy);
        else {
                struct ax25_uid_assoc *pt = v;
-               
 
                seq_printf(seq, "%6d %s\n", pt->uid, ax2asc(&pt->call));
        }
@@ -213,16 +205,13 @@ struct file_operations ax25_uid_fops = {
  */
 void __exit ax25_uid_free(void)
 {
-       ax25_uid_assoc *s, *ax25_uid;
+       ax25_uid_assoc *ax25_uid;
+       struct hlist_node *node;
 
        write_lock(&ax25_uid_lock);
-       ax25_uid = ax25_uid_list;
-       while (ax25_uid != NULL) {
-               s        = ax25_uid;
-               ax25_uid = ax25_uid->next;
-
-               kfree(s);
+       ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
+               hlist_del_init(&ax25_uid->uid_node);
+               ax25_uid_put(ax25_uid);
        }
-       ax25_uid_list = NULL;
        write_unlock(&ax25_uid_lock);
 }
index 52a3bf7ae177a803b5b77190ec1f34e8070175e5..faf59b02c4bf082179ff67477ab47719e885cafa 100644 (file)
@@ -1696,7 +1696,8 @@ 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)) {
@@ -1709,10 +1710,10 @@ static void net_rx_action(struct softirq_action *h)
 
                dev = list_entry(queue->poll_list.next,
                                 struct net_device, poll_list);
-               netpoll_poll_lock(dev);
+               have = netpoll_poll_lock(dev);
 
                if (dev->quota <= 0 || dev->poll(dev, &budget)) {
-                       netpoll_poll_unlock(dev);
+                       netpoll_poll_unlock(have);
                        local_irq_disable();
                        list_del(&dev->poll_list);
                        list_add_tail(&dev->poll_list, &queue->poll_list);
@@ -1721,7 +1722,7 @@ static void net_rx_action(struct softirq_action *h)
                        else
                                dev->quota = dev->weight;
                } else {
-                       netpoll_poll_unlock(dev);
+                       netpoll_poll_unlock(have);
                        dev_put(dev);
                        local_irq_disable();
                }
index c327c9edadc57f23fba034059232fcbab08c4fc8..a1a9a7abff50981c1e26fdcca3d2b7b2fa315d59 100644 (file)
@@ -33,6 +33,7 @@
 #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;
@@ -248,14 +249,14 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
        int status;
        struct netpoll_info *npinfo;
 
-repeat:
-       if(!np || !np->dev || !netif_running(np->dev)) {
+       if (!np || !np->dev || !netif_running(np->dev)) {
                __kfree_skb(skb);
                return;
        }
 
-       /* avoid recursion */
        npinfo = np->dev->npinfo;
+
+       /* avoid recursion */
        if (npinfo->poll_owner == smp_processor_id() ||
            np->dev->xmit_lock_owner == smp_processor_id()) {
                if (np->drop)
@@ -265,30 +266,37 @@ repeat:
                return;
        }
 
-       spin_lock(&np->dev->xmit_lock);
-       np->dev->xmit_lock_owner = smp_processor_id();
+       do {
+               npinfo->tries--;
+               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)) {
+               /*
+                * 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);
                np->dev->xmit_lock_owner = -1;
                spin_unlock(&np->dev->xmit_lock);
 
-               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);
+               /* success */
+               if(!status) {
+                       npinfo->tries = MAX_RETRIES; /* reset */
+                       return;
+               }
 
-       /* transmit busy */
-       if(status) {
+               /* transmit busy */
                netpoll_poll(np);
-               goto repeat;
-       }
+               udelay(50);
+       } while (npinfo->tries > 0);
 }
 
 void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
@@ -349,15 +357,11 @@ 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;
 
@@ -639,9 +643,11 @@ 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;
@@ -718,9 +724,16 @@ 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:
index f32dba9e26fe45942fc1334e08410abbc2722b46..8d0cc3cf3e491a636f258af31262b36f54a1efa4 100644 (file)
@@ -148,12 +148,12 @@ static int dn_neigh_construct(struct neighbour *neigh)
 
        __neigh_parms_put(neigh->parms);
        neigh->parms = neigh_parms_clone(parms);
-       rcu_read_unlock();
 
        if (dn_db->use_long)
                neigh->ops = &dn_long_ops;
        else
                neigh->ops = &dn_short_ops;
+       rcu_read_unlock();
 
        if (dn->flags & DN_NDFLAG_P3)
                neigh->ops = &dn_phase3_ops;
index a701405fab0b3413389dc1899e00b90c9eb028d3..45efd5f4741b93830d5ee7021cec57bd47c14aed 100644 (file)
@@ -1333,9 +1333,9 @@ err:;
 }
 
 static inline int check_leaf(struct trie *t, struct leaf *l,  t_key key, int *plen, const struct flowi *flp,
-                            struct fib_result *res, int *err)
+                            struct fib_result *res)
 {
-       int i;
+       int err, i;
        t_key mask;
        struct leaf_info *li;
        struct hlist_head *hhead = &l->list;
@@ -1348,18 +1348,18 @@ static inline int check_leaf(struct trie *t, struct leaf *l,  t_key key, int *pl
                if (l->key != (key & mask))
                        continue;
 
-               if (((*err) = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) == 0) {
+               if ((err = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) <= 0) {
                        *plen = i;
 #ifdef CONFIG_IP_FIB_TRIE_STATS
                        t->stats.semantic_match_passed++;
 #endif
-                       return 1;
+                       return err;
                }
 #ifdef CONFIG_IP_FIB_TRIE_STATS
                t->stats.semantic_match_miss++;
 #endif
        }
-       return 0;
+       return 1;
 }
 
 static int
@@ -1386,7 +1386,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result
 
        /* Just a leaf? */
        if (IS_LEAF(n)) {
-               if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret))
+               if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0)
                        goto found;
                goto failed;
        }
@@ -1508,7 +1508,7 @@ fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result
                       continue;
                }
                if (IS_LEAF(n)) {
-                       if (check_leaf(t, (struct leaf *)n, key, &plen, flp, res, &ret))
+                       if ((ret = check_leaf(t, (struct leaf *)n, key, &plen, flp, res)) <= 0)
                                goto found;
               }
 backtrace:
index 3d78464f64ea5f0d98c40a2d1ed979943e6cea0e..badfc584997336ff5dc94a49c13420796de68060 100644 (file)
@@ -349,12 +349,12 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param,
 {
        struct sk_buff *skb;
 
-       ip_append_data(icmp_socket->sk, icmp_glue_bits, icmp_param,
-                      icmp_param->data_len+icmp_param->head_len,
-                      icmp_param->head_len,
-                      ipc, rt, MSG_DONTWAIT);
-
-       if ((skb = skb_peek(&icmp_socket->sk->sk_write_queue)) != NULL) {
+       if (ip_append_data(icmp_socket->sk, icmp_glue_bits, icmp_param,
+                          icmp_param->data_len+icmp_param->head_len,
+                          icmp_param->head_len,
+                          ipc, rt, MSG_DONTWAIT) < 0)
+               ip_flush_pending_frames(icmp_socket->sk);
+       else if ((skb = skb_peek(&icmp_socket->sk->sk_write_queue)) != NULL) {
                struct icmphdr *icmph = skb->h.icmph;
                unsigned int csum = 0;
                struct sk_buff *skb1;
index 95473953c406ebe2cc7217918381b5896f3ace66..ab18a853d7ce3ca5249606af7f5a1660de6e5182 100644 (file)
@@ -450,10 +450,13 @@ static void peer_check_expire(unsigned long dummy)
        /* Trigger the timer after inet_peer_gc_mintime .. inet_peer_gc_maxtime
         * interval depending on the total number of entries (more entries,
         * less interval). */
-       peer_periodic_timer.expires = jiffies
-               + inet_peer_gc_maxtime
-               - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ *
-                       peer_total / inet_peer_threshold * HZ;
+       if (peer_total >= inet_peer_threshold)
+               peer_periodic_timer.expires = jiffies + inet_peer_gc_mintime;
+       else
+               peer_periodic_timer.expires = jiffies
+                       + inet_peer_gc_maxtime
+                       - (inet_peer_gc_maxtime - inet_peer_gc_mintime) / HZ *
+                               peer_total / inet_peer_threshold * HZ;
        add_timer(&peer_periodic_timer);
 }
 
index 2065944fd9e5117739ed1f2aeed2c2c59cf50151..7ded6e60f43af7902fc6ce26e3625475295cf601 100644 (file)
@@ -358,7 +358,7 @@ static struct crypto_tfm **ipcomp_alloc_tfms(const char *alg_name)
        int cpu;
 
        /* This can be any valid CPU ID so we don't need locking. */
-       cpu = smp_processor_id();
+       cpu = raw_smp_processor_id();
 
        list_for_each_entry(pos, &ipcomp_tfms_list, list) {
                struct crypto_tfm *tfm;
index eda1fba431a415cef7f9533c8fdbcaca03f4f4a1..c6baa8174389fd64d864100d3133759b797b82bd 100644 (file)
@@ -214,6 +214,12 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
                break;
        
        case IPQ_COPY_PACKET:
+               if (entry->skb->ip_summed == CHECKSUM_HW &&
+                   (*errp = skb_checksum_help(entry->skb,
+                                              entry->info->outdev == NULL))) {
+                       read_unlock_bh(&queue_lock);
+                       return NULL;
+               }
                if (copy_range == 0 || copy_range > entry->skb->len)
                        data_len = entry->skb->len;
                else
@@ -385,6 +391,7 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
        if (!skb_ip_make_writable(&e->skb, v->data_len))
                return -ENOMEM;
        memcpy(e->skb->data, v->payload, v->data_len);
+       e->skb->ip_summed = CHECKSUM_NONE;
        e->skb->nfcache |= NFC_ALTERED;
 
        /*
index ada9911118e9a7ec2ee841db8b3f250e48bfb71c..94a0ce1c1c9d057e565748b8dbef8e2b76a31491 100644 (file)
@@ -61,16 +61,20 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
        if (!tcph)
                return 0;
 
-       if (!(einfo->operation & IPT_ECN_OP_SET_ECE
-             || tcph->ece == einfo->proto.tcp.ece)
-           && (!(einfo->operation & IPT_ECN_OP_SET_CWR
-                 || tcph->cwr == einfo->proto.tcp.cwr)))
+       if ((!(einfo->operation & IPT_ECN_OP_SET_ECE) ||
+            tcph->ece == einfo->proto.tcp.ece) &&
+           ((!(einfo->operation & IPT_ECN_OP_SET_CWR) ||
+            tcph->cwr == einfo->proto.tcp.cwr)))
                return 1;
 
        if (!skb_ip_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph)))
                return 0;
        tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4;
 
+       if ((*pskb)->ip_summed == CHECKSUM_HW &&
+           skb_checksum_help(*pskb, inward))
+               return 0;
+
        diffs[0] = ((u_int16_t *)tcph)[6];
        if (einfo->operation & IPT_ECN_OP_SET_ECE)
                tcph->ece = einfo->proto.tcp.ece;
@@ -79,13 +83,10 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
        diffs[1] = ((u_int16_t *)tcph)[6];
        diffs[0] = diffs[0] ^ 0xFFFF;
 
-       if ((*pskb)->ip_summed != CHECKSUM_HW)
+       if ((*pskb)->ip_summed != CHECKSUM_UNNECESSARY)
                tcph->check = csum_fold(csum_partial((char *)diffs,
                                                     sizeof(diffs),
                                                     tcph->check^0xFFFF));
-       else
-               if (skb_checksum_help(*pskb, inward))
-                       return 0;
        (*pskb)->nfcache |= NFC_ALTERED;
        return 1;
 }
index 1049050b2bfbc0a5123662548b37ac382e1cb11f..7b84a254440e79db82680e29e977367a887af718 100644 (file)
@@ -61,6 +61,10 @@ ipt_tcpmss_target(struct sk_buff **pskb,
        if (!skb_ip_make_writable(pskb, (*pskb)->len))
                return NF_DROP;
 
+       if ((*pskb)->ip_summed == CHECKSUM_HW &&
+           skb_checksum_help(*pskb, out == NULL))
+               return NF_DROP;
+
        iph = (*pskb)->nh.iph;
        tcplen = (*pskb)->len - iph->ihl*4;
 
@@ -186,9 +190,6 @@ ipt_tcpmss_target(struct sk_buff **pskb,
               newmss);
 
  retmodified:
-       /* We never hw checksum SYN packets.  */
-       BUG_ON((*pskb)->ip_summed == CHECKSUM_HW);
-
        (*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED;
        return IPT_CONTINUE;
 }
index ddb6ce4ecff291e9ecec53e86a2781eefe61a3bb..69b1fcf70077262e39737ce5f87bb8effb1e85e9 100644 (file)
@@ -584,7 +584,7 @@ static inline void skb_entail(struct sock *sk, struct tcp_sock *tp,
        sk_charge_skb(sk, skb);
        if (!sk->sk_send_head)
                sk->sk_send_head = skb;
-       else if (tp->nonagle&TCP_NAGLE_PUSH)
+       if (tp->nonagle & TCP_NAGLE_PUSH)
                tp->nonagle &= ~TCP_NAGLE_PUSH; 
 }
 
index 5d91213d34c06c2f52a9a3217cb1dc9a2ef4c5cc..67c670886c1fda8f3f8beb156e4b23b36888eae1 100644 (file)
@@ -242,9 +242,14 @@ static int tcp_v4_get_port(struct sock *sk, unsigned short snum)
                tcp_port_rover = rover;
                spin_unlock(&tcp_portalloc_lock);
 
-               /* Exhausted local port range during search? */
+               /* Exhausted local port range during search?  It is not
+                * possible for us to be holding one of the bind hash
+                * locks if this test triggers, because if 'remaining'
+                * drops to zero, we broke out of the do/while loop at
+                * the top level, not from the 'break;' statement.
+                */
                ret = 1;
-               if (remaining <= 0)
+               if (unlikely(remaining <= 0))
                        goto fail;
 
                /* OK, here is the one we will use.  HEAD is
index 3ed6fc15815bac1af3a25e3bdcd46c72d90449cd..dd30dd137b74dd061d74af66500f3d3294be13cf 100644 (file)
@@ -861,7 +861,8 @@ 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.  */
-       BUG_ON(skb->len != skb->data_len);
+       if (skb->len != skb->data_len)
+               return tcp_fragment(sk, skb, len, mss_now);
 
        buff = sk_stream_alloc_pskb(sk, 0, 0, GFP_ATOMIC);
        if (unlikely(buff == NULL))
@@ -924,10 +925,6 @@ static int tcp_tso_should_defer(struct sock *sk, struct tcp_sock *tp, struct sk_
 
        limit = min(send_win, cong_win);
 
-       /* If sk_send_head can be sent fully now, just do it.  */
-       if (skb->len <= limit)
-               return 0;
-
        if (sysctl_tcp_tso_win_divisor) {
                u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache);
 
@@ -974,6 +971,8 @@ 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);
 
@@ -994,9 +993,10 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle)
                                break;
                }
 
+               limit = mss_now;
                if (tso_segs > 1) {
-                       u32 limit = tcp_window_allows(tp, skb,
-                                                     mss_now, cwnd_quota);
+                       limit = tcp_window_allows(tp, skb,
+                                                 mss_now, cwnd_quota);
 
                        if (skb->len < limit) {
                                unsigned int trim = skb->len % mss_now;
@@ -1004,15 +1004,12 @@ 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))))
@@ -1064,11 +1061,14 @@ 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) {
-                       u32 limit = tcp_window_allows(tp, skb,
-                                                     mss_now, cwnd_quota);
+                       limit = tcp_window_allows(tp, skb,
+                                                 mss_now, cwnd_quota);
 
                        if (skb->len < limit) {
                                unsigned int trim = skb->len % mss_now;
@@ -1076,15 +1076,12 @@ 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;
 
index 866f10726c5832732769fcb9250da70a2ae02fb9..10fbb50daea44d1c79b2c40b688c54750e9933e6 100644 (file)
@@ -198,12 +198,13 @@ resubmit:
                if (!raw_sk) {
                        if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
                                IP6_INC_STATS_BH(IPSTATS_MIB_INUNKNOWNPROTOS);
-                               icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhoff);
+                               icmpv6_send(skb, ICMPV6_PARAMPROB,
+                                           ICMPV6_UNK_NEXTHDR, nhoff,
+                                           skb->dev);
                        }
-               } else {
+               } else
                        IP6_INC_STATS_BH(IPSTATS_MIB_INDELIVERS);
-                       kfree_skb(skb);
-               }
+               kfree_skb(skb);
        }
        rcu_read_unlock();
        return 0;
index 423feb46ccc026841ea52ef771d8f85842944dc1..135383ef538f5a33573d745d17962237af3ae082 100644 (file)
@@ -354,7 +354,7 @@ static struct crypto_tfm **ipcomp6_alloc_tfms(const char *alg_name)
        int cpu;
 
        /* This can be any valid CPU ID so we don't need locking. */
-       cpu = smp_processor_id();
+       cpu = raw_smp_processor_id();
 
        list_for_each_entry(pos, &ipcomp6_tfms_list, list) {
                struct crypto_tfm *tfm;
index 5493180f0d441200675a5ecd0406617e5a7d7cf5..a16df5b27c84e8ab93dc5dc42be41c1c5662e591 100644 (file)
@@ -211,6 +211,12 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
                break;
        
        case IPQ_COPY_PACKET:
+               if (entry->skb->ip_summed == CHECKSUM_HW &&
+                   (*errp = skb_checksum_help(entry->skb,
+                                              entry->info->outdev == NULL))) {
+                       read_unlock_bh(&queue_lock);
+                       return NULL;
+               }
                if (copy_range == 0 || copy_range > entry->skb->len)
                        data_len = entry->skb->len;
                else
@@ -381,6 +387,7 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
        if (!skb_ip_make_writable(&e->skb, v->data_len))
                return -ENOMEM;
        memcpy(e->skb->data, v->payload, v->data_len);
+       e->skb->ip_summed = CHECKSUM_NONE;
        e->skb->nfcache |= NFC_ALTERED;
 
        /*
index e2b848ec98513ac9ababcc9f3d588c0fd93efc84..1d4d75b34d321c19ec892013c9f3b73bdfa3d9fe 100644 (file)
@@ -328,6 +328,8 @@ 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,
index f6e288dc116ede93c2f755075c641303ca4bca47..ef29cfd936d3bed8f094f89627e8e67932529886 100644 (file)
@@ -158,9 +158,14 @@ static int tcp_v6_get_port(struct sock *sk, unsigned short snum)
                tcp_port_rover = rover;
                spin_unlock(&tcp_portalloc_lock);
 
-               /* Exhausted local port range during search? */
+               /* Exhausted local port range during search?  It is not
+                * possible for us to be holding one of the bind hash
+                * locks if this test triggers, because if 'remaining'
+                * drops to zero, we broke out of the do/while loop at
+                * the top level, not from the 'break;' statement.
+                */
                ret = 1;
-               if (remaining <= 0)
+               if (unlikely(remaining <= 0))
                        goto fail;
 
                /* OK, here is the one we will use. */
index 31ed4a9a1d066c0cdef1c3e5b6371fa3678037d4..162a85fed150efd5a359da92a9524e6f3f3f4742 100644 (file)
@@ -459,12 +459,7 @@ static struct sock *nr_make_new(struct sock *osk)
        sk->sk_sndbuf   = osk->sk_sndbuf;
        sk->sk_state    = TCP_ESTABLISHED;
        sk->sk_sleep    = osk->sk_sleep;
-
-       if (sock_flag(osk, SOCK_ZAPPED))
-               sock_set_flag(sk, SOCK_ZAPPED);
-
-       if (sock_flag(osk, SOCK_DBG))
-               sock_set_flag(sk, SOCK_DBG);
+       sock_copy_flags(sk, osk);
 
        skb_queue_head_init(&nr->ack_queue);
        skb_queue_head_init(&nr->reseq_queue);
@@ -541,7 +536,8 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
        struct nr_sock *nr = nr_sk(sk);
        struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr;
        struct net_device *dev;
-       ax25_address *user, *source;
+       ax25_uid_assoc *user;
+       ax25_address *source;
 
        lock_sock(sk);
        if (!sock_flag(sk, SOCK_ZAPPED)) {
@@ -580,16 +576,19 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
        } else {
                source = &addr->fsa_ax25.sax25_call;
 
-               if ((user = ax25_findbyuid(current->euid)) == NULL) {
+               user = ax25_findbyuid(current->euid);
+               if (user) {
+                       nr->user_addr   = user->call;
+                       ax25_uid_put(user);
+               } else {
                        if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) {
                                release_sock(sk);
                                dev_put(dev);
                                return -EPERM;
                        }
-                       user = source;
+                       nr->user_addr   = *source;
                }
 
-               nr->user_addr   = *user;
                nr->source_addr = *source;
        }
 
@@ -609,7 +608,8 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr,
        struct sock *sk = sock->sk;
        struct nr_sock *nr = nr_sk(sk);
        struct sockaddr_ax25 *addr = (struct sockaddr_ax25 *)uaddr;
-       ax25_address *user, *source = NULL;
+       ax25_address *source = NULL;
+       ax25_uid_assoc *user;
        struct net_device *dev;
 
        lock_sock(sk);
@@ -650,16 +650,19 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr,
                }
                source = (ax25_address *)dev->dev_addr;
 
-               if ((user = ax25_findbyuid(current->euid)) == NULL) {
+               user = ax25_findbyuid(current->euid);
+               if (user) {
+                       nr->user_addr   = user->call;
+                       ax25_uid_put(user);
+               } else {
                        if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) {
                                dev_put(dev);
                                release_sock(sk);
                                return -EPERM;
                        }
-                       user = source;
+                       nr->user_addr   = *source;
                }
 
-               nr->user_addr   = *user;
                nr->source_addr = *source;
                nr->device      = dev;
 
index 7eb6a5bf93ea1961bc0c35e70843a646c106596f..5480caf8ccc2e0dd2141c8058db5b37c05c14dcd 100644 (file)
@@ -556,12 +556,7 @@ static struct sock *rose_make_new(struct sock *osk)
        sk->sk_sndbuf   = osk->sk_sndbuf;
        sk->sk_state    = TCP_ESTABLISHED;
        sk->sk_sleep    = osk->sk_sleep;
-
-       if (sock_flag(osk, SOCK_ZAPPED))
-               sock_set_flag(sk, SOCK_ZAPPED);
-
-       if (sock_flag(osk, SOCK_DBG))
-               sock_set_flag(sk, SOCK_DBG);
+       sock_copy_flags(sk, osk);
 
        init_timer(&rose->timer);
        init_timer(&rose->idletimer);
@@ -631,7 +626,8 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
        struct rose_sock *rose = rose_sk(sk);
        struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr;
        struct net_device *dev;
-       ax25_address *user, *source;
+       ax25_address *source;
+       ax25_uid_assoc *user;
        int n;
 
        if (!sock_flag(sk, SOCK_ZAPPED))
@@ -656,14 +652,17 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 
        source = &addr->srose_call;
 
-       if ((user = ax25_findbyuid(current->euid)) == NULL) {
+       user = ax25_findbyuid(current->euid);
+       if (user) {
+               rose->source_call = user->call;
+               ax25_uid_put(user);
+       } else {
                if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE))
                        return -EACCES;
-               user = source;
+               rose->source_call   = *source;
        }
 
        rose->source_addr   = addr->srose_addr;
-       rose->source_call   = *user;
        rose->device        = dev;
        rose->source_ndigis = addr->srose_ndigis;
 
@@ -690,8 +689,8 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
        struct rose_sock *rose = rose_sk(sk);
        struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr;
        unsigned char cause, diagnostic;
-       ax25_address *user;
        struct net_device *dev;
+       ax25_uid_assoc *user;
        int n;
 
        if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) {
@@ -741,12 +740,14 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
                if ((dev = rose_dev_first()) == NULL)
                        return -ENETUNREACH;
 
-               if ((user = ax25_findbyuid(current->euid)) == NULL)
+               user = ax25_findbyuid(current->euid);
+               if (!user)
                        return -EINVAL;
 
                memcpy(&rose->source_addr, dev->dev_addr, ROSE_ADDR_LEN);
-               rose->source_call = *user;
+               rose->source_call = user->call;
                rose->device      = dev;
+               ax25_uid_put(user);
 
                rose_insert_socket(sk);         /* Finish the bind */
        }
index ff73ebb912b8ebd0f6887bdb776caa25922d9b5a..25da6f699fd03c7b748cca110d42eb68eb54da27 100644 (file)
@@ -994,8 +994,10 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
         *      1. The frame isn't for us,
         *      2. It isn't "owned" by any existing route.
         */
-       if (frametype != ROSE_CALL_REQUEST)     /* XXX */
-               return 0;
+       if (frametype != ROSE_CALL_REQUEST) {   /* XXX */
+               res = 0;
+               goto out;
+       }
 
        len  = (((skb->data[3] >> 4) & 0x0F) + 1) / 2;
        len += (((skb->data[3] >> 0) & 0x0F) + 1) / 2;
index 8edefd5d095d5019bae647ccc845314de65c5264..0d066c965342e5bbb93bcbe2a80cd4d39653028b 100644 (file)
@@ -438,6 +438,7 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops)
        if (!ops->init || ops->init(sch, NULL) == 0)
                return sch;
 
+       qdisc_destroy(sch);
 errout:
        return NULL;
 }
index 98d49ec9b74b93a4256f430e83838f2e911baf42..b74f7772b576b131b34b25c33fa544d4d6b84c8d 100644 (file)
@@ -57,6 +57,7 @@ static struct snmp_mib sctp_snmp_list[] = {
        SNMP_MIB_ITEM("SctpReasmUsrMsgs", SCTP_MIB_REASMUSRMSGS),
        SNMP_MIB_ITEM("SctpOutSCTPPacks", SCTP_MIB_OUTSCTPPACKS),
        SNMP_MIB_ITEM("SctpInSCTPPacks", SCTP_MIB_INSCTPPACKS),
+       SNMP_MIB_SENTINEL
 };
 
 /* Return the current value of a particular entry in the mib by adding its
index 24c21f2a33a7b9bfa53d06de59455f0cca172579..5a7265aeaf839c160ee047d9f319b0763fdefe82 100644 (file)
@@ -185,9 +185,7 @@ make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body,
                        sg->page = body->pages[i];
                        sg->offset = offset;
                        sg->length = thislen;
-                       kmap(sg->page); /* XXX kmap_atomic? */
                        crypto_digest_update(tfm, sg, 1);
-                       kunmap(sg->page);
                        len -= thislen;
                        i++;
                        offset = 0;
index 8a4d9c106af1b37b1120a2adb53e21f7fb3dc317..fde16f40a581dfb64e725e694afb4df5090693ed 100644 (file)
@@ -993,6 +993,7 @@ 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;
index 9b9f94c915d234365c14444872c5ea5e1163bd6d..09ffca54b3734136aa46afcfcbaeb279e80960d9 100644 (file)
@@ -359,11 +359,16 @@ handle_modversions(struct module *mod, struct elf_info *info,
                /* ignore __this_module, it will be resolved shortly */
                if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
                        break;
-#ifdef STT_REGISTER
+/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
+#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
+/* add compatibility with older glibc */
+#ifndef STT_SPARC_REGISTER
+#define STT_SPARC_REGISTER STT_REGISTER
+#endif
                if (info->hdr->e_machine == EM_SPARC ||
                    info->hdr->e_machine == EM_SPARCV9) {
                        /* Ignore register directives. */
-                       if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
+                       if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
                                break;
                }
 #endif
index ee794ae06040a2cf768092f79300ab4f8f1cf4fe..b65ee4701f98fab7d6564d9cee6d771455aa3603 100644 (file)
@@ -77,7 +77,7 @@ source "sound/parisc/Kconfig"
 endmenu
 
 menu "Open Sound System"
-       depends on SOUND!=n && (BROKEN || (!SPARC32 && !SPARC64))
+       depends on SOUND!=n
 
 config SOUND_PRIME
        tristate "Open Sound System (DEPRECATED)"
index 764ac184b2232bd7e7810efc5c8f05a244263e07..969d75528bdeb9189f5ff9fdc8aaddac165bf1f5 100644 (file)
@@ -5,7 +5,7 @@
 
 snd-objs     := sound.o init.o memory.o info.o control.o misc.o \
                 device.o wrappers.o
-ifeq ($(CONFIG_ISA),y)
+ifeq ($(CONFIG_ISA_DMA_API),y)
 snd-objs     += isadma.o
 endif
 ifeq ($(CONFIG_SND_OSSEMUL),y)
index 7612884f530b17abfe554a867e55309b45a2a815..3271e9245490b81d3b3f6c3d9d3e6b54ec66612d 100644 (file)
@@ -432,7 +432,7 @@ EXPORT_SYMBOL(snd_device_new);
 EXPORT_SYMBOL(snd_device_register);
 EXPORT_SYMBOL(snd_device_free);
   /* isadma.c */
-#ifdef CONFIG_ISA
+#ifdef CONFIG_ISA_DMA_API
 EXPORT_SYMBOL(snd_dma_program);
 EXPORT_SYMBOL(snd_dma_disable);
 EXPORT_SYMBOL(snd_dma_pointer);
index 148a856a43ad7631207804137347ba6cd26184ca..be4ea60a367924b0808651f5a542aa0021940804 100644 (file)
@@ -1,7 +1,7 @@
 # ALSA ISA drivers
 
 menu "ISA devices"
-       depends on SND!=n && ISA
+       depends on SND!=n && ISA && ISA_DMA_API
 
 config SND_AD1848_LIB
         tristate
index 7bd95ceab7cc62ab59339a4854dc0bc834b0eebd..953e5f3ea03d6bb990584f58bed059b6f8420c25 100644 (file)
@@ -6,7 +6,7 @@
 # Prompt user for primary drivers.
 config SOUND_BT878
        tristate "BT878 audio dma"
-       depends on SOUND_PRIME
+       depends on SOUND_PRIME && PCI
        ---help---
          Audio DMA support for bt878 based grabber boards.  As you might have
          already noticed, bt878 is listed with two functions in /proc/pci.
@@ -80,14 +80,14 @@ config SOUND_EMU10K1
 
 config MIDI_EMU10K1
        bool "Creative SBLive! MIDI (EXPERIMENTAL)"
-       depends on SOUND_EMU10K1 && EXPERIMENTAL
+       depends on SOUND_EMU10K1 && EXPERIMENTAL && ISA_DMA_API
        help
          Say Y if you want to be able to use the OSS /dev/sequencer
          interface.  This code is still experimental.
 
 config SOUND_FUSION
        tristate "Crystal SoundFusion (CS4280/461x)"
-       depends on SOUND_PRIME
+       depends on SOUND_PRIME && PCI
        help
          This module drives the Crystal SoundFusion devices (CS4280/46xx
          series) when wired as native sound drivers with AC97 codecs.  If
@@ -95,7 +95,7 @@ config SOUND_FUSION
 
 config SOUND_CS4281
        tristate "Crystal Sound CS4281"
-       depends on SOUND_PRIME
+       depends on SOUND_PRIME && PCI
        help
          Picture and feature list at
          <http://www.pcbroker.com/crystal4281.html>.
@@ -179,7 +179,7 @@ config SOUND_HARMONY
 
 config SOUND_SONICVIBES
        tristate "S3 SonicVibes"
-       depends on SOUND_PRIME
+       depends on SOUND_PRIME && PCI
        help
          Say Y or M if you have a PCI sound card utilizing the S3
          SonicVibes chipset. To find out if your sound card uses a
@@ -226,7 +226,7 @@ config SOUND_AU1550_AC97
 
 config SOUND_TRIDENT
        tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core"
-       depends on SOUND_PRIME
+       depends on SOUND_PRIME && PCI
        ---help---
          Say Y or M if you have a PCI sound card utilizing the Trident
          4DWave-DX/NX chipset or your mother board chipset has SiS 7018
@@ -503,7 +503,7 @@ config SOUND_VIA82CXXX
 
 config MIDI_VIA82CXXX
        bool "VIA 82C686 MIDI"
-       depends on SOUND_VIA82CXXX
+       depends on SOUND_VIA82CXXX && ISA_DMA_API
        help
          Answer Y to use the MIDI interface of the Via686. You may need to
          enable this in the BIOS before it will work. This is for connection
@@ -512,7 +512,7 @@ config MIDI_VIA82CXXX
 
 config SOUND_OSS
        tristate "OSS sound modules"
-       depends on SOUND_PRIME
+       depends on SOUND_PRIME && ISA_DMA_API
        help
          OSS is the Open Sound System suite of sound card drivers.  They make
          sound programming easier since they provide a common API.  Say Y or
index db9afb61d6ffb49e02ff3bf78c6dec67c664e618..9bf3ee544d86e62987c2d23e20bea83b5bfcd0c2 100644 (file)
@@ -80,7 +80,7 @@ obj-$(CONFIG_SOUND_ALI5455)   += ali5455.o ac97_codec.o
 obj-$(CONFIG_SOUND_IT8172)     += ite8172.o ac97_codec.o
 obj-$(CONFIG_SOUND_FORTE)      += forte.o ac97_codec.o
 
-obj-$(CONFIG_SOUND_AD1980)     += ac97_plugin_ad1980.o
+obj-$(CONFIG_SOUND_AD1980)     += ac97_plugin_ad1980.o ac97_codec.o
 obj-$(CONFIG_SOUND_WM97XX)     += ac97_plugin_wm97xx.o
 
 ifeq ($(CONFIG_MIDI_EMU10K1),y)
index 7e9f667cf7a7176b15e3b5e24dfda480db54c033..b9a640fe48b10c857867a6c86854a78fee0a73fc 100644 (file)
@@ -3430,9 +3430,9 @@ out_iospace:
                release_mem_region(card->iobase_mmio_phys, 256);
        }
 out_pio:       
-       release_region(card->iobase, 64);
-out_region2:
        release_region(card->ac97base, 256);
+out_region2:
+       release_region(card->iobase, 64);
 out_region1:
        pci_free_consistent(pci_dev, sizeof(struct i810_channel)*NR_HW_CH,
            card->channel, card->chandma);
index bab7044572d38b02572e99e3294562e9698fc9db..d5b8064dc5650bebe99cae1fcb23ec60a4215719 100644 (file)
  *  VIDC sound function prototypes
  */
 
-/* vidc.c */
-
-extern int vidc_busy;
-
 /* vidc_fill.S */
 
 /*
index 6d7a00f34d822cc3171e4518f02a8271a1303104..26b42bb20a0a180f0493e670be5ee218a09f4c17 100644 (file)
@@ -314,7 +314,7 @@ config SND_YMFPCI
 
 config SND_ALS4000
        tristate "Avance Logic ALS4000"
-       depends on SND
+       depends on SND && ISA_DMA_API
        select SND_OPL3_LIB
        select SND_MPU401_UART
        select SND_PCM
index 844d76152ea271028654cdcc4767c41d2db0dffc..c89e82eb06a6df91840c5863e8804d643db94e09 100644 (file)
@@ -765,7 +765,8 @@ snd_pmac_ctrl_intr(int irq, void *devid, struct pt_regs *regs)
  */
 static void snd_pmac_sound_feature(pmac_t *chip, int enable)
 {
-       ppc_md.feature_call(PMAC_FTR_SOUND_CHIP_ENABLE, chip->node, 0, enable);
+       if (ppc_md.feature_call)
+               ppc_md.feature_call(PMAC_FTR_SOUND_CHIP_ENABLE, chip->node, 0, enable);
 }
 
 /*