Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Mar 2008 14:46:19 +0000 (07:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Mar 2008 14:46:19 +0000 (07:46 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ALPS - fix forward/back buttons reversed on Acer 5520-5290
  Input: ALPS - put secondary device in proper place in sysfs
  Input: wacom - add support for Bamboo1, BambooFun, and Cintiq 12WX
  Input: document i8042.noloop
  Input: add keyboard notifier documentation
  Input: ads7846 - fix uninitialized var warning
  Input: i8042 - add SNI RM support
  Input: i8042 - add Lenovo 3000 N100 to nomux blacklist
  Input: i8042 - fix warning on non-x86 builds
  Input: cobalt_btns - assorted fixes

329 files changed:
Documentation/00-INDEX
Documentation/acpi/dsdt-override.txt
Documentation/acpi/initramfs-add-dsdt.sh [deleted file]
Documentation/filesystems/proc.txt
Documentation/kernel-parameters.txt
Documentation/laptops/00-INDEX
Documentation/laptops/acer-wmi.txt
Documentation/laptops/laptop-mode.txt [moved from Documentation/laptop-mode.txt with 100% similarity]
Documentation/mca.txt
Documentation/power/00-INDEX
Documentation/power/pm.txt [moved from Documentation/pm.txt with 99% similarity]
Documentation/power/pm_qos_interface.txt [moved from Documentation/pm_qos_interface.txt with 100% similarity]
Documentation/power/power_supply_class.txt [moved from Documentation/power_supply_class.txt with 100% similarity]
Documentation/thermal/sysfs-api.txt
MAINTAINERS
Makefile
arch/alpha/Kconfig
arch/alpha/kernel/pci_iommu.c
arch/arm/Makefile
arch/arm/common/it8152.c
arch/arm/configs/omap_h2_1610_defconfig
arch/arm/configs/omap_osk_5912_defconfig
arch/arm/kernel/head-common.S
arch/arm/kernel/head.S
arch/arm/kernel/kprobes.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/gpio.c
arch/arm/mach-h720x/common.c
arch/arm/mach-imx/dma.c
arch/arm/mach-imx/irq.c
arch/arm/mach-iop13xx/iq81340mc.c
arch/arm/mach-iop13xx/iq81340sc.c
arch/arm/mach-iop13xx/pci.c
arch/arm/mach-iop13xx/setup.c
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-ixp4xx/gtwx5715-pci.c
arch/arm/mach-netx/generic.c
arch/arm/mach-ns9xxx/gpio.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap2/io.c
arch/arm/mach-orion/addr-map.c
arch/arm/mach-orion/common.c
arch/arm/mach-orion/common.h
arch/arm/mach-orion/dns323-setup.c
arch/arm/mach-orion/gpio.c
arch/arm/mach-orion/kurobox_pro-setup.c
arch/arm/mach-orion/ts209-setup.c
arch/arm/mach-pnx4008/clock.c
arch/arm/mach-pnx4008/dma.c
arch/arm/mach-pxa/cm-x270-pci.c
arch/arm/mach-pxa/cm-x270.c
arch/arm/mach-pxa/dma.c
arch/arm/mach-pxa/em-x270.c
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/trizeps4.c
arch/arm/mach-sa1100/badge4.c
arch/arm/mach-sa1100/cpu-sa1100.c
arch/arm/mach-sa1100/dma.c
arch/arm/mach-sa1100/h3600.c
arch/arm/plat-iop/pci.c
arch/arm/plat-omap/cpu-omap.c
arch/arm/plat-omap/devices.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/gpio.c
arch/arm/plat-s3c24xx/dma.c
arch/mips/Kconfig
arch/mips/Makefile
arch/mips/au1000/common/dbdma.c
arch/mips/defconfig [deleted file]
arch/mips/kernel/Makefile
arch/mips/kernel/cpu-bugs64.c
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/csrc-r4k.c
arch/mips/kernel/head.S
arch/mips/kernel/traps.c
arch/mips/lib/ucmpdi2.c
arch/mips/lib/uncached.c
arch/mips/mips-boards/generic/time.c
arch/mips/mipssim/sim_time.c
arch/mips/mm/c-r3k.c
arch/mips/mm/c-r4k.c
arch/mips/mm/c-tx39.c
arch/mips/mm/cache.c
arch/mips/mm/cex-sb1.S
arch/mips/mm/pg-r4k.c
arch/mips/mm/pg-sb1.c
arch/mips/mm/sc-ip22.c
arch/mips/mm/sc-mips.c
arch/mips/mm/sc-r5k.c
arch/mips/mm/sc-rm7k.c
arch/mips/mm/tlb-r3k.c
arch/mips/mm/tlb-r4k.c
arch/mips/mm/tlb-r8k.c
arch/mips/mm/tlbex.c
arch/mips/mm/uasm.c
arch/mips/mm/uasm.h
arch/mips/pci/pci-bcm1480.c
arch/mips/pci/pci-ip27.c
arch/mips/pci/pci.c
arch/mips/pmc-sierra/yosemite/smp.c
arch/mips/sgi-ip27/ip27-init.c
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip27/ip27-xtalk.c
arch/parisc/Makefile
arch/parisc/configs/default_defconfig [moved from arch/parisc/defconfig with 100% similarity]
arch/parisc/kernel/firmware.c
arch/parisc/kernel/hardware.c
arch/parisc/kernel/head.S
arch/parisc/kernel/pdc_cons.c
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/traps.c
arch/powerpc/Makefile
arch/powerpc/boot/Makefile
arch/powerpc/boot/dts/mpc8377_mds.dts
arch/powerpc/boot/dts/mpc8378_mds.dts
arch/powerpc/boot/dts/mpc8379_mds.dts
arch/powerpc/boot/dts/sbc8548.dts
arch/powerpc/boot/wrapper
arch/powerpc/configs/adder875-uboot_defconfig [deleted file]
arch/powerpc/configs/adder875_defconfig [moved from arch/powerpc/configs/adder875-redboot_defconfig with 95% similarity]
arch/powerpc/kernel/head_8xx.S
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/platforms/83xx/mpc837x_mds.c
arch/powerpc/platforms/Kconfig
arch/powerpc/platforms/Kconfig.cputype
arch/powerpc/platforms/cell/spufs/context.c
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/sched.c
arch/powerpc/platforms/cell/spufs/spufs.h
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/sysdev/qe_lib/qe.c
arch/ppc/kernel/head_8xx.S
arch/x86/Kconfig
block/genhd.c
crypto/async_tx/async_memcpy.c
crypto/async_tx/async_memset.c
crypto/async_tx/async_tx.c
crypto/async_tx/async_xor.c
drivers/acpi/Kconfig
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/ec.c
drivers/acpi/osl.c
drivers/acpi/pci_irq.c
drivers/acpi/pci_root.c
drivers/acpi/processor_core.c
drivers/acpi/scan.c
drivers/acpi/sleep/main.c
drivers/acpi/system.c
drivers/acpi/thermal.c
drivers/acpi/toshiba_acpi.c
drivers/acpi/utilities/utdebug.c
drivers/acpi/utilities/utobject.c
drivers/acpi/utils.c
drivers/acpi/video.c
drivers/acpi/wmi.c
drivers/ata/ahci.c
drivers/ata/libata-acpi.c
drivers/ata/pata_ali.c
drivers/atm/firestream.c
drivers/atm/fore200e.c
drivers/atm/idt77252.c
drivers/block/Kconfig
drivers/block/Makefile
drivers/block/floppy.c
drivers/block/ps2esdi.c [deleted file]
drivers/block/viodasd.c
drivers/block/virtio_blk.c
drivers/bluetooth/hci_usb.c
drivers/char/drm/ati_pcigart.c
drivers/char/drm/drmP.h
drivers/char/drm/drm_fops.c
drivers/char/drm/drm_lock.c
drivers/char/drm/drm_pciids.h
drivers/char/drm/r128_cce.c
drivers/char/drm/radeon_cp.c
drivers/char/drm/via_dma.c
drivers/char/drm/via_dmablit.c
drivers/char/riscom8.c
drivers/dma/dmaengine.c
drivers/dma/fsldma.c
drivers/dma/iop-adma.c
drivers/firewire/Kconfig
drivers/firewire/fw-ohci.c
drivers/firewire/fw-sbp2.c
drivers/firewire/fw-topology.c
drivers/firewire/fw-transaction.c
drivers/firewire/fw-transaction.h
drivers/i2c/busses/i2c-amd756.c
drivers/i2c/chips/Makefile
drivers/i2c/i2c-core.c
drivers/ieee1394/sbp2.c
drivers/infiniband/hw/ipath/ipath_common.h
drivers/infiniband/hw/ipath/ipath_driver.c
drivers/infiniband/hw/ipath/ipath_kernel.h
drivers/infiniband/hw/ipath/ipath_mad.c
drivers/infiniband/hw/ipath/ipath_qp.c
drivers/infiniband/hw/ipath/ipath_rc.c
drivers/infiniband/hw/ipath/ipath_registers.h
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
drivers/isdn/i4l/isdn_common.c
drivers/isdn/i4l/isdn_v110.c
drivers/macintosh/via-pmu-backlight.c
drivers/macintosh/via-pmu.c
drivers/misc/Kconfig
drivers/misc/acer-wmi.c
drivers/misc/sony-laptop.c
drivers/mmc/host/tifm_sd.c
drivers/net/Kconfig
drivers/net/ac3200.c
drivers/net/apne.c
drivers/net/appletalk/ltpc.c
drivers/net/arcnet/capmode.c
drivers/net/atarilance.c
drivers/net/e100.c
drivers/net/enc28j60.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/mv643xx_eth.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/phy/Kconfig
drivers/net/phy/davicom.c
drivers/net/pppol2tp.c
drivers/net/s2io.c
drivers/net/tulip/de2104x.c
drivers/net/virtio_net.c
drivers/net/wan/sbni.c
drivers/net/wireless/libertas/cmdresp.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c
drivers/parisc/pdc_stable.c
drivers/parisc/sba_iommu.c
drivers/pci/bus.c
drivers/pci/hotplug/pciehp_core.c
drivers/pci/pci-acpi.c
drivers/pnp/quirks.c
drivers/spi/au1550_spi.c
drivers/spi/spi_bitbang.c
drivers/thermal/Kconfig
drivers/thermal/thermal.c
drivers/virtio/virtio_balloon.c
drivers/virtio/virtio_pci.c
drivers/virtio/virtio_ring.c
fs/bio.c
fs/hfs/brec.c
fs/nfsd/nfsfh.c
fs/proc/base.c
fs/proc/generic.c
fs/proc/internal.h
fs/proc/proc_net.c
fs/proc/task_mmu.c
include/asm-arm/arch-omap/board-h3.h
include/asm-arm/arch-omap/common.h
include/asm-arm/arch-omap/gpioexpander.h
include/asm-arm/pgtable-nommu.h
include/asm-arm/plat-s3c/uncompress.h
include/asm-arm/proc-fns.h
include/asm-h8300/uaccess.h
include/asm-mips/cacheflush.h
include/asm-mips/highmem.h
include/asm-mips/mach-ip27/cpu-feature-overrides.h
include/asm-mips/mach-jmr3927/ioremap.h
include/asm-mips/mach-lasat/irq.h
include/asm-mips/pgtable-32.h
include/asm-mips/time.h
include/asm-parisc/elf.h
include/asm-parisc/fixmap.h
include/asm-parisc/futex.h
include/asm-parisc/pdc.h
include/asm-parisc/pgalloc.h
include/asm-parisc/pgtable.h
include/asm-parisc/unistd.h
include/asm-powerpc/pgtable-ppc32.h
include/asm-ppc/pgtable.h
include/linux/Kbuild
include/linux/ethtool.h
include/linux/exportfs.h
include/linux/genhd.h
include/linux/mm.h
include/linux/netfilter/nfnetlink_compat.h
include/linux/pci.h
include/linux/pmu.h
include/linux/proc_fs.h
include/linux/ps2esdi.h [deleted file]
include/linux/virtio.h
include/net/bluetooth/bluetooth.h
include/net/dst.h
include/net/irda/irttp.h
include/net/net_namespace.h
include/net/netfilter/nf_conntrack_extend.h
init/initramfs.c
init/main.c
kernel/power/Kconfig
kernel/power/snapshot.c
kernel/relay.c
kernel/sched.c
kernel/sched_fair.c
lib/devres.c
lib/swiotlb.c
net/bluetooth/bnep/bnep.h
net/bluetooth/bnep/sock.c
net/bluetooth/hci_core.c
net/bluetooth/hci_sock.c
net/ipv4/tcp_output.c
net/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_extend.c
net/netfilter/nf_queue.c
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c
net/netfilter/xt_time.c
net/rxrpc/ar-recvmsg.c
net/sctp/bind_addr.c
net/sctp/ipv6.c
net/sctp/protocol.c
net/sctp/sm_make_chunk.c
net/sctp/socket.c
net/sunrpc/xprtrdma/svc_rdma_sendto.c
net/sunrpc/xprtrdma/svc_rdma_transport.c
scripts/kernel-doc
security/selinux/hooks.c
security/smack/smack.h
security/smack/smackfs.c

index 042073f656e53e01daff332e1e9ee500ad99efc0..fc8e7c7d182f5cbcc179fc5dec2575912ce46653 100644 (file)
@@ -225,8 +225,6 @@ kprobes.txt
        - documents the kernel probes debugging feature.
 kref.txt
        - docs on adding reference counters (krefs) to kernel objects.
-laptop-mode.txt
-       - how to conserve battery power using laptop-mode.
 laptops/
        - directory with laptop related info and laptop driver documentation.
 ldm.txt
@@ -301,12 +299,8 @@ pcmcia/
        - info on the Linux PCMCIA driver.
 pi-futex.txt
        - documentation on lightweight PI-futexes.
-pm.txt
-       - info on Linux power management support.
 pnp.txt
        - Linux Plug and Play documentation.
-power_supply_class.txt
-       - Tells userspace about battery, UPS, AC or DC power supply properties
 power/
        - directory with info on Linux PCI power management.
 powerpc/
index 5008f256a2dbec6d642866262bb00ecb0eea65c1..febbb1ba4d2317b984e7217796ac39151f867531 100644 (file)
@@ -1,15 +1,7 @@
-Linux supports two methods of overriding the BIOS DSDT:
+Linux supports a method of overriding the BIOS DSDT:
 
 CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.
 
-CONFIG_ACPI_CUSTOM_DSDT_INITRD adds the image to the initrd.
-
-When to use these methods is described in detail on the
+When to use this method is described in detail on the
 Linux/ACPI home page:
 http://www.lesswatts.org/projects/acpi/overridingDSDT.php
-
-Note that if both options are used, the DSDT supplied
-by the INITRD method takes precedence.
-
-Documentation/initramfs-add-dsdt.sh is provided for convenience
-for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
diff --git a/Documentation/acpi/initramfs-add-dsdt.sh b/Documentation/acpi/initramfs-add-dsdt.sh
deleted file mode 100755 (executable)
index 17ef6e8..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-# Adds a DSDT file to the initrd (if it's an initramfs)
-# first argument is the name of archive
-# second argument is the name of the file to add
-# The file will be copied as /DSDT.aml
-
-# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
-# 20060205: this time it should really work
-
-# check the arguments
-if [ $# -ne 2 ]; then
-       program_name=$(basename $0)
-       echo "\
-$program_name: too few arguments
-Usage: $program_name initrd-name.img DSDT-to-add.aml
-Adds a DSDT file to an initrd (in initramfs format)
-
-  initrd-name.img: filename of the initrd in initramfs format
-  DSDT-to-add.aml: filename of the DSDT file to add
-  " 1>&2
-    exit 1
-fi
-
-# we should check it's an initramfs
-
-tempcpio=$(mktemp -d)
-# cleanup on exit, hangup, interrupt, quit, termination
-trap 'rm -rf $tempcpio' 0 1 2 3 15
-
-# extract the archive
-gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1
-
-# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
-cp -f "$2" "$tempcpio"/DSDT.aml
-
-# add the file
-cd "$tempcpio"
-(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
-cd "$OLDPWD"
-
-# re-compress the archive
-gzip -c "$tempcpio"/initramfs.cpio > "$1"
-
index 5681e2fa1496167e6f876b6dab39e9605597a117..518ebe609e2b1c9392580c9ae840d5da4aa84e68 100644 (file)
@@ -1506,13 +1506,13 @@ laptop_mode
 -----------
 
 laptop_mode is a knob that controls "laptop mode". All the things that are
-controlled by this knob are discussed in Documentation/laptop-mode.txt.
+controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt.
 
 block_dump
 ----------
 
 block_dump enables block I/O debugging when set to a nonzero value. More
-information on block I/O debugging is in Documentation/laptop-mode.txt.
+information on block I/O debugging is in Documentation/laptops/laptop-mode.txt.
 
 swap_token_timeout
 ------------------
index 09118a04594287b5cd8040d1a6192f94fcc4ba75..650b0d8aa89b7bde17ca17c1ee54ad37e57f7480 100644 (file)
@@ -138,7 +138,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        strict -- Be less tolerant of platforms that are not
                                strictly ACPI specification compliant.
 
-                       See also Documentation/pm.txt, pci=noacpi
+                       See also Documentation/power/pm.txt, pci=noacpi
 
        acpi_apic_instance=     [ACPI, IOAPIC]
                        Format: <int>
@@ -177,9 +177,6 @@ and is between 256 and 4096 characters. It is defined in the file
 
        acpi_no_auto_ssdt       [HW,ACPI] Disable automatic loading of SSDT
 
-       acpi_no_initrd_override [KNL,ACPI]
-                       Disable loading custom ACPI tables from the initramfs
-
        acpi_os_name=   [HW,ACPI] Tell ACPI BIOS the name of the OS
                        Format: To spoof as Windows 98: ="Microsoft Windows"
 
index 729c2c062e109ab0d57a5b8760d4a29821cb9943..ee5692b26dd4d629901cabc387e791c0576df243 100644 (file)
@@ -2,6 +2,8 @@
        - This file
 acer-wmi.txt
        - information on the Acer Laptop WMI Extras driver.
+laptop-mode.txt
+       - how to conserve battery power using laptop-mode.
 sony-laptop.txt
        - Sony Notebook Control Driver (SNC) Readme.
 sonypi.txt
index b06696329cffceccc0477a6fa38b0351fc9e013c..23df051dbf69f4a10c10cbbf82188b581c245e66 100644 (file)
@@ -48,7 +48,7 @@ DSDT.
 
 To send me the DSDT, as root/sudo:
 
-cat /sys/firmware/acpi/DSDT > dsdt
+cat /sys/firmware/acpi/tables/DSDT > dsdt
 
 And send me the resulting 'dsdt' file.
 
@@ -169,7 +169,7 @@ can be added to acer-wmi.
 
 The LED is exposed through the LED subsystem, and can be found in:
 
-/sys/devices/platform/acer-wmi/leds/acer-mail:green/
+/sys/devices/platform/acer-wmi/leds/acer-wmi::mail/
 
 The mail LED is autodetected, so if you don't have one, the LED device won't
 be registered.
index aabce4ad90f98fefce10850c04bbae8ab81b7ef3..510375d4209a608c2452dc7b631fb045ba7e83fa 100644 (file)
@@ -143,14 +143,7 @@ MCA Device Drivers
 
 Currently, there are a number of MCA-specific device drivers.
 
-1) PS/2 ESDI
-       drivers/block/ps2esdi.c
-       include/linux/ps2esdi.h
-   Uses major number 36, and should use /dev files /dev/eda, /dev/edb.
-   Supports two drives, but only one controller.  May use the
-   command-line args "ed=cyl,head,sec" and "tp720".
-
-2) PS/2 SCSI
+1) PS/2 SCSI
        drivers/scsi/ibmmca.c
        drivers/scsi/ibmmca.h
    The driver for the IBM SCSI subsystem.  Includes both integrated
@@ -159,25 +152,25 @@ Currently, there are a number of MCA-specific device drivers.
    machine with a front-panel display (i.e. model 95), you can use
    "ibmmcascsi=display" to enable a drive activity indicator.
 
-3) 3c523
+2) 3c523
        drivers/net/3c523.c
        drivers/net/3c523.h
    3Com 3c523 Etherlink/MC ethernet driver.
 
-4) SMC Ultra/MCA and IBM Adapter/A
+3) SMC Ultra/MCA and IBM Adapter/A
        drivers/net/smc-mca.c
        drivers/net/smc-mca.h
        Driver for the MCA version of the SMC Ultra and various other
        OEM'ed and work-alike cards (Elite, Adapter/A, etc).
 
-5) NE/2
+4) NE/2
        driver/net/ne2.c
        driver/net/ne2.h
        The NE/2 is the MCA version of the NE2000.  This may not work
        with clones that have a different adapter id than the original
        NE/2.
 
-6) Future Domain MCS-600/700, OEM'd IBM Fast SCSI Adapter/A and
+5) Future Domain MCS-600/700, OEM'd IBM Fast SCSI Adapter/A and
    Reply Sound Blaster/SCSI (SCSI part)
        Better support for these cards than the driver for ISA.
    Supports multiple cards with IRQ sharing.
index 8db4e41a052d9a9df37bfa39dc5dda1a7b1d12a1..a55d7f1c836d7de2ad0b09b9ea2c138562db01a6 100644 (file)
@@ -14,6 +14,12 @@ notifiers.txt
        - Registering suspend notifiers in device drivers
 pci.txt
        - How the PCI Subsystem Does Power Management
+pm.txt
+       - info on Linux power management support.
+pm_qos_interface.txt
+       - info on Linux PM Quality of Service interface
+power_supply_class.txt
+       - Tells userspace about battery, UPS, AC or DC power supply properties
 s2ram.txt
        - How to get suspend to ram working (and debug it when it isn't)
 states.txt
similarity index 99%
rename from Documentation/pm.txt
rename to Documentation/power/pm.txt
index da8589a0e07df08b77ae15c5bb83f7800f9b2bdf..be841507e43fa0745f6c6eef55e06356ae725709 100644 (file)
@@ -108,7 +108,7 @@ void pm_unregister_all(pm_callback cback);
  *          EINVAL if the request is not supported
  *          EBUSY if the device is now busy and cannot handle the request
  *          ENOMEM if the device was unable to handle the request due to memory
- *          
+ *
  * Details: The device request callback will be called before the
  *          device/system enters a suspend state (ACPI D1-D3) or
  *          or after the device/system resumes from suspend (ACPI D0).
index ba9c2da5a8c200fbb6a27b84c7a2f85a441e979d..d9f28be75403cea53c07cfe8e965074a71037619 100644 (file)
@@ -143,10 +143,10 @@ type                              Strings which represent the thermal zone type.
                                This is given by thermal zone driver as part of registration.
                                Eg: "ACPI thermal zone" indicates it's a ACPI thermal device
                                RO
-                               Optional
+                               Required
 
 temp                           Current temperature as reported by thermal zone (sensor)
-                               Unit: degree Celsius
+                               Unit: millidegree Celsius
                                RO
                                Required
 
@@ -163,7 +163,7 @@ mode                                One of the predefined values in [kernel, user]
                                          charge of the thermal management.
 
 trip_point_[0-*]_temp          The temperature above which trip point will be fired
-                               Unit: degree Celsius
+                               Unit: millidegree Celsius
                                RO
                                Optional
 
@@ -193,7 +193,7 @@ type                                String which represents the type of device
                                eg. For memory controller device on intel_menlow platform:
                                this should be "Memory controller"
                                RO
-                               Optional
+                               Required
 
 max_state                      The maximum permissible cooling state of this cooling device.
                                RO
@@ -219,16 +219,16 @@ the sys I/F structure will be built like this:
 
 |thermal_zone1:
        |-----type:                     ACPI thermal zone
-       |-----temp:                     37
+       |-----temp:                     37000
        |-----mode:                     kernel
-       |-----trip_point_0_temp:        100
+       |-----trip_point_0_temp:        100000
        |-----trip_point_0_type:        critical
-       |-----trip_point_1_temp:        80
+       |-----trip_point_1_temp:        80000
        |-----trip_point_1_type:        passive
-       |-----trip_point_2_temp:        70
-       |-----trip_point_2_type:        active[0]
-       |-----trip_point_3_temp:        60
-       |-----trip_point_3_type:        active[1]
+       |-----trip_point_2_temp:        70000
+       |-----trip_point_2_type:        active0
+       |-----trip_point_3_temp:        60000
+       |-----trip_point_3_type:        active1
        |-----cdev0:                    --->/sys/class/thermal/cooling_device0
        |-----cdev0_trip_point:         1       /* cdev0 can be used for passive */
        |-----cdev1:                    --->/sys/class/thermal/cooling_device3
index 25f450fe1059602a3d38292964d4c4ca9a0d38c1..6d628fb6ee014a3e5491cc92b98cef54c3e67831 100644 (file)
@@ -266,6 +266,15 @@ L:      linux-acpi@vger.kernel.org
 W:      http://www.lesswatts.org/projects/acpi/
 S:      Maintained
 
+AD1889 ALSA SOUND DRIVER
+P:     Kyle McMartin
+M:     kyle@parisc-linux.org
+P:     Thibaut Varene
+M:     T-Bone@parisc-linux.org
+W:     http://wiki.parisc-linux.org/AD1889
+L:     linux-parisc@vger.kernel.org
+S:     Maintained
+
 ADM1025 HARDWARE MONITOR DRIVER
 P:     Jean Delvare
 M:     khali@linux-fr.org
@@ -2052,43 +2061,19 @@ M:      kernel@wantstofly.org
 L:     netdev@vger.kernel.org
 S:     Maintained
 
-INTEL PRO/100 ETHERNET SUPPORT
+INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe)
 P:     Auke Kok
 M:     auke-jan.h.kok@intel.com
 P:     Jesse Brandeburg
 M:     jesse.brandeburg@intel.com
 P:     Jeff Kirsher
 M:     jeffrey.t.kirsher@intel.com
+P:     Bruce Allan
+M:     bruce.w.allan@intel.com
 P:     John Ronciak
 M:     john.ronciak@intel.com
 L:     e1000-devel@lists.sourceforge.net
-W:     http://sourceforge.net/projects/e1000/
-S:     Supported
-
-INTEL PRO/1000 GIGABIT ETHERNET SUPPORT
-P:     Auke Kok
-M:     auke-jan.h.kok@intel.com
-P:     Jesse Brandeburg
-M:     jesse.brandeburg@intel.com
-P:     Jeff Kirsher
-M:     jeffrey.t.kirsher@intel.com
-P:     John Ronciak
-M:     john.ronciak@intel.com
-L:     e1000-devel@lists.sourceforge.net
-W:     http://sourceforge.net/projects/e1000/
-S:     Supported
-
-INTEL PRO/10GbE SUPPORT
-P:     Ayyappan Veeraiyan
-M:     ayyappan.veeraiyan@intel.com
-P:     Auke Kok
-M:     auke-jan.h.kok@intel.com
-P:     Jesse Brandeburg
-M:     jesse.brandeburg@intel.com
-P:     John Ronciak
-M:     john.ronciak@intel.com
-L:     e1000-devel@lists.sourceforge.net
-W:     http://sourceforge.net/projects/e1000/
+W:     http://e1000.sourceforge.net/
 S:     Supported
 
 INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
index 0eb23e5bfc88cd30d6abec5c01d8f473a72a595a..7a4d34b91e032099d119adae92a0f347dc481901 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 25
-EXTRAVERSION = -rc5
+EXTRAVERSION = -rc6
 NAME = Funky Weasel is Jiggy wit it
 
 # *DOCUMENTATION*
index 002703b8c0b033d72eea6297b869796f772c2c6e..729cdbdf8036203d99c1b59728aedf37d7a5349f 100644 (file)
@@ -330,6 +330,9 @@ config PCI_DOMAINS
 config PCI_SYSCALL
        def_bool PCI
 
+config IOMMU_HELPER
+       def_bool PCI
+
 config ALPHA_CORE_AGP
        bool
        depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL
index e07a23fc5b74e3d966ac1fc0c070f03fef83ca57..4e1c08636edd66b4c08b58aee5c358b55a0c382c 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/scatterlist.h>
 #include <linux/log2.h>
 #include <linux/dma-mapping.h>
+#include <linux/iommu-helper.h>
 
 #include <asm/io.h>
 #include <asm/hwrpb.h>
@@ -125,14 +126,6 @@ iommu_arena_new(struct pci_controller *hose, dma_addr_t base,
        return iommu_arena_new_node(0, hose, base, window_size, align);
 }
 
-static inline int is_span_boundary(unsigned int index, unsigned int nr,
-                                  unsigned long shift,
-                                  unsigned long boundary_size)
-{
-       shift = (shift + index) & (boundary_size - 1);
-       return shift + nr > boundary_size;
-}
-
 /* Must be called with the arena lock held */
 static long
 iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena,
@@ -147,7 +140,6 @@ iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena,
        base = arena->dma_base >> PAGE_SHIFT;
        if (dev) {
                boundary_size = dma_get_seg_boundary(dev) + 1;
-               BUG_ON(!is_power_of_2(boundary_size));
                boundary_size >>= PAGE_SHIFT;
        } else {
                boundary_size = 1UL << (32 - PAGE_SHIFT);
@@ -161,7 +153,7 @@ iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena,
 
 again:
        while (i < n && p+i < nent) {
-               if (!i && is_span_boundary(p, n, base, boundary_size)) {
+               if (!i && iommu_is_span_boundary(p, n, base, boundary_size)) {
                        p = ALIGN(p + 1, mask + 1);
                        goto again;
                }
index 7b8ff66febe1ffe27f9f734a3a7f45b58e86a464..1a4649667ec8d420a541ee55c9a88c9b4bf8d5d8 100644 (file)
@@ -251,6 +251,7 @@ define archhelp
   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
   echo  '* xipImage      - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
+  echo  '  uImage        - U-Boot wrapped zImage'
   echo  '  bootpImage    - Combined zImage and initial RAM disk' 
   echo  '                  (supply initrd image via make variable INITRD=<path>)'
   echo  '  install       - Install uncompressed kernel'
index 97b7dc13d9aa9832e94995874293ed22332be748..538262241483202545dad88ac247b427b9e6c3b6 100644 (file)
@@ -274,7 +274,7 @@ static int it8152_pci_platform_notify_remove(struct device *dev)
 int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
 {
        dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
-               __FUNCTION__, dma_addr, size);
+               __func__, dma_addr, size);
        return (dev->bus == &pci_bus_type) &&
                ((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
 }
@@ -289,7 +289,7 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
  */
 int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
 {
-       dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask);
+       dev_dbg(&dev->dev, "%s: %llx\n", __func__, mask);
        if (mask >= PHYS_OFFSET + SZ_64M - 1)
                return 0;
 
@@ -299,7 +299,7 @@ int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
 int
 pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
 {
-       dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask);
+       dev_dbg(&dev->dev, "%s: %llx\n", __func__, mask);
        if (mask >= PHYS_OFFSET + SZ_64M - 1)
                return 0;
 
index c2345af3707a0b825e2017ffabe83d25aaccc3a1..323c1deeb9536005323c963c52a2fd4ba20c5fe1 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc5
-# Mon Dec 17 20:04:38 2007
+# Linux kernel version: 2.6.25-rc3
+# Mon Mar  3 03:39:48 2008
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -21,6 +21,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_ZONE_DMA=y
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -40,17 +41,22 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
 CONFIG_FAIR_GROUP_SCHED=y
-CONFIG_FAIR_USER_SCHED=y
-# CONFIG_FAIR_CGROUP_SCHED is not set
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
 # CONFIG_SYSFS_DEPRECATED is not set
 # CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -64,17 +70,26 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -102,6 +117,8 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_PREEMPT_RCU is not set
 
 #
 # System Type
@@ -130,6 +147,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_KS8695 is not set
 # CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
@@ -139,6 +157,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_MSM7X00A is not set
 
 #
 # TI OMAP Implementations
@@ -155,6 +174,7 @@ CONFIG_OMAP_MUX=y
 # CONFIG_OMAP_MUX_DEBUG is not set
 CONFIG_OMAP_MUX_WARNINGS=y
 CONFIG_OMAP_MCBSP=y
+# CONFIG_OMAP_MMU_FWK is not set
 # CONFIG_OMAP_MPU_TIMER is not set
 CONFIG_OMAP_32K_TIMER=y
 CONFIG_OMAP_32K_TIMER_HZ=128
@@ -266,6 +286,7 @@ CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh"
 # CONFIG_XIP_KERNEL is not set
 # CONFIG_KEXEC is not set
+# CONFIG_ATAGS_PROC is not set
 
 #
 # CPU Frequency scaling
@@ -311,9 +332,10 @@ CONFIG_PM=y
 # CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_SLEEP=y
-CONFIG_SUSPEND_UP_POSSIBLE=y
 CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 # CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 
 #
 # Networking
@@ -330,6 +352,7 @@ CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -384,6 +407,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
@@ -421,11 +445,13 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 CONFIG_ATA_OVER_ETH=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HAVE_IDE is not set
 
 #
 # SCSI device support
@@ -489,6 +515,7 @@ CONFIG_SMC91X=y
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
 # CONFIG_B44 is not set
 CONFIG_NETDEV_1000=y
+# CONFIG_E1000E_ENABLED is not set
 CONFIG_NETDEV_10000=y
 
 #
@@ -512,7 +539,6 @@ CONFIG_SLIP_COMPRESSED=y
 CONFIG_SLHC=y
 # CONFIG_SLIP_SMART is not set
 # CONFIG_SLIP_MODE_SLIP6 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
@@ -616,12 +642,10 @@ CONFIG_I2C_OMAP=y
 #
 # Miscellaneous I2C Chip support
 #
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
 # CONFIG_DS1682 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_ISP1301_OMAP is not set
 CONFIG_TPS65010=y
@@ -649,6 +673,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ADM9240 is not set
 # CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_F71805F is not set
@@ -676,6 +701,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
 # CONFIG_SENSORS_THMC50 is not set
 # CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_W83781D is not set
@@ -683,6 +709,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
@@ -705,6 +732,7 @@ CONFIG_SSB_POSSIBLE=y
 # Multifunction device drivers
 #
 # CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
 
 #
 # Multimedia devices
@@ -802,10 +830,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
-
-#
-# USB Gadget Support
-#
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
 # CONFIG_NEW_LEDS is not set
@@ -826,12 +850,10 @@ CONFIG_EXT2_FS=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-CONFIG_ROMFS_FS=y
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_FUSE_FS is not set
@@ -874,8 +896,10 @@ CONFIG_SYSFS=y
 # CONFIG_EFS_FS is not set
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+CONFIG_ROMFS_FS=y
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
@@ -946,9 +970,6 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 # CONFIG_DLM is not set
-CONFIG_INSTRUMENTATION=y
-# CONFIG_PROFILING is not set
-# CONFIG_MARKERS is not set
 
 #
 # Kernel hacking
@@ -975,6 +996,7 @@ CONFIG_FRAME_POINTER=y
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_ALGAPI=y
 CONFIG_CRYPTO_BLKCIPHER=y
+# CONFIG_CRYPTO_SEQIV is not set
 CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_HMAC is not set
 # CONFIG_CRYPTO_XCBC is not set
@@ -992,6 +1014,9 @@ CONFIG_CRYPTO_CBC=y
 CONFIG_CRYPTO_PCBC=m
 # CONFIG_CRYPTO_LRW is not set
 # CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_CCM is not set
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_FCRYPT is not set
@@ -1006,12 +1031,14 @@ CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_KHAZAD is not set
 # CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SALSA20 is not set
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_TEST is not set
 # CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
 CONFIG_CRYPTO_HW=y
 
 #
index d592a64871144e82e66a415be8f205cda2142920..d4ca5e6e4ffa7b4472f5254b3c75dffaff53cf2d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc5
-# Mon Dec 17 21:12:45 2007
+# Linux kernel version: 2.6.25-rc3
+# Mon Mar  3 03:35:17 2008
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -21,6 +21,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_ZONE_DMA=y
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -39,17 +40,22 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
 CONFIG_FAIR_GROUP_SCHED=y
-CONFIG_FAIR_USER_SCHED=y
-# CONFIG_FAIR_CGROUP_SCHED is not set
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
 # CONFIG_SYSFS_DEPRECATED is not set
 # CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -63,17 +69,26 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLAB=y
 # CONFIG_SLUB is not set
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
@@ -101,6 +116,8 @@ CONFIG_IOSCHED_CFQ=y
 CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_PREEMPT_RCU is not set
 
 #
 # System Type
@@ -129,6 +146,7 @@ CONFIG_DEFAULT_IOSCHED="cfq"
 # CONFIG_ARCH_KS8695 is not set
 # CONFIG_ARCH_NS9XXX is not set
 # CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION is not set
 # CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
@@ -138,6 +156,7 @@ CONFIG_DEFAULT_IOSCHED="cfq"
 # CONFIG_ARCH_LH7A40X is not set
 # CONFIG_ARCH_DAVINCI is not set
 CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_MSM7X00A is not set
 
 #
 # TI OMAP Implementations
@@ -154,6 +173,7 @@ CONFIG_OMAP_MUX=y
 # CONFIG_OMAP_MUX_DEBUG is not set
 CONFIG_OMAP_MUX_WARNINGS=y
 CONFIG_OMAP_MCBSP=y
+# CONFIG_OMAP_MMU_FWK is not set
 # CONFIG_OMAP_MPU_TIMER is not set
 CONFIG_OMAP_32K_TIMER=y
 CONFIG_OMAP_32K_TIMER_HZ=128
@@ -173,13 +193,13 @@ CONFIG_ARCH_OMAP16XX=y
 #
 # OMAP Board Type
 #
-# CONFIG_MACH_OMAP_INNOVATOR is not set
-# CONFIG_MACH_OMAP_H2 is not set
-# CONFIG_MACH_OMAP_H3 is not set
+CONFIG_MACH_OMAP_INNOVATOR=y
+CONFIG_MACH_OMAP_H2=y
+CONFIG_MACH_OMAP_H3=y
 CONFIG_MACH_OMAP_OSK=y
 # CONFIG_OMAP_OSK_MISTRAL is not set
-# CONFIG_MACH_NOKIA770 is not set
-# CONFIG_MACH_OMAP_GENERIC is not set
+CONFIG_MACH_NOKIA770=y
+CONFIG_MACH_OMAP_GENERIC=y
 
 #
 # OMAP CPU Speed
@@ -275,6 +295,7 @@ CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x10400000,8M root=/dev/ram0 rw"
 # CONFIG_XIP_KERNEL is not set
 # CONFIG_KEXEC is not set
+# CONFIG_ATAGS_PROC is not set
 
 #
 # CPU Frequency scaling
@@ -307,9 +328,10 @@ CONFIG_PM=y
 # CONFIG_PM_LEGACY is not set
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_SLEEP=y
-CONFIG_SUSPEND_UP_POSSIBLE=y
 CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 # CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 
 #
 # Networking
@@ -326,6 +348,7 @@ CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -381,6 +404,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
@@ -493,11 +517,13 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_XIP is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
 CONFIG_IDE=m
 CONFIG_BLK_DEV_IDE=m
 
@@ -519,7 +545,6 @@ CONFIG_IDE_PROC_FS=y
 #
 # CONFIG_IDE_GENERIC is not set
 # CONFIG_BLK_DEV_PLATFORM is not set
-# CONFIG_IDE_ARM is not set
 # CONFIG_BLK_DEV_IDEDMA is not set
 CONFIG_IDE_ARCH_OBSOLETE_INIT=y
 # CONFIG_BLK_DEV_HD is not set
@@ -553,6 +578,7 @@ CONFIG_SMC91X=y
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
 # CONFIG_B44 is not set
 CONFIG_NETDEV_1000=y
+# CONFIG_E1000E_ENABLED is not set
 CONFIG_NETDEV_10000=y
 
 #
@@ -574,7 +600,6 @@ CONFIG_PPP_MULTILINK=y
 # CONFIG_PPPOL2TP is not set
 # CONFIG_SLIP is not set
 CONFIG_SLHC=y
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
@@ -671,6 +696,7 @@ CONFIG_HW_RANDOM_OMAP=m
 # CONFIG_SYNCLINK_CS is not set
 # CONFIG_CARDMAN_4000 is not set
 # CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
 CONFIG_I2C=y
@@ -698,12 +724,10 @@ CONFIG_I2C_OMAP=y
 #
 # Miscellaneous I2C Chip support
 #
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
 # CONFIG_DS1682 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_ISP1301_OMAP is not set
 CONFIG_TPS65010=y
@@ -731,6 +755,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1031 is not set
 # CONFIG_SENSORS_ADM9240 is not set
 # CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_F71805F is not set
@@ -758,6 +783,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
 # CONFIG_SENSORS_THMC50 is not set
 # CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_W83781D is not set
@@ -765,6 +791,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
@@ -780,6 +807,7 @@ CONFIG_SSB_POSSIBLE=y
 # Multifunction device drivers
 #
 # CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
 
 #
 # Multimedia devices
@@ -865,10 +893,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
-
-#
-# USB Gadget Support
-#
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
 # CONFIG_NEW_LEDS is not set
@@ -889,12 +913,10 @@ CONFIG_EXT2_FS=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=y
 CONFIG_AUTOFS4_FS=y
 # CONFIG_FUSE_FS is not set
@@ -948,8 +970,10 @@ CONFIG_JFFS2_RTIME=y
 # CONFIG_JFFS2_RUBIN is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
@@ -1019,9 +1043,6 @@ CONFIG_NLS_ISO8859_1=m
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 # CONFIG_DLM is not set
-CONFIG_INSTRUMENTATION=y
-# CONFIG_PROFILING is not set
-# CONFIG_MARKERS is not set
 
 #
 # Kernel hacking
@@ -1045,7 +1066,51 @@ CONFIG_FRAME_POINTER=y
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_SEQIV is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# 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_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
 
 #
 # Library routines
index 024a9cf469b47d6e841da0147e3c02355268ca81..50f667febe29ff638f2fa1544ab3217f1eb26a0d 100644 (file)
@@ -11,6 +11,9 @@
  *
  */
 
+#define ATAG_CORE 0x54410001
+#define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
+
        .type   __switch_data, %object
 __switch_data:
        .long   __mmap_switched
index 7898cbc9861a9d484d655079c66b3f1e76dccd0b..bff4c6e90dd5458f1f71d2d70a5703ea394017c5 100644 (file)
@@ -29,9 +29,6 @@
 #define KERNEL_RAM_VADDR       (PAGE_OFFSET + TEXT_OFFSET)
 #define KERNEL_RAM_PADDR       (PHYS_OFFSET + TEXT_OFFSET)
 
-#define ATAG_CORE 0x54410001
-#define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
-
 
 /*
  * swapper_pg_dir is the virtual address of the initial page table.
index a22a98c43ca5911e9b8f9328509fbd4b9a973ca3..13e371aad8792686df6fee77d0642fa3030f8a69 100644 (file)
@@ -431,6 +431,11 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
        return 0;
 }
 
+int __kprobes arch_trampoline_kprobe(struct kprobe *p)
+{
+       return 0;
+}
+
 static struct undef_hook kprobes_break_hook = {
        .instr_mask     = 0xffffffff,
        .instr_val      = KPROBE_BREAKPOINT_INSTRUCTION,
index 38313abef657d0a01684634c3aaf43eba6e82c2b..bf103b24c9379e208bf395bfdc9499aea0963daa 100644 (file)
@@ -245,10 +245,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
 
 static void at91_lcdc_power_control(int on)
 {
-       if (on)
-               at91_set_gpio_value(AT91_PIN_PD12, 0);  /* power up */
-       else
-               at91_set_gpio_value(AT91_PIN_PD12, 1);  /* power down */
+       at91_set_gpio_value(AT91_PIN_PA30, on);
 }
 
 /* Driver datas */
index f629c2b5f0c544bbec401964e6f7c13550e1e851..ee4964abcaf5ab7f70880e3361625288b8695372 100644 (file)
@@ -490,6 +490,11 @@ postcore_initcall(at91_gpio_debugfs_init);
 
 /*--------------------------------------------------------------------------*/
 
+/* This lock class tells lockdep that GPIO irqs are in a different
+ * category than their parents, so it won't report false recursion.
+ */
+static struct lock_class_key gpio_lock_class;
+
 /*
  * Called from the processor-specific init to enable GPIO interrupt support.
  */
@@ -510,6 +515,8 @@ void __init at91_gpio_irq_setup(void)
                __raw_writel(~0, this->regbase + PIO_IDR);
 
                for (i = 0, pin = this->chipbase; i < 32; i++, pin++) {
+                       lockdep_set_class(&irq_desc[pin].lock, &gpio_lock_class);
+
                        /*
                         * Can use the "simple" and not "edge" handler since it's
                         * shorter, and the AIC handles interrupts sanely.
index 7f31816896ad2ae662196c3772bf595781fc1dbd..45144ad2bed9cad00a573d02d0d15ce51e34b32f 100644 (file)
@@ -103,7 +103,7 @@ static void
 h720x_gpio_handler(unsigned int mask, unsigned int irq,
                  struct irq_desc *desc)
 {
-       IRQDBG("%s irq: %d\n",__FUNCTION__,irq);
+       IRQDBG("%s irq: %d\n", __func__, irq);
        desc = irq_desc + irq;
        while (mask) {
                if (mask & 1) {
@@ -123,7 +123,7 @@ h720x_gpioa_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
 
        mask = CPU_REG(GPIO_A_VIRT,GPIO_STAT);
        irq = IRQ_CHAINED_GPIOA(0);
-       IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
+       IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq);
        h720x_gpio_handler(mask, irq, desc);
 }
 
@@ -133,7 +133,7 @@ h720x_gpiob_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
        unsigned int mask, irq;
        mask = CPU_REG(GPIO_B_VIRT,GPIO_STAT);
        irq = IRQ_CHAINED_GPIOB(0);
-       IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
+       IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq);
        h720x_gpio_handler(mask, irq, desc);
 }
 
@@ -144,7 +144,7 @@ h720x_gpioc_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
 
        mask = CPU_REG(GPIO_C_VIRT,GPIO_STAT);
        irq = IRQ_CHAINED_GPIOC(0);
-       IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
+       IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq);
        h720x_gpio_handler(mask, irq, desc);
 }
 
@@ -155,7 +155,7 @@ h720x_gpiod_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
 
        mask = CPU_REG(GPIO_D_VIRT,GPIO_STAT);
        irq = IRQ_CHAINED_GPIOD(0);
-       IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
+       IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq);
        h720x_gpio_handler(mask, irq, desc);
 }
 
@@ -167,7 +167,7 @@ h720x_gpioe_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
 
        mask = CPU_REG(GPIO_E_VIRT,GPIO_STAT);
        irq = IRQ_CHAINED_GPIOE(0);
-       IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
+       IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq);
        h720x_gpio_handler(mask, irq, desc);
 }
 #endif
index bc6fb02d213bd6cf0e4072a735ba4709dc0a06af..a59ff2987cb7c582b3ad469281dc899d901ebd41 100644 (file)
@@ -54,7 +54,7 @@ static inline int imx_dma_sg_next(imx_dmach_t dma_ch, unsigned int lastcount)
 
        if (!imxdma->name) {
                printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
-                      __FUNCTION__, dma_ch);
+                      __func__, dma_ch);
                return 0;
        }
 
@@ -288,7 +288,7 @@ imx_dma_setup_handlers(imx_dmach_t dma_ch,
 
        if (!imxdma->name) {
                printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
-                      __FUNCTION__, dma_ch);
+                      __func__, dma_ch);
                return -ENODEV;
        }
 
@@ -321,7 +321,7 @@ void imx_dma_enable(imx_dmach_t dma_ch)
 
        if (!imxdma->name) {
                printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
-                      __FUNCTION__, dma_ch);
+                      __func__, dma_ch);
                return;
        }
 
@@ -365,7 +365,7 @@ int imx_dma_request(imx_dmach_t dma_ch, const char *name)
 
        if (dma_ch >= IMX_DMA_CHANNELS) {
                printk(KERN_CRIT "%s: called for  non-existed channel %d\n",
-                      __FUNCTION__, dma_ch);
+                      __func__, dma_ch);
                return -EINVAL;
        }
 
@@ -396,7 +396,7 @@ void imx_dma_free(imx_dmach_t dma_ch)
        if (!imxdma->name) {
                printk(KERN_CRIT
                       "%s: trying to free channel %d which is already freed\n",
-                      __FUNCTION__, dma_ch);
+                      __func__, dma_ch);
                return;
        }
 
@@ -456,7 +456,7 @@ imx_dma_request_by_prio(imx_dmach_t * pdma_ch, const char *name,
                }
        }
 
-       printk(KERN_ERR "%s: no free DMA channel found\n", __FUNCTION__);
+       printk(KERN_ERR "%s: no free DMA channel found\n", __func__);
 
        return -ENODEV;
 }
index a7465db8489373a54bc785a4d0a72a809698c327..e6695c4e623b80facd70a60feb7244466a09cedc 100644 (file)
@@ -160,21 +160,21 @@ imx_gpio_irq_type(unsigned int _irq, unsigned int type)
 static void
 imx_gpio_ack_irq(unsigned int irq)
 {
-       DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, irq);
+       DEBUG_IRQ("%s: irq %d\n", __func__, irq);
        ISR(IRQ_TO_REG(irq)) = 1 << ((irq - IRQ_GPIOA(0)) % 32);
 }
 
 static void
 imx_gpio_mask_irq(unsigned int irq)
 {
-       DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, irq);
+       DEBUG_IRQ("%s: irq %d\n", __func__, irq);
        IMR(IRQ_TO_REG(irq)) &= ~( 1 << ((irq - IRQ_GPIOA(0)) % 32));
 }
 
 static void
 imx_gpio_unmask_irq(unsigned int irq)
 {
-       DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, irq);
+       DEBUG_IRQ("%s: irq %d\n", __func__, irq);
        IMR(IRQ_TO_REG(irq)) |= 1 << ((irq - IRQ_GPIOA(0)) % 32);
 }
 
index 268a8d84999cf41101130064f2aab57a94bade7e..77b24cd1d88da677e0ec1f5681d0c88aa59b2a5d 100644 (file)
@@ -81,7 +81,7 @@ static void __init iq81340mc_init(void)
 static void __init iq81340mc_timer_init(void)
 {
        unsigned long bus_freq = iop13xx_core_freq() / iop13xx_xsi_bus_ratio();
-       printk(KERN_DEBUG "%s: bus frequency: %lu\n", __FUNCTION__, bus_freq);
+       printk(KERN_DEBUG "%s: bus frequency: %lu\n", __func__, bus_freq);
        iop_init_time(bus_freq);
 }
 
index a51ffd2683e5ae6e80e856883072b772a1751019..e8522b3b81634cccb91707ccc9c7f49f927336b2 100644 (file)
@@ -83,7 +83,7 @@ static void __init iq81340sc_init(void)
 static void __init iq81340sc_timer_init(void)
 {
        unsigned long bus_freq = iop13xx_core_freq() / iop13xx_xsi_bus_ratio();
-       printk(KERN_DEBUG "%s: bus frequency: %lu\n", __FUNCTION__, bus_freq);
+       printk(KERN_DEBUG "%s: bus frequency: %lu\n", __func__, bus_freq);
        iop_init_time(bus_freq);
 }
 
index 99d94cb1bafdc6818e96d4edc6bc64fbeb152a71..7825c1aaa27b073b61b34744d3d3ddf92021c160 100644 (file)
@@ -94,13 +94,13 @@ void iop13xx_map_pci_memory(void)
                                        , 0, iop13xx_atux_mem_size, MT_DEVICE);
                                        if (!iop13xx_atux_mem_base) {
                                                printk("%s: atux allocation "
-                                                      "failed\n", __FUNCTION__);
+                                                      "failed\n", __func__);
                                                BUG();
                                        }
                                } else
                                        iop13xx_atux_mem_size = 0;
                                PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n",
-                               __FUNCTION__, atu, iop13xx_atux_mem_size,
+                               __func__, atu, iop13xx_atux_mem_size,
                                iop13xx_atux_mem_base);
                                break;
                        case 1:
@@ -120,13 +120,13 @@ void iop13xx_map_pci_memory(void)
                                        , 0, iop13xx_atue_mem_size, MT_DEVICE);
                                        if (!iop13xx_atue_mem_base) {
                                                printk("%s: atue allocation "
-                                                      "failed\n", __FUNCTION__);
+                                                      "failed\n", __func__);
                                                BUG();
                                        }
                                } else
                                        iop13xx_atue_mem_size = 0;
                                PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n",
-                               __FUNCTION__, atu, iop13xx_atue_mem_size,
+                               __func__, atu, iop13xx_atue_mem_size,
                                iop13xx_atue_mem_base);
                                break;
                        }
index bfe0c87e33976e96fad4f673fc3ca334d5dcbf81..246f6d4787209fb526e4680426d629bbf5938569 100644 (file)
@@ -519,7 +519,7 @@ void __init iop13xx_platform_init(void)
        if (iq8134x_flash_resource.end > iq8134x_flash_resource.start)
                iop13xx_devices[plat_idx++] = &iq8134x_flash;
        else
-               printk(KERN_ERR "%s: Failed to probe flash size\n", __FUNCTION__);
+               printk(KERN_ERR "%s: Failed to probe flash size\n", __func__);
 #endif
 
        platform_add_devices(iop13xx_devices, plat_idx);
index bf04121d1a31748ac99b93f4b2982f5b4675103e..64be341109b3623a39b2b1e659bbecd0d1760dad 100644 (file)
@@ -87,7 +87,7 @@ static inline int check_master_abort(void)
        if (isr & PCI_ISR_PFE) {
                /* make sure the Master Abort bit is reset */    
                *PCI_ISR = PCI_ISR_PFE;
-               pr_debug("%s failed\n", __FUNCTION__);
+               pr_debug("%s failed\n", __func__);
                return 1;
        }
 
index 0d5a42455820322c804d046233e7563826d66106..49dec78688078f3bcc387af331b33ddb88be2895 100644 (file)
@@ -65,7 +65,7 @@ static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        else
                rc = gtwx5715_irqmap[slot][pin-1];
 
-       printk("%s: Mapped slot %d pin %d to IRQ %d\n", __FUNCTION__,slot, pin, rc);
+       printk("%s: Mapped slot %d pin %d to IRQ %d\n", __func__, slot, pin, rc);
        return(rc);
 }
 
index b9ca8f98265da182787fff8efa2b94d72129b33f..fd7537f7d11e798c3257ba46a5b21211b45a5b1c 100644 (file)
@@ -133,7 +133,7 @@ netx_hif_ack_irq(unsigned int _irq)
        val &= ~((1 << 24) << irq);
        writel(val, NETX_DPMAS_INT_EN);
 
-       DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq);
+       DEBUG_IRQ("%s: irq %d\n", __func__, _irq);
 }
 
 static void
@@ -145,7 +145,7 @@ netx_hif_mask_irq(unsigned int _irq)
        val = readl(NETX_DPMAS_INT_EN);
        val &= ~((1 << 24) << irq);
        writel(val, NETX_DPMAS_INT_EN);
-       DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq);
+       DEBUG_IRQ("%s: irq %d\n", __func__, _irq);
 }
 
 static void
@@ -157,7 +157,7 @@ netx_hif_unmask_irq(unsigned int _irq)
        val = readl(NETX_DPMAS_INT_EN);
        val |= (1 << 24) << irq;
        writel(val, NETX_DPMAS_INT_EN);
-       DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq);
+       DEBUG_IRQ("%s: irq %d\n", __func__, _irq);
 }
 
 static struct irq_chip netx_hif_chip = {
index b2230213b983deacd3db7e0a251fc1d27b9f2e69..5286e9fc1d307bac62f1341dd6c4e728a83be33a 100644 (file)
@@ -31,7 +31,7 @@
 static spinlock_t gpio_lock = __SPIN_LOCK_UNLOCKED(gpio_lock);
 
 /* only access gpiores with atomic ops */
-static DECLARE_BITMAP(gpiores, GPIO_MAX);
+static DECLARE_BITMAP(gpiores, GPIO_MAX + 1);
 
 static inline int ns9xxx_valid_gpio(unsigned gpio)
 {
index 070345ee39a54834939f9c627387222c9d12a003..5079877200154364cf5d5d5921898909f53b2c2a 100644 (file)
@@ -350,6 +350,10 @@ static void __init h2_init_smc91x(void)
 
 static struct i2c_board_info __initdata h2_i2c_board_info[] = {
        {
+               I2C_BOARD_INFO("tps65010", 0x48),
+               .type           = "tps65010",
+               .irq            = OMAP_GPIO_IRQ(58),
+       }, {
                I2C_BOARD_INFO("isp1301_omap", 0x2d),
                .type           = "isp1301_omap",
                .irq            = OMAP_GPIO_IRQ(2),
index 6fc516855a8cec0bc93b6cda648da65c2d001fe2..c3ef1ee5f77bcd4a01fb9a5ecac297493c850651 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/input.h>
+#include <linux/spi/spi.h>
 #include <linux/i2c/tps65010.h>
 
 #include <asm/setup.h>
@@ -51,6 +52,8 @@
 #include <asm/arch/mcbsp.h>
 #include <asm/arch/omap-alsa.h>
 
+#define H3_TS_GPIO     48
+
 static int h3_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_RIGHT),
@@ -373,6 +376,17 @@ static struct platform_device h3_lcd_device = {
        .id             = -1,
 };
 
+static struct spi_board_info h3_spi_board_info[] __initdata = {
+       [0] = {
+               .modalias       = "tsc2101",
+               .bus_num        = 2,
+               .chip_select    = 0,
+               .irq            = OMAP_GPIO_IRQ(H3_TS_GPIO),
+               .max_speed_hz   = 16000000,
+               /* .platform_data       = &tsc_platform_data, */
+       },
+};
+
 static struct omap_mcbsp_reg_cfg mcbsp_regs = {
        .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
        .spcr1 = RINTM(3) | RRST,
@@ -457,6 +471,14 @@ static struct omap_board_config_kernel h3_config[] __initdata = {
        { OMAP_TAG_LCD,         &h3_lcd_config },
 };
 
+static struct i2c_board_info __initdata h3_i2c_board_info[] = {
+       {
+               I2C_BOARD_INFO("tps65010", 0x48),
+               .type           = "tps65013",
+               /* .irq         = OMAP_GPIO_IRQ(??), */
+       },
+};
+
 static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
        {
                .name                   = "mmc_slot",
index 8eb5dcdaead2aaeb299f2320e687dafe4cfacfd8..e6c64e10b7ec283b46d58177e2a7e5d7b9984b0a 100644 (file)
@@ -717,7 +717,7 @@ static int __init omap_pm_init(void)
 #endif
 
 #ifdef CONFIG_OMAP_32K_TIMER
-       error = sysfs_create_file(power_kobj, &sleep_while_idle_attr);
+       error = sysfs_create_file(power_kobj, &sleep_while_idle_attr.attr);
        if (error)
                printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
 #endif
index 5a4091f582edc23aeafc051785898547a1decc8f..69c8174f3aace0f5b377021e347e7785800ef1cb 100644 (file)
@@ -42,6 +42,12 @@ static struct map_desc omap2_io_desc[] __initdata = {
                .length         = L3_24XX_SIZE,
                .type           = MT_DEVICE
        },
+       {
+               .virtual        = L4_24XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_24XX_PHYS),
+               .length         = L4_24XX_SIZE,
+               .type           = MT_DEVICE
+       },
 #ifdef CONFIG_ARCH_OMAP2430
        {
                .virtual        = L4_WK_243X_VIRT,
index 2e2fd63643c39760ee02153fc62ccba89defba88..58cc3c0333b6b3ee46a2db6f852d865f3dddf147 100644 (file)
 #define PCIE_BAR_CTRL(n)       ORION_PCIE_REG(0x1804 + ((n - 1) * 4))
 #define PCIE_BAR_LO(n)         ORION_PCIE_REG(0x0010 + ((n) * 8))
 #define PCIE_BAR_HI(n)         ORION_PCIE_REG(0x0014 + ((n) * 8))
-#define PCIE_WIN_CTRL(n)       ORION_PCIE_REG(0x1820 + ((n) << 4))
-#define PCIE_WIN_BASE(n)       ORION_PCIE_REG(0x1824 + ((n) << 4))
-#define PCIE_WIN_REMAP(n)      ORION_PCIE_REG(0x182c + ((n) << 4))
+#define PCIE_WIN_CTRL(n)       (((n) < 5) ? \
+                                       ORION_PCIE_REG(0x1820 + ((n) << 4)) : \
+                                       ORION_PCIE_REG(0x1880))
+#define PCIE_WIN_BASE(n)       (((n) < 5) ? \
+                                       ORION_PCIE_REG(0x1824 + ((n) << 4)) : \
+                                       ORION_PCIE_REG(0x1884))
+#define PCIE_WIN_REMAP(n)      (((n) < 5) ? \
+                                       ORION_PCIE_REG(0x182c + ((n) << 4)) : \
+                                       ORION_PCIE_REG(0x188c))
 #define PCIE_DEFWIN_CTRL       ORION_PCIE_REG(0x18b0)
 #define PCIE_EXPROM_WIN_CTRL   ORION_PCIE_REG(0x18c0)
 #define PCIE_EXPROM_WIN_REMP   ORION_PCIE_REG(0x18c4)
 #define PCIE_MAX_BARS          3
-#define PCIE_MAX_WINS          5
+#define PCIE_MAX_WINS          6
 
 /*
  * Use PCIE BAR '1' for all DDR banks
index 5f0ee4b8a9b73a5a1cfced1a0e0a5efa91e1e993..bbc2b4ec932ca8a407188a3810a3dcbcfd317840 100644 (file)
@@ -17,7 +17,9 @@
 #include <linux/mv643xx_eth.h>
 #include <linux/mv643xx_i2c.h>
 #include <asm/page.h>
+#include <asm/setup.h>
 #include <asm/timex.h>
+#include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/arch/hardware.h>
 #include "common.h"
@@ -177,8 +179,8 @@ static struct platform_device orion_ehci1 = {
 
 static struct resource orion_eth_shared_resources[] = {
        {
-               .start  = ORION_ETH_PHYS_BASE,
-               .end    = ORION_ETH_PHYS_BASE + 0xffff,
+               .start  = ORION_ETH_PHYS_BASE + 0x2000,
+               .end    = ORION_ETH_PHYS_BASE + 0x3fff,
                .flags  = IORESOURCE_MEM,
        },
 };
@@ -347,3 +349,21 @@ void __init orion_init(void)
                platform_device_register(&orion_ehci1);
        platform_device_register(&orion_i2c);
 }
+
+/*
+ * Many orion-based systems have buggy bootloader implementations.
+ * This is a common fixup for bogus memory tags.
+ */
+void __init tag_fixup_mem32(struct machine_desc *mdesc, struct tag *t,
+                           char **from, struct meminfo *meminfo)
+{
+       for (; t->hdr.size; t = tag_next(t))
+               if (t->hdr.tag == ATAG_MEM &&
+                   (!t->u.mem.size || t->u.mem.size & ~PAGE_MASK ||
+                    t->u.mem.start & ~PAGE_MASK)) {
+                       printk(KERN_WARNING
+                              "Clearing invalid memory bank %dKB@0x%08x\n",
+                              t->u.mem.size / 1024, t->u.mem.start);
+                       t->hdr.tag = 0;
+               }
+}
index 10154ec885dfb1c08339732710e59d2c3d9f333a..501497cc2c4df431658a0b036358d374d5f86c5a 100644 (file)
@@ -83,4 +83,10 @@ struct mv_sata_platform_data;
 
 void __init orion_sata_init(struct mv_sata_platform_data *sata_data);
 
+struct machine_desc;
+struct meminfo;
+struct tag;
+extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *,
+                                  char **, struct meminfo *);
+
 #endif /* __ARCH_ORION_COMMON_H__ */
index 02b280c2482064d465fd23a489e046a2d36b3aa3..076e155ad5106106980f6ea05ef93762d986a4c7 100644 (file)
@@ -319,4 +319,5 @@ MACHINE_START(DNS323, "D-Link DNS-323")
        .map_io         = orion_map_io,
        .init_irq       = orion_init_irq,
        .timer          = &orion_timer,
+       .fixup          = tag_fixup_mem32,
 MACHINE_END
index d5f00c86d6163fb8a191bcea06089ed89a5e21d6..f713818c66a3dd3814f45c44fe31f02fa7e5dc64 100644 (file)
@@ -36,7 +36,7 @@ int gpio_direction_input(unsigned pin)
        unsigned long flags;
 
        if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) {
-               pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin);
+               pr_debug("%s: invalid GPIO %d\n", __func__, pin);
                return -EINVAL;
        }
 
@@ -62,7 +62,7 @@ int gpio_direction_output(unsigned pin, int value)
        int mask;
 
        if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) {
-               pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin);
+               pr_debug("%s: invalid GPIO %d\n", __func__, pin);
                return -EINVAL;
        }
 
@@ -141,7 +141,7 @@ int gpio_request(unsigned pin, const char *label)
        unsigned long flags;
 
        if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) {
-               pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin);
+               pr_debug("%s: invalid GPIO %d\n", __func__, pin);
                return -EINVAL;
        }
 
@@ -149,7 +149,7 @@ int gpio_request(unsigned pin, const char *label)
 
        if (gpio_label[pin]) {
                pr_debug("%s: GPIO %d already used as %s\n",
-                        __FUNCTION__, pin, gpio_label[pin]);
+                        __func__, pin, gpio_label[pin]);
                ret = -EBUSY;
        } else
                gpio_label[pin] = label ? label : "?";
@@ -162,12 +162,12 @@ EXPORT_SYMBOL(gpio_request);
 void gpio_free(unsigned pin)
 {
        if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) {
-               pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin);
+               pr_debug("%s: invalid GPIO %d\n", __func__, pin);
                return;
        }
 
        if (!gpio_label[pin])
-               pr_warning("%s: GPIO %d already freed\n", __FUNCTION__, pin);
+               pr_warning("%s: GPIO %d already freed\n", __func__, pin);
        else
                gpio_label[pin] = NULL;
 }
index 6817aca4aa2653b6d92647add7ee6e65a1e66aaf..785a07bdf1e24681f63b28a0a603f43a2c89e00e 100644 (file)
@@ -240,4 +240,5 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
        .map_io         = orion_map_io,
        .init_irq       = orion_init_irq,
        .timer          = &orion_timer,
+       .fixup          = tag_fixup_mem32,
 MACHINE_END
index b8cfe6813e9d5313f8d7d5ad7d29b3b2e75050c5..45764dad16d0fb3bb121b5e5911761ae36051162 100644 (file)
@@ -357,4 +357,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209")
        .map_io         = orion_map_io,
        .init_irq       = orion_init_irq,
        .timer          = &orion_timer,
+       .fixup          = tag_fixup_mem32,
 MACHINE_END
index daa8d3d98eff13b7d33927d7a8218bdc021d4bc7..8e00ed43fb95d76fb0dc5243cf0a3acdf0d2d809 100644 (file)
@@ -976,7 +976,7 @@ static int __init clk_init(void)
                                (*clkp)->set_parent((*clkp), (*clkp)->parent);
                }
                pr_debug("%s: clock %s, rate %ld\n",
-                       __FUNCTION__, (*clkp)->name, (*clkp)->rate);
+                       __func__, (*clkp)->name, (*clkp)->rate);
        }
 
        local_clk_use(&ck_pll4);
index f7009d845be838e58ede89dc9851d743a810bd4c..fe152e82590b366990ab96f5dfc91bdc6eb2b41b 100644 (file)
@@ -192,7 +192,7 @@ void pnx4008_free_channel(int ch)
        if (!dma_channels[ch].name) {
                printk(KERN_CRIT
                       "%s: trying to free channel %d which is already freed\n",
-                      __FUNCTION__, ch);
+                      __func__, ch);
                return;
        }
 
index 15c4e0df3e10dcc375180b79b33247a1ea9fe4e2..fcda7d5cb693a15096f9b6420fa86572f33f206c 100644 (file)
@@ -104,7 +104,7 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq;
 
-       dev_dbg(&dev->dev, "%s: slot=%x, pin=%x\n", __FUNCTION__, slot, pin);
+       dev_dbg(&dev->dev, "%s: slot=%x, pin=%x\n", __func__, slot, pin);
 
        irq = it8152_pci_map_irq(dev, slot, pin);
        if (irq)
index 6012177a29a35b5afb0227c8f0d31bd95ed0f81c..ecdbc96a4de1240f026c6b7c813409faf1073911 100644 (file)
@@ -504,11 +504,11 @@ static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
        struct pxamci_platform_data *p_d = dev->platform_data;
 
        if ((1 << vdd) & p_d->ocr_mask) {
-               printk(KERN_DEBUG "%s: on\n", __FUNCTION__);
+               printk(KERN_DEBUG "%s: on\n", __func__);
                GPCR(105) = GPIO_bit(105);
        } else {
                GPSR(105) = GPIO_bit(105);
-               printk(KERN_DEBUG "%s: off\n", __FUNCTION__);
+               printk(KERN_DEBUG "%s: off\n", __func__);
        }
 }
 
index 93c4f31f127faa053dcd555f5fe7aa66fb5aee34..3215316d7b063fe31ff5a5cc4b3867f40a4344d7 100644 (file)
@@ -81,7 +81,7 @@ void pxa_free_dma (int dma_ch)
        if (!dma_channels[dma_ch].name) {
                printk (KERN_CRIT
                        "%s: trying to free channel %d which is already freed\n",
-                       __FUNCTION__, dma_ch);
+                       __func__, dma_ch);
                return;
        }
 
index 3d0ad5065ee5c132b1d1f8ed47b3344ffb440650..3bb31314429af0568b9a3920e76895fca580d29b 100644 (file)
@@ -264,7 +264,7 @@ static int em_x270_mci_init(struct device *dev,
                          "MMC card detect", data);
        if (err) {
                printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n",
-                      __FUNCTION__, err);
+                      __func__, err);
                return err;
        }
 
index 345c3deeb02ef586eeae1628459ef16aa1cf7c6f..72a436fb9a291f4509a314f6b8c39202b5080d16 100644 (file)
@@ -390,11 +390,11 @@ static void mainstone_mci_setpower(struct device *dev, unsigned int vdd)
        struct pxamci_platform_data* p_d = dev->platform_data;
 
        if (( 1 << vdd) & p_d->ocr_mask) {
-               printk(KERN_DEBUG "%s: on\n", __FUNCTION__);
+               printk(KERN_DEBUG "%s: on\n", __func__);
                MST_MSCWR1 |= MST_MSCWR1_MMC_ON;
                MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL;
        } else {
-               printk(KERN_DEBUG "%s: off\n", __FUNCTION__);
+               printk(KERN_DEBUG "%s: off\n", __func__);
                MST_MSCWR1 &= ~MST_MSCWR1_MMC_ON;
        }
 }
index 853fc9433750efc0ea33987aa62df87a7ed237f6..f207fcd30cd7426f041806d88f0b52db6be69832 100644 (file)
@@ -217,7 +217,7 @@ void board_pcmcia_power(int power)
                ConXS_BCR = trizeps_conxs_bcr;
 
        }
-       pr_debug("%s: o%s 0x%x\n", __FUNCTION__, power ? "n": "ff", trizeps_conxs_bcr);
+       pr_debug("%s: o%s 0x%x\n", __func__, power ? "n": "ff", trizeps_conxs_bcr);
 }
 
 /* backlight power switching for LCD panel */
@@ -228,7 +228,7 @@ static void board_backlight_power(int on)
        } else {
                trizeps_conxs_bcr &= ~ConXS_BCR_L_DISP;
        }
-       pr_debug("%s: o%s 0x%x\n", __FUNCTION__, on ? "n" : "ff", trizeps_conxs_bcr);
+       pr_debug("%s: o%s 0x%x\n", __func__, on ? "n" : "ff", trizeps_conxs_bcr);
        ConXS_BCR = trizeps_conxs_bcr;
 }
 
@@ -238,10 +238,10 @@ static void board_mci_power(struct device *dev, unsigned int vdd)
        struct pxamci_platform_data* p_d = dev->platform_data;
 
        if (( 1 << vdd) & p_d->ocr_mask) {
-               pr_debug("%s: on\n", __FUNCTION__);
+               pr_debug("%s: on\n", __func__);
                /* FIXME fill in values here */
        } else {
-               pr_debug("%s: off\n", __FUNCTION__);
+               pr_debug("%s: off\n", __func__);
                /* FIXME fill in values here */
        }
 }
index f60b7a66dfa022bc66699a7e26b151cb8c1f1c58..842d9e6dc5ff77c94c802baa47647cba879ed73a 100644 (file)
@@ -206,7 +206,7 @@ static int __init badge4_init(void)
        if (ret < 0)
                printk(KERN_ERR
                       "%s: SA-1111 initialization failed (%d)\n",
-                      __FUNCTION__, ret);
+                      __func__, ret);
 
 
        /* maybe turn on 5v0 from the start */
@@ -240,11 +240,11 @@ void badge4_set_5V(unsigned subsystem, int on)
        /* detect on->off and off->on transitions */
        if ((!old_5V_bitmap) && (badge4_5V_bitmap)) {
                /* was off, now on */
-               printk(KERN_INFO "%s: enabling 5V supply rail\n", __FUNCTION__);
+               printk(KERN_INFO "%s: enabling 5V supply rail\n", __func__);
                GPSR = BADGE4_GPIO_PCMEN5V;
        } else if ((old_5V_bitmap) && (!badge4_5V_bitmap)) {
                /* was on, now off */
-               printk(KERN_INFO "%s: disabling 5V supply rail\n", __FUNCTION__);
+               printk(KERN_INFO "%s: disabling 5V supply rail\n", __func__);
                GPCR = BADGE4_GPIO_PCMEN5V;
        }
 
index d68630b74d787fa4a733120e4f89a6b5c5fcf733..343368aa82de471137232e8848d8d4c1cb30d9d2 100644 (file)
@@ -139,7 +139,7 @@ static void sa1100_update_dram_timings(int current_speed, int new_speed)
 
        if (settings->speed == 0) {
                panic("%s: couldn't find dram setting for speed %d\n",
-                     __FUNCTION__, new_speed);
+                     __func__, new_speed);
        }
 
        /* No risk, no fun: run with interrupts on! */
index 1fbe053e8b5998cd46216d9ba445fb26849a3a4e..e5080286060e3be165e4830b29a0a401b8108950 100644 (file)
@@ -129,7 +129,7 @@ int sa1100_request_dma (dma_device_t device, const char *device_id,
        if (err) {
                printk(KERN_ERR
                       "%s: unable to request IRQ %d for %s\n",
-                      __FUNCTION__, IRQ_DMA0 + i, device_id);
+                      __func__, IRQ_DMA0 + i, device_id);
                dma->device = 0;
                return err;
        }
@@ -165,12 +165,12 @@ void sa1100_free_dma(dma_regs_t *regs)
                if (regs == (dma_regs_t *)&DDAR(i))
                        break;
        if (i >= SA1100_DMA_CHANNELS) {
-               printk(KERN_ERR "%s: bad DMA identifier\n", __FUNCTION__);
+               printk(KERN_ERR "%s: bad DMA identifier\n", __func__);
                return;
        }
 
        if (!dma_chan[i].device) {
-               printk(KERN_ERR "%s: Trying to free free DMA\n", __FUNCTION__);
+               printk(KERN_ERR "%s: Trying to free free DMA\n", __func__);
                return;
        }
 
@@ -329,7 +329,7 @@ void sa1100_reset_dma(dma_regs_t *regs)
                if (regs == (dma_regs_t *)&DDAR(i))
                        break;
        if (i >= SA1100_DMA_CHANNELS) {
-               printk(KERN_ERR "%s: bad DMA identifier\n", __FUNCTION__);
+               printk(KERN_ERR "%s: bad DMA identifier\n", __func__);
                return;
        }
 
index b72fee0f2538ee6865a69389b7cb8eb253040c8b..8473c37b77d6e1bf4f5c7d6ce06109793c4275c4 100644 (file)
@@ -596,7 +596,7 @@ static void h3800_control_egpio(enum ipaq_egpio_type x, int setp)
        case IPAQ_EGPIO_CODEC_NRESET:
        case IPAQ_EGPIO_AUDIO_ON:
        case IPAQ_EGPIO_QMUTE:
-               printk("%s: error - should not be called\n", __FUNCTION__);
+               printk("%s: error - should not be called\n", __func__);
                break;
        case IPAQ_EGPIO_OPT_NVRAM_ON:
                SET_ASIC2(GPIO2_OPT_ON_NVRAM);
@@ -638,7 +638,7 @@ static int h3800_pm_callback(int req)
        static u16 asic2_data;
        int result = 0;
 
-       printk("%s %d\n", __FUNCTION__, req);
+       printk("%s %d\n", __func__, req);
 
        switch (req) {
        case PM_RESUME:
@@ -666,7 +666,7 @@ static int h3800_pm_callback(int req)
                asic2_data = H3800_ASIC2_GPIOPIOD;
                break;
        default:
-               printk("%s: unrecognized PM callback\n", __FUNCTION__);
+               printk("%s: unrecognized PM callback\n", __func__);
                break;
        }
        return result;
@@ -706,7 +706,7 @@ static void h3800_IRQ_demux(unsigned int irq, struct irq_desc *desc)
 {
        int i;
 
-       if (0) printk("%s: interrupt received\n", __FUNCTION__);
+       if (0) printk("%s: interrupt received\n", __func__);
 
        desc->chip->ack(irq);
 
@@ -716,21 +716,21 @@ static void h3800_IRQ_demux(unsigned int irq, struct irq_desc *desc)
 
                /* KPIO */
                irq = H3800_ASIC2_KPIINTFLAG;
-               if (0) printk("%s KPIO 0x%08X\n", __FUNCTION__, irq);
+               if (0) printk("%s KPIO 0x%08X\n", __func__, irq);
                for (j = 0; j < H3800_KPIO_IRQ_COUNT; j++)
                        if (irq & kpio_irq_mask[j])
                                handle_edge_irq(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j);
 
                /* GPIO2 */
                irq = H3800_ASIC2_GPIINTFLAG;
-               if (0) printk("%s GPIO 0x%08X\n", __FUNCTION__, irq);
+               if (0) printk("%s GPIO 0x%08X\n", __func__, irq);
                for (j = 0; j < H3800_GPIO_IRQ_COUNT; j++)
                        if (irq & gpio_irq_mask[j])
                                handle_edge_irq(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j);
        }
 
        if (i >= MAX_ASIC_ISR_LOOPS)
-               printk("%s: interrupt processing overrun\n", __FUNCTION__);
+               printk("%s: interrupt processing overrun\n", __func__);
 
        /* For level-based interrupts */
        desc->chip->unmask(irq);
index 2b5aa1135b117395188b617eff8967a28682b5e9..98d01517b5634faf1448164f82183ba08c4f1aa7 100644 (file)
@@ -371,7 +371,7 @@ static int __init iop3xx_init_atu_setup(char *str)
                        default:
                                printk(KERN_DEBUG "\"%s\" malformed at "
                                            "character: \'%c\'",
-                                           __FUNCTION__,
+                                           __func__,
                                            *str);
                                *(str + 1) = '\0';
                        }
index c0d63b0c61c9c5a54a11a298ea0f8d7334444e58..d719c15daa558286e27351df5443f1c436a3b484 100644 (file)
 #define MPU_CLK                "virt_prcm_set"
 #endif
 
+static struct clk *mpu_clk;
+
 /* TODO: Add support for SDRAM timing changes */
 
 int omap_verify_speed(struct cpufreq_policy *policy)
 {
-       struct clk * mpu_clk;
-
        if (policy->cpu)
                return -EINVAL;
 
        cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
                                     policy->cpuinfo.max_freq);
-       mpu_clk = clk_get(NULL, MPU_CLK);
-       if (IS_ERR(mpu_clk))
-               return PTR_ERR(mpu_clk);
+
        policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
        policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
        cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
                                     policy->cpuinfo.max_freq);
-       clk_put(mpu_clk);
-
        return 0;
 }
 
 unsigned int omap_getspeed(unsigned int cpu)
 {
-       struct clk * mpu_clk;
        unsigned long rate;
 
        if (cpu)
                return 0;
 
-       mpu_clk = clk_get(NULL, MPU_CLK);
-       if (IS_ERR(mpu_clk))
-               return 0;
        rate = clk_get_rate(mpu_clk) / 1000;
-       clk_put(mpu_clk);
-
        return rate;
 }
 
@@ -77,14 +67,9 @@ static int omap_target(struct cpufreq_policy *policy,
                       unsigned int target_freq,
                       unsigned int relation)
 {
-       struct clk * mpu_clk;
        struct cpufreq_freqs freqs;
        int ret = 0;
 
-       mpu_clk = clk_get(NULL, MPU_CLK);
-       if (IS_ERR(mpu_clk))
-               return PTR_ERR(mpu_clk);
-
        freqs.old = omap_getspeed(0);
        freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
        freqs.cpu = 0;
@@ -92,15 +77,12 @@ static int omap_target(struct cpufreq_policy *policy,
        cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
        ret = clk_set_rate(mpu_clk, target_freq * 1000);
        cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
-       clk_put(mpu_clk);
 
        return ret;
 }
 
 static int __init omap_cpu_init(struct cpufreq_policy *policy)
 {
-       struct clk * mpu_clk;
-
        mpu_clk = clk_get(NULL, MPU_CLK);
        if (IS_ERR(mpu_clk))
                return PTR_ERR(mpu_clk);
@@ -111,17 +93,23 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy)
        policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
        policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000;
        policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-       clk_put(mpu_clk);
 
        return 0;
 }
 
+static int omap_cpu_exit(struct cpufreq_policy *policy)
+{
+       clk_put(mpu_clk);
+       return 0;
+}
+
 static struct cpufreq_driver omap_driver = {
        .flags          = CPUFREQ_STICKY,
        .verify         = omap_verify_speed,
        .target         = omap_target,
        .get            = omap_getspeed,
        .init           = omap_cpu_init,
+       .exit           = omap_cpu_exit,
        .name           = "omap",
 };
 
index c5dab1d6417e113aeae93658b45a5d5730cdebb1..4a53f9ba6c43ce3c353531f4e7ba6edef98ac1b2 100644 (file)
@@ -88,68 +88,6 @@ EXPORT_SYMBOL(dsp_kfunc_device_register);
 static inline void omap_init_dsp(void) { }
 #endif /* CONFIG_OMAP_DSP */
 
-/*-------------------------------------------------------------------------*/
-#if    defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
-
-#define        OMAP1_I2C_BASE          0xfffb3800
-#define OMAP2_I2C_BASE1                0x48070000
-#define OMAP_I2C_SIZE          0x3f
-#define OMAP1_I2C_INT          INT_I2C
-#define OMAP2_I2C_INT1         56
-
-static struct resource i2c_resources1[] = {
-       {
-               .start          = 0,
-               .end            = 0,
-               .flags          = IORESOURCE_MEM,
-       },
-       {
-               .start          = 0,
-               .flags          = IORESOURCE_IRQ,
-       },
-};
-
-/* DMA not used; works around erratum writing to non-empty i2c fifo */
-
-static struct platform_device omap_i2c_device1 = {
-       .name           = "i2c_omap",
-       .id             = 1,
-       .num_resources  = ARRAY_SIZE(i2c_resources1),
-       .resource       = i2c_resources1,
-};
-
-/* See also arch/arm/mach-omap2/devices.c for second I2C on 24xx */
-static void omap_init_i2c(void)
-{
-       if (cpu_is_omap24xx()) {
-               i2c_resources1[0].start = OMAP2_I2C_BASE1;
-               i2c_resources1[0].end = OMAP2_I2C_BASE1 + OMAP_I2C_SIZE;
-               i2c_resources1[1].start = OMAP2_I2C_INT1;
-       } else {
-               i2c_resources1[0].start = OMAP1_I2C_BASE;
-               i2c_resources1[0].end = OMAP1_I2C_BASE + OMAP_I2C_SIZE;
-               i2c_resources1[1].start = OMAP1_I2C_INT;
-       }
-
-       /* FIXME define and use a boot tag, in case of boards that
-        * either don't wire up I2C, or chips that mux it differently...
-        * it can include clocking and address info, maybe more.
-        */
-       if (cpu_is_omap24xx()) {
-               omap_cfg_reg(M19_24XX_I2C1_SCL);
-               omap_cfg_reg(L15_24XX_I2C1_SDA);
-       } else {
-               omap_cfg_reg(I2C_SCL);
-               omap_cfg_reg(I2C_SDA);
-       }
-
-       (void) platform_device_register(&omap_i2c_device1);
-}
-
-#else
-static inline void omap_init_i2c(void) {}
-#endif
-
 /*-------------------------------------------------------------------------*/
 #if    defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
 
@@ -501,7 +439,6 @@ static int __init omap_init_devices(void)
         * in alphabetical order so they're easier to sort through.
         */
        omap_init_dsp();
-       omap_init_i2c();
        omap_init_kp();
        omap_init_mmc();
        omap_init_uwire();
index a46676db81138e5f1e06394179d2ee62fed6c95f..91004a3c4794fe1f90f41d856d3d389537465529 100644 (file)
@@ -137,7 +137,7 @@ static void omap_disable_channel_irq(int lch);
 static inline void omap_enable_channel_irq(int lch);
 
 #define REVISIT_24XX()         printk(KERN_ERR "FIXME: no %s on 24xx\n", \
-                                               __FUNCTION__);
+                                               __func__);
 
 #ifdef CONFIG_ARCH_OMAP15XX
 /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
@@ -699,7 +699,7 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
        u32 reg;
 
        if (!cpu_class_is_omap2()) {
-               printk(KERN_ERR "FIXME: no %s on 15xx/16xx\n", __FUNCTION__);
+               printk(KERN_ERR "FIXME: no %s on 15xx/16xx\n", __func__);
                return;
        }
 
@@ -1705,14 +1705,8 @@ static int omap2_dma_handle_ch(int ch)
                status = OMAP_DMA_CSR_REG(ch);
        }
 
-       if (likely(dma_chan[ch].callback != NULL)) {
-               if (dma_chan[ch].chain_id != -1)
-                       dma_chan[ch].callback(dma_chan[ch].chain_id, status,
-                                             dma_chan[ch].data);
-               else
-                       dma_chan[ch].callback(ch, status, dma_chan[ch].data);
-
-       }
+       if (likely(dma_chan[ch].callback != NULL))
+               dma_chan[ch].callback(ch, status, dma_chan[ch].data);
 
        OMAP_DMA_CSR_REG(ch) = status;
 
index e719d0eeb5c88f2b079d2d67c07486730dc55bbb..302ad8dff2cb5d49a088c43feb1fdea5fe46b027 100644 (file)
@@ -268,7 +268,7 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id)
        if (id <= 0 || id > dm_timer_count || dm_timers[id-1].reserved) {
                spin_unlock_irqrestore(&dm_timer_lock, flags);
                printk("BUG: warning at %s:%d/%s(): unable to get timer %d\n",
-                      __FILE__, __LINE__, __FUNCTION__, id);
+                      __FILE__, __LINE__, __func__, id);
                dump_stack();
                return NULL;
        }
index 56f4d1394d562bdfc652a2d7f13ee436042ed88c..66a1455595f49c7d15c5b861ce332d5e6a448586 100644 (file)
@@ -333,13 +333,14 @@ static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input)
 void omap_set_gpio_direction(int gpio, int is_input)
 {
        struct gpio_bank *bank;
+       unsigned long flags;
 
        if (check_gpio(gpio) < 0)
                return;
        bank = get_gpio_bank(gpio);
-       spin_lock(&bank->lock);
+       spin_lock_irqsave(&bank->lock, flags);
        _set_gpio_direction(bank, get_gpio_index(gpio), is_input);
-       spin_unlock(&bank->lock);
+       spin_unlock_irqrestore(&bank->lock, flags);
 }
 
 static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
@@ -406,13 +407,14 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
 void omap_set_gpio_dataout(int gpio, int enable)
 {
        struct gpio_bank *bank;
+       unsigned long flags;
 
        if (check_gpio(gpio) < 0)
                return;
        bank = get_gpio_bank(gpio);
-       spin_lock(&bank->lock);
+       spin_lock_irqsave(&bank->lock, flags);
        _set_gpio_dataout(bank, get_gpio_index(gpio), enable);
-       spin_unlock(&bank->lock);
+       spin_unlock_irqrestore(&bank->lock, flags);
 }
 
 int omap_get_gpio_datain(int gpio)
@@ -624,6 +626,7 @@ static int gpio_irq_type(unsigned irq, unsigned type)
        struct gpio_bank *bank;
        unsigned gpio;
        int retval;
+       unsigned long flags;
 
        if (!cpu_class_is_omap2() && irq > IH_MPUIO_BASE)
                gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE);
@@ -642,13 +645,13 @@ static int gpio_irq_type(unsigned irq, unsigned type)
                return -EINVAL;
 
        bank = get_irq_chip_data(irq);
-       spin_lock(&bank->lock);
+       spin_lock_irqsave(&bank->lock, flags);
        retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type);
        if (retval == 0) {
                irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK;
                irq_desc[irq].status |= type;
        }
-       spin_unlock(&bank->lock);
+       spin_unlock_irqrestore(&bank->lock, flags);
        return retval;
 }
 
@@ -830,11 +833,13 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena
  */
 static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
 {
+       unsigned long flags;
+
        switch (bank->method) {
 #ifdef CONFIG_ARCH_OMAP16XX
        case METHOD_MPUIO:
        case METHOD_GPIO_1610:
-               spin_lock(&bank->lock);
+               spin_lock_irqsave(&bank->lock, flags);
                if (enable) {
                        bank->suspend_wakeup |= (1 << gpio);
                        enable_irq_wake(bank->irq);
@@ -842,7 +847,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
                        disable_irq_wake(bank->irq);
                        bank->suspend_wakeup &= ~(1 << gpio);
                }
-               spin_unlock(&bank->lock);
+               spin_unlock_irqrestore(&bank->lock, flags);
                return 0;
 #endif
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
@@ -853,7 +858,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
                                        (bank - gpio_bank) * 32 + gpio);
                        return -EINVAL;
                }
-               spin_lock(&bank->lock);
+               spin_lock_irqsave(&bank->lock, flags);
                if (enable) {
                        bank->suspend_wakeup |= (1 << gpio);
                        enable_irq_wake(bank->irq);
@@ -861,7 +866,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
                        disable_irq_wake(bank->irq);
                        bank->suspend_wakeup &= ~(1 << gpio);
                }
-               spin_unlock(&bank->lock);
+               spin_unlock_irqrestore(&bank->lock, flags);
                return 0;
 #endif
        default:
@@ -897,16 +902,17 @@ static int gpio_wake_enable(unsigned int irq, unsigned int enable)
 int omap_request_gpio(int gpio)
 {
        struct gpio_bank *bank;
+       unsigned long flags;
 
        if (check_gpio(gpio) < 0)
                return -EINVAL;
 
        bank = get_gpio_bank(gpio);
-       spin_lock(&bank->lock);
+       spin_lock_irqsave(&bank->lock, flags);
        if (unlikely(bank->reserved_map & (1 << get_gpio_index(gpio)))) {
                printk(KERN_ERR "omap-gpio: GPIO %d is already reserved!\n", gpio);
                dump_stack();
-               spin_unlock(&bank->lock);
+               spin_unlock_irqrestore(&bank->lock, flags);
                return -1;
        }
        bank->reserved_map |= (1 << get_gpio_index(gpio));
@@ -925,7 +931,7 @@ int omap_request_gpio(int gpio)
                __raw_writel(__raw_readl(reg) | (1 << get_gpio_index(gpio)), reg);
        }
 #endif
-       spin_unlock(&bank->lock);
+       spin_unlock_irqrestore(&bank->lock, flags);
 
        return 0;
 }
@@ -933,15 +939,16 @@ int omap_request_gpio(int gpio)
 void omap_free_gpio(int gpio)
 {
        struct gpio_bank *bank;
+       unsigned long flags;
 
        if (check_gpio(gpio) < 0)
                return;
        bank = get_gpio_bank(gpio);
-       spin_lock(&bank->lock);
+       spin_lock_irqsave(&bank->lock, flags);
        if (unlikely(!(bank->reserved_map & (1 << get_gpio_index(gpio))))) {
                printk(KERN_ERR "omap-gpio: GPIO %d wasn't reserved!\n", gpio);
                dump_stack();
-               spin_unlock(&bank->lock);
+               spin_unlock_irqrestore(&bank->lock, flags);
                return;
        }
 #ifdef CONFIG_ARCH_OMAP16XX
@@ -960,7 +967,7 @@ void omap_free_gpio(int gpio)
 #endif
        bank->reserved_map &= ~(1 << get_gpio_index(gpio));
        _reset_gpio(bank, gpio);
-       spin_unlock(&bank->lock);
+       spin_unlock_irqrestore(&bank->lock, flags);
 }
 
 /*
@@ -1194,11 +1201,12 @@ static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t me
 {
        struct gpio_bank        *bank = platform_get_drvdata(pdev);
        void __iomem            *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
+       unsigned long           flags;
 
-       spin_lock(&bank->lock);
+       spin_lock_irqsave(&bank->lock, flags);
        bank->saved_wakeup = __raw_readl(mask_reg);
        __raw_writel(0xffff & ~bank->suspend_wakeup, mask_reg);
-       spin_unlock(&bank->lock);
+       spin_unlock_irqrestore(&bank->lock, flags);
 
        return 0;
 }
@@ -1207,10 +1215,11 @@ static int omap_mpuio_resume_early(struct platform_device *pdev)
 {
        struct gpio_bank        *bank = platform_get_drvdata(pdev);
        void __iomem            *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
+       unsigned long           flags;
 
-       spin_lock(&bank->lock);
+       spin_lock_irqsave(&bank->lock, flags);
        __raw_writel(bank->saved_wakeup, mask_reg);
-       spin_unlock(&bank->lock);
+       spin_unlock_irqrestore(&bank->lock, flags);
 
        return 0;
 }
@@ -1277,6 +1286,11 @@ static struct clk *gpio_fclks[OMAP34XX_NR_GPIOS];
 static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS];
 #endif
 
+/* This lock class tells lockdep that GPIO irqs are in a different
+ * category than their parents, so it won't report false recursion.
+ */
+static struct lock_class_key gpio_lock_class;
+
 static int __init _omap_gpio_init(void)
 {
        int i;
@@ -1450,6 +1464,7 @@ static int __init _omap_gpio_init(void)
 #endif
                for (j = bank->virtual_irq_start;
                     j < bank->virtual_irq_start + gpio_count; j++) {
+                       lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class);
                        set_irq_chip_data(j, bank);
                        if (bank_is_mpuio(bank))
                                set_irq_chip(j, &mpuio_irq_chip);
@@ -1489,6 +1504,7 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
                void __iomem *wake_status;
                void __iomem *wake_clear;
                void __iomem *wake_set;
+               unsigned long flags;
 
                switch (bank->method) {
 #ifdef CONFIG_ARCH_OMAP16XX
@@ -1509,11 +1525,11 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg)
                        continue;
                }
 
-               spin_lock(&bank->lock);
+               spin_lock_irqsave(&bank->lock, flags);
                bank->saved_wakeup = __raw_readl(wake_status);
                __raw_writel(0xffffffff, wake_clear);
                __raw_writel(bank->suspend_wakeup, wake_set);
-               spin_unlock(&bank->lock);
+               spin_unlock_irqrestore(&bank->lock, flags);
        }
 
        return 0;
@@ -1530,6 +1546,7 @@ static int omap_gpio_resume(struct sys_device *dev)
                struct gpio_bank *bank = &gpio_bank[i];
                void __iomem *wake_clear;
                void __iomem *wake_set;
+               unsigned long flags;
 
                switch (bank->method) {
 #ifdef CONFIG_ARCH_OMAP16XX
@@ -1548,10 +1565,10 @@ static int omap_gpio_resume(struct sys_device *dev)
                        continue;
                }
 
-               spin_lock(&bank->lock);
+               spin_lock_irqsave(&bank->lock, flags);
                __raw_writel(0xffffffff, wake_clear);
                __raw_writel(bank->saved_wakeup, wake_set);
-               spin_unlock(&bank->lock);
+               spin_unlock_irqrestore(&bank->lock, flags);
        }
 
        return 0;
index ac9ff1666fccf729ba3f2b85b38c21e4e2ed5626..60f162dc4fad5d1617f074c5256dc5c8b8227e03 100644 (file)
@@ -130,8 +130,8 @@ dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan)
        dmadbg_dumpregs(fname, line, chan, &state);
 }
 
-#define dbg_showregs(chan) dmadbg_showregs(__FUNCTION__, __LINE__, (chan))
-#define dbg_showchan(chan) dmadbg_showchan(__FUNCTION__, __LINE__, (chan))
+#define dbg_showregs(chan) dmadbg_showregs(__func__, __LINE__, (chan))
+#define dbg_showchan(chan) dmadbg_showchan(__func__, __LINE__, (chan))
 #else
 #define dbg_showregs(chan) do { } while(0)
 #define dbg_showchan(chan) do { } while(0)
@@ -403,7 +403,7 @@ static int s3c2410_dma_start(struct s3c2410_dma_chan *chan)
 
                        if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
                                pr_debug("%s: buff not yet loaded, no more todo\n",
-                                        __FUNCTION__);
+                                        __func__);
                        } else {
                                chan->load_state = S3C2410_DMALOAD_1RUNNING;
                                s3c2410_dma_loadbuffer(chan, chan->next);
@@ -463,16 +463,16 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
                return -EINVAL;
 
        pr_debug("%s: id=%p, data=%08x, size=%d\n",
-                __FUNCTION__, id, (unsigned int)data, size);
+                __func__, id, (unsigned int)data, size);
 
        buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC);
        if (buf == NULL) {
                pr_debug("%s: out of memory (%ld alloc)\n",
-                        __FUNCTION__, (long)sizeof(*buf));
+                        __func__, (long)sizeof(*buf));
                return -ENOMEM;
        }
 
-       //pr_debug("%s: new buffer %p\n", __FUNCTION__, buf);
+       //pr_debug("%s: new buffer %p\n", __func__, buf);
        //dbg_showchan(chan);
 
        buf->next  = NULL;
@@ -486,18 +486,18 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
        if (chan->curr == NULL) {
                /* we've got nothing loaded... */
                pr_debug("%s: buffer %p queued onto empty channel\n",
-                        __FUNCTION__, buf);
+                        __func__, buf);
 
                chan->curr = buf;
                chan->end  = buf;
                chan->next = NULL;
        } else {
                pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n",
-                        chan->number, __FUNCTION__, buf);
+                        chan->number, __func__, buf);
 
                if (chan->end == NULL)
                        pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n",
-                                chan->number, __FUNCTION__, chan);
+                                chan->number, __func__, chan);
 
                chan->end->next = buf;
                chan->end = buf;
@@ -572,7 +572,7 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan)
                if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
                                /* flag error? */
                        printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n",
-                              chan->number, __FUNCTION__);
+                              chan->number, __func__);
                        return;
                }
                break;
@@ -658,7 +658,7 @@ s3c2410_dma_irq(int irq, void *devpw)
 
                if (buf->magic != BUF_MAGIC) {
                        printk(KERN_ERR "dma%d: %s: buf %p incorrect magic\n",
-                              chan->number, __FUNCTION__, buf);
+                              chan->number, __func__, buf);
                        return IRQ_HANDLED;
                }
 
@@ -692,7 +692,7 @@ s3c2410_dma_irq(int irq, void *devpw)
                        if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
                                /* flag error? */
                                printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n",
-                                      chan->number, __FUNCTION__);
+                                      chan->number, __func__);
                                return IRQ_HANDLED;
                        }
 
@@ -759,7 +759,7 @@ int s3c2410_dma_request(unsigned int channel,
 
        if (!chan->irq_claimed) {
                pr_debug("dma%d: %s : requesting irq %d\n",
-                        channel, __FUNCTION__, chan->irq);
+                        channel, __func__, chan->irq);
 
                chan->irq_claimed = 1;
                local_irq_restore(flags);
@@ -786,7 +786,7 @@ int s3c2410_dma_request(unsigned int channel,
 
        /* need to setup */
 
-       pr_debug("%s: channel initialised, %p\n", __FUNCTION__, chan);
+       pr_debug("%s: channel initialised, %p\n", __func__, chan);
 
        return chan->number | DMACH_LOW_LEVEL;
 }
@@ -823,7 +823,7 @@ int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client)
 
        if (chan->state != S3C2410_DMA_IDLE) {
                pr_debug("%s: need to stop dma channel %p\n",
-                      __FUNCTION__, chan);
+                      __func__, chan);
 
                /* possibly flush the channel */
                s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STOP);
@@ -852,7 +852,7 @@ static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan)
        unsigned long flags;
        unsigned long tmp;
 
-       pr_debug("%s:\n", __FUNCTION__);
+       pr_debug("%s:\n", __func__);
 
        dbg_showchan(chan);
 
@@ -907,14 +907,14 @@ static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan)
        struct s3c2410_dma_buf *buf, *next;
        unsigned long flags;
 
-       pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number);
+       pr_debug("%s: chan %p (%d)\n", __func__, chan, chan->number);
 
        dbg_showchan(chan);
 
        local_irq_save(flags);
 
        if (chan->state != S3C2410_DMA_IDLE) {
-               pr_debug("%s: stopping channel...\n", __FUNCTION__ );
+               pr_debug("%s: stopping channel...\n", __func__ );
                s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_STOP);
        }
 
@@ -929,7 +929,7 @@ static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan)
                        next = buf->next;
 
                        pr_debug("%s: free buffer %p, next %p\n",
-                              __FUNCTION__, buf, buf->next);
+                              __func__, buf, buf->next);
 
                        s3c2410_dma_buffdone(chan, buf, S3C2410_RES_ABORT);
                        s3c2410_dma_freebuf(buf);
@@ -976,7 +976,7 @@ static int s3c2410_dma_started(struct s3c2410_dma_chan *chan)
 
                        if (s3c2410_dma_waitforload(chan, __LINE__) == 0) {
                                pr_debug("%s: buff not yet loaded, no more todo\n",
-                                        __FUNCTION__);
+                                        __func__);
                        } else {
                                chan->load_state = S3C2410_DMALOAD_1RUNNING;
                                s3c2410_dma_loadbuffer(chan, chan->next);
@@ -1050,16 +1050,16 @@ int s3c2410_dma_config(dmach_t channel,
        struct s3c2410_dma_chan *chan = lookup_dma_channel(channel);
 
        pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n",
-                __FUNCTION__, channel, xferunit, dcon);
+                __func__, channel, xferunit, dcon);
 
        if (chan == NULL)
                return -EINVAL;
 
-       pr_debug("%s: Initial dcon is %08x\n", __FUNCTION__, dcon);
+       pr_debug("%s: Initial dcon is %08x\n", __func__, dcon);
 
        dcon |= chan->dcon & dma_sel.dcon_mask;
 
-       pr_debug("%s: New dcon is %08x\n", __FUNCTION__, dcon);
+       pr_debug("%s: New dcon is %08x\n", __func__, dcon);
 
        switch (xferunit) {
        case 1:
@@ -1075,14 +1075,14 @@ int s3c2410_dma_config(dmach_t channel,
                break;
 
        default:
-               pr_debug("%s: bad transfer size %d\n", __FUNCTION__, xferunit);
+               pr_debug("%s: bad transfer size %d\n", __func__, xferunit);
                return -EINVAL;
        }
 
        dcon |= S3C2410_DCON_HWTRIG;
        dcon |= S3C2410_DCON_INTREQ;
 
-       pr_debug("%s: dcon now %08x\n", __FUNCTION__, dcon);
+       pr_debug("%s: dcon now %08x\n", __func__, dcon);
 
        chan->dcon = dcon;
        chan->xfer_unit = xferunit;
@@ -1099,7 +1099,7 @@ int s3c2410_dma_setflags(dmach_t channel, unsigned int flags)
        if (chan == NULL)
                return -EINVAL;
 
-       pr_debug("%s: chan=%p, flags=%08x\n", __FUNCTION__, chan, flags);
+       pr_debug("%s: chan=%p, flags=%08x\n", __func__, chan, flags);
 
        chan->flags = flags;
 
@@ -1120,7 +1120,7 @@ int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn)
        if (chan == NULL)
                return -EINVAL;
 
-       pr_debug("%s: chan=%p, op rtn=%p\n", __FUNCTION__, chan, rtn);
+       pr_debug("%s: chan=%p, op rtn=%p\n", __func__, chan, rtn);
 
        chan->op_fn = rtn;
 
@@ -1136,7 +1136,7 @@ int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn)
        if (chan == NULL)
                return -EINVAL;
 
-       pr_debug("%s: chan=%p, callback rtn=%p\n", __FUNCTION__, chan, rtn);
+       pr_debug("%s: chan=%p, callback rtn=%p\n", __func__, chan, rtn);
 
        chan->callback_fn = rtn;
 
@@ -1170,7 +1170,7 @@ int s3c2410_dma_devconfig(int channel,
                return -EINVAL;
 
        pr_debug("%s: source=%d, hwcfg=%08x, devaddr=%08lx\n",
-                __FUNCTION__, (int)source, hwcfg, devaddr);
+                __func__, (int)source, hwcfg, devaddr);
 
        chan->source = source;
        chan->dev_addr = devaddr;
@@ -1180,7 +1180,7 @@ int s3c2410_dma_devconfig(int channel,
        case S3C2410_DMASRC_HW:
                /* source is hardware */
                pr_debug("%s: hw source, devaddr=%08lx, hwcfg=%d\n",
-                        __FUNCTION__, devaddr, hwcfg);
+                        __func__, devaddr, hwcfg);
                dma_wrreg(chan, S3C2410_DMA_DISRCC, hwcfg & 3);
                dma_wrreg(chan, S3C2410_DMA_DISRC,  devaddr);
                dma_wrreg(chan, S3C2410_DMA_DIDSTC, (0<<1) | (0<<0));
@@ -1190,8 +1190,8 @@ int s3c2410_dma_devconfig(int channel,
 
        case S3C2410_DMASRC_MEM:
                /* source is memory */
-               pr_debug( "%s: mem source, devaddr=%08lx, hwcfg=%d\n",
-                         __FUNCTION__, devaddr, hwcfg);
+               pr_debug("%s: mem source, devaddr=%08lx, hwcfg=%d\n",
+                        __func__, devaddr, hwcfg);
                dma_wrreg(chan, S3C2410_DMA_DISRCC, (0<<1) | (0<<0));
                dma_wrreg(chan, S3C2410_DMA_DIDST,  devaddr);
                dma_wrreg(chan, S3C2410_DMA_DIDSTC, hwcfg & 3);
index ade230d445d9fd1ed952bc191720e60c679d9073..8724ed3298d31f9de2dad9521126a75bb8d51298 100644 (file)
@@ -1824,7 +1824,7 @@ choice
         Allows the configuration of the timer frequency.
 
        config HZ_48
-               bool "48 HZ" if SYS_SUPPORTS_48HZ
+               bool "48 HZ" if SYS_SUPPORTS_48HZ || SYS_SUPPORTS_ARBIT_HZ
 
        config HZ_100
                bool "100 HZ" if SYS_SUPPORTS_100HZ || SYS_SUPPORTS_ARBIT_HZ
index 3fb7f3065c92d4a523001aba19731f36e3e76435..72097dacabd3fe68dbae4296199aba7f21c2c6ec 100644 (file)
@@ -12,6 +12,8 @@
 # for "archclean" cleaning up for this architecture.
 #
 
+KBUILD_DEFCONFIG := ip22_defconfig
+
 cflags-y :=
 
 #
index 428ed275a0f60bb2131bdba50f0fe818690c2a9e..57f17b41098dfa8134a9b7b500ea1f66547abb8b 100644 (file)
@@ -161,22 +161,22 @@ static dbdev_tab_t dbdev_tab[] = {
        { DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 },
 
        /* Provide 16 user definable device types */
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
-       { 0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
+       { ~0, 0, 0, 0, 0, 0, 0 },
 };
 
 #define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab)
@@ -209,7 +209,7 @@ au1xxx_ddma_add_device(dbdev_tab_t *dev)
        dbdev_tab_t *p=NULL;
        static u16 new_id=0x1000;
 
-       p = find_dbdev_id(0);
+       p = find_dbdev_id(~0);
        if ( NULL != p )
        {
                memcpy(p, dev, sizeof(dbdev_tab_t));
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
deleted file mode 100644 (file)
index 4f5e56c..0000000
+++ /dev/null
@@ -1,1158 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc2
-# Tue Aug  7 12:39:49 2007
-#
-CONFIG_MIPS=y
-
-#
-# Machine selection
-#
-CONFIG_ZONE_DMA=y
-# CONFIG_MACH_ALCHEMY is not set
-# CONFIG_BASLER_EXCITE is not set
-# CONFIG_MIPS_COBALT is not set
-# CONFIG_MACH_DECSTATION is not set
-# CONFIG_MACH_JAZZ is not set
-# CONFIG_LEMOTE_FULONG is not set
-# CONFIG_MIPS_ATLAS is not set
-# CONFIG_MIPS_MALTA is not set
-# CONFIG_MIPS_SEAD is not set
-# CONFIG_MIPS_SIM is not set
-# CONFIG_MARKEINS is not set
-# CONFIG_MACH_VR41XX is not set
-# CONFIG_PNX8550_JBS is not set
-# CONFIG_PNX8550_STB810 is not set
-# CONFIG_PMC_MSP is not set
-# CONFIG_PMC_YOSEMITE is not set
-CONFIG_SGI_IP22=y
-# CONFIG_SGI_IP27 is not set
-# CONFIG_SGI_IP32 is not set
-# CONFIG_SIBYTE_CRHINE is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_CRHONE is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SNI_RM is not set
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
-# CONFIG_WR_PPMC is not set
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_TIME=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
-CONFIG_ARC=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_DMA_NEED_PCI_MAP_STATE=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-# CONFIG_NO_IOPORT is not set
-CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
-CONFIG_CPU_BIG_ENDIAN=y
-# CONFIG_CPU_LITTLE_ENDIAN is not set
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_IRQ_CPU=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_ARC32=y
-CONFIG_BOOT_ELF32=y
-CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_ARC_CONSOLE=y
-CONFIG_ARC_PROMLIB=y
-
-#
-# CPU selection
-#
-# CONFIG_CPU_LOONGSON2 is not set
-# CONFIG_CPU_MIPS32_R1 is not set
-# CONFIG_CPU_MIPS32_R2 is not set
-# CONFIG_CPU_MIPS64_R1 is not set
-# CONFIG_CPU_MIPS64_R2 is not set
-# CONFIG_CPU_R3000 is not set
-# CONFIG_CPU_TX39XX is not set
-# CONFIG_CPU_VR41XX is not set
-# CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
-# CONFIG_CPU_TX49XX is not set
-CONFIG_CPU_R5000=y
-# CONFIG_CPU_R5432 is not set
-# CONFIG_CPU_R6000 is not set
-# CONFIG_CPU_NEVADA is not set
-# CONFIG_CPU_R8000 is not set
-# CONFIG_CPU_R10000 is not set
-# CONFIG_CPU_RM7000 is not set
-# CONFIG_CPU_RM9000 is not set
-# CONFIG_CPU_SB1 is not set
-CONFIG_SYS_HAS_CPU_R4X00=y
-CONFIG_SYS_HAS_CPU_R5000=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
-
-#
-# Kernel type
-#
-CONFIG_32BIT=y
-# CONFIG_64BIT is not set
-CONFIG_PAGE_SIZE_4KB=y
-# CONFIG_PAGE_SIZE_8KB is not set
-# CONFIG_PAGE_SIZE_16KB is not set
-# CONFIG_PAGE_SIZE_64KB is not set
-CONFIG_BOARD_SCACHE=y
-CONFIG_IP22_CPU_SCACHE=y
-CONFIG_MIPS_MT_DISABLED=y
-# CONFIG_MIPS_MT_SMP is not set
-# CONFIG_MIPS_MT_SMTC is not set
-CONFIG_CPU_HAS_LLSC=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_RESOURCES_64BIT is not set
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
-CONFIG_VIRT_TO_BUS=y
-# CONFIG_HZ_48 is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_128 is not set
-# CONFIG_HZ_250 is not set
-# CONFIG_HZ_256 is not set
-CONFIG_HZ_1000=y
-# CONFIG_HZ_1024 is not set
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_HZ=1000
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-# CONFIG_KEXEC is not set
-CONFIG_SECCOMP=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# General setup
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_SYSVIPC_SYSCTL=y
-# CONFIG_POSIX_MQUEUE is not set
-# CONFIG_BSD_PROCESS_ACCT is not set
-# CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_AUDIT is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_RELAY=y
-# CONFIG_BLK_DEV_INITRD is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SYSCTL=y
-CONFIG_EMBEDDED=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-# CONFIG_HOTPLUG is not set
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_BLOCK=y
-# CONFIG_LBD is not set
-# CONFIG_BLK_DEV_IO_TRACE is not set
-# CONFIG_LSF is not set
-# CONFIG_BLK_DEV_BSG is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Bus options (PCI, PCMCIA, EISA, ISA, TC)
-#
-CONFIG_HW_HAS_EISA=y
-# CONFIG_ARCH_SUPPORTS_MSI is not set
-# CONFIG_EISA is not set
-CONFIG_MMU=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-CONFIG_TRAD_SIGNALS=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SUSPEND is not set
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-# CONFIG_XFRM_SUB_POLICY is not set
-CONFIG_XFRM_MIGRATE=y
-CONFIG_NET_KEY=y
-CONFIG_NET_KEY_MIGRATE=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
-CONFIG_IP_PNP_BOOTP=y
-# CONFIG_IP_PNP_RARP 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=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_XFRM_MODE_BEET=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_CUBIC=y
-CONFIG_DEFAULT_TCP_CONG="cubic"
-CONFIG_TCP_MD5SIG=y
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_IPV6_OPTIMISTIC_DAD=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_MIP6=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_BEET=m
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-CONFIG_IPV6_SIT=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_SUBTREES=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NF_CONNTRACK_ENABLED=m
-CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CT_ACCT=y
-CONFIG_NF_CONNTRACK_MARK=y
-CONFIG_NF_CONNTRACK_SECMARK=y
-CONFIG_NF_CONNTRACK_EVENTS=y
-CONFIG_NF_CT_PROTO_GRE=m
-CONFIG_NF_CT_PROTO_SCTP=m
-CONFIG_NF_CT_PROTO_UDPLITE=m
-CONFIG_NF_CONNTRACK_AMANDA=m
-CONFIG_NF_CONNTRACK_FTP=m
-CONFIG_NF_CONNTRACK_H323=m
-CONFIG_NF_CONNTRACK_IRC=m
-# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
-CONFIG_NF_CONNTRACK_PPTP=m
-CONFIG_NF_CONNTRACK_SANE=m
-CONFIG_NF_CONNTRACK_SIP=m
-CONFIG_NF_CONNTRACK_TFTP=m
-CONFIG_NF_CT_NETLINK=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_DSCP=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_TRACE=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_DSCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_U32=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_NF_CONNTRACK_IPV4=m
-CONFIG_NF_CONNTRACK_PROC_COMPAT=y
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_NF_NAT=m
-CONFIG_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_NF_NAT_SNMP_BASIC=m
-CONFIG_NF_NAT_PROTO_GRE=m
-CONFIG_NF_NAT_FTP=m
-CONFIG_NF_NAT_IRC=m
-CONFIG_NF_NAT_TFTP=m
-CONFIG_NF_NAT_AMANDA=m
-CONFIG_NF_NAT_PPTP=m
-CONFIG_NF_NAT_H323=m
-CONFIG_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_NF_CONNTRACK_IPV6=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-# CONFIG_IP_DCCP is not set
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-# CONFIG_TIPC 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_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FIFO=y
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RR=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-# CONFIG_CLS_U32_PERF is not set
-# CONFIG_CLS_U32_MARK is not set
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_EMATCH is not set
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=y
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_POLICE=y
-# CONFIG_NET_CLS_IND 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
-# CONFIG_AF_RXRPC is not set
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_MAC80211=m
-# CONFIG_MAC80211_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
-CONFIG_RFKILL=m
-CONFIG_RFKILL_INPUT=m
-# CONFIG_NET_9P is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_SYS_HYPERVISOR is not set
-CONFIG_CONNECTOR=m
-# CONFIG_MTD is not set
-# CONFIG_PARPORT is not set
-CONFIG_BLK_DEV=y
-# CONFIG_BLK_DEV_COW_COMMON is not set
-# CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_RAM is not set
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-# CONFIG_MISC_DEVICES is not set
-# CONFIG_IDE is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=y
-CONFIG_SCSI_DMA=y
-CONFIG_SCSI_TGT=m
-# CONFIG_SCSI_NETLINK is not set
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=y
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=y
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-# CONFIG_CHR_DEV_SG is not set
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-# CONFIG_SCSI_LOGGING is not set
-CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-CONFIG_SCSI_SPI_ATTRS=m
-# CONFIG_SCSI_FC_ATTRS is not set
-CONFIG_SCSI_ISCSI_ATTRS=m
-# CONFIG_SCSI_SAS_LIBSAS is not set
-CONFIG_SCSI_LOWLEVEL=y
-CONFIG_ISCSI_TCP=m
-CONFIG_SGIWD93_SCSI=y
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_ATA is not set
-# CONFIG_MD is not set
-CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
-# CONFIG_IFB is not set
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_MACVLAN=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-# CONFIG_VITESSE_PHY is not set
-# CONFIG_SMSC_PHY is not set
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_ICPLUS_PHY is not set
-# CONFIG_FIXED_PHY is not set
-CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
-# CONFIG_AX88796 is not set
-# CONFIG_DM9000 is not set
-CONFIG_SGISEEQ=y
-# CONFIG_NETDEV_1000 is not set
-# CONFIG_NETDEV_10000 is not set
-
-#
-# Wireless LAN
-#
-CONFIG_WLAN_PRE80211=y
-CONFIG_STRIP=m
-CONFIG_WLAN_80211=y
-# CONFIG_LIBERTAS is not set
-CONFIG_HOSTAP=m
-# CONFIG_HOSTAP_FIRMWARE is not set
-# CONFIG_WAN is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP 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
-# CONFIG_ISDN is not set
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-# CONFIG_INPUT_FF_MEMLESS is not set
-# CONFIG_INPUT_POLLDEV is not set
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=m
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_STOWAWAY is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=m
-# CONFIG_MOUSE_PS2_ALPS is not set
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-# CONFIG_MOUSE_PS2_SYNAPTICS is not set
-# CONFIG_MOUSE_PS2_LIFEBOOK is not set
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TABLET is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-# CONFIG_SERIAL_8250 is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_IP22_ZILOG=m
-CONFIG_SERIAL_CORE=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_IPMI_HANDLER is not set
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-# CONFIG_SOFT_WATCHDOG is not set
-CONFIG_INDYDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_RTC is not set
-CONFIG_SGI_DS1286=m
-# CONFIG_R3964 is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=256
-# CONFIG_TCG_TPM is not set
-# CONFIG_I2C is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-# CONFIG_W1 is not set
-# CONFIG_POWER_SUPPLY is not set
-# CONFIG_HWMON is not set
-
-#
-# Multifunction device drivers
-#
-# CONFIG_MFD_SM501 is not set
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-# CONFIG_DVB_CORE is not set
-# CONFIG_DAB is not set
-
-#
-# Graphics support
-#
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Display device support
-#
-# CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
-
-#
-# Console display driver support
-#
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_SGI_NEWPORT_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FONT_8x16=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_LINUX_CLUT224 is not set
-CONFIG_LOGO_SGI_CLUT224=y
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-CONFIG_HID_SUPPORT=y
-CONFIG_HID=y
-# CONFIG_HID_DEBUG is not set
-CONFIG_USB_SUPPORT=y
-# CONFIG_USB_ARCH_HAS_HCD is not set
-# CONFIG_USB_ARCH_HAS_OHCI is not set
-# CONFIG_USB_ARCH_HAS_EHCI is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-# CONFIG_MMC is not set
-# CONFIG_NEW_LEDS is not set
-# CONFIG_RTC_CLASS is not set
-
-#
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
-# Userspace I/O
-#
-# CONFIG_UIO is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=m
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-# CONFIG_EXT4DEV_FS is not set
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
-CONFIG_XFS_SECURITY=y
-# CONFIG_XFS_POSIX_ACL is not set
-# CONFIG_XFS_RT is not set
-# CONFIG_GFS2_FS is not set
-# CONFIG_OCFS2_FS is not set
-CONFIG_MINIX_FS=m
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-CONFIG_FUSE_FS=m
-CONFIG_GENERIC_ACL=y
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=m
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_ECRYPT_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-CONFIG_EFS_FS=m
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-# CONFIG_UFS_DEBUG is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
-CONFIG_RPCSEC_GSS_KRB5=m
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp437"
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-# CONFIG_CIFS_WEAK_PW_HASH is not set
-# CONFIG_CIFS_XATTR is not set
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_BSD_DISKLABEL is not set
-# CONFIG_MINIX_SUBPARTITION is not set
-# CONFIG_SOLARIS_X86_PARTITION is not set
-# CONFIG_UNIXWARE_DISKLABEL is not set
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_KARMA_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-# CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
-CONFIG_NLS=m
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_ENABLE_MUST_CHECK=y
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_UNUSED_SYMBOLS is not set
-# CONFIG_DEBUG_FS is not set
-# CONFIG_HEADERS_CHECK is not set
-# CONFIG_DEBUG_KERNEL is not set
-CONFIG_CROSSCOMPILE=y
-CONFIG_CMDLINE=""
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-# CONFIG_SECURITY is not set
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ABLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_GF128MUL=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_LRW=m
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-CONFIG_CRYPTO_CAMELLIA=m
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_HW is not set
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=m
-# CONFIG_CRC_CCITT is not set
-CONFIG_CRC16=m
-# CONFIG_CRC_ITU_T is not set
-CONFIG_CRC32=m
-# CONFIG_CRC7 is not set
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=m
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
index ffa08362de170d3c09790b4511c6cdd5f973f6bc..9e78e1a4ca179f8004b9cf47aa2fa5815c086f3a 100644 (file)
@@ -76,7 +76,6 @@ obj-$(CONFIG_PROC_FS)         += proc.o
 obj-$(CONFIG_64BIT)            += cpu-bugs64.o
 
 obj-$(CONFIG_I8253)            += i8253.o
-obj-$(CONFIG_PCSPEAKER)                += pcspeaker.o
 
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o
 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
index 417bb3e336ac811d33a0f9b43092e44e146a5b8f..a1b48af0992ffb297c588c1a2cc5ae22de826871 100644 (file)
@@ -167,7 +167,7 @@ static inline void check_mult_sh(void)
        panic(bug64hit, !R4000_WAR ? r4kwar : nowar);
 }
 
-static volatile int daddi_ov __initdata = 0;
+static volatile int daddi_ov __cpuinitdata = 0;
 
 asmlinkage void __init do_daddi_ov(struct pt_regs *regs)
 {
@@ -239,7 +239,7 @@ static inline void check_daddi(void)
        panic(bug64hit, !DADDI_WAR ? daddiwar : nowar);
 }
 
-int daddiu_bug __initdata = -1;
+int daddiu_bug __cpuinitdata = -1;
 
 static inline void check_daddiu(void)
 {
index 5861a432a52f93bb2feeb76724311922f6b57c76..89c3304cb93c391903f0178de2bd796a48e24c5d 100644 (file)
@@ -550,7 +550,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
        }
 }
 
-static char unknown_isa[] __initdata = KERN_ERR \
+static char unknown_isa[] __cpuinitdata = KERN_ERR \
        "Unsupported ISA type, c0.config0: %d.";
 
 static inline unsigned int decode_config0(struct cpuinfo_mips *c)
@@ -656,7 +656,7 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
        return config3 & MIPS_CONF_M;
 }
 
-static void __init decode_configs(struct cpuinfo_mips *c)
+static void __cpuinit decode_configs(struct cpuinfo_mips *c)
 {
        /* MIPS32 or MIPS64 compliant CPU.  */
        c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER |
@@ -814,7 +814,7 @@ const char *__cpu_name[NR_CPUS];
 /*
  * Name a CPU
  */
-static __init const char *cpu_to_name(struct cpuinfo_mips *c)
+static __cpuinit const char *cpu_to_name(struct cpuinfo_mips *c)
 {
        const char *name = NULL;
 
@@ -896,7 +896,7 @@ static __init const char *cpu_to_name(struct cpuinfo_mips *c)
        return name;
 }
 
-__init void cpu_probe(void)
+__cpuinit void cpu_probe(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
        unsigned int cpu = smp_processor_id();
@@ -959,7 +959,7 @@ __init void cpu_probe(void)
                c->srsets = 1;
 }
 
-__init void cpu_report(void)
+__cpuinit void cpu_report(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
 
index 0e2b5cd81f67dbdd4e48bd83846e074d6c17ea0c..86e026f067bc566c2bbd9620763e2ab6428e836a 100644 (file)
@@ -22,12 +22,17 @@ static struct clocksource clocksource_mips = {
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-void __init init_mips_clocksource(void)
+int __init init_mips_clocksource(void)
 {
+       if (!cpu_has_counter || !mips_hpt_frequency)
+               return -ENXIO;
+
        /* Calclate a somewhat reasonable rating value */
        clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
 
        clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);
 
        clocksource_register(&clocksource_mips);
+
+       return 0;
 }
index a24fb790090113eef1fc650b677ce70c80d79c53..361364501d34926deea6d59456cce24f0674e538 100644 (file)
@@ -195,7 +195,7 @@ NESTED(kernel_entry, 16, sp)                        # kernel entry point
        j               start_kernel
        END(kernel_entry)
 
-       __INIT
+       __CPUINIT
 
 #ifdef CONFIG_SMP
 /*
index fcae6675297273839812a4977c329ee6cb9e5899..984c0d0a7b4d72d2f0ff49c6dcf450220ba061c4 100644 (file)
@@ -534,8 +534,7 @@ static int simulate_llsc(struct pt_regs *regs, unsigned int opcode)
 
 /*
  * Simulate trapping 'rdhwr' instructions to provide user accessible
- * registers not implemented in hardware.  The only current use of this
- * is the thread area pointer.
+ * registers not implemented in hardware.
  */
 static int simulate_rdhwr(struct pt_regs *regs, unsigned int opcode)
 {
@@ -545,11 +544,31 @@ static int simulate_rdhwr(struct pt_regs *regs, unsigned int opcode)
                int rd = (opcode & RD) >> 11;
                int rt = (opcode & RT) >> 16;
                switch (rd) {
-                       case 29:
-                               regs->regs[rt] = ti->tp_value;
-                               return 0;
+               case 0:         /* CPU number */
+                       regs->regs[rt] = smp_processor_id();
+                       return 0;
+               case 1:         /* SYNCI length */
+                       regs->regs[rt] = min(current_cpu_data.dcache.linesz,
+                                            current_cpu_data.icache.linesz);
+                       return 0;
+               case 2:         /* Read count register */
+                       regs->regs[rt] = read_c0_count();
+                       return 0;
+               case 3:         /* Count register resolution */
+                       switch (current_cpu_data.cputype) {
+                       case CPU_20KC:
+                       case CPU_25KF:
+                               regs->regs[rt] = 1;
+                               break;
                        default:
-                               return -1;
+                               regs->regs[rt] = 2;
+                       }
+                       return 0;
+               case 29:
+                       regs->regs[rt] = ti->tp_value;
+                       return 0;
+               default:
+                       return -1;
                }
        }
 
@@ -1287,7 +1306,7 @@ int cp0_compare_irq;
 int cp0_perfcount_irq;
 EXPORT_SYMBOL_GPL(cp0_perfcount_irq);
 
-void __init per_cpu_trap_init(void)
+void __cpuinit per_cpu_trap_init(void)
 {
        unsigned int cpu = smp_processor_id();
        unsigned int status_set = ST0_CU0;
@@ -1404,11 +1423,12 @@ void __init set_handler(unsigned long offset, void *addr, unsigned long size)
        flush_icache_range(ebase + offset, ebase + offset + size);
 }
 
-static char panic_null_cerr[] __initdata =
+static char panic_null_cerr[] __cpuinitdata =
        "Trying to set NULL cache error exception handler";
 
 /* Install uncached CPU exception handler */
-void __init set_uncached_handler(unsigned long offset, void *addr, unsigned long size)
+void __cpuinit set_uncached_handler(unsigned long offset, void *addr,
+       unsigned long size)
 {
 #ifdef CONFIG_32BIT
        unsigned long uncached_ebase = KSEG1ADDR(ebase);
index b33d8569bcb0a0f71ee3838b72f1f92df113f657..bb4cb2f828ea9ae86090a06b859caf299f1a5c29 100644 (file)
@@ -17,3 +17,5 @@ word_type __ucmpdi2(unsigned long long a, unsigned long long b)
                return 2;
        return 1;
 }
+
+EXPORT_SYMBOL(__ucmpdi2);
index 27b012d4341c2ad6f259ac33b4557b7360bc0a9b..a6d1c77034d5ea351bd140c7ee78fd86cdf515dd 100644 (file)
@@ -36,7 +36,7 @@
  * values, so we can avoid sharing the same stack area between a cached
  * and the uncached mode.
  */
-unsigned long __init run_uncached(void *func)
+unsigned long __cpuinit run_uncached(void *func)
 {
        register long sp __asm__("$sp");
        register long ret __asm__("$2");
index f02ce6308e51d839dd9e366a7cbdea60cc4e7625..b50e0fc406ac9d04fa50b64ad87e8f6666d800a0 100644 (file)
@@ -146,7 +146,7 @@ void __init plat_perf_setup(void)
        }
 }
 
-unsigned int __init get_c0_compare_int(void)
+unsigned int __cpuinit get_c0_compare_int(void)
 {
 #ifdef MSC01E_INT_BASE
        if (cpu_has_veic) {
index e39bbe989da34b85a0ec7dbe703efdbef4e5270a..881ecbc1fa238d62790bcf9dcd946137cad7639f 100644 (file)
@@ -83,7 +83,7 @@ static void mips_timer_dispatch(void)
 }
 
 
-unsigned __init get_c0_compare_int(void)
+unsigned __cpuinit get_c0_compare_int(void)
 {
 #ifdef MSC01E_INT_BASE
        if (cpu_has_veic) {
index 562abb77d1d543864a80b2a09318aadf1c464733..76935e320214bf200106b78bd4b8ed7037c1f72c 100644 (file)
@@ -307,7 +307,7 @@ static void r3k_dma_cache_wback_inv(unsigned long start, unsigned long size)
        r3k_flush_dcache_range(start, start + size);
 }
 
-void __init r3k_cache_init(void)
+void __cpuinit r3k_cache_init(void)
 {
        extern void build_clear_page(void);
        extern void build_copy_page(void);
index 2c4f7e11f0d55fe746d142f764b0e4024f78d686..6496925b5e290ab1ec837a785baf065438ae346c 100644 (file)
@@ -93,7 +93,7 @@ static inline void r4k_blast_dcache_page_dc32(unsigned long addr)
        blast_dcache32_page(addr);
 }
 
-static void __init r4k_blast_dcache_page_setup(void)
+static void __cpuinit r4k_blast_dcache_page_setup(void)
 {
        unsigned long  dc_lsize = cpu_dcache_line_size();
 
@@ -107,7 +107,7 @@ static void __init r4k_blast_dcache_page_setup(void)
 
 static void (* r4k_blast_dcache_page_indexed)(unsigned long addr);
 
-static void __init r4k_blast_dcache_page_indexed_setup(void)
+static void __cpuinit r4k_blast_dcache_page_indexed_setup(void)
 {
        unsigned long dc_lsize = cpu_dcache_line_size();
 
@@ -121,7 +121,7 @@ static void __init r4k_blast_dcache_page_indexed_setup(void)
 
 static void (* r4k_blast_dcache)(void);
 
-static void __init r4k_blast_dcache_setup(void)
+static void __cpuinit r4k_blast_dcache_setup(void)
 {
        unsigned long dc_lsize = cpu_dcache_line_size();
 
@@ -206,7 +206,7 @@ static inline void tx49_blast_icache32_page_indexed(unsigned long page)
 
 static void (* r4k_blast_icache_page)(unsigned long addr);
 
-static void __init r4k_blast_icache_page_setup(void)
+static void __cpuinit r4k_blast_icache_page_setup(void)
 {
        unsigned long ic_lsize = cpu_icache_line_size();
 
@@ -223,7 +223,7 @@ static void __init r4k_blast_icache_page_setup(void)
 
 static void (* r4k_blast_icache_page_indexed)(unsigned long addr);
 
-static void __init r4k_blast_icache_page_indexed_setup(void)
+static void __cpuinit r4k_blast_icache_page_indexed_setup(void)
 {
        unsigned long ic_lsize = cpu_icache_line_size();
 
@@ -247,7 +247,7 @@ static void __init r4k_blast_icache_page_indexed_setup(void)
 
 static void (* r4k_blast_icache)(void);
 
-static void __init r4k_blast_icache_setup(void)
+static void __cpuinit r4k_blast_icache_setup(void)
 {
        unsigned long ic_lsize = cpu_icache_line_size();
 
@@ -268,7 +268,7 @@ static void __init r4k_blast_icache_setup(void)
 
 static void (* r4k_blast_scache_page)(unsigned long addr);
 
-static void __init r4k_blast_scache_page_setup(void)
+static void __cpuinit r4k_blast_scache_page_setup(void)
 {
        unsigned long sc_lsize = cpu_scache_line_size();
 
@@ -286,7 +286,7 @@ static void __init r4k_blast_scache_page_setup(void)
 
 static void (* r4k_blast_scache_page_indexed)(unsigned long addr);
 
-static void __init r4k_blast_scache_page_indexed_setup(void)
+static void __cpuinit r4k_blast_scache_page_indexed_setup(void)
 {
        unsigned long sc_lsize = cpu_scache_line_size();
 
@@ -304,7 +304,7 @@ static void __init r4k_blast_scache_page_indexed_setup(void)
 
 static void (* r4k_blast_scache)(void);
 
-static void __init r4k_blast_scache_setup(void)
+static void __cpuinit r4k_blast_scache_setup(void)
 {
        unsigned long sc_lsize = cpu_scache_line_size();
 
@@ -691,11 +691,11 @@ static inline void rm7k_erratum31(void)
        }
 }
 
-static char *way_string[] __initdata = { NULL, "direct mapped", "2-way",
+static char *way_string[] __cpuinitdata = { NULL, "direct mapped", "2-way",
        "3-way", "4-way", "5-way", "6-way", "7-way", "8-way"
 };
 
-static void __init probe_pcache(void)
+static void __cpuinit probe_pcache(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
        unsigned int config = read_c0_config();
@@ -1016,7 +1016,7 @@ static void __init probe_pcache(void)
  * executes in KSEG1 space or else you will crash and burn badly.  You have
  * been warned.
  */
-static int __init probe_scache(void)
+static int __cpuinit probe_scache(void)
 {
        unsigned long flags, addr, begin, end, pow2;
        unsigned int config = read_c0_config();
@@ -1095,7 +1095,7 @@ extern int r5k_sc_init(void);
 extern int rm7k_sc_init(void);
 extern int mips_sc_init(void);
 
-static void __init setup_scache(void)
+static void __cpuinit setup_scache(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
        unsigned int config = read_c0_config();
@@ -1206,7 +1206,7 @@ void au1x00_fixup_config_od(void)
        }
 }
 
-static void __init coherency_setup(void)
+static void __cpuinit coherency_setup(void)
 {
        change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT);
 
@@ -1238,7 +1238,7 @@ static void __init coherency_setup(void)
        }
 }
 
-void __init r4k_cache_init(void)
+void __cpuinit r4k_cache_init(void)
 {
        extern void build_clear_page(void);
        extern void build_copy_page(void);
index 9ea121e8cdceb39245d922154dde44ce239d40e5..b09d56981d53cfcf7d99da747f8225a8915ade2f 100644 (file)
@@ -329,7 +329,7 @@ static __init void tx39_probe_cache(void)
        }
 }
 
-void __init tx39_cache_init(void)
+void __cpuinit tx39_cache_init(void)
 {
        extern void build_clear_page(void);
        extern void build_copy_page(void);
index 6a24651971df0f6e361d110419c65ee46f5f241a..51ab1faa027d86b6c2b5c832ea518942bd0e33e8 100644 (file)
@@ -127,9 +127,10 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address,
        }
 }
 
-static char cache_panic[] __initdata = "Yeee, unsupported cache architecture.";
+static char cache_panic[] __cpuinitdata =
+       "Yeee, unsupported cache architecture.";
 
-void __init cpu_cache_init(void)
+void __devinit cpu_cache_init(void)
 {
        if (cpu_has_3k_cache) {
                extern void __weak r3k_cache_init(void);
index e54a62f2807c93754e9c4b05d97442b812d5d626..2d08268bb705f19f29c2a708f5a25a8f6d571369 100644 (file)
@@ -34,8 +34,6 @@
         * is changed.
         */
 
-        __INIT
-
        .set    mips64
        .set    noreorder
        .set    noat
@@ -51,6 +49,8 @@
         * (0x170-0x17f) are used to preserve k0, k1, and ra.
         */
 
+       __CPUINIT
+
 LEAF(except_vec2_sb1)
        /*
         * If this error is recoverable, we need to exit the handler
index 9185fbf37c0d5b9655e914b446d2d9e3ae70f5d4..455dedb5b39e8379703246bc3a158fdafb0ca83e 100644 (file)
@@ -66,21 +66,21 @@ EXPORT_SYMBOL(copy_page);
  * with 64-bit kernels.  The prefetch offsets have been experimentally tuned
  * an Origin 200.
  */
-static int pref_offset_clear __initdata = 512;
-static int pref_offset_copy  __initdata = 256;
+static int pref_offset_clear __cpuinitdata = 512;
+static int pref_offset_copy  __cpuinitdata = 256;
 
-static unsigned int pref_src_mode __initdata;
-static unsigned int pref_dst_mode __initdata;
+static unsigned int pref_src_mode __cpuinitdata;
+static unsigned int pref_dst_mode __cpuinitdata;
 
-static int load_offset __initdata;
-static int store_offset __initdata;
+static int load_offset __cpuinitdata;
+static int store_offset __cpuinitdata;
 
-static unsigned int __initdata *dest, *epc;
+static unsigned int __cpuinitdata *dest, *epc;
 
 static unsigned int instruction_pending;
 static union mips_instruction delayed_mi;
 
-static void __init emit_instruction(union mips_instruction mi)
+static void __cpuinit emit_instruction(union mips_instruction mi)
 {
        if (instruction_pending)
                *epc++ = delayed_mi.word;
@@ -222,7 +222,7 @@ static inline void build_cdex_p(void)
        emit_instruction(mi);
 }
 
-static void __init __build_store_reg(int reg)
+static void __cpuinit __build_store_reg(int reg)
 {
        union mips_instruction mi;
        unsigned int width;
@@ -339,7 +339,7 @@ static inline void build_jr_ra(void)
        flush_delay_slot_or_nop();
 }
 
-void __init build_clear_page(void)
+void __cpuinit build_clear_page(void)
 {
        unsigned int loop_start;
        unsigned long off;
@@ -442,7 +442,7 @@ dest = label();
        pr_debug("\t.set pop\n");
 }
 
-void __init build_copy_page(void)
+void __cpuinit build_copy_page(void)
 {
        unsigned int loop_start;
        unsigned long off;
index 89925ec57d6a83e80b8657dc2fb038996bea90ac..49e289d05414fe333287ba2d0377170c0849071f 100644 (file)
@@ -293,10 +293,10 @@ void copy_page(void *to, void *from)
 EXPORT_SYMBOL(clear_page);
 EXPORT_SYMBOL(copy_page);
 
-void __init build_clear_page(void)
+void __cpuinit build_clear_page(void)
 {
 }
 
-void __init build_copy_page(void)
+void __cpuinit build_copy_page(void)
 {
 }
index d236cf8b7374720e2beb555c66aad84becec69c7..1f602a110e101e9e54bcd4c1426cec9659eaaa23 100644 (file)
@@ -168,7 +168,7 @@ struct bcache_ops indy_sc_ops = {
        .bc_inv = indy_sc_wback_invalidate
 };
 
-void __init indy_sc_init(void)
+void __cpuinit indy_sc_init(void)
 {
        if (indy_sc_probe()) {
                indy_sc_enable();
index c13170bc675c6f3483221ced2a7d34a28d0081bf..b55c2d1b998fee54a905b4cc816d3c7196209673 100644 (file)
@@ -100,7 +100,7 @@ static inline int __init mips_sc_probe(void)
        return 1;
 }
 
-int __init mips_sc_init(void)
+int __cpuinit mips_sc_init(void)
 {
        int found = mips_sc_probe();
        if (found) {
@@ -109,4 +109,3 @@ int __init mips_sc_init(void)
        }
        return found;
 }
-
index d35b6c1103a393d8f52994ec66ee59859c59e90a..f330d38e55753b057c9647c031215c8fb2feb7d0 100644 (file)
@@ -99,7 +99,7 @@ static struct bcache_ops r5k_sc_ops = {
        .bc_inv = r5k_dma_cache_inv_sc
 };
 
-void __init r5k_sc_init(void)
+void __cpuinit r5k_sc_init(void)
 {
        if (r5k_sc_probe()) {
                r5k_sc_enable();
index 31ec730524239dcc9de7c22dd2cda845daa8b963..fc227f3b1199750bfbdb6fb350274b4d51fef915 100644 (file)
@@ -128,7 +128,7 @@ struct bcache_ops rm7k_sc_ops = {
        .bc_inv = rm7k_sc_inv
 };
 
-void __init rm7k_sc_init(void)
+void __cpuinit rm7k_sc_init(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
        unsigned int config = read_c0_config();
index 7948e9a5e37212bccc6da9bce7d4829429169dc9..a782549ac80eaa02069e40a18f6e0d98527be9b2 100644 (file)
@@ -281,7 +281,7 @@ void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
        }
 }
 
-void __init tlb_init(void)
+void __cpuinit tlb_init(void)
 {
        local_flush_tlb_all();
 
index 74ae0348cc92533d483f0f2597d8429bfb4d07b7..63065d6e806397202e93628db4dc0142e1ce642a 100644 (file)
@@ -388,7 +388,7 @@ void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
  * lifetime of the system
  */
 
-static int temp_tlb_entry __initdata;
+static int temp_tlb_entry __cpuinitdata;
 
 __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
                               unsigned long entryhi, unsigned long pagemask)
@@ -427,7 +427,7 @@ out:
        return ret;
 }
 
-static void __init probe_tlb(unsigned long config)
+static void __cpuinit probe_tlb(unsigned long config)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
        unsigned int reg;
@@ -455,7 +455,7 @@ static void __init probe_tlb(unsigned long config)
        c->tlbsize = ((reg >> 25) & 0x3f) + 1;
 }
 
-static int __initdata ntlb = 0;
+static int __cpuinitdata ntlb = 0;
 static int __init set_ntlb(char *str)
 {
        get_option(&str, &ntlb);
@@ -464,7 +464,7 @@ static int __init set_ntlb(char *str)
 
 __setup("ntlb=", set_ntlb);
 
-void __init tlb_init(void)
+void __cpuinit tlb_init(void)
 {
        unsigned int config = read_c0_config();
 
@@ -473,7 +473,7 @@ void __init tlb_init(void)
         *   - On R4600 1.7 the tlbp never hits for pages smaller than
         *     the value in the c0_pagemask register.
         *   - The entire mm handling assumes the c0_pagemask register to
-        *     be set for 4kb pages.
+        *     be set to fixed-size pages.
         */
        probe_tlb(config);
        write_c0_pagemask(PM_DEFAULT_MASK);
index bd8409d8ff626c64b62ed271cb11ab1bf82a125d..4f01a3be215cf142434fbe91fbaf3edee0a6884f 100644 (file)
@@ -214,14 +214,14 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
        local_irq_restore(flags);
 }
 
-static void __init probe_tlb(unsigned long config)
+static void __cpuinit probe_tlb(unsigned long config)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
 
        c->tlbsize = 3 * 128;           /* 3 sets each 128 entries */
 }
 
-void __init tlb_init(void)
+void __cpuinit tlb_init(void)
 {
        unsigned int config = read_c0_config();
        unsigned long status;
index 218a6cc415e8865cbdb83b59889666fd4f2d8dc7..3a93d4ce270320501acf029da9a5036e4d4d3d26 100644 (file)
@@ -60,7 +60,7 @@ static inline int __maybe_unused r10000_llsc_war(void)
  * why; it's not an issue caused by the core RTL.
  *
  */
-static int __init m4kc_tlbp_war(void)
+static int __cpuinit m4kc_tlbp_war(void)
 {
        return (current_cpu_data.processor_id & 0xffff00) ==
               (PRID_COMP_MIPS | PRID_IMP_4KC);
@@ -144,16 +144,16 @@ static inline void dump_handler(const u32 *handler, int count)
  * We deliberately chose a buffer size of 128, so we won't scribble
  * over anything important on overflow before we panic.
  */
-static u32 tlb_handler[128] __initdata;
+static u32 tlb_handler[128] __cpuinitdata;
 
 /* simply assume worst case size for labels and relocs */
-static struct uasm_label labels[128] __initdata;
-static struct uasm_reloc relocs[128] __initdata;
+static struct uasm_label labels[128] __cpuinitdata;
+static struct uasm_reloc relocs[128] __cpuinitdata;
 
 /*
  * The R3000 TLB handler is simple.
  */
-static void __init build_r3000_tlb_refill_handler(void)
+static void __cpuinit build_r3000_tlb_refill_handler(void)
 {
        long pgdc = (long)pgd_current;
        u32 *p;
@@ -197,7 +197,7 @@ static void __init build_r3000_tlb_refill_handler(void)
  * other one.To keep things simple, we first assume linear space,
  * then we relocate it to the final handler layout as needed.
  */
-static u32 final_handler[64] __initdata;
+static u32 final_handler[64] __cpuinitdata;
 
 /*
  * Hazards
@@ -221,7 +221,7 @@ static u32 final_handler[64] __initdata;
  *
  * As if we MIPS hackers wouldn't know how to nop pipelines happy ...
  */
-static void __init __maybe_unused build_tlb_probe_entry(u32 **p)
+static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p)
 {
        switch (current_cpu_type()) {
        /* Found by experiment: R4600 v2.0 needs this, too.  */
@@ -245,7 +245,7 @@ static void __init __maybe_unused build_tlb_probe_entry(u32 **p)
  */
 enum tlb_write_entry { tlb_random, tlb_indexed };
 
-static void __init build_tlb_write_entry(u32 **p, struct uasm_label **l,
+static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
                                         struct uasm_reloc **r,
                                         enum tlb_write_entry wmode)
 {
@@ -389,7 +389,7 @@ static void __init build_tlb_write_entry(u32 **p, struct uasm_label **l,
  * TMP and PTR are scratch.
  * TMP will be clobbered, PTR will hold the pmd entry.
  */
-static void __init
+static void __cpuinit
 build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
                 unsigned int tmp, unsigned int ptr)
 {
@@ -450,7 +450,7 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
  * BVADDR is the faulting address, PTR is scratch.
  * PTR will hold the pgd for vmalloc.
  */
-static void __init
+static void __cpuinit
 build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
                        unsigned int bvaddr, unsigned int ptr)
 {
@@ -522,7 +522,7 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
  * TMP and PTR are scratch.
  * TMP will be clobbered, PTR will hold the pgd entry.
  */
-static void __init __maybe_unused
+static void __cpuinit __maybe_unused
 build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr)
 {
        long pgdc = (long)pgd_current;
@@ -557,7 +557,7 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr)
 
 #endif /* !CONFIG_64BIT */
 
-static void __init build_adjust_context(u32 **p, unsigned int ctx)
+static void __cpuinit build_adjust_context(u32 **p, unsigned int ctx)
 {
        unsigned int shift = 4 - (PTE_T_LOG2 + 1) + PAGE_SHIFT - 12;
        unsigned int mask = (PTRS_PER_PTE / 2 - 1) << (PTE_T_LOG2 + 1);
@@ -583,7 +583,7 @@ static void __init build_adjust_context(u32 **p, unsigned int ctx)
        uasm_i_andi(p, ctx, ctx, mask);
 }
 
-static void __init build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr)
+static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr)
 {
        /*
         * Bug workaround for the Nevada. It seems as if under certain
@@ -608,7 +608,7 @@ static void __init build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr)
        UASM_i_ADDU(p, ptr, ptr, tmp); /* add in offset */
 }
 
-static void __init build_update_entries(u32 **p, unsigned int tmp,
+static void __cpuinit build_update_entries(u32 **p, unsigned int tmp,
                                        unsigned int ptep)
 {
        /*
@@ -651,7 +651,7 @@ static void __init build_update_entries(u32 **p, unsigned int tmp,
 #endif
 }
 
-static void __init build_r4000_tlb_refill_handler(void)
+static void __cpuinit build_r4000_tlb_refill_handler(void)
 {
        u32 *p = tlb_handler;
        struct uasm_label *l = labels;
@@ -783,7 +783,7 @@ u32 handle_tlbl[FASTPATH_SIZE] __cacheline_aligned;
 u32 handle_tlbs[FASTPATH_SIZE] __cacheline_aligned;
 u32 handle_tlbm[FASTPATH_SIZE] __cacheline_aligned;
 
-static void __init
+static void __cpuinit
 iPTE_LW(u32 **p, struct uasm_label **l, unsigned int pte, unsigned int ptr)
 {
 #ifdef CONFIG_SMP
@@ -803,7 +803,7 @@ iPTE_LW(u32 **p, struct uasm_label **l, unsigned int pte, unsigned int ptr)
 #endif
 }
 
-static void __init
+static void __cpuinit
 iPTE_SW(u32 **p, struct uasm_reloc **r, unsigned int pte, unsigned int ptr,
        unsigned int mode)
 {
@@ -863,7 +863,7 @@ iPTE_SW(u32 **p, struct uasm_reloc **r, unsigned int pte, unsigned int ptr,
  * the page table where this PTE is located, PTE will be re-loaded
  * with it's original value.
  */
-static void __init
+static void __cpuinit
 build_pte_present(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
                  unsigned int pte, unsigned int ptr, enum label_id lid)
 {
@@ -874,7 +874,7 @@ build_pte_present(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
 }
 
 /* Make PTE valid, store result in PTR. */
-static void __init
+static void __cpuinit
 build_make_valid(u32 **p, struct uasm_reloc **r, unsigned int pte,
                 unsigned int ptr)
 {
@@ -887,7 +887,7 @@ build_make_valid(u32 **p, struct uasm_reloc **r, unsigned int pte,
  * Check if PTE can be written to, if not branch to LABEL. Regardless
  * restore PTE with value from PTR when done.
  */
-static void __init
+static void __cpuinit
 build_pte_writable(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
                   unsigned int pte, unsigned int ptr, enum label_id lid)
 {
@@ -900,7 +900,7 @@ build_pte_writable(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
 /* Make PTE writable, update software status bits as well, then store
  * at PTR.
  */
-static void __init
+static void __cpuinit
 build_make_write(u32 **p, struct uasm_reloc **r, unsigned int pte,
                 unsigned int ptr)
 {
@@ -914,7 +914,7 @@ build_make_write(u32 **p, struct uasm_reloc **r, unsigned int pte,
  * Check if PTE can be modified, if not branch to LABEL. Regardless
  * restore PTE with value from PTR when done.
  */
-static void __init
+static void __cpuinit
 build_pte_modifiable(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
                     unsigned int pte, unsigned int ptr, enum label_id lid)
 {
@@ -931,7 +931,7 @@ build_pte_modifiable(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
  * This places the pte into ENTRYLO0 and writes it with tlbwi.
  * Then it returns.
  */
-static void __init
+static void __cpuinit
 build_r3000_pte_reload_tlbwi(u32 **p, unsigned int pte, unsigned int tmp)
 {
        uasm_i_mtc0(p, pte, C0_ENTRYLO0); /* cp0 delay */
@@ -947,7 +947,7 @@ build_r3000_pte_reload_tlbwi(u32 **p, unsigned int pte, unsigned int tmp)
  * may have the probe fail bit set as a result of a trap on a
  * kseg2 access, i.e. without refill.  Then it returns.
  */
-static void __init
+static void __cpuinit
 build_r3000_tlb_reload_write(u32 **p, struct uasm_label **l,
                             struct uasm_reloc **r, unsigned int pte,
                             unsigned int tmp)
@@ -965,7 +965,7 @@ build_r3000_tlb_reload_write(u32 **p, struct uasm_label **l,
        uasm_i_rfe(p); /* branch delay */
 }
 
-static void __init
+static void __cpuinit
 build_r3000_tlbchange_handler_head(u32 **p, unsigned int pte,
                                   unsigned int ptr)
 {
@@ -985,7 +985,7 @@ build_r3000_tlbchange_handler_head(u32 **p, unsigned int pte,
        uasm_i_tlbp(p); /* load delay */
 }
 
-static void __init build_r3000_tlb_load_handler(void)
+static void __cpuinit build_r3000_tlb_load_handler(void)
 {
        u32 *p = handle_tlbl;
        struct uasm_label *l = labels;
@@ -1015,7 +1015,7 @@ static void __init build_r3000_tlb_load_handler(void)
        dump_handler(handle_tlbl, ARRAY_SIZE(handle_tlbl));
 }
 
-static void __init build_r3000_tlb_store_handler(void)
+static void __cpuinit build_r3000_tlb_store_handler(void)
 {
        u32 *p = handle_tlbs;
        struct uasm_label *l = labels;
@@ -1045,7 +1045,7 @@ static void __init build_r3000_tlb_store_handler(void)
        dump_handler(handle_tlbs, ARRAY_SIZE(handle_tlbs));
 }
 
-static void __init build_r3000_tlb_modify_handler(void)
+static void __cpuinit build_r3000_tlb_modify_handler(void)
 {
        u32 *p = handle_tlbm;
        struct uasm_label *l = labels;
@@ -1078,7 +1078,7 @@ static void __init build_r3000_tlb_modify_handler(void)
 /*
  * R4000 style TLB load/store/modify handlers.
  */
-static void __init
+static void __cpuinit
 build_r4000_tlbchange_handler_head(u32 **p, struct uasm_label **l,
                                   struct uasm_reloc **r, unsigned int pte,
                                   unsigned int ptr)
@@ -1103,7 +1103,7 @@ build_r4000_tlbchange_handler_head(u32 **p, struct uasm_label **l,
                build_tlb_probe_entry(p);
 }
 
-static void __init
+static void __cpuinit
 build_r4000_tlbchange_handler_tail(u32 **p, struct uasm_label **l,
                                   struct uasm_reloc **r, unsigned int tmp,
                                   unsigned int ptr)
@@ -1120,7 +1120,7 @@ build_r4000_tlbchange_handler_tail(u32 **p, struct uasm_label **l,
 #endif
 }
 
-static void __init build_r4000_tlb_load_handler(void)
+static void __cpuinit build_r4000_tlb_load_handler(void)
 {
        u32 *p = handle_tlbl;
        struct uasm_label *l = labels;
@@ -1160,7 +1160,7 @@ static void __init build_r4000_tlb_load_handler(void)
        dump_handler(handle_tlbl, ARRAY_SIZE(handle_tlbl));
 }
 
-static void __init build_r4000_tlb_store_handler(void)
+static void __cpuinit build_r4000_tlb_store_handler(void)
 {
        u32 *p = handle_tlbs;
        struct uasm_label *l = labels;
@@ -1191,7 +1191,7 @@ static void __init build_r4000_tlb_store_handler(void)
        dump_handler(handle_tlbs, ARRAY_SIZE(handle_tlbs));
 }
 
-static void __init build_r4000_tlb_modify_handler(void)
+static void __cpuinit build_r4000_tlb_modify_handler(void)
 {
        u32 *p = handle_tlbm;
        struct uasm_label *l = labels;
@@ -1223,7 +1223,7 @@ static void __init build_r4000_tlb_modify_handler(void)
        dump_handler(handle_tlbm, ARRAY_SIZE(handle_tlbm));
 }
 
-void __init build_tlb_refill_handler(void)
+void __cpuinit build_tlb_refill_handler(void)
 {
        /*
         * The refill handler is generated per-CPU, multi-node systems
@@ -1269,7 +1269,7 @@ void __init build_tlb_refill_handler(void)
        }
 }
 
-void __init flush_tlb_handlers(void)
+void __cpuinit flush_tlb_handlers(void)
 {
        flush_icache_range((unsigned long)handle_tlbl,
                           (unsigned long)handle_tlbl + sizeof(handle_tlbl));
index e3f74ed5f704113cd55dfc76a14c5d21bb79b130..1a6f7704cc894276dda1b6ce6dcc3d6edb225382 100644 (file)
@@ -82,7 +82,7 @@ struct insn {
         | (e) << RE_SH                                         \
         | (f) << FUNC_SH)
 
-static struct insn insn_table[] __initdata = {
+static struct insn insn_table[] __cpuinitdata = {
        { insn_addiu, M(addiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
        { insn_addu, M(spec_op, 0, 0, 0, 0, addu_op), RS | RT | RD },
        { insn_and, M(spec_op, 0, 0, 0, 0, and_op), RS | RT | RD },
@@ -135,7 +135,7 @@ static struct insn insn_table[] __initdata = {
 
 #undef M
 
-static inline __init u32 build_rs(u32 arg)
+static inline __cpuinit u32 build_rs(u32 arg)
 {
        if (arg & ~RS_MASK)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -143,7 +143,7 @@ static inline __init u32 build_rs(u32 arg)
        return (arg & RS_MASK) << RS_SH;
 }
 
-static inline __init u32 build_rt(u32 arg)
+static inline __cpuinit u32 build_rt(u32 arg)
 {
        if (arg & ~RT_MASK)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -151,7 +151,7 @@ static inline __init u32 build_rt(u32 arg)
        return (arg & RT_MASK) << RT_SH;
 }
 
-static inline __init u32 build_rd(u32 arg)
+static inline __cpuinit u32 build_rd(u32 arg)
 {
        if (arg & ~RD_MASK)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -159,7 +159,7 @@ static inline __init u32 build_rd(u32 arg)
        return (arg & RD_MASK) << RD_SH;
 }
 
-static inline __init u32 build_re(u32 arg)
+static inline __cpuinit u32 build_re(u32 arg)
 {
        if (arg & ~RE_MASK)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -167,7 +167,7 @@ static inline __init u32 build_re(u32 arg)
        return (arg & RE_MASK) << RE_SH;
 }
 
-static inline __init u32 build_simm(s32 arg)
+static inline __cpuinit u32 build_simm(s32 arg)
 {
        if (arg > 0x7fff || arg < -0x8000)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -175,7 +175,7 @@ static inline __init u32 build_simm(s32 arg)
        return arg & 0xffff;
 }
 
-static inline __init u32 build_uimm(u32 arg)
+static inline __cpuinit u32 build_uimm(u32 arg)
 {
        if (arg & ~IMM_MASK)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -183,7 +183,7 @@ static inline __init u32 build_uimm(u32 arg)
        return arg & IMM_MASK;
 }
 
-static inline __init u32 build_bimm(s32 arg)
+static inline __cpuinit u32 build_bimm(s32 arg)
 {
        if (arg > 0x1ffff || arg < -0x20000)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -194,7 +194,7 @@ static inline __init u32 build_bimm(s32 arg)
        return ((arg < 0) ? (1 << 15) : 0) | ((arg >> 2) & 0x7fff);
 }
 
-static inline __init u32 build_jimm(u32 arg)
+static inline __cpuinit u32 build_jimm(u32 arg)
 {
        if (arg & ~((JIMM_MASK) << 2))
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -202,7 +202,7 @@ static inline __init u32 build_jimm(u32 arg)
        return (arg >> 2) & JIMM_MASK;
 }
 
-static inline __init u32 build_func(u32 arg)
+static inline __cpuinit u32 build_func(u32 arg)
 {
        if (arg & ~FUNC_MASK)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -210,7 +210,7 @@ static inline __init u32 build_func(u32 arg)
        return arg & FUNC_MASK;
 }
 
-static inline __init u32 build_set(u32 arg)
+static inline __cpuinit u32 build_set(u32 arg)
 {
        if (arg & ~SET_MASK)
                printk(KERN_WARNING "Micro-assembler field overflow\n");
@@ -222,7 +222,7 @@ static inline __init u32 build_set(u32 arg)
  * The order of opcode arguments is implicitly left to right,
  * starting with RS and ending with FUNC or IMM.
  */
-static void __init build_insn(u32 **buf, enum opcode opc, ...)
+static void __cpuinit build_insn(u32 **buf, enum opcode opc, ...)
 {
        struct insn *ip = NULL;
        unsigned int i;
@@ -375,14 +375,14 @@ I_u3u1u2(_xor)
 I_u2u1u3(_xori)
 
 /* Handle labels. */
-void __init uasm_build_label(struct uasm_label **lab, u32 *addr, int lid)
+void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid)
 {
        (*lab)->addr = addr;
        (*lab)->lab = lid;
        (*lab)++;
 }
 
-int __init uasm_in_compat_space_p(long addr)
+int __cpuinit uasm_in_compat_space_p(long addr)
 {
        /* Is this address in 32bit compat space? */
 #ifdef CONFIG_64BIT
@@ -392,7 +392,7 @@ int __init uasm_in_compat_space_p(long addr)
 #endif
 }
 
-int __init uasm_rel_highest(long val)
+int __cpuinit uasm_rel_highest(long val)
 {
 #ifdef CONFIG_64BIT
        return ((((val + 0x800080008000L) >> 48) & 0xffff) ^ 0x8000) - 0x8000;
@@ -401,7 +401,7 @@ int __init uasm_rel_highest(long val)
 #endif
 }
 
-int __init uasm_rel_higher(long val)
+int __cpuinit uasm_rel_higher(long val)
 {
 #ifdef CONFIG_64BIT
        return ((((val + 0x80008000L) >> 32) & 0xffff) ^ 0x8000) - 0x8000;
@@ -410,17 +410,17 @@ int __init uasm_rel_higher(long val)
 #endif
 }
 
-int __init uasm_rel_hi(long val)
+int __cpuinit uasm_rel_hi(long val)
 {
        return ((((val + 0x8000L) >> 16) & 0xffff) ^ 0x8000) - 0x8000;
 }
 
-int __init uasm_rel_lo(long val)
+int __cpuinit uasm_rel_lo(long val)
 {
        return ((val & 0xffff) ^ 0x8000) - 0x8000;
 }
 
-void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr)
+void __cpuinit UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr)
 {
        if (!uasm_in_compat_space_p(addr)) {
                uasm_i_lui(buf, rs, uasm_rel_highest(addr));
@@ -436,7 +436,7 @@ void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr)
                uasm_i_lui(buf, rs, uasm_rel_hi(addr));
 }
 
-void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr)
+void __cpuinit UASM_i_LA(u32 **buf, unsigned int rs, long addr)
 {
        UASM_i_LA_mostly(buf, rs, addr);
        if (uasm_rel_lo(addr)) {
@@ -448,7 +448,7 @@ void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr)
 }
 
 /* Handle relocations. */
-void __init
+void __cpuinit
 uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid)
 {
        (*rel)->addr = addr;
@@ -457,7 +457,7 @@ uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid)
        (*rel)++;
 }
 
-static inline void __init
+static inline void __cpuinit
 __resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab)
 {
        long laddr = (long)lab->addr;
@@ -474,7 +474,7 @@ __resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab)
        }
 }
 
-void __init
+void __cpuinit
 uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab)
 {
        struct uasm_label *l;
@@ -485,7 +485,7 @@ uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab)
                                __resolve_relocs(rel, l);
 }
 
-void __init
+void __cpuinit
 uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off)
 {
        for (; rel->lab != UASM_LABEL_INVALID; rel++)
@@ -493,7 +493,7 @@ uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off)
                        rel->addr += off;
 }
 
-void __init
+void __cpuinit
 uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off)
 {
        for (; lab->lab != UASM_LABEL_INVALID; lab++)
@@ -501,7 +501,7 @@ uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off)
                        lab->addr += off;
 }
 
-void __init
+void __cpuinit
 uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first,
                  u32 *end, u32 *target)
 {
@@ -513,7 +513,7 @@ uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first,
        uasm_move_labels(lab, first, end, off);
 }
 
-int __init uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr)
+int __cpuinit uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr)
 {
        for (; rel->lab != UASM_LABEL_INVALID; rel++) {
                if (rel->addr == addr
@@ -526,49 +526,49 @@ int __init uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr)
 }
 
 /* Convenience functions for labeled branches. */
-void __init
+void __cpuinit
 uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid)
 {
        uasm_r_mips_pc16(r, *p, lid);
        uasm_i_bltz(p, reg, 0);
 }
 
-void __init
+void __cpuinit
 uasm_il_b(u32 **p, struct uasm_reloc **r, int lid)
 {
        uasm_r_mips_pc16(r, *p, lid);
        uasm_i_b(p, 0);
 }
 
-void __init
+void __cpuinit
 uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid)
 {
        uasm_r_mips_pc16(r, *p, lid);
        uasm_i_beqz(p, reg, 0);
 }
 
-void __init
+void __cpuinit
 uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid)
 {
        uasm_r_mips_pc16(r, *p, lid);
        uasm_i_beqzl(p, reg, 0);
 }
 
-void __init
+void __cpuinit
 uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid)
 {
        uasm_r_mips_pc16(r, *p, lid);
        uasm_i_bnez(p, reg, 0);
 }
 
-void __init
+void __cpuinit
 uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid)
 {
        uasm_r_mips_pc16(r, *p, lid);
        uasm_i_bgezl(p, reg, 0);
 }
 
-void __init
+void __cpuinit
 uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid)
 {
        uasm_r_mips_pc16(r, *p, lid);
index a10fc1135c76bb24abecbc5e57554fa713e3673c..fe0574f6e77ddcec84847b6e4028540022982646 100644 (file)
 #include <linux/types.h>
 
 #define Ip_u1u2u3(op)                                                  \
-void __init                                                            \
+void __cpuinit                                                         \
 uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c)
 
 #define Ip_u2u1u3(op)                                                  \
-void __init                                                            \
+void __cpuinit                                                         \
 uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c)
 
 #define Ip_u3u1u2(op)                                                  \
-void __init                                                            \
+void __cpuinit                                                         \
 uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c)
 
 #define Ip_u1u2s3(op)                                                  \
-void __init                                                            \
+void __cpuinit                                                         \
 uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c)
 
 #define Ip_u2s3u1(op)                                                  \
-void __init                                                            \
+void __cpuinit                                                         \
 uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c)
 
 #define Ip_u2u1s3(op)                                                  \
-void __init                                                            \
+void __cpuinit                                                         \
 uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c)
 
 #define Ip_u1u2(op)                                                    \
-void __init uasm_i##op(u32 **buf, unsigned int a, unsigned int b)
+void __cpuinit uasm_i##op(u32 **buf, unsigned int a, unsigned int b)
 
 #define Ip_u1s2(op)                                                    \
-void __init uasm_i##op(u32 **buf, unsigned int a, signed int b)
+void __cpuinit uasm_i##op(u32 **buf, unsigned int a, signed int b)
 
-#define Ip_u1(op) void __init uasm_i##op(u32 **buf, unsigned int a)
+#define Ip_u1(op) void __cpuinit uasm_i##op(u32 **buf, unsigned int a)
 
-#define Ip_0(op) void __init uasm_i##op(u32 **buf)
+#define Ip_0(op) void __cpuinit uasm_i##op(u32 **buf)
 
 Ip_u2u1s3(_addiu);
 Ip_u3u1u2(_addu);
@@ -98,19 +98,19 @@ struct uasm_label {
        int lab;
 };
 
-void __init uasm_build_label(struct uasm_label **lab, u32 *addr, int lid);
+void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid);
 #ifdef CONFIG_64BIT
-int __init uasm_in_compat_space_p(long addr);
-int __init uasm_rel_highest(long val);
-int __init uasm_rel_higher(long val);
+int uasm_in_compat_space_p(long addr);
+int uasm_rel_highest(long val);
+int uasm_rel_higher(long val);
 #endif
-int __init uasm_rel_hi(long val);
-int __init uasm_rel_lo(long val);
-void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr);
-void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr);
+int uasm_rel_hi(long val);
+int uasm_rel_lo(long val);
+void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr);
+void UASM_i_LA(u32 **buf, unsigned int rs, long addr);
 
 #define UASM_L_LA(lb)                                                  \
-static inline void __init uasm_l##lb(struct uasm_label **lab, u32 *addr) \
+static inline void __cpuinit uasm_l##lb(struct uasm_label **lab, u32 *addr) \
 {                                                                      \
        uasm_build_label(lab, addr, label##lb);                         \
 }
@@ -164,29 +164,19 @@ struct uasm_reloc {
 /* This is zero so we can use zeroed label arrays. */
 #define UASM_LABEL_INVALID 0
 
-void __init uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid);
-void __init
-uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab);
-void __init
-uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off);
-void __init
-uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off);
-void __init
-uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first,
-                 u32 *end, u32 *target);
-int __init uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr);
+void uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid);
+void uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab);
+void uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off);
+void uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off);
+void uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab,
+       u32 *first, u32 *end, u32 *target);
+int uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr);
 
 /* Convenience functions for labeled branches. */
-void __init
-uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
-void __init uasm_il_b(u32 **p, struct uasm_reloc **r, int lid);
-void __init
-uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
-void __init
-uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
-void __init
-uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
-void __init
-uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
-void __init
-uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
+void uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
+void uasm_il_b(u32 **p, struct uasm_reloc **r, int lid);
+void uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
+void uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
+void uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
+void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
+void uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
index 30ed36125bcdb73173f859823a77c3dbffce6d01..ab68c4318a308554dd3a598cbee493d9096ac08c 100644 (file)
@@ -249,8 +249,9 @@ static int __init bcm1480_pcibios_init(void)
         * XXX ehs: Should this happen in PCI Device mode?
         */
 
-       set_io_port_base((unsigned long)
-               ioremap(A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, 65536));
+       bcm1480_controller.io_map_base = (unsigned long)
+               ioremap(A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, 65536);
+       set_io_port_base(bcm1480_controller.io_map_base);
        isa_slot_offset = (unsigned long)
                ioremap(A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES, 1024*1024);
 
index a322543ac34e257223f66cb4f3bd684c60eb9537..bb64828a92fece6bcab023b1fd50cbcaf814231e 100644 (file)
@@ -40,7 +40,7 @@ int irq_to_slot[MAX_PCI_BUSSES * MAX_DEVICES_PER_PCIBUS];
 
 extern struct pci_ops bridge_pci_ops;
 
-int __init bridge_probe(nasid_t nasid, int widget_id, int masterwid)
+int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
 {
        unsigned long offset = NODE_OFFSET(nasid);
        struct bridge_controller *bc;
index f9471d77c09673f9c1e4252a404b95fea1abeecf..358ad6210949113211fa80b8e27995b20d1d1f56 100644 (file)
@@ -260,7 +260,7 @@ static void pcibios_fixup_device_resources(struct pci_dev *dev,
        }
 }
 
-void pcibios_fixup_bus(struct pci_bus *bus)
+void __devinit pcibios_fixup_bus(struct pci_bus *bus)
 {
        /* Propagate hose info into the subordinate devices.  */
 
index 653f3ec61cababae9a75320da0ec6fa8b96a8ea2..3a7df647ca7739b9336cc22ade77c34d883d5252 100644 (file)
@@ -7,10 +7,10 @@
 
 #define LAUNCHSTACK_SIZE 256
 
-static __initdata DEFINE_SPINLOCK(launch_lock);
+static __cpuinitdata DEFINE_SPINLOCK(launch_lock);
 
-static unsigned long secondary_sp __initdata;
-static unsigned long secondary_gp __initdata;
+static unsigned long secondary_sp __cpuinitdata;
+static unsigned long secondary_gp __cpuinitdata;
 
 static unsigned char launchstack[LAUNCHSTACK_SIZE] __initdata
        __attribute__((aligned(2 * sizeof(long))));
index a49e7c85f7241adce41c47eab083d41c267544c5..7093e7c573a42d0f06b689417792490ef37ee5f6 100644 (file)
@@ -53,7 +53,7 @@ extern void pcibr_setup(cnodeid_t);
 
 extern void xtalk_probe_node(cnodeid_t nid);
 
-static void __init per_hub_init(cnodeid_t cnode)
+static void __cpuinit per_hub_init(cnodeid_t cnode)
 {
        struct hub_data *hub = hub_data(cnode);
        nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode);
index 08d45369be45c40a4895a00c9c831e109de9fd7f..25d3baf0ebc4362a8c6cb02fa11468759c0f0b28 100644 (file)
@@ -285,7 +285,7 @@ void __cpuinit cpu_time_init(void)
        set_c0_status(SRB_TIMOCLK);
 }
 
-void __init hub_rtc_init(cnodeid_t cnode)
+void __cpuinit hub_rtc_init(cnodeid_t cnode)
 {
        /*
         * We only need to initialize the current node.
index fc82f34a32ceead327291ec709988fc3d4943b34..6ae64e8dfc408473ddd9f34ee569886f8c0abac3 100644 (file)
@@ -22,7 +22,7 @@
 
 extern int bridge_probe(nasid_t nasid, int widget, int masterwid);
 
-static int __init probe_one_port(nasid_t nasid, int widget, int masterwid)
+static int __cpuinit probe_one_port(nasid_t nasid, int widget, int masterwid)
 {
        widgetreg_t             widget_id;
        xwidget_part_num_t      partnum;
@@ -46,7 +46,7 @@ static int __init probe_one_port(nasid_t nasid, int widget, int masterwid)
        return 0;
 }
 
-static int __init xbow_probe(nasid_t nasid)
+static int __cpuinit xbow_probe(nasid_t nasid)
 {
        lboard_t *brd;
        klxbow_t *xbow_p;
@@ -99,7 +99,7 @@ static int __init xbow_probe(nasid_t nasid)
        return 0;
 }
 
-void __init xtalk_probe_node(cnodeid_t nid)
+void __cpuinit xtalk_probe_node(cnodeid_t nid)
 {
        volatile u64            hubreg;
        nasid_t                 nasid;
index e574de4efb36c2e588ad93d8ab6c5637551bdff1..5ddad7bd60ac8740de6712aabd6c274fc1fb435d 100644 (file)
@@ -16,6 +16,9 @@
 # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, 
 # Mike Shaver, Helge Deller and Martin K. Petersen
 #
+
+KBUILD_DEFCONFIG := default_defconfig
+
 NM             = sh $(srctree)/arch/parisc/nm
 CHECKFLAGS     += -D__hppa__=1
 
index 4ab83d56974dcc88381ea4267c5ebb71fb69ddac..7177a6cd1b7f58b0fcc83f60ea5c11cf1bd96e1a 100644 (file)
@@ -1080,6 +1080,9 @@ void pdc_io_reset_devices(void)
        spin_unlock_irqrestore(&pdc_lock, flags);
 }
 
+/* locked by pdc_console_lock */
+static int __attribute__((aligned(8)))   iodc_retbuf[32];
+static char __attribute__((aligned(64))) iodc_dbuf[4096];
 
 /**
  * pdc_iodc_print - Console print using IODC.
@@ -1091,24 +1094,20 @@ void pdc_io_reset_devices(void)
  * Since the HP console requires CR+LF to perform a 'newline', we translate
  * "\n" to "\r\n".
  */
-int pdc_iodc_print(unsigned char *str, unsigned count)
+int pdc_iodc_print(const unsigned char *str, unsigned count)
 {
-       /* XXX Should we spinlock posx usage */
        static int posx;        /* for simple TAB-Simulation... */
-       int __attribute__((aligned(8)))   iodc_retbuf[32];
-       char __attribute__((aligned(64))) iodc_dbuf[4096];
        unsigned int i;
        unsigned long flags;
 
-       memset(iodc_dbuf, 0, 4096);
-       for (i = 0; i < count && i < 2048;) {
+       for (i = 0; i < count && i < 79;) {
                switch(str[i]) {
                case '\n':
                        iodc_dbuf[i+0] = '\r';
                        iodc_dbuf[i+1] = '\n';
                        i += 2;
                        posx = 0;
-                       break;
+                       goto print;
                case '\t':
                        while (posx & 7) {
                                iodc_dbuf[i] = ' ';
@@ -1124,6 +1123,16 @@ int pdc_iodc_print(unsigned char *str, unsigned count)
                }
        }
 
+       /* if we're at the end of line, and not already inserting a newline,
+        * insert one anyway. iodc console doesn't claim to support >79 char
+        * lines. don't account for this in the return value.
+        */
+       if (i == 79 && iodc_dbuf[i-1] != '\n') {
+               iodc_dbuf[i+0] = '\r';
+               iodc_dbuf[i+1] = '\n';
+       }
+
+print:
         spin_lock_irqsave(&pdc_lock, flags);
         real32_call(PAGE0->mem_cons.iodc_io,
                     (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT,
@@ -1142,11 +1151,9 @@ int pdc_iodc_print(unsigned char *str, unsigned count)
  */
 int pdc_iodc_getc(void)
 {
-       unsigned long flags;
-        static int __attribute__((aligned(8)))   iodc_retbuf[32];
-        static char __attribute__((aligned(64))) iodc_dbuf[4096];
        int ch;
        int status;
+       unsigned long flags;
 
        /* Bail if no console input device. */
        if (!PAGE0->mem_kbd.iodc_io)
index 84b9611a92285b8edcbab9fffc20fdbca6662d7c..f48a640b55fbe553fd191eace94be5a8d66aa0cf 100644 (file)
@@ -274,7 +274,18 @@ static struct hp_hardware hp_hardware_list[] __devinitdata = {
        {HPHW_NPROC,0x887,0x4,0x91,"Storm Peak Slow"},
        {HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"},
        {HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"},
-       {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak"},
+       {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"},
+       {HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"},
+       {HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"},
+       {HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"},
+       {HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"},
+       {HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"},
+       {HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"},
+       {HPHW_NPROC,0x897,0x4,0x91,"Storm Peak DC- Slow Mako+"},
+       {HPHW_NPROC,0x898,0x4,0x91,"Storm Peak DC- Fast Mako+"},
+       {HPHW_NPROC,0x899,0x4,0x91,"Mt. Hamilton Slow Mako+"},
+       {HPHW_NPROC,0x89B,0x4,0x91,"Crestone Peak Mako+ Slow"},
+       {HPHW_NPROC,0x89C,0x4,0x91,"Crestone Peak Mako+ Fast"},
        {HPHW_A_DIRECT, 0x004, 0x0000D, 0x00, "Arrakis MUX"}, 
        {HPHW_A_DIRECT, 0x005, 0x0000D, 0x00, "Dyun Kiuh MUX"}, 
        {HPHW_A_DIRECT, 0x006, 0x0000D, 0x00, "Baat Kiuh AP/MUX (40299B)"}, 
index a7b8859488bb9ca7014746151a8d1f2a766a71be..ec2482dc1beb39f4a62a7e17c28b7238d8291709 100644 (file)
 #include <asm/pgtable.h>
 
 #include <linux/linkage.h>
+#include <linux/init.h>
 
        .level  LEVEL
 
-       .data
+       __INITDATA
 ENTRY(boot_args)
        .word 0 /* arg0 */
        .word 0 /* arg1 */
@@ -31,7 +32,7 @@ ENTRY(boot_args)
        .word 0 /* arg3 */
 END(boot_args)
 
-       .text
+       .section .text.head
        .align  4
        .import init_thread_union,data
        .import fault_vector_20,code    /* IVA parisc 2.0 32 bit */
@@ -343,7 +344,7 @@ smp_slave_stext:
 ENDPROC(stext)
 
 #ifndef CONFIG_64BIT
-       .data
+       .section .data.read_mostly
 
        .align  4
        .export $global$,data
index 33b1f84441b14e4076e077432c1212cd74b681a3..ccb68090781efdc24b553ce9e6162899ed349c03 100644 (file)
 #include <linux/tty.h>
 #include <asm/pdc.h>           /* for iodc_call() proto and friends */
 
+static spinlock_t pdc_console_lock = SPIN_LOCK_UNLOCKED;
 
 static void pdc_console_write(struct console *co, const char *s, unsigned count)
 {
-       pdc_iodc_print(s, count);
+       int i = 0;
+       unsigned long flags;
+
+       spin_lock_irqsave(&pdc_console_lock, flags);
+       do {
+               i += pdc_iodc_print(s + i, count - i);
+       } while (i < count);
+       spin_unlock_irqrestore(&pdc_console_lock, flags);
 }
 
-void pdc_printf(const char *fmt, ...)
+int pdc_console_poll_key(struct console *co)
 {
-       va_list args;
-       char buf[1024];
-       int i, len;
-
-       va_start(args, fmt);
-       len = vscnprintf(buf, sizeof(buf), fmt, args);
-       va_end(args);
+       int c;
+       unsigned long flags;
 
-       pdc_iodc_print(buf, len);
-}
+       spin_lock_irqsave(&pdc_console_lock, flags);
+       c = pdc_iodc_getc();
+       spin_unlock_irqrestore(&pdc_console_lock, flags);
 
-int pdc_console_poll_key(struct console *co)
-{
-       return pdc_iodc_getc();
+       return c;
 }
 
 static int pdc_console_setup(struct console *co, char *options)
index 117438e9eb2a8329a932c17b5b184095982c39dc..6b5ac38f5a9916017473d3174bb6f3d047f72cb8 100644 (file)
        ENTRY_COMP(kexec_load)          /* 300 */
        ENTRY_COMP(utimensat)
        ENTRY_COMP(signalfd)
-       ENTRY_COMP(timerfd)
+       ENTRY_SAME(ni_syscall)          /* was timerfd */
        ENTRY_SAME(eventfd)
        ENTRY_COMP(fallocate)           /* 305 */
+       ENTRY_SAME(timerfd_create)
+       ENTRY_COMP(timerfd_settime)
+       ENTRY_COMP(timerfd_gettime)
 
        /* Nothing yet */
 
index 99fd56939afa73909f4aabbe9fe88a490afa3748..9dc6dc42f9cfb151e5d827338c9e27431e40c58d 100644 (file)
@@ -51,6 +51,9 @@
 DEFINE_SPINLOCK(pa_dbit_lock);
 #endif
 
+void parisc_show_stack(struct task_struct *t, unsigned long *sp,
+       struct pt_regs *regs);
+
 static int printbinary(char *buf, unsigned long x, int nbits)
 {
        unsigned long mask = 1UL << (nbits - 1);
@@ -148,6 +151,8 @@ void show_regs(struct pt_regs *regs)
        print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]);
        printk(level);
        print_symbol(" RP(r2): %s\n", regs->gr[2]);
+
+       parisc_show_stack(current, NULL, regs);
 }
 
 
@@ -181,11 +186,19 @@ static void do_show_stack(struct unwind_frame_info *info)
        printk("\n");
 }
 
-void show_stack(struct task_struct *task, unsigned long *s)
+void parisc_show_stack(struct task_struct *task, unsigned long *sp,
+       struct pt_regs *regs)
 {
        struct unwind_frame_info info;
+       struct task_struct *t;
+
+       t = task ? task : current;
+       if (regs) {
+               unwind_frame_init(&info, t, regs);
+               goto show_stack;
+       }
 
-       if (!task) {
+       if (t == current) {
                unsigned long sp;
 
 HERE:
@@ -201,12 +214,18 @@ HERE:
                        unwind_frame_init(&info, current, &r);
                }
        } else {
-               unwind_frame_init_from_blocked_task(&info, task);
+               unwind_frame_init_from_blocked_task(&info, t);
        }
 
+show_stack:
        do_show_stack(&info);
 }
 
+void show_stack(struct task_struct *t, unsigned long *sp)
+{
+       return parisc_show_stack(t, sp, NULL);
+}
+
 int is_valid_bugaddr(unsigned long iaoq)
 {
        return 1;
index 1c6ce3536e4cf15e88d1a0138bd26daada9251f5..ab5cfe8ef988f53361b42c418e477f36eb94b32d 100644 (file)
@@ -155,7 +155,7 @@ all: zImage
 
 CPPFLAGS_vmlinux.lds   := -Upowerpc
 
-BOOT_TARGETS = zImage zImage.initrd uImage treeImage.% cuImage.%
+BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.%
 
 PHONY += $(BOOT_TARGETS)
 
index e3993a607584825fafffc5d5043c5f6599be4b2f..4974d9e56ead1d02176111e5de1e2de6ea3f31b3 100644 (file)
@@ -186,7 +186,7 @@ quiet_cmd_wrap      = WRAP    $@
 image-$(CONFIG_PPC_PSERIES)            += zImage.pseries
 image-$(CONFIG_PPC_MAPLE)              += zImage.pseries
 image-$(CONFIG_PPC_IBM_CELL_BLADE)     += zImage.pseries
-image-$(CONFIG_PPC_PS3)                        += zImage-dtb.ps3
+image-$(CONFIG_PPC_PS3)                        += dtbImage.ps3
 image-$(CONFIG_PPC_CELLEB)             += zImage.pseries
 image-$(CONFIG_PPC_CHRP)               += zImage.chrp
 image-$(CONFIG_PPC_EFIKA)              += zImage.chrp
@@ -205,7 +205,7 @@ image-$(CONFIG_DEFAULT_UIMAGE)              += uImage
 #
 
 # Board ports in arch/powerpc/platform/40x/Kconfig
-image-$(CONFIG_EP405)                  += zImage-dtb.ep405
+image-$(CONFIG_EP405)                  += dtbImage.ep405
 image-$(CONFIG_WALNUT)                 += treeImage.walnut
 
 # Board ports in arch/powerpc/platform/44x/Kconfig
@@ -220,9 +220,9 @@ image-$(CONFIG_WARP)                        += cuImage.warp
 # Board ports in arch/powerpc/platform/8xx/Kconfig
 image-$(CONFIG_PPC_MPC86XADS)          += cuImage.mpc866ads
 image-$(CONFIG_PPC_MPC885ADS)          += cuImage.mpc885ads
-image-$(CONFIG_PPC_EP88XC)             += zImage-dtb.ep88xc
+image-$(CONFIG_PPC_EP88XC)             += dtbImage.ep88xc
 image-$(CONFIG_PPC_ADDER875)           += cuImage.adder875-uboot \
-                                          zImage-dtb.adder875-redboot
+                                          dtbImage.adder875-redboot
 
 # Board ports in arch/powerpc/platform/52xx/Kconfig
 image-$(CONFIG_PPC_LITE5200)           += cuImage.lite5200 cuImage.lite5200b
@@ -230,7 +230,7 @@ image-$(CONFIG_PPC_LITE5200)                += cuImage.lite5200 cuImage.lite5200b
 # Board ports in arch/powerpc/platform/82xx/Kconfig
 image-$(CONFIG_MPC8272_ADS)            += cuImage.mpc8272ads
 image-$(CONFIG_PQ2FADS)                        += cuImage.pq2fads
-image-$(CONFIG_EP8248E)                        += zImage-dtb.ep8248e
+image-$(CONFIG_EP8248E)                        += dtbImage.ep8248e
 
 # Board ports in arch/powerpc/platform/83xx/Kconfig
 image-$(CONFIG_MPC832x_MDS)            += cuImage.mpc832x_mds
@@ -268,7 +268,8 @@ endif
 
 initrd-  := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))
 initrd-y := $(patsubst zImage%, zImage.initrd%, \
-               $(patsubst treeImage%, treeImage.initrd%, $(image-y)))
+               $(patsubst dtbImage%, dtbImage.initrd%, \
+               $(patsubst treeImage%, treeImage.initrd%, $(image-y))))
 initrd-y := $(filter-out $(image-y), $(initrd-y))
 targets        += $(image-y) $(initrd-y)
 
@@ -283,10 +284,11 @@ $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
 $(obj)/zImage.%: vmlinux $(wrapperbits)
        $(call if_changed,wrap,$*)
 
-$(obj)/zImage-dtb.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts
+# dtbImage% - a dtbImage is a zImage with an embedded device tree blob
+$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts
        $(call if_changed,wrap,$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz)
 
-$(obj)/zImage-dtb.%: vmlinux $(wrapperbits) $(dtstree)/%.dts
+$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(dtstree)/%.dts
        $(call if_changed,wrap,$*,$(dtstree)/$*.dts)
 
 # This cannot be in the root of $(src) as the zImage rule always adds a $(obj)
index a3637fff73ccea43951ccca804d4e62e4452a376..49c05e97386cfccfd520e3ab17de4d0c2b787bba 100644 (file)
                reg = <0x00000000 0x20000000>;  // 512MB at 0
        };
 
+       localbus@e0005000 {
+               #address-cells = <2>;
+               #size-cells = <1>;
+               compatible = "fsl,mpc8377-elbc", "fsl,elbc", "simple-bus";
+               reg = <0xe0005000 0x1000>;
+               interrupts = <77 0x8>;
+               interrupt-parent = <&ipic>;
+
+               // booting from NOR flash
+               ranges = <0 0x0 0xfe000000 0x02000000
+                         1 0x0 0xf8000000 0x00008000
+                         3 0x0 0xe0600000 0x00008000>;
+
+               flash@0,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "cfi-flash";
+                       reg = <0 0x0 0x2000000>;
+                       bank-width = <2>;
+                       device-width = <1>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       fs@100000 {
+                               reg = <0x100000 0x800000>;
+                       };
+
+                       kernel@1d00000 {
+                               reg = <0x1d00000 0x200000>;
+                       };
+
+                       dtb@1f00000 {
+                               reg = <0x1f00000 0x100000>;
+                       };
+               };
+
+               bcsr@1,0 {
+                       reg = <1 0x0 0x8000>;
+                       compatible = "fsl,mpc837xmds-bcsr";
+               };
+
+               nand@3,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8377-fcm-nand",
+                                    "fsl,elbc-fcm-nand";
+                       reg = <3 0x0 0x8000>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       kernel@100000 {
+                               reg = <0x100000 0x300000>;
+                       };
+
+                       fs@400000 {
+                               reg = <0x400000 0x1c00000>;
+                       };
+               };
+       };
+
        soc@e0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
                        mode = "cpu";
                };
 
-               /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
                usb@23000 {
                        compatible = "fsl-usb2-dr";
                        reg = <0x23000 0x1000>;
                        #size-cells = <0>;
                        interrupt-parent = <&ipic>;
                        interrupts = <38 0x8>;
-                       phy_type = "utmi_wide";
+                       dr_mode = "host";
+                       phy_type = "ulpi";
                };
 
                mdio@24520 {
index 533e9b06cc8f7f11a62ce17e2e81ed291d62fa85..1d6ea080ad730d6224caecf1d185a9b69e1aeea0 100644 (file)
                reg = <0x00000000 0x20000000>;  // 512MB at 0
        };
 
+       localbus@e0005000 {
+               #address-cells = <2>;
+               #size-cells = <1>;
+               compatible = "fsl,mpc8378-elbc", "fsl,elbc", "simple-bus";
+               reg = <0xe0005000 0x1000>;
+               interrupts = <77 0x8>;
+               interrupt-parent = <&ipic>;
+
+               // booting from NOR flash
+               ranges = <0 0x0 0xfe000000 0x02000000
+                         1 0x0 0xf8000000 0x00008000
+                         3 0x0 0xe0600000 0x00008000>;
+
+               flash@0,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "cfi-flash";
+                       reg = <0 0x0 0x2000000>;
+                       bank-width = <2>;
+                       device-width = <1>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       fs@100000 {
+                               reg = <0x100000 0x800000>;
+                       };
+
+                       kernel@1d00000 {
+                               reg = <0x1d00000 0x200000>;
+                       };
+
+                       dtb@1f00000 {
+                               reg = <0x1f00000 0x100000>;
+                       };
+               };
+
+               bcsr@1,0 {
+                       reg = <1 0x0 0x8000>;
+                       compatible = "fsl,mpc837xmds-bcsr";
+               };
+
+               nand@3,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8378-fcm-nand",
+                                    "fsl,elbc-fcm-nand";
+                       reg = <3 0x0 0x8000>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       kernel@100000 {
+                               reg = <0x100000 0x300000>;
+                       };
+
+                       fs@400000 {
+                               reg = <0x400000 0x1c00000>;
+                       };
+               };
+       };
+
        soc@e0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
                        mode = "cpu";
                };
 
-               /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
                usb@23000 {
                        compatible = "fsl-usb2-dr";
                        reg = <0x23000 0x1000>;
                        #size-cells = <0>;
                        interrupt-parent = <&ipic>;
                        interrupts = <38 0x8>;
-                       phy_type = "utmi_wide";
+                       dr_mode = "host";
+                       phy_type = "ulpi";
                };
 
                mdio@24520 {
index c270685bbde4d26e53a12a0bc6bf43282997501b..fdb4a9255b24ab5a3070a578f03f427d1b27055b 100644 (file)
                reg = <0x00000000 0x20000000>;  // 512MB at 0
        };
 
+       localbus@e0005000 {
+               #address-cells = <2>;
+               #size-cells = <1>;
+               compatible = "fsl,mpc8379-elbc", "fsl,elbc", "simple-bus";
+               reg = <0xe0005000 0x1000>;
+               interrupts = <77 0x8>;
+               interrupt-parent = <&ipic>;
+
+               // booting from NOR flash
+               ranges = <0 0x0 0xfe000000 0x02000000
+                         1 0x0 0xf8000000 0x00008000
+                         3 0x0 0xe0600000 0x00008000>;
+
+               flash@0,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "cfi-flash";
+                       reg = <0 0x0 0x2000000>;
+                       bank-width = <2>;
+                       device-width = <1>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       fs@100000 {
+                               reg = <0x100000 0x800000>;
+                       };
+
+                       kernel@1d00000 {
+                               reg = <0x1d00000 0x200000>;
+                       };
+
+                       dtb@1f00000 {
+                               reg = <0x1f00000 0x100000>;
+                       };
+               };
+
+               bcsr@1,0 {
+                       reg = <1 0x0 0x8000>;
+                       compatible = "fsl,mpc837xmds-bcsr";
+               };
+
+               nand@3,0 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "fsl,mpc8379-fcm-nand",
+                                    "fsl,elbc-fcm-nand";
+                       reg = <3 0x0 0x8000>;
+
+                       u-boot@0 {
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       kernel@100000 {
+                               reg = <0x100000 0x300000>;
+                       };
+
+                       fs@400000 {
+                               reg = <0x400000 0x1c00000>;
+                       };
+               };
+       };
+
        soc@e0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
                        mode = "cpu";
                };
 
-               /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
                usb@23000 {
                        compatible = "fsl-usb2-dr";
                        reg = <0x23000 0x1000>;
                        #size-cells = <0>;
                        interrupt-parent = <&ipic>;
                        interrupts = <38 0x8>;
-                       phy_type = "utmi_wide";
+                       dr_mode = "host";
+                       phy_type = "ulpi";
                };
 
                mdio@24520 {
index 14be38ad5d4b30f4ff3fcaa0a118680a68ba5df5..b86e65d926c16e40acffd304193018075deffa88 100644 (file)
                cell-index = <0>;
                interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
                interrupt-map = <
-                       /* IDSEL 0x01 (PCI-X slot) */
-                       0x0800 0x0 0x0 0x1 &mpic 0x0 0x1
-                       0x0800 0x0 0x0 0x2 &mpic 0x1 0x1
-                       0x0800 0x0 0x0 0x3 &mpic 0x2 0x1
-                       0x0800 0x0 0x0 0x4 &mpic 0x3 0x1>;
+                       /* IDSEL 0x01 (PCI-X slot) @66MHz */
+                       0x0800 0x0 0x0 0x1 &mpic 0x2 0x1
+                       0x0800 0x0 0x0 0x2 &mpic 0x3 0x1
+                       0x0800 0x0 0x0 0x3 &mpic 0x4 0x1
+                       0x0800 0x0 0x0 0x4 &mpic 0x1 0x1
+
+                       /* IDSEL 0x11 (PCI, 3.3V 32bit) @33MHz */
+                       0x8800 0x0 0x0 0x1 &mpic 0x2 0x1
+                       0x8800 0x0 0x0 0x2 &mpic 0x3 0x1
+                       0x8800 0x0 0x0 0x3 &mpic 0x4 0x1
+                       0x8800 0x0 0x0 0x4 &mpic 0x1 0x1>;
 
                interrupt-parent = <&mpic>;
                interrupts = <0x18 0x2>;
index c3178155311ba1f565e8af685f61f83046b02db1..d50e498a072b99cd50af01960655a8edae9af27e 100755 (executable)
@@ -191,10 +191,14 @@ ps3)
     ksection=.kernel:vmlinux.bin
     isection=.kernel:initrd
     ;;
-ep88xc|ep405|redboot*|ep8248e)
+ep88xc|ep405|ep8248e)
     platformo="$object/fixed-head.o $object/$platform.o"
     binary=y
     ;;
+adder875-redboot)
+    platformo="$object/fixed-head.o $object/redboot-8xx.o"
+    binary=y
+    ;;
 esac
 
 vmz="$tmpdir/`basename \"$kernel\"`.$ext"
diff --git a/arch/powerpc/configs/adder875-uboot_defconfig b/arch/powerpc/configs/adder875-uboot_defconfig
deleted file mode 100644 (file)
index 1faf7ef..0000000
+++ /dev/null
@@ -1,798 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc6
-# Thu Jan 17 16:17:18 2008
-#
-# CONFIG_PPC64 is not set
-
-#
-# Processor support
-#
-# CONFIG_6xx is not set
-# CONFIG_PPC_85xx is not set
-CONFIG_PPC_8xx=y
-# CONFIG_40x is not set
-# CONFIG_44x is not set
-# CONFIG_E200 is not set
-CONFIG_8xx=y
-# CONFIG_PPC_MM_SLICES is not set
-CONFIG_NOT_COHERENT_CACHE=y
-CONFIG_PPC32=y
-CONFIG_WORD_SIZE=32
-CONFIG_PPC_MERGE=y
-CONFIG_MMU=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_TIME=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_IRQ_PER_CPU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_ARCH_HAS_ILOG2_U32=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
-CONFIG_PPC=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_NVRAM=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_PPC_OF=y
-CONFIG_OF=y
-# CONFIG_PPC_UDBG_16550 is not set
-# CONFIG_GENERIC_TBSYNC is not set
-CONFIG_AUDIT_ARCH=y
-CONFIG_GENERIC_BUG=y
-# CONFIG_DEFAULT_UIMAGE is not set
-CONFIG_REDBOOT=y
-# CONFIG_PPC_DCR_NATIVE is not set
-# CONFIG_PPC_DCR_MMIO is not set
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# General setup
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-# CONFIG_SWAP is not set
-CONFIG_SYSVIPC=y
-CONFIG_SYSVIPC_SYSCTL=y
-# CONFIG_POSIX_MQUEUE is not set
-# CONFIG_BSD_PROCESS_ACCT is not set
-# CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
-# CONFIG_AUDIT is not set
-# CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_CGROUPS is not set
-CONFIG_FAIR_GROUP_SCHED=y
-CONFIG_FAIR_USER_SCHED=y
-# CONFIG_FAIR_CGROUP_SCHED is not set
-CONFIG_SYSFS_DEPRECATED=y
-# CONFIG_RELAY is not set
-# CONFIG_BLK_DEV_INITRD is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SYSCTL=y
-CONFIG_EMBEDDED=y
-# CONFIG_SYSCTL_SYSCALL is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-# CONFIG_ELF_CORE is not set
-# CONFIG_BASE_FULL is not set
-# CONFIG_FUTEX is not set
-CONFIG_ANON_INODES=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-# CONFIG_VM_EVENT_COUNTERS is not set
-CONFIG_SLUB_DEBUG=y
-# CONFIG_SLAB is not set
-CONFIG_SLUB=y
-# CONFIG_SLOB is not set
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=1
-# CONFIG_MODULES is not set
-CONFIG_BLOCK=y
-# CONFIG_LBD is not set
-# CONFIG_BLK_DEV_IO_TRACE is not set
-# CONFIG_LSF is not set
-# CONFIG_BLK_DEV_BSG is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-# CONFIG_IOSCHED_AS is not set
-CONFIG_IOSCHED_DEADLINE=y
-# CONFIG_IOSCHED_CFQ is not set
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Platform support
-#
-# CONFIG_PPC_MPC52xx is not set
-# CONFIG_PPC_MPC5200 is not set
-# CONFIG_PPC_CELL is not set
-# CONFIG_PPC_CELL_NATIVE is not set
-CONFIG_CPM1=y
-# CONFIG_MPC8XXFADS is not set
-# CONFIG_MPC86XADS is not set
-# CONFIG_MPC885ADS is not set
-# CONFIG_PPC_EP88XC is not set
-CONFIG_PPC_ADDER875=y
-
-#
-# MPC8xx CPM Options
-#
-
-#
-# Generic MPC8xx Options
-#
-CONFIG_8xx_COPYBACK=y
-# CONFIG_8xx_CPU6 is not set
-CONFIG_8xx_CPU15=y
-CONFIG_NO_UCODE_PATCH=y
-# CONFIG_USB_SOF_UCODE_PATCH is not set
-# CONFIG_I2C_SPI_UCODE_PATCH is not set
-# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
-# CONFIG_PQ2ADS is not set
-# CONFIG_MPIC is not set
-# CONFIG_MPIC_WEIRD is not set
-# CONFIG_PPC_I8259 is not set
-# CONFIG_PPC_RTAS is not set
-# CONFIG_MMIO_NVRAM is not set
-# CONFIG_PPC_MPC106 is not set
-# CONFIG_PPC_970_NAP is not set
-# CONFIG_PPC_INDIRECT_IO is not set
-# CONFIG_GENERIC_IOMAP is not set
-# CONFIG_CPU_FREQ is not set
-# CONFIG_CPM2 is not set
-CONFIG_PPC_CPM_NEW_BINDING=y
-# CONFIG_FSL_ULI1575 is not set
-CONFIG_CPM=y
-
-#
-# Kernel options
-#
-# CONFIG_HIGHMEM is not set
-# CONFIG_TICK_ONESHOT is not set
-# CONFIG_NO_HZ is not set
-# CONFIG_HIGH_RES_TIMERS is not set
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-# CONFIG_HZ_300 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_MISC is not set
-# CONFIG_MATH_EMULATION is not set
-# CONFIG_8XX_MINIMAL_FPEMU is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_RESOURCES_64BIT is not set
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
-CONFIG_VIRT_TO_BUS=y
-# CONFIG_PROC_DEVICETREE is not set
-# CONFIG_CMDLINE_BOOL is not set
-# CONFIG_PM is not set
-CONFIG_SUSPEND_UP_POSSIBLE=y
-CONFIG_HIBERNATION_UP_POSSIBLE=y
-# CONFIG_SECCOMP is not set
-CONFIG_WANT_DEVICE_TREE=y
-CONFIG_DEVICE_TREE="adder875-uboot.dts"
-CONFIG_ISA_DMA_API=y
-
-#
-# Bus options
-#
-CONFIG_ZONE_DMA=y
-CONFIG_FSL_SOC=y
-# CONFIG_PCI is not set
-# CONFIG_PCI_DOMAINS is not set
-# CONFIG_PCI_SYSCALL is not set
-# CONFIG_PCI_QSPAN is not set
-# CONFIG_ARCH_SUPPORTS_MSI is not set
-# CONFIG_PCCARD is not set
-
-#
-# Advanced setup
-#
-# CONFIG_ADVANCED_OPTIONS is not set
-
-#
-# Default settings for advanced configuration options are used
-#
-CONFIG_HIGHMEM_START=0xfe000000
-CONFIG_LOWMEM_SIZE=0x30000000
-CONFIG_KERNEL_START=0xc0000000
-CONFIG_TASK_SIZE=0x80000000
-CONFIG_CONSISTENT_START=0xfd000000
-CONFIG_CONSISTENT_SIZE=0x00200000
-CONFIG_BOOT_LOAD=0x00400000
-
-#
-# 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=y
-# CONFIG_IP_PNP_DHCP is not set
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP 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_XFRM_TUNNEL is not set
-# CONFIG_INET_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
-# CONFIG_INET_XFRM_MODE_TUNNEL is not set
-# CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET_LRO is not set
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_CUBIC=y
-CONFIG_DEFAULT_TCP_CONG="cubic"
-# CONFIG_TCP_MD5SIG is not set
-# CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
-# CONFIG_NETWORK_SECMARK is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_IP_DCCP is not set
-# CONFIG_IP_SCTP is not set
-# CONFIG_TIPC 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_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_SCHED 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
-# CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
-# CONFIG_RFKILL is not set
-# CONFIG_NET_9P is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-# CONFIG_CONNECTOR is not set
-CONFIG_MTD=y
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_CONCAT is not set
-# CONFIG_MTD_PARTITIONS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-# CONFIG_RFD_FTL is not set
-# CONFIG_SSFDC is not set
-# CONFIG_MTD_OOPS is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_GEN_PROBE=y
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-# CONFIG_MTD_CFI_INTELEXT is not set
-CONFIG_MTD_CFI_AMDSTD=y
-# CONFIG_MTD_CFI_STAA is not set
-CONFIG_MTD_CFI_UTIL=y
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_ABSENT is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-CONFIG_MTD_PHYSMAP_OF=y
-# CONFIG_MTD_CFI_FLAGADM is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLOCK2MTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_NAND is not set
-# CONFIG_MTD_ONENAND is not set
-
-#
-# UBI - Unsorted block images
-#
-# CONFIG_MTD_UBI is not set
-CONFIG_OF_DEVICE=y
-# CONFIG_PARPORT is not set
-# CONFIG_BLK_DEV is not set
-# CONFIG_MISC_DEVICES is not set
-# CONFIG_IDE is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-# CONFIG_SCSI is not set
-# CONFIG_SCSI_DMA is not set
-# CONFIG_SCSI_NETLINK is not set
-# CONFIG_ATA is not set
-# CONFIG_MD is not set
-# CONFIG_MACINTOSH_DRIVERS is not set
-CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_MACVLAN is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-# CONFIG_VETH is not set
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-# CONFIG_MARVELL_PHY is not set
-CONFIG_DAVICOM_PHY=y
-# CONFIG_QSEMI_PHY is not set
-# CONFIG_LXT_PHY is not set
-# CONFIG_CICADA_PHY is not set
-# CONFIG_VITESSE_PHY is not set
-# CONFIG_SMSC_PHY is not set
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_ICPLUS_PHY is not set
-# CONFIG_FIXED_PHY is not set
-# CONFIG_MDIO_BITBANG is not set
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
-# CONFIG_IBM_NEW_EMAC_ZMII is not set
-# CONFIG_IBM_NEW_EMAC_RGMII is not set
-# CONFIG_IBM_NEW_EMAC_TAH is not set
-# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
-# CONFIG_B44 is not set
-CONFIG_FS_ENET=y
-# CONFIG_FS_ENET_HAS_SCC is not set
-CONFIG_FS_ENET_HAS_FEC=y
-CONFIG_FS_ENET_MDIO_FEC=y
-# CONFIG_NETDEV_1000 is not set
-# CONFIG_NETDEV_10000 is not set
-
-#
-# Wireless LAN
-#
-# CONFIG_WLAN_PRE80211 is not set
-# CONFIG_WLAN_80211 is not set
-# CONFIG_WAN is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP 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
-# CONFIG_ISDN is not set
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-# CONFIG_INPUT_FF_MEMLESS is not set
-# CONFIG_INPUT_POLLDEV is not set
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_EVDEV is not set
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_STOWAWAY is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TABLET is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-# CONFIG_VT is not set
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-# CONFIG_SERIAL_8250 is not set
-
-#
-# Non-8250 serial port support
-#
-# CONFIG_SERIAL_UARTLITE is not set
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_CPM=y
-CONFIG_SERIAL_CPM_CONSOLE=y
-# CONFIG_SERIAL_CPM_SCC1 is not set
-# CONFIG_SERIAL_CPM_SCC2 is not set
-# CONFIG_SERIAL_CPM_SCC3 is not set
-# CONFIG_SERIAL_CPM_SCC4 is not set
-CONFIG_SERIAL_CPM_SMC1=y
-CONFIG_SERIAL_CPM_SMC2=y
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_IPMI_HANDLER is not set
-CONFIG_HW_RANDOM=y
-# CONFIG_NVRAM is not set
-CONFIG_GEN_RTC=y
-# CONFIG_GEN_RTC_X is not set
-# CONFIG_R3964 is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_TCG_TPM is not set
-# CONFIG_I2C is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-# CONFIG_W1 is not set
-# CONFIG_POWER_SUPPLY is not set
-# CONFIG_HWMON is not set
-# CONFIG_WATCHDOG is not set
-
-#
-# Sonics Silicon Backplane
-#
-CONFIG_SSB_POSSIBLE=y
-# CONFIG_SSB is not set
-
-#
-# Multifunction device drivers
-#
-# CONFIG_MFD_SM501 is not set
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-# CONFIG_DVB_CORE is not set
-CONFIG_DAB=y
-
-#
-# Graphics support
-#
-# CONFIG_VGASTATE is not set
-CONFIG_VIDEO_OUTPUT_CONTROL=y
-# CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Display device support
-#
-# CONFIG_DISPLAY_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-# CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
-# CONFIG_MMC is not set
-# CONFIG_NEW_LEDS is not set
-# CONFIG_EDAC is not set
-# CONFIG_RTC_CLASS is not set
-
-#
-# Userspace I/O
-#
-# CONFIG_UIO is not set
-
-#
-# File systems
-#
-# CONFIG_EXT2_FS is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_EXT4DEV_FS is not set
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_FS_POSIX_ACL is not set
-# CONFIG_XFS_FS is not set
-# CONFIG_GFS2_FS is not set
-# CONFIG_OCFS2_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 is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-# CONFIG_PROC_KCORE is not set
-CONFIG_PROC_SYSCTL=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_POSIX_ACL is not set
-# CONFIG_HUGETLB_PAGE is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS2_FS is not set
-CONFIG_CRAMFS=y
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-CONFIG_NETWORK_FILESYSTEMS=y
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V3_ACL is not set
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_BIND34 is not set
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-# CONFIG_OSF_PARTITION is not set
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-# CONFIG_MAC_PARTITION is not set
-CONFIG_MSDOS_PARTITION=y
-# CONFIG_BSD_DISKLABEL is not set
-# CONFIG_MINIX_SUBPARTITION is not set
-# CONFIG_SOLARIS_X86_PARTITION is not set
-# CONFIG_UNIXWARE_DISKLABEL is not set
-# CONFIG_LDM_PARTITION is not set
-# CONFIG_SGI_PARTITION is not set
-# CONFIG_ULTRIX_PARTITION is not set
-# CONFIG_SUN_PARTITION is not set
-# CONFIG_KARMA_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-# CONFIG_SYSV68_PARTITION is not set
-# CONFIG_NLS is not set
-# CONFIG_DLM is not set
-# CONFIG_UCC_SLOW is not set
-
-#
-# Library routines
-#
-# CONFIG_CRC_CCITT is not set
-# CONFIG_CRC16 is not set
-# CONFIG_CRC_ITU_T is not set
-# CONFIG_CRC32 is not set
-# CONFIG_CRC7 is not set
-# CONFIG_LIBCRC32C is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_INSTRUMENTATION=y
-# CONFIG_PROFILING is not set
-# CONFIG_MARKERS is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_ENABLE_WARN_DEPRECATED=y
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-# CONFIG_DEBUG_FS is not set
-# CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHED_DEBUG=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_TIMER_STATS is not set
-# CONFIG_SLUB_DEBUG_ON is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_DEBUG_SG is not set
-CONFIG_FORCED_INLINING=y
-# CONFIG_BOOT_PRINTK_DELAY is not set
-# CONFIG_FAULT_INJECTION is not set
-# CONFIG_SAMPLES is not set
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUGGER is not set
-# CONFIG_BDI_SWITCH is not set
-# CONFIG_PPC_EARLY_DEBUG is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-# CONFIG_SECURITY is not set
-# CONFIG_SECURITY_FILE_CAPABILITIES is not set
-# CONFIG_CRYPTO is not set
-# CONFIG_PPC_CLOCK is not set
-CONFIG_PPC_LIB_RHEAP=y
similarity index 95%
rename from arch/powerpc/configs/adder875-redboot_defconfig
rename to arch/powerpc/configs/adder875_defconfig
index cab5f9b64567c654c89250a2b2b38bb47737e4d3..a3cc94a2ff06a40104d6ddaea804b13aeb8c6a4f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc6
-# Thu Jan 17 16:17:38 2008
+# Linux kernel version: 2.6.25-rc2
+# Wed Feb 20 12:26:07 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -26,6 +26,7 @@ CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -64,17 +65,18 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
 CONFIG_FAIR_GROUP_SCHED=y
-CONFIG_FAIR_USER_SCHED=y
-# CONFIG_FAIR_CGROUP_SCHED is not set
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
 # CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SYSCTL=y
@@ -87,11 +89,13 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 # CONFIG_ELF_CORE is not set
+CONFIG_COMPAT_BRK=y
 # CONFIG_BASE_FULL is not set
 # CONFIG_FUTEX is not set
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 # CONFIG_VM_EVENT_COUNTERS is not set
@@ -99,6 +103,12 @@ CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=1
 # CONFIG_MODULES is not set
@@ -120,12 +130,14 @@ CONFIG_DEFAULT_DEADLINE=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="deadline"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_PREEMPT_RCU is not set
 
 #
 # Platform support
 #
-# CONFIG_PPC_MPC52xx is not set
-# CONFIG_PPC_MPC5200 is not set
+# CONFIG_PPC_MPC512x is not set
+# CONFIG_PPC_MPC5121 is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 CONFIG_CPM1=y
@@ -150,6 +162,7 @@ CONFIG_NO_UCODE_PATCH=y
 # CONFIG_I2C_SPI_UCODE_PATCH is not set
 # CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
 # CONFIG_PQ2ADS is not set
+# CONFIG_IPIC is not set
 # CONFIG_MPIC is not set
 # CONFIG_MPIC_WEIRD is not set
 # CONFIG_PPC_I8259 is not set
@@ -160,7 +173,6 @@ CONFIG_NO_UCODE_PATCH=y
 # CONFIG_PPC_INDIRECT_IO is not set
 # CONFIG_GENERIC_IOMAP is not set
 # CONFIG_CPU_FREQ is not set
-# CONFIG_CPM2 is not set
 CONFIG_PPC_CPM_NEW_BINDING=y
 # CONFIG_FSL_ULI1575 is not set
 CONFIG_CPM=y
@@ -178,14 +190,19 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_HZ_300 is not set
 CONFIG_HZ_1000=y
 CONFIG_HZ=1000
+# CONFIG_SCHED_HRTICK is not set
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_RCU_TRACE=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_MATH_EMULATION is not set
 # CONFIG_8XX_MINIMAL_FPEMU is not set
+# CONFIG_IOMMU_HELPER is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_HAS_WALK_MEMORY=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
@@ -204,11 +221,7 @@ CONFIG_VIRT_TO_BUS=y
 # CONFIG_PROC_DEVICETREE is not set
 # CONFIG_CMDLINE_BOOL is not set
 # CONFIG_PM is not set
-CONFIG_SUSPEND_UP_POSSIBLE=y
-CONFIG_HIBERNATION_UP_POSSIBLE=y
 # CONFIG_SECCOMP is not set
-CONFIG_WANT_DEVICE_TREE=y
-CONFIG_DEVICE_TREE="adder875-redboot.dts"
 CONFIG_ISA_DMA_API=y
 
 #
@@ -305,6 +318,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
@@ -411,6 +425,7 @@ CONFIG_OF_DEVICE=y
 # CONFIG_PARPORT is not set
 # CONFIG_BLK_DEV is not set
 # CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
 #
@@ -445,6 +460,7 @@ CONFIG_DAVICOM_PHY=y
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
 # CONFIG_FIXED_PHY is not set
 # CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
@@ -469,7 +485,6 @@ CONFIG_FS_ENET_MDIO_FEC=y
 # CONFIG_WAN is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP 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
@@ -574,6 +589,7 @@ CONFIG_GEN_RTC=y
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
+CONFIG_THERMAL=y
 # CONFIG_WATCHDOG is not set
 
 #
@@ -614,6 +630,7 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
 # CONFIG_HID_SUPPORT is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
+# CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
 # CONFIG_EDAC is not set
 # CONFIG_RTC_CLASS is not set
@@ -635,11 +652,9 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+# CONFIG_DNOTIFY is not set
 # CONFIG_INOTIFY is not set
 # CONFIG_QUOTA is not set
-# CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_FUSE_FS is not set
@@ -682,8 +697,10 @@ CONFIG_TMPFS=y
 # CONFIG_JFFS2_FS is not set
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
@@ -730,7 +747,6 @@ CONFIG_MSDOS_PARTITION=y
 # CONFIG_SYSV68_PARTITION is not set
 # CONFIG_NLS is not set
 # CONFIG_DLM is not set
-# CONFIG_UCC_SLOW is not set
 
 #
 # Library routines
@@ -745,9 +761,6 @@ CONFIG_ZLIB_INFLATE=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
-CONFIG_INSTRUMENTATION=y
-# CONFIG_PROFILING is not set
-# CONFIG_MARKERS is not set
 
 #
 # Kernel hacking
@@ -757,7 +770,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
-# CONFIG_DEBUG_FS is not set
+CONFIG_DEBUG_FS=y
 # CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
@@ -766,6 +779,7 @@ CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
 # CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
@@ -776,14 +790,15 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
-CONFIG_FORCED_INLINING=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_SAMPLES is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUGGER is not set
+# CONFIG_VIRQ_DEBUG is not set
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
 
index f7458396cd7c022968abb231d1fdf62cb5ec2c67..3c9452d4308b8d245f1c85816b62d971948c6d44 100644 (file)
@@ -332,8 +332,18 @@ InstructionTLBMiss:
        mfspr   r11, SPRN_MD_TWC        /* ....and get the pte address */
        lwz     r10, 0(r11)     /* Get the pte */
 
+#ifdef CONFIG_SWAP
+       /* do not set the _PAGE_ACCESSED bit of a non-present page */
+       andi.   r11, r10, _PAGE_PRESENT
+       beq     4f
+       ori     r10, r10, _PAGE_ACCESSED
+       mfspr   r11, SPRN_MD_TWC        /* get the pte address again */
+       stw     r10, 0(r11)
+4:
+#else
        ori     r10, r10, _PAGE_ACCESSED
        stw     r10, 0(r11)
+#endif
 
        /* The Linux PTE won't go exactly into the MMU TLB.
         * Software indicator bits 21, 22 and 28 must be clear.
@@ -398,8 +408,17 @@ DataStoreTLBMiss:
        DO_8xx_CPU6(0x3b80, r3)
        mtspr   SPRN_MD_TWC, r11
 
-       mfspr   r11, SPRN_MD_TWC        /* get the pte address again */
+#ifdef CONFIG_SWAP
+       /* do not set the _PAGE_ACCESSED bit of a non-present page */
+       andi.   r11, r10, _PAGE_PRESENT
+       beq     4f
        ori     r10, r10, _PAGE_ACCESSED
+4:
+       /* and update pte in table */
+#else
+       ori     r10, r10, _PAGE_ACCESSED
+#endif
+       mfspr   r11, SPRN_MD_TWC        /* get the pte address again */
        stw     r10, 0(r11)
 
        /* The Linux PTE won't go exactly into the MMU TLB.
@@ -507,7 +526,16 @@ DataTLBError:
 
        /* Update 'changed', among others.
        */
+#ifdef CONFIG_SWAP
+       ori     r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE
+       /* do not set the _PAGE_ACCESSED bit of a non-present page */
+       andi.   r11, r10, _PAGE_PRESENT
+       beq     4f
+       ori     r10, r10, _PAGE_ACCESSED
+4:
+#else
        ori     r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
+#endif
        mfspr   r11, SPRN_MD_TWC                /* Get pte address again */
        stw     r10, 0(r11)             /* and update pte in table */
 
index 5c2e253ddfb1a8eec7efbc582a8017724def45bb..9d2c56621f1ea0ad18ee1a0d89e46931ece7e7a5 100644 (file)
@@ -785,6 +785,21 @@ _GLOBAL(__lshrdi3)
        or      r4,r4,r7        # LSW |= t2
        blr
 
+/*
+ * 64-bit comparison: __ucmpdi2(u64 a, u64 b)
+ * Returns 0 if a < b, 1 if a == b, 2 if a > b.
+ */
+_GLOBAL(__ucmpdi2)
+       cmplw   r3,r5
+       li      r3,1
+       bne     1f
+       cmplw   r4,r6
+       beqlr
+1:     li      r3,0
+       bltlr
+       li      r3,2
+       blr
+
 _GLOBAL(abs)
        srawi   r4,r3,31
        xor     r3,r3,r4
index 980fe32895c0af5aed4e97142ef479dc234ff88f..89c83ccb85c10e07d5fe29375d26fb624377567d 100644 (file)
@@ -748,7 +748,13 @@ static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
                struct resource *res = dev->resource + i;
                if (!res->flags)
                        continue;
-               if (res->end == 0xffffffff) {
+               /* On platforms that have PPC_PCI_PROBE_ONLY set, we don't
+                * consider 0 as an unassigned BAR value. It's technically
+                * a valid value, but linux doesn't like it... so when we can
+                * re-assign things, we do so, but if we can't, we keep it
+                * around and hope for the best...
+                */
+               if (res->start == 0 && !(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
                        pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n",
                                 pci_name(dev), i,
                                 (unsigned long long)res->start,
index aa9ff35b0e630e86d04ef5611188570c5ed5b958..9c98424277a8660373549eb5d3d3c664556694ea 100644 (file)
@@ -58,6 +58,7 @@ extern void program_check_exception(struct pt_regs *regs);
 extern void single_step_exception(struct pt_regs *regs);
 extern int sys_sigreturn(struct pt_regs *regs);
 
+EXPORT_SYMBOL(empty_zero_page);
 EXPORT_SYMBOL(clear_pages);
 EXPORT_SYMBOL(copy_page);
 EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
@@ -149,6 +150,8 @@ long long __lshrdi3(long long, int);
 EXPORT_SYMBOL(__ashrdi3);
 EXPORT_SYMBOL(__ashldi3);
 EXPORT_SYMBOL(__lshrdi3);
+int __ucmpdi2(unsigned long long, unsigned long long);
+EXPORT_SYMBOL(__ucmpdi2);
 #endif
 
 EXPORT_SYMBOL(memcpy);
index 32f416175db10f9c6266ea48c56bf5b69becb952..590f1f67c87403df6db3f878c800a7c37bf992b4 100644 (file)
@@ -506,10 +506,10 @@ void __init htab_initialize(void)
        } else {
                /* Find storage for the HPT.  Must be contiguous in
                 * the absolute address space. On cell we want it to be
-                * in the first 1 Gig.
+                * in the first 2 Gig so we can use it for IOMMU hacks.
                 */
                if (machine_is(cell))
-                       limit = 0x40000000;
+                       limit = 0x80000000;
                else
                        limit = 0;
 
index 8a9c26973605d918259acd874e7d5c627eb631fe..64d17b0d64555cbd4a29271b7f7122abed2caba0 100644 (file)
@@ -39,12 +39,9 @@ static int mpc837xmds_usb_cfg(void)
        if (ret)
                return ret;
        /* Map BCSR area */
-       np = of_find_node_by_name(NULL, "bcsr");
+       np = of_find_compatible_node(NULL, NULL, "fsl,mpc837xmds-bcsr");
        if (np) {
-               struct resource res;
-
-               of_address_to_resource(np, 0, &res);
-               bcsr_regs = ioremap(res.start, res.end - res.start + 1);
+               bcsr_regs = of_iomap(np, 0);
                of_node_put(np);
        }
        if (!bcsr_regs)
@@ -96,6 +93,7 @@ static void __init mpc837x_mds_setup_arch(void)
 static struct of_device_id mpc837x_ids[] = {
        { .type = "soc", },
        { .compatible = "soc", },
+       { .compatible = "simple-bus", },
        {},
 };
 
index 0afd22595546fc68d981972e15e0815eda7da09d..a578b966ecbc1da6452ff0160f07e5e0349d80eb 100644 (file)
@@ -22,7 +22,6 @@ config PPC_83xx
        select FSL_SOC
        select MPC83xx
        select IPIC
-       select FSL_EMB_PERFMON
 
 config PPC_86xx
        bool "Freescale 86xx"
index 73d81ce14b6763c185397d998c1208c4a073d0ab..0c3face0ddbb4d78010e1efcbd12569e8343e25c 100644 (file)
@@ -113,7 +113,12 @@ config FSL_BOOKE
        default y
 
 config FSL_EMB_PERFMON
-       bool
+       bool "Freescale Embedded Perfmon"
+       depends on E500 || PPC_83xx
+       help
+         This is the Performance Monitor support found on the e500 core
+         and some e300 cores (c3 and c4).  Select this only if your
+         core supports the Embedded Performance Monitor APU
 
 config PTE_64BIT
        bool
index cf6c2c89211d2dc2fe308e50404370d3ae9af418..0ad83aeb70b114758c68de984aa45161954c1eae 100644 (file)
@@ -170,7 +170,8 @@ void spu_release_saved(struct spu_context *ctx)
 {
        BUG_ON(ctx->state != SPU_STATE_SAVED);
 
-       if (test_and_clear_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags))
+       if (test_and_clear_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags) &&
+                       test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags))
                spu_activate(ctx, 0);
 
        spu_release(ctx);
index 6221968c2a3ce24d6bc11f3a5807db3ccaff440e..cac69e116776bd6bc5e91553057b3f2e4526ac79 100644 (file)
@@ -220,6 +220,7 @@ static int spu_run_init(struct spu_context *ctx, u32 *npc)
                }
        }
 
+       set_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags);
        return 0;
 }
 
@@ -234,7 +235,7 @@ static int spu_run_fini(struct spu_context *ctx, u32 *npc,
        *npc = ctx->ops->npc_read(ctx);
 
        spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
-       ctx->policy = SCHED_IDLE;
+       clear_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags);
        spu_release(ctx);
 
        if (signal_pending(current))
index 5d5f680cd0b8ced5789556e444a0b8b955cc23c8..00528ef84ad2085613703a8feab52a25b1ee9f93 100644 (file)
@@ -867,7 +867,7 @@ static noinline void spusched_tick(struct spu_context *ctx)
        if (ctx->policy == SCHED_FIFO)
                goto out;
 
-       if (--ctx->time_slice && ctx->policy != SCHED_IDLE)
+       if (--ctx->time_slice && test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags))
                goto out;
 
        spu = ctx->spu;
@@ -877,7 +877,7 @@ static noinline void spusched_tick(struct spu_context *ctx)
        new = grab_runnable_context(ctx->prio + 1, spu->node);
        if (new) {
                spu_unschedule(spu, ctx);
-               if (ctx->policy != SCHED_IDLE)
+               if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags))
                        spu_add_to_rq(ctx);
        } else {
                spu_context_nospu_trace(spusched_tick__newslice, ctx);
index 2c2fe3c07d72da414038e8a81d327eaa4457baf4..cdc515182f823fc71357886c7dc5205f1d97f11d 100644 (file)
@@ -44,6 +44,7 @@ struct spu_gang;
 enum {
        SPU_SCHED_NOTIFY_ACTIVE,
        SPU_SCHED_WAS_ACTIVE,   /* was active upon spu_acquire_saved()  */
+       SPU_SCHED_SPU_RUN,      /* context is within spu_run */
 };
 
 struct spu_context {
index 40736400ef80c2455e763d630175c93de73f22a9..829b8b02527bfb4f5d2a388256687ee10a2847a0 100644 (file)
@@ -618,9 +618,9 @@ static int pmacpic_find_viaint(void)
        if (np == NULL)
                goto not_found;
        viaint = irq_of_parse_and_map(np, 0);;
-#endif /* CONFIG_ADB_PMU */
 
 not_found:
+#endif /* CONFIG_ADB_PMU */
        return viaint;
 }
 
index 6efbd5e5bb1b6f1b8119ed8ccf7e8ed35591a015..cc81fd1141b031ffe476a12f033a7c925aff8f79 100644 (file)
@@ -509,7 +509,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
        }
 
        /* Validate some of the fields */
-       if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) {
+       if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) {
                printk(KERN_ERR "qe-firmware: invalid data\n");
                return -EINVAL;
        }
@@ -609,7 +609,10 @@ struct qe_firmware_info *qe_get_firmware_info(void)
         * If we haven't checked yet, and a driver hasn't uploaded a firmware
         * yet, then check the device tree for information.
         */
-       if (initialized || qe_firmware_uploaded)
+       if (qe_firmware_uploaded)
+               return &qe_firmware_info;
+
+       if (initialized)
                return NULL;
 
        initialized = 1;
index eb8d26f8736239ace4aaac1163a81150e9003e78..321bda2de2cb8a40ab0600bb75da4676556edda3 100644 (file)
@@ -329,8 +329,18 @@ InstructionTLBMiss:
        mfspr   r11, SPRN_MD_TWC        /* ....and get the pte address */
        lwz     r10, 0(r11)     /* Get the pte */
 
+#ifdef CONFIG_SWAP
+       /* do not set the _PAGE_ACCESSED bit of a non-present page */
+       andi.   r11, r10, _PAGE_PRESENT
+       beq     4f
+       ori     r10, r10, _PAGE_ACCESSED
+       mfspr   r11, SPRN_MD_TWC        /* get the pte address again */
+       stw     r10, 0(r11)
+4:
+#else
        ori     r10, r10, _PAGE_ACCESSED
        stw     r10, 0(r11)
+#endif
 
        /* The Linux PTE won't go exactly into the MMU TLB.
         * Software indicator bits 21, 22 and 28 must be clear.
@@ -395,8 +405,17 @@ DataStoreTLBMiss:
        DO_8xx_CPU6(0x3b80, r3)
        mtspr   SPRN_MD_TWC, r11
 
-       mfspr   r11, SPRN_MD_TWC        /* get the pte address again */
+#ifdef CONFIG_SWAP
+       /* do not set the _PAGE_ACCESSED bit of a non-present page */
+       andi.   r11, r10, _PAGE_PRESENT
+       beq     4f
+       ori     r10, r10, _PAGE_ACCESSED
+4:
+       /* and update pte in table */
+#else
        ori     r10, r10, _PAGE_ACCESSED
+#endif
+       mfspr   r11, SPRN_MD_TWC        /* get the pte address again */
        stw     r10, 0(r11)
 
        /* The Linux PTE won't go exactly into the MMU TLB.
@@ -575,7 +594,16 @@ DataTLBError:
 
        /* Update 'changed', among others.
        */
+#ifdef CONFIG_SWAP
+       ori     r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE
+       /* do not set the _PAGE_ACCESSED bit of a non-present page */
+       andi.   r11, r10, _PAGE_PRESENT
+       beq     4f
+       ori     r10, r10, _PAGE_ACCESSED
+4:
+#else
        ori     r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
+#endif
        mfspr   r11, SPRN_MD_TWC                /* Get pte address again */
        stw     r10, 0(r11)             /* and update pte in table */
 
index 237fc128143d43fbe3c232de29cb47ffec331d90..6c70fed0f9a0f9e35cd027072a464b8c42b85434 100644 (file)
@@ -1259,7 +1259,7 @@ menuconfig APM
          machines with more than one CPU.
 
          In order to use APM, you will need supporting software. For location
-         and more information, read <file:Documentation/pm.txt> and the
+         and more information, read <file:Documentation/power/pm.txt> and the
          Battery Powered Linux mini-HOWTO, available from
          <http://www.tldp.org/docs.html#howto>.
 
index c44527d16c52d66058ca434e8c6e5af05b8874c6..00da5219ee37c02a066d45e6ceefa65d9606d5e6 100644 (file)
@@ -360,7 +360,9 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data)
 
 static int __init genhd_device_init(void)
 {
-       class_register(&block_class);
+       int error = class_register(&block_class);
+       if (unlikely(error))
+               return error;
        bdev_map = kobj_map_init(base_probe, &block_class_lock);
        blk_dev_init();
 
index 0f6282207b3223baf9910332681fd5b3eb98295c..84caa4efc0d447516ce269ed91e85b3ad4f4c85b 100644 (file)
@@ -66,11 +66,11 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset,
        }
 
        if (tx) {
-               pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len);
+               pr_debug("%s: (async) len: %zu\n", __func__, len);
                async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param);
        } else {
                void *dest_buf, *src_buf;
-               pr_debug("%s: (sync) len: %zu\n", __FUNCTION__, len);
+               pr_debug("%s: (sync) len: %zu\n", __func__, len);
 
                /* wait for any prerequisite operations */
                if (depend_tx) {
@@ -80,7 +80,7 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset,
                        BUG_ON(depend_tx->ack);
                        if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR)
                                panic("%s: DMA_ERROR waiting for depend_tx\n",
-                                       __FUNCTION__);
+                                       __func__);
                }
 
                dest_buf = kmap_atomic(dest, KM_USER0) + dest_offset;
index 09c0e83664bc23f4465cad7b6c477ca76b1d46da..f5ff3906b035d52d5c6b28949ca6470b46d60f88 100644 (file)
@@ -63,11 +63,11 @@ async_memset(struct page *dest, int val, unsigned int offset,
        }
 
        if (tx) {
-               pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len);
+               pr_debug("%s: (async) len: %zu\n", __func__, len);
                async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param);
        } else { /* run the memset synchronously */
                void *dest_buf;
-               pr_debug("%s: (sync) len: %zu\n", __FUNCTION__, len);
+               pr_debug("%s: (sync) len: %zu\n", __func__, len);
 
                dest_buf = (void *) (((char *) page_address(dest)) + offset);
 
@@ -79,7 +79,7 @@ async_memset(struct page *dest, int val, unsigned int offset,
                        BUG_ON(depend_tx->ack);
                        if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR)
                                panic("%s: DMA_ERROR waiting for depend_tx\n",
-                                       __FUNCTION__);
+                                       __func__);
                }
 
                memset(dest_buf, val, len);
index 562882189de589587c475b25770ff46b90eac6ac..2be3bae899301efa2fde18d972c436260b39a864 100644 (file)
@@ -472,11 +472,11 @@ async_trigger_callback(enum async_tx_flags flags,
                tx = NULL;
 
        if (tx) {
-               pr_debug("%s: (async)\n", __FUNCTION__);
+               pr_debug("%s: (async)\n", __func__);
 
                async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param);
        } else {
-               pr_debug("%s: (sync)\n", __FUNCTION__);
+               pr_debug("%s: (sync)\n", __func__);
 
                /* wait for any prerequisite operations */
                if (depend_tx) {
@@ -486,7 +486,7 @@ async_trigger_callback(enum async_tx_flags flags,
                        BUG_ON(depend_tx->ack);
                        if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR)
                                panic("%s: DMA_ERROR waiting for depend_tx\n",
-                                       __FUNCTION__);
+                                       __func__);
                }
 
                async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param);
index 2259a4ff15cb9ce7253f4cc5d4f6132586fe762d..7a9db353f1986fca6a4d778dd1e05977ff0fb790 100644 (file)
@@ -47,7 +47,7 @@ do_async_xor(struct dma_device *device,
        int i;
        unsigned long dma_prep_flags = cb_fn ? DMA_PREP_INTERRUPT : 0;
 
-       pr_debug("%s: len: %zu\n", __FUNCTION__, len);
+       pr_debug("%s: len: %zu\n", __func__, len);
 
        dma_dest = dma_map_page(device->dev, dest, offset, len,
                                DMA_FROM_DEVICE);
@@ -86,7 +86,7 @@ do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset,
        void *_dest;
        int i;
 
-       pr_debug("%s: len: %zu\n", __FUNCTION__, len);
+       pr_debug("%s: len: %zu\n", __func__, len);
 
        /* reuse the 'src_list' array to convert to buffer pointers */
        for (i = 0; i < src_cnt; i++)
@@ -196,7 +196,7 @@ async_xor(struct page *dest, struct page **src_list, unsigned int offset,
                                        DMA_ERROR)
                                        panic("%s: DMA_ERROR waiting for "
                                                "depend_tx\n",
-                                               __FUNCTION__);
+                                               __func__);
                        }
 
                        do_sync_xor(dest, &src_list[src_off], offset,
@@ -276,7 +276,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list,
                unsigned long dma_prep_flags = cb_fn ? DMA_PREP_INTERRUPT : 0;
                int i;
 
-               pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len);
+               pr_debug("%s: (async) len: %zu\n", __func__, len);
 
                for (i = 0; i < src_cnt; i++)
                        dma_src[i] = dma_map_page(device->dev, src_list[i],
@@ -299,7 +299,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list,
        } else {
                unsigned long xor_flags = flags;
 
-               pr_debug("%s: (sync) len: %zu\n", __FUNCTION__, len);
+               pr_debug("%s: (sync) len: %zu\n", __func__, len);
 
                xor_flags |= ASYNC_TX_XOR_DROP_DST;
                xor_flags &= ~ASYNC_TX_ACK;
@@ -310,7 +310,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list,
                if (tx) {
                        if (dma_wait_for_async_tx(tx) == DMA_ERROR)
                                panic("%s: DMA_ERROR waiting for tx\n",
-                                       __FUNCTION__);
+                                       __func__);
                        async_tx_ack(tx);
                }
 
index f688c214be0c67110df1d039be5566d3c7f59bfe..b4f5e85428294eed21bb8f342af5a7a7c3fac87b 100644 (file)
@@ -283,34 +283,22 @@ config ACPI_TOSHIBA
          If you have a legacy free Toshiba laptop (such as the Libretto L1
          series), say Y.
 
-config ACPI_CUSTOM_DSDT
-       bool "Include Custom DSDT"
+config ACPI_CUSTOM_DSDT_FILE
+       string "Custom DSDT Table file to include"
+       default ""
        depends on !STANDALONE
-       default n 
        help
          This option supports a custom DSDT by linking it into the kernel.
          See Documentation/acpi/dsdt-override.txt
 
-         If unsure, say N.
-
-config ACPI_CUSTOM_DSDT_FILE
-       string "Custom DSDT Table file to include"
-       depends on ACPI_CUSTOM_DSDT
-       default ""
-       help
          Enter the full path name to the file which includes the AmlCode
          declaration.
 
-config ACPI_CUSTOM_DSDT_INITRD
-       bool "Read Custom DSDT from initramfs"
-       depends on BLK_DEV_INITRD
-       default n
-       help
-         This option supports a custom DSDT by optionally loading it from initrd.
-         See Documentation/acpi/dsdt-override.txt
+         If unsure, don't enter a file name.
 
-         If you are not using this feature now, but may use it later,
-         it is safe to say Y here.
+config ACPI_CUSTOM_DSDT
+       bool
+       default ACPI_CUSTOM_DSDT_FILE != ""
 
 config ACPI_BLACKLIST_YEAR
        int "Disable ACPI for systems before Jan 1st this year" if X86_32
index ce3c0a2cbac4dc81e9c5ff2712b100ec8a942b46..5b6760e0f9571d20e34dcb47346c354ad6dff116 100644 (file)
@@ -776,7 +776,7 @@ static int __init acpi_init(void)
 
        acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
        if (!acpi_kobj) {
-               printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__);
+               printk(KERN_WARNING "%s: kset create error\n", __func__);
                acpi_kobj = NULL;
        }
 
index 24a7865a57cb2515c740fbee5d9b038ca3927630..6c5da83cdb6807be36db10253bd42c2c332c0402 100644 (file)
@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device)
        input->phys = button->phys;
        input->id.bustype = BUS_HOST;
        input->id.product = button->type;
+       input->dev.parent = &device->dev;
 
        switch (button->type) {
        case ACPI_BUTTON_TYPE_POWER:
index caf873c14bfb244a89ba9c322ada05c3c2b3c04e..e7e197e3a4ffce2151d61f5e6b48f89c98087dfa 100644 (file)
@@ -129,6 +129,7 @@ static struct acpi_ec {
        struct mutex lock;
        wait_queue_head_t wait;
        struct list_head list;
+       atomic_t irq_count;
        u8 handlers_installed;
 } *boot_ec, *first_ec;
 
@@ -181,6 +182,8 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
 {
        int ret = 0;
 
+       atomic_set(&ec->irq_count, 0);
+
        if (unlikely(event == ACPI_EC_EVENT_OBF_1 &&
                     test_bit(EC_FLAGS_NO_OBF1_GPE, &ec->flags)))
                force_poll = 1;
@@ -227,6 +230,7 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
                while (time_before(jiffies, delay)) {
                        if (acpi_ec_check_status(ec, event))
                                goto end;
+                       msleep(5);
                }
        }
        pr_err(PREFIX "acpi_ec_wait timeout,"
@@ -529,6 +533,13 @@ static u32 acpi_ec_gpe_handler(void *data)
        struct acpi_ec *ec = data;
 
        pr_debug(PREFIX "~~~> interrupt\n");
+       atomic_inc(&ec->irq_count);
+       if (atomic_read(&ec->irq_count) > 5) {
+               pr_err(PREFIX "GPE storm detected, disabling EC GPE\n");
+               acpi_disable_gpe(NULL, ec->gpe, ACPI_ISR);
+               clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+               return ACPI_INTERRUPT_HANDLED;
+       }
        clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
        if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))
                wake_up(&ec->wait);
@@ -943,11 +954,7 @@ int __init acpi_ec_ecdt_probe(void)
                boot_ec->command_addr = ecdt_ptr->control.address;
                boot_ec->data_addr = ecdt_ptr->data.address;
                boot_ec->gpe = ecdt_ptr->gpe;
-               if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id,
-                               &boot_ec->handle))) {
-                       pr_info("Failed to locate handle for boot EC\n");
-                       boot_ec->handle = ACPI_ROOT_OBJECT;
-               }
+               boot_ec->handle = ACPI_ROOT_OBJECT;
        } else {
                /* This workaround is needed only on some broken machines,
                 * which require early EC, but fail to provide ECDT */
index 8edba7b678eb9d33493f422472dc16fdb4c6f84e..a697fb6cf050e8096d8be177f8303c5ed4290995 100644 (file)
@@ -91,10 +91,6 @@ static DEFINE_SPINLOCK(acpi_res_lock);
 #define        OSI_STRING_LENGTH_MAX 64        /* arbitrary */
 static char osi_additional_string[OSI_STRING_LENGTH_MAX];
 
-#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
-static int acpi_no_initrd_override;
-#endif
-
 /*
  * "Ode to _OSI(Linux)"
  *
@@ -324,67 +320,6 @@ acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
        return AE_OK;
 }
 
-#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
-static struct acpi_table_header *acpi_find_dsdt_initrd(void)
-{
-       struct file *firmware_file;
-       mm_segment_t oldfs;
-       unsigned long len, len2;
-       struct acpi_table_header *dsdt_buffer, *ret = NULL;
-       struct kstat stat;
-       char *ramfs_dsdt_name = "/DSDT.aml";
-
-       printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT\n");
-
-       /*
-        * Never do this at home, only the user-space is allowed to open a file.
-        * The clean way would be to use the firmware loader.
-        * But this code must be run before there is any userspace available.
-        * A static/init firmware infrastructure doesn't exist yet...
-        */
-       if (vfs_stat(ramfs_dsdt_name, &stat) < 0)
-               return ret;
-
-       len = stat.size;
-       /* check especially against empty files */
-       if (len <= 4) {
-               printk(KERN_ERR PREFIX "Failed: DSDT only %lu bytes.\n", len);
-               return ret;
-       }
-
-       firmware_file = filp_open(ramfs_dsdt_name, O_RDONLY, 0);
-       if (IS_ERR(firmware_file)) {
-               printk(KERN_ERR PREFIX "Failed to open %s.\n", ramfs_dsdt_name);
-               return ret;
-       }
-
-       dsdt_buffer = kmalloc(len, GFP_ATOMIC);
-       if (!dsdt_buffer) {
-               printk(KERN_ERR PREFIX "Failed to allocate %lu bytes.\n", len);
-               goto err;
-       }
-
-       oldfs = get_fs();
-       set_fs(KERNEL_DS);
-       len2 = vfs_read(firmware_file, (char __user *)dsdt_buffer, len,
-               &firmware_file->f_pos);
-       set_fs(oldfs);
-       if (len2 < len) {
-               printk(KERN_ERR PREFIX "Failed to read %lu bytes from %s.\n",
-                       len, ramfs_dsdt_name);
-               ACPI_FREE(dsdt_buffer);
-               goto err;
-       }
-
-       printk(KERN_INFO PREFIX "Found %lu byte DSDT in %s.\n",
-                       len, ramfs_dsdt_name);
-       ret = dsdt_buffer;
-err:
-       filp_close(firmware_file, NULL);
-       return ret;
-}
-#endif
-
 acpi_status
 acpi_os_table_override(struct acpi_table_header * existing_table,
                       struct acpi_table_header ** new_table)
@@ -397,16 +332,6 @@ acpi_os_table_override(struct acpi_table_header * existing_table,
 #ifdef CONFIG_ACPI_CUSTOM_DSDT
        if (strncmp(existing_table->signature, "DSDT", 4) == 0)
                *new_table = (struct acpi_table_header *)AmlCode;
-#endif
-#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
-       if ((strncmp(existing_table->signature, "DSDT", 4) == 0) &&
-           !acpi_no_initrd_override) {
-               struct acpi_table_header *initrd_table;
-
-               initrd_table = acpi_find_dsdt_initrd();
-               if (initrd_table)
-                       *new_table = initrd_table;
-       }
 #endif
        if (*new_table != NULL) {
                printk(KERN_WARNING PREFIX "Override [%4.4s-%8.8s], "
@@ -418,15 +343,6 @@ acpi_os_table_override(struct acpi_table_header * existing_table,
        return AE_OK;
 }
 
-#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
-static int __init acpi_no_initrd_override_setup(char *s)
-{
-       acpi_no_initrd_override = 1;
-       return 1;
-}
-__setup("acpi_no_initrd_override", acpi_no_initrd_override_setup);
-#endif
-
 static irqreturn_t acpi_irq(int irq, void *dev_id)
 {
        u32 handled;
@@ -1237,7 +1153,7 @@ int acpi_check_resource_conflict(struct resource *res)
 
        if (clash) {
                if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) {
-                       printk(KERN_INFO "%sACPI: %s resource %s [0x%llx-0x%llx]"
+                       printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
                               " conflicts with ACPI region %s"
                               " [0x%llx-0x%llx]\n",
                               acpi_enforce_resources == ENFORCE_RESOURCES_LAX
index 7f19859580c7efcbdf9675d6be44436573d0e8d6..7af414a3c63ee89f3ec0624d256437f9d74a2825 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 
+#include <linux/dmi.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -76,6 +77,101 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment,
        return NULL;
 }
 
+/* http://bugzilla.kernel.org/show_bug.cgi?id=4773 */
+static struct dmi_system_id medion_md9580[] = {
+       {
+               .ident = "Medion MD9580-F laptop",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "MEDIONNB"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "A555"),
+               },
+       },
+       { }
+};
+
+/* http://bugzilla.kernel.org/show_bug.cgi?id=5044 */
+static struct dmi_system_id dell_optiplex[] = {
+       {
+               .ident = "Dell Optiplex GX1",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX1 600S+"),
+               },
+       },
+       { }
+};
+
+/* http://bugzilla.kernel.org/show_bug.cgi?id=10138 */
+static struct dmi_system_id hp_t5710[] = {
+       {
+               .ident = "HP t5710",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "hp t5000 series"),
+                       DMI_MATCH(DMI_BOARD_NAME, "098Ch"),
+               },
+       },
+       { }
+};
+
+struct prt_quirk {
+       struct dmi_system_id    *system;
+       unsigned int            segment;
+       unsigned int            bus;
+       unsigned int            device;
+       unsigned char           pin;
+       char                    *source;        /* according to BIOS */
+       char                    *actual_source;
+};
+
+/*
+ * These systems have incorrect _PRT entries.  The BIOS claims the PCI
+ * interrupt at the listed segment/bus/device/pin is connected to the first
+ * link device, but it is actually connected to the second.
+ */
+static struct prt_quirk prt_quirks[] = {
+       { medion_md9580, 0, 0, 9, 'A',
+               "\\_SB_.PCI0.ISA.LNKA",
+               "\\_SB_.PCI0.ISA.LNKB"},
+       { dell_optiplex, 0, 0, 0xd, 'A',
+               "\\_SB_.LNKB",
+               "\\_SB_.LNKA"},
+       { hp_t5710, 0, 0, 1, 'A',
+               "\\_SB_.PCI0.LNK1",
+               "\\_SB_.PCI0.LNK3"},
+};
+
+static void
+do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt)
+{
+       int i;
+       struct prt_quirk *quirk;
+
+       for (i = 0; i < ARRAY_SIZE(prt_quirks); i++) {
+               quirk = &prt_quirks[i];
+
+               /* All current quirks involve link devices, not GSIs */
+               if (!prt->source)
+                       continue;
+
+               if (dmi_check_system(quirk->system) &&
+                   entry->id.segment == quirk->segment &&
+                   entry->id.bus == quirk->bus &&
+                   entry->id.device == quirk->device &&
+                   entry->pin + 'A' == quirk->pin &&
+                   !strcmp(prt->source, quirk->source) &&
+                   strlen(prt->source) >= strlen(quirk->actual_source)) {
+                       printk(KERN_WARNING PREFIX "firmware reports "
+                               "%04x:%02x:%02x[%c] connected to %s; "
+                               "changing to %s\n",
+                               entry->id.segment, entry->id.bus,
+                               entry->id.device, 'A' + entry->pin,
+                               prt->source, quirk->actual_source);
+                       strcpy(prt->source, quirk->actual_source);
+               }
+       }
+}
+
 static int
 acpi_pci_irq_add_entry(acpi_handle handle,
                       int segment, int bus, struct acpi_pci_routing_table *prt)
@@ -96,6 +192,8 @@ acpi_pci_irq_add_entry(acpi_handle handle,
        entry->id.function = prt->address & 0xFFFF;
        entry->pin = prt->pin;
 
+       do_prt_fixups(entry, prt);
+
        /*
         * Type 1: Dynamic
         * ---------------
index f14ff1ffab29c24156d2cff92d75340460337745..c3fed31166b552761f2bb9c3b26ef2b7c3e47592 100644 (file)
@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device)
                }
 }
 
-static int acpi_pci_root_add(struct acpi_device *device)
+static int __devinit acpi_pci_root_add(struct acpi_device *device)
 {
        int result = 0;
        struct acpi_pci_root *root = NULL;
index a3cc8a98255cf724248c7efbf749a912bc9ef4f1..36a68fa114e3e7b97b85585e40e3f74929110d79 100644 (file)
@@ -840,17 +840,19 @@ static int is_processor_present(acpi_handle handle)
 
 
        status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
-       /*
-        * if a processor object does not have an _STA object,
-        * OSPM assumes that the processor is present.
-        */
-       if (status == AE_NOT_FOUND)
-               return 1;
 
        if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT))
                return 1;
 
-       ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
+       /*
+        * _STA is mandatory for a processor that supports hot plug
+        */
+       if (status == AE_NOT_FOUND)
+               ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+                               "Processor does not support hot plug\n"));
+       else
+               ACPI_EXCEPTION((AE_INFO, status,
+                               "Processor Device is not present"));
        return 0;
 }
 
@@ -886,8 +888,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
        return 0;
 }
 
-static void
-acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
+static void __ref acpi_processor_hotplug_notify(acpi_handle handle,
+                                               u32 event, void *data)
 {
        struct acpi_processor *pr;
        struct acpi_device *device = NULL;
@@ -897,9 +899,10 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
        switch (event) {
        case ACPI_NOTIFY_BUS_CHECK:
        case ACPI_NOTIFY_DEVICE_CHECK:
-               printk("Processor driver received %s event\n",
+               ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+               "Processor driver received %s event\n",
                       (event == ACPI_NOTIFY_BUS_CHECK) ?
-                      "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK");
+                      "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"));
 
                if (!is_processor_present(handle))
                        break;
index 3fac011f9cf964082b463ef20913542ca9bce173..57570ac47803f4d590da5f8254547119ab10aec3 100644 (file)
@@ -609,7 +609,8 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd)
        status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer);
        if (ACPI_SUCCESS(status)) {
                obj = buffer.pointer;
-               status = acpi_get_handle(NULL, obj->string.pointer, ejd);
+               status = acpi_get_handle(ACPI_ROOT_OBJECT, obj->string.pointer,
+                                        ejd);
                kfree(buffer.pointer);
        }
        return status;
@@ -966,7 +967,7 @@ static void acpi_device_set_id(struct acpi_device *device,
        case ACPI_BUS_TYPE_DEVICE:
                status = acpi_get_object_info(handle, &buffer);
                if (ACPI_FAILURE(status)) {
-                       printk(KERN_ERR PREFIX "%s: Error reading device info\n", __FUNCTION__);
+                       printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__);
                        return;
                }
 
index 293a1cbb47c05776b543894bc32ee145de0153b7..d2f71a54726c5c988bdc680a892599966e0744df 100644 (file)
@@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void)
 static void acpi_power_off(void)
 {
        /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
-       printk("%s called\n", __FUNCTION__);
+       printk("%s called\n", __func__);
        local_irq_disable();
        acpi_enable_wakeup_device(ACPI_STATE_S5);
        acpi_enter_sleep_state(ACPI_STATE_S5);
index 55cf4c05bb74edc7714ddb4a000b729395feb291..4749f379a915a4c4f6308f21b21de4205f399387 100644 (file)
@@ -319,7 +319,7 @@ void acpi_irq_stats_init(void)
                goto fail;
 
        for (i = 0; i < num_counters; ++i) {
-               char buffer[10];
+               char buffer[12];
                char *name;
 
                if (i < num_gpes)
index 8d4b79b4f933c631281e23ce8b602e3bcbbf3d9f..c4e00ac8ea855ac980b05b5e6bf60b8e52b5016b 100644 (file)
@@ -879,6 +879,8 @@ static void acpi_thermal_check(void *data)
 }
 
 /* sys I/F for generic thermal sysfs support */
+#define KELVIN_TO_MILLICELSIUS(t) (t * 100 - 273200)
+
 static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf)
 {
        struct acpi_thermal *tz = thermal->devdata;
@@ -886,7 +888,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf)
        if (!tz)
                return -EINVAL;
 
-       return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS(tz->temperature));
+       return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature));
 }
 
 static const char enabled[] = "kernel";
@@ -980,21 +982,21 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
 
        if (tz->trips.critical.flags.valid) {
                if (!trip)
-                       return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS(
+                       return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(
                                tz->trips.critical.temperature));
                trip--;
        }
 
        if (tz->trips.hot.flags.valid) {
                if (!trip)
-                       return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS(
+                       return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(
                                        tz->trips.hot.temperature));
                trip--;
        }
 
        if (tz->trips.passive.flags.valid) {
                if (!trip)
-                       return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS(
+                       return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(
                                        tz->trips.passive.temperature));
                trip--;
        }
@@ -1002,7 +1004,7 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal,
        for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE &&
                tz->trips.active[i].flags.valid; i++) {
                if (!trip)
-                       return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS(
+                       return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(
                                        tz->trips.active[i].temperature));
                trip--;
        }
index 9e8c20c6a0b7243e708876a4dfffa30dd8f47506..0a43c8e0eff323fe55f29846695c71e750ffedf3 100644 (file)
@@ -99,6 +99,13 @@ MODULE_LICENSE("GPL");
 #define HCI_VIDEO_OUT_CRT              0x2
 #define HCI_VIDEO_OUT_TV               0x4
 
+static const struct acpi_device_id toshiba_device_ids[] = {
+       {"TOS6200", 0},
+       {"TOS1900", 0},
+       {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, toshiba_device_ids);
+
 /* utility
  */
 
index c7e128e5369b2d5853acf17e8ff109dc2d1fe021..7361204b1eef2114ca22a65902dae2b6ae75276f 100644 (file)
@@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void)
  * RETURN:      Updated pointer to the function name
  *
  * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.
- *              This allows compiler macros such as __FUNCTION__ to be used
+ *              This allows compiler macros such as __func__ to be used
  *              with no change to the debug output.
  *
  ******************************************************************************/
index 76ee766c84f948ed2d8749f06486338a792f7e05..e08b3fa6639f593c0c1d4c893d591be26d36243c 100644 (file)
@@ -432,7 +432,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
         * element -- which is legal)
         */
        if (!internal_object) {
-               *obj_length = 0;
+               *obj_length = sizeof(union acpi_object);
                return_ACPI_STATUS(AE_OK);
        }
 
index eba55b7d6c95ad63479430fc3c63c57dce3a5b19..44ea60cf21c09c00adc1135394decbb4af2faa1d 100644 (file)
@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle,
                        break;
                }
 
+               if (!element->reference.handle) {
+                       printk(KERN_WARNING PREFIX "Invalid reference in"
+                              " package %s\n", pathname);
+                       status = AE_NULL_ENTRY;
+                       break;
+               }
                /* Get the  acpi_handle. */
 
                list->handles[i] = element->reference.handle;
index 12cce69b5441e98a7bd8da23031dc250daaa88f1..1bc0c74f2755d1c3bbf8264c01a27dbd208ce227 100644 (file)
@@ -713,7 +713,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
 
        kfree(obj);
 
-       if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
+       if (device->cap._BCL && device->cap._BCM && max_level > 0) {
                int result;
                static int count = 0;
                char *name;
@@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset)
        if (!video)
                goto end;
 
-       printk(KERN_INFO PREFIX "Please implement %s\n", __FUNCTION__);
+       printk(KERN_INFO PREFIX "Please implement %s\n", __func__);
        seq_printf(seq, "<TODO>\n");
 
       end:
index efacc9f8bfe31a0b9c84b5aec4ea11c8285dc527..c33b1c6e93b11b4b975c859de79abbf63b797593 100644 (file)
@@ -293,7 +293,7 @@ struct acpi_buffer *out)
 {
        struct guid_block *block = NULL;
        struct wmi_block *wblock = NULL;
-       acpi_handle handle;
+       acpi_handle handle, wc_handle;
        acpi_status status, wc_status = AE_ERROR;
        struct acpi_object_list input, wc_input;
        union acpi_object wc_params[1], wq_params[1];
@@ -338,8 +338,10 @@ struct acpi_buffer *out)
                 * expensive, but have no corresponding WCxx method. So we
                 * should not fail if this happens.
                 */
-               wc_status = acpi_evaluate_object(handle, wc_method,
-                       &wc_input, NULL);
+               wc_status = acpi_get_handle(handle, wc_method, &wc_handle);
+               if (ACPI_SUCCESS(wc_status))
+                       wc_status = acpi_evaluate_object(handle, wc_method,
+                               &wc_input, NULL);
        }
 
        strcpy(method, "WQ");
@@ -351,7 +353,7 @@ struct acpi_buffer *out)
         * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if
         * the WQxx method failed - we should disable collection anyway.
         */
-       if ((block->flags & ACPI_WMI_EXPENSIVE) && wc_status) {
+       if ((block->flags & ACPI_WMI_EXPENSIVE) && ACPI_SUCCESS(wc_status)) {
                wc_params[0].integer.value = 0;
                status = acpi_evaluate_object(handle,
                wc_method, &wc_input, NULL);
index 6978469eb16d87c9637c2969f6831a17c38cd267..17ee6ed985d9198ad356a9b68efebf406a4b11f6 100644 (file)
 #define DRV_NAME       "ahci"
 #define DRV_VERSION    "3.0"
 
+static int ahci_skip_host_reset;
+module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444);
+MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)");
+
 static int ahci_enable_alpm(struct ata_port *ap,
                enum link_pm policy);
 static void ahci_disable_alpm(struct ata_port *ap);
@@ -587,6 +591,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 
        /* Marvell */
        { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },        /* 6145 */
+       { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv },        /* 6121 */
 
        /* Generic, PCI class code for AHCI */
        { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
@@ -661,6 +666,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
        void __iomem *mmio = pcim_iomap_table(pdev)[AHCI_PCI_BAR];
        u32 cap, port_map;
        int i;
+       int mv;
 
        /* make sure AHCI mode is enabled before accessing CAP */
        ahci_enable_ahci(mmio);
@@ -696,12 +702,16 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
         * presence register, as bit 4 (counting from 0)
         */
        if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
+               if (pdev->device == 0x6121)
+                       mv = 0x3;
+               else
+                       mv = 0xf;
                dev_printk(KERN_ERR, &pdev->dev,
                           "MV_AHCI HACK: port_map %x -> %x\n",
-                          hpriv->port_map,
-                          hpriv->port_map & 0xf);
+                          port_map,
+                          port_map & mv);
 
-               port_map &= 0xf;
+               port_map &= mv;
        }
 
        /* cross check port_map and cap.n_ports */
@@ -1088,29 +1098,35 @@ static int ahci_reset_controller(struct ata_host *host)
        ahci_enable_ahci(mmio);
 
        /* global controller reset */
-       tmp = readl(mmio + HOST_CTL);
-       if ((tmp & HOST_RESET) == 0) {
-               writel(tmp | HOST_RESET, mmio + HOST_CTL);
-               readl(mmio + HOST_CTL); /* flush */
-       }
+       if (!ahci_skip_host_reset) {
+               tmp = readl(mmio + HOST_CTL);
+               if ((tmp & HOST_RESET) == 0) {
+                       writel(tmp | HOST_RESET, mmio + HOST_CTL);
+                       readl(mmio + HOST_CTL); /* flush */
+               }
 
-       /* reset must complete within 1 second, or
-        * the hardware should be considered fried.
-        */
-       ssleep(1);
+               /* reset must complete within 1 second, or
+                * the hardware should be considered fried.
+                */
+               ssleep(1);
 
-       tmp = readl(mmio + HOST_CTL);
-       if (tmp & HOST_RESET) {
-               dev_printk(KERN_ERR, host->dev,
-                          "controller reset failed (0x%x)\n", tmp);
-               return -EIO;
-       }
+               tmp = readl(mmio + HOST_CTL);
+               if (tmp & HOST_RESET) {
+                       dev_printk(KERN_ERR, host->dev,
+                                  "controller reset failed (0x%x)\n", tmp);
+                       return -EIO;
+               }
 
-       /* turn on AHCI mode */
-       ahci_enable_ahci(mmio);
+               /* turn on AHCI mode */
+               ahci_enable_ahci(mmio);
 
-       /* some registers might be cleared on reset.  restore initial values */
-       ahci_restore_initial_config(host);
+               /* Some registers might be cleared on reset.  Restore
+                * initial values.
+                */
+               ahci_restore_initial_config(host);
+       } else
+               dev_printk(KERN_INFO, host->dev,
+                          "skipping global host reset\n");
 
        if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
                u16 tmp16;
@@ -1162,9 +1178,14 @@ static void ahci_init_controller(struct ata_host *host)
        int i;
        void __iomem *port_mmio;
        u32 tmp;
+       int mv;
 
        if (hpriv->flags & AHCI_HFLAG_MV_PATA) {
-               port_mmio = __ahci_port_base(host, 4);
+               if (pdev->device == 0x6121)
+                       mv = 2;
+               else
+                       mv = 4;
+               port_mmio = __ahci_port_base(host, mv);
 
                writel(0, port_mmio + PORT_IRQ_MASK);
 
@@ -2241,7 +2262,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (rc)
                return rc;
 
-       rc = pcim_iomap_regions(pdev, 1 << AHCI_PCI_BAR, DRV_NAME);
+       /* AHCI controllers often implement SFF compatible interface.
+        * Grab all PCI BARs just in case.
+        */
+       rc = pcim_iomap_regions_request_all(pdev, 1 << AHCI_PCI_BAR, DRV_NAME);
        if (rc == -EBUSY)
                pcim_pin_device(pdev);
        if (rc)
index 0770cb7391a42d5ef99f6d2cecd6937c8f98a240..bf98a566adac67c2ec49dc7fc4318fbf15cad68d 100644 (file)
@@ -118,45 +118,77 @@ static void ata_acpi_associate_ide_port(struct ata_port *ap)
                ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
 }
 
-static void ata_acpi_handle_hotplug(struct ata_port *ap, struct kobject *kobj,
+static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
                                    u32 event)
 {
        char event_string[12];
        char *envp[] = { event_string, NULL };
-       struct ata_eh_info *ehi = &ap->link.eh_info;
-
-       if (event == 0 || event == 1) {
-              unsigned long flags;
-              spin_lock_irqsave(ap->lock, flags);
-              ata_ehi_clear_desc(ehi);
-              ata_ehi_push_desc(ehi, "ACPI event");
-              ata_ehi_hotplugged(ehi);
-              ata_port_freeze(ap);
-              spin_unlock_irqrestore(ap->lock, flags);
+       struct ata_eh_info *ehi;
+       struct kobject *kobj = NULL;
+       int wait = 0;
+       unsigned long flags;
+
+       if (!ap)
+               ap = dev->link->ap;
+       ehi = &ap->link.eh_info;
+
+       spin_lock_irqsave(ap->lock, flags);
+
+       switch (event) {
+       case ACPI_NOTIFY_BUS_CHECK:
+       case ACPI_NOTIFY_DEVICE_CHECK:
+               ata_ehi_push_desc(ehi, "ACPI event");
+               ata_ehi_hotplugged(ehi);
+               ata_port_freeze(ap);
+               break;
+
+       case ACPI_NOTIFY_EJECT_REQUEST:
+               ata_ehi_push_desc(ehi, "ACPI event");
+               if (dev)
+                       dev->flags |= ATA_DFLAG_DETACH;
+               else {
+                       struct ata_link *tlink;
+                       struct ata_device *tdev;
+
+                       ata_port_for_each_link(tlink, ap)
+                               ata_link_for_each_dev(tdev, tlink)
+                                       tdev->flags |= ATA_DFLAG_DETACH;
+               }
+
+               ata_port_schedule_eh(ap);
+               wait = 1;
+               break;
        }
 
+       if (dev) {
+               if (dev->sdev)
+                       kobj = &dev->sdev->sdev_gendev.kobj;
+       } else
+               kobj = &ap->dev->kobj;
+
        if (kobj) {
                sprintf(event_string, "BAY_EVENT=%d", event);
                kobject_uevent_env(kobj, KOBJ_CHANGE, envp);
        }
+
+       spin_unlock_irqrestore(ap->lock, flags);
+
+       if (wait)
+               ata_port_wait_eh(ap);
 }
 
 static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data)
 {
        struct ata_device *dev = data;
-       struct kobject *kobj = NULL;
 
-       if (dev->sdev)
-               kobj = &dev->sdev->sdev_gendev.kobj;
-
-       ata_acpi_handle_hotplug(dev->link->ap, kobj, event);
+       ata_acpi_handle_hotplug(NULL, dev, event);
 }
 
 static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data)
 {
        struct ata_port *ap = data;
 
-       ata_acpi_handle_hotplug(ap, &ap->dev->kobj, event);
+       ata_acpi_handle_hotplug(ap, NULL, event);
 }
 
 /**
@@ -191,20 +223,30 @@ void ata_acpi_associate(struct ata_host *host)
                else
                        ata_acpi_associate_ide_port(ap);
 
-               if (ap->acpi_handle)
-                       acpi_install_notify_handler (ap->acpi_handle,
-                                                    ACPI_SYSTEM_NOTIFY,
-                                                    ata_acpi_ap_notify,
-                                                    ap);
+               if (ap->acpi_handle) {
+                       acpi_install_notify_handler(ap->acpi_handle,
+                                                   ACPI_SYSTEM_NOTIFY,
+                                                   ata_acpi_ap_notify, ap);
+#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
+                       /* we might be on a docking station */
+                       register_hotplug_dock_device(ap->acpi_handle,
+                                                    ata_acpi_ap_notify, ap);
+#endif
+               }
 
                for (j = 0; j < ata_link_max_devices(&ap->link); j++) {
                        struct ata_device *dev = &ap->link.device[j];
 
-                       if (dev->acpi_handle)
-                               acpi_install_notify_handler (dev->acpi_handle,
-                                                            ACPI_SYSTEM_NOTIFY,
-                                                            ata_acpi_dev_notify,
-                                                            dev);
+                       if (dev->acpi_handle) {
+                               acpi_install_notify_handler(dev->acpi_handle,
+                                               ACPI_SYSTEM_NOTIFY,
+                                               ata_acpi_dev_notify, dev);
+#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
+                               /* we might be on a docking station */
+                               register_hotplug_dock_device(dev->acpi_handle,
+                                               ata_acpi_dev_notify, dev);
+#endif
+                       }
                }
        }
 }
index 7e68edf3c0f3fe9c5133396c698c96159956d646..8786455c901d9b220d6f7f3cb0540900500e927a 100644 (file)
@@ -295,7 +295,7 @@ static void ali_lock_sectors(struct ata_device *adev)
 static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
 {
        /* If its not a media command, its not worth it */
-       if (qc->nbytes < 2048)
+       if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
                return -EOPNOTSUPP;
        return 0;
 }
index c662d686154a1ac64ad5b1c1e7deca1029fce0bc..47c57a4294b7c8beccb38ee7e4ed62fc388ad4fc 100644 (file)
@@ -331,8 +331,8 @@ module_param(fs_keystream, int, 0);
 #define FS_DEBUG_QSIZE   0x00001000
 
 
-#define func_enter() fs_dprintk (FS_DEBUG_FLOW, "fs: enter %s\n", __FUNCTION__)
-#define func_exit()  fs_dprintk (FS_DEBUG_FLOW, "fs: exit  %s\n", __FUNCTION__)
+#define func_enter() fs_dprintk(FS_DEBUG_FLOW, "fs: enter %s\n", __func__)
+#define func_exit()  fs_dprintk(FS_DEBUG_FLOW, "fs: exit  %s\n", __func__)
 
 
 static struct fs_dev *fs_boards = NULL;
index f97e050338f04a0dd24431dafe194fb8600f3de9..9427a61f62b0e36f3ec538f7d99d4b854212aa74 100644 (file)
@@ -95,8 +95,8 @@
 #if 1
 #define ASSERT(expr)     if (!(expr)) { \
                             printk(FORE200E "assertion failed! %s[%d]: %s\n", \
-                                   __FUNCTION__, __LINE__, #expr); \
-                            panic(FORE200E "%s", __FUNCTION__); \
+                                   __func__, __LINE__, #expr); \
+                            panic(FORE200E "%s", __func__); \
                         }
 #else
 #define ASSERT(expr)     do {} while (0)
index eee54c0cde6819ad064ada9cb619bdb3954f0052..b967919fb7e2e91a763ab8a6c53307f21cbfa443 100644 (file)
@@ -555,7 +555,7 @@ idt77252_tx_dump(struct idt77252_dev *card)
        struct vc_map *vc;
        int i;
 
-       printk("%s\n", __FUNCTION__);
+       printk("%s\n", __func__);
        for (i = 0; i < card->tct_size; i++) {
                vc = card->vcs[i];
                if (!vc)
@@ -1035,7 +1035,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
        skb = sb_pool_skb(card, le32_to_cpu(rsqe->word_2));
        if (skb == NULL) {
                printk("%s: NULL skb in %s, rsqe: %08x %08x %08x %08x\n",
-                      card->name, __FUNCTION__,
+                      card->name, __func__,
                       le32_to_cpu(rsqe->word_1), le32_to_cpu(rsqe->word_2),
                       le32_to_cpu(rsqe->word_3), le32_to_cpu(rsqe->word_4));
                return;
@@ -1873,7 +1873,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,
                        return;
 
                if (sb_pool_add(card, skb, queue)) {
-                       printk("%s: SB POOL full\n", __FUNCTION__);
+                       printk("%s: SB POOL full\n", __func__);
                        goto outfree;
                }
 
@@ -1883,7 +1883,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,
                IDT77252_PRV_PADDR(skb) = paddr;
 
                if (push_rx_skb(card, skb, queue)) {
-                       printk("%s: FB QUEUE full\n", __FUNCTION__);
+                       printk("%s: FB QUEUE full\n", __func__);
                        goto outunmap;
                }
        }
@@ -3821,12 +3821,12 @@ static int __init idt77252_init(void)
 {
        struct sk_buff *skb;
 
-       printk("%s: at %p\n", __FUNCTION__, idt77252_init);
+       printk("%s: at %p\n", __func__, idt77252_init);
 
        if (sizeof(skb->cb) < sizeof(struct atm_skb_data) +
                              sizeof(struct idt77252_skb_prv)) {
                printk(KERN_ERR "%s: skb->cb is too small (%lu < %lu)\n",
-                      __FUNCTION__, (unsigned long) sizeof(skb->cb),
+                      __func__, (unsigned long) sizeof(skb->cb),
                       (unsigned long) sizeof(struct atm_skb_data) +
                                       sizeof(struct idt77252_skb_prv));
                return -EIO;
index b6d230b3209f24567be22208be6d8236af88282d..0d1d2133d9bc239fe800a3e64c05ceef6c1e898a 100644 (file)
@@ -44,16 +44,6 @@ config MAC_FLOPPY
          If you have a SWIM-3 (Super Woz Integrated Machine 3; from Apple)
          floppy controller, say Y here. Most commonly found in PowerMacs.
 
-config BLK_DEV_PS2
-       tristate "PS/2 ESDI hard disk support"
-       depends on MCA && MCA_LEGACY && BROKEN
-       help
-         Say Y here if you have a PS/2 machine with a MCA bus and an ESDI
-         hard disk.
-
-         To compile this driver as a module, choose M here: the
-         module will be called ps2esdi.
-
 config AMIGA_Z2RAM
        tristate "Amiga Zorro II ramdisk support"
        depends on ZORRO
index 01c972415cb29c8ed5fcfae76972d622e4833b0c..5e584306be9992aae29c39a0c7221bdc82f053c8 100644 (file)
@@ -13,7 +13,6 @@ obj-$(CONFIG_ATARI_FLOPPY)    += ataflop.o
 obj-$(CONFIG_AMIGA_Z2RAM)      += z2ram.o
 obj-$(CONFIG_BLK_DEV_RAM)      += brd.o
 obj-$(CONFIG_BLK_DEV_LOOP)     += loop.o
-obj-$(CONFIG_BLK_DEV_PS2)      += ps2esdi.o
 obj-$(CONFIG_BLK_DEV_XD)       += xd.o
 obj-$(CONFIG_BLK_CPQ_DA)       += cpqarray.o
 obj-$(CONFIG_BLK_CPQ_CISS_DA)  += cciss.o
index 32c79a55511bd174f3effd63af4e5bd7bc594b68..7652e87d60c52cb7c2a18053198fd205ec1ef9b2 100644 (file)
@@ -217,7 +217,6 @@ static int use_virtual_dma;
  */
 
 static DEFINE_SPINLOCK(floppy_lock);
-static struct completion device_release;
 
 static unsigned short virtual_dma_port = 0x3f0;
 irqreturn_t floppy_interrupt(int irq, void *dev_id);
@@ -4144,7 +4143,6 @@ DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL);
 
 static void floppy_device_release(struct device *dev)
 {
-       complete(&device_release);
 }
 
 static struct platform_device floppy_device[N_DRIVE];
@@ -4539,7 +4537,6 @@ void cleanup_module(void)
 {
        int drive;
 
-       init_completion(&device_release);
        blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
        unregister_blkdev(FLOPPY_MAJOR, "fd");
 
@@ -4564,8 +4561,6 @@ void cleanup_module(void)
 
        /* eject disk, if any */
        fd_eject(0);
-
-       wait_for_completion(&device_release);
 }
 
 module_param(floppy, charp, 0);
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
deleted file mode 100644 (file)
index 3c796e2..0000000
+++ /dev/null
@@ -1,1079 +0,0 @@
-/* ps2esdi driver based on assembler code by Arindam Banerji,
-   written by Peter De Schrijver */
-/* Reassuring note to IBM : This driver was NOT developed by vice-versa
-   engineering the PS/2's BIOS */
-/* Dedicated to Wannes, Tofke, Ykke, Godot, Killroy and all those 
-   other lovely fish out there... */
-/* This code was written during the long and boring WINA 
-   elections 1994 */
-/* Thanks to Arindam Banerij for giving me the source of his driver */
-/* This code may be freely distributed and modified in any way, 
-   as long as these notes remain intact */
-
-/*  Revised: 05/07/94 by Arindam Banerji (axb@cse.nd.edu) */
-/*  Revised: 09/08/94 by Peter De Schrijver (stud11@cc4.kuleuven.ac.be)
-   Thanks to Arindam Banerij for sending me the docs of the adapter */
-
-/* BA Modified for ThinkPad 720 by Boris Ashkinazi */
-/*                    (bash@vnet.ibm.com) 08/08/95 */
-
-/* Modified further for ThinkPad-720C by Uri Blumenthal */
-/*                    (uri@watson.ibm.com) Sep 11, 1995 */
-
-/* TODO : 
-   + Timeouts
-   + Get disk parameters
-   + DMA above 16MB
-   + reset after read/write error
- */
-
-#define DEVICE_NAME "PS/2 ESDI"
-
-#include <linux/major.h>
-#include <linux/errno.h>
-#include <linux/wait.h>
-#include <linux/interrupt.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/genhd.h>
-#include <linux/ps2esdi.h>
-#include <linux/blkdev.h>
-#include <linux/mca-legacy.h>
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/module.h>
-#include <linux/hdreg.h>
-
-#include <asm/system.h>
-#include <asm/io.h>
-#include <asm/dma.h>
-#include <asm/mca_dma.h>
-#include <asm/uaccess.h>
-
-#define PS2ESDI_IRQ 14
-#define MAX_HD 2
-#define MAX_RETRIES 5
-#define MAX_16BIT 65536
-#define ESDI_TIMEOUT   0xf000
-#define ESDI_STAT_TIMEOUT 4
-
-#define TYPE_0_CMD_BLK_LENGTH 2
-#define TYPE_1_CMD_BLK_LENGTH 4
-
-static void reset_ctrl(void);
-
-static int ps2esdi_geninit(void);
-
-static void do_ps2esdi_request(struct request_queue * q);
-
-static void ps2esdi_readwrite(int cmd, struct request *req);
-
-static void ps2esdi_fill_cmd_block(u_short * cmd_blk, u_short cmd,
-u_short cyl, u_short head, u_short sector, u_short length, u_char drive);
-
-static int ps2esdi_out_cmd_blk(u_short * cmd_blk);
-
-static void ps2esdi_prep_dma(char *buffer, u_short length, u_char dma_xmode);
-
-static irqreturn_t ps2esdi_interrupt_handler(int irq, void *dev_id);
-static void (*current_int_handler) (u_int) = NULL;
-static void ps2esdi_normal_interrupt_handler(u_int);
-static void ps2esdi_initial_reset_int_handler(u_int);
-static void ps2esdi_geometry_int_handler(u_int);
-static int ps2esdi_getgeo(struct block_device *bdev, struct hd_geometry *geo);
-
-static int ps2esdi_read_status_words(int num_words, int max_words, u_short * buffer);
-
-static void dump_cmd_complete_status(u_int int_ret_code);
-
-static void ps2esdi_get_device_cfg(void);
-
-static void ps2esdi_reset_timer(unsigned long unused);
-
-static u_int dma_arb_level;            /* DMA arbitration level */
-
-static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int);
-
-static int no_int_yet;
-static int ps2esdi_drives;
-static u_short io_base;
-static DEFINE_TIMER(esdi_timer, ps2esdi_reset_timer, 0, 0);
-static int reset_status;
-static int ps2esdi_slot = -1;
-static int tp720esdi = 0;      /* Is it Integrated ESDI of ThinkPad-720? */
-static int intg_esdi = 0;       /* If integrated adapter */
-struct ps2esdi_i_struct {
-       unsigned int head, sect, cyl, wpcom, lzone, ctl;
-};
-static DEFINE_SPINLOCK(ps2esdi_lock);
-static struct request_queue *ps2esdi_queue;
-static struct request *current_req;
-
-#if 0
-#if 0                          /* try both - I don't know which one is better... UB */
-static struct ps2esdi_i_struct ps2esdi_info[MAX_HD] =
-{
-       {4, 48, 1553, 0, 0, 0},
-       {0, 0, 0, 0, 0, 0}};
-#else
-static struct ps2esdi_i_struct ps2esdi_info[MAX_HD] =
-{
-       {64, 32, 161, 0, 0, 0},
-       {0, 0, 0, 0, 0, 0}};
-#endif
-#endif
-static struct ps2esdi_i_struct ps2esdi_info[MAX_HD] =
-{
-       {0, 0, 0, 0, 0, 0},
-       {0, 0, 0, 0, 0, 0}};
-
-static struct block_device_operations ps2esdi_fops =
-{
-       .owner          = THIS_MODULE,
-       .getgeo         = ps2esdi_getgeo,
-};
-
-static struct gendisk *ps2esdi_gendisk[2];
-
-/* initialization routine called by ll_rw_blk.c   */
-static int __init ps2esdi_init(void)
-{
-
-       int error = 0;
-
-       /* register the device - pass the name and major number */
-       if (register_blkdev(PS2ESDI_MAJOR, "ed"))
-               return -EBUSY;
-
-       /* set up some global information - indicating device specific info */
-       ps2esdi_queue = blk_init_queue(do_ps2esdi_request, &ps2esdi_lock);
-       if (!ps2esdi_queue) {
-               unregister_blkdev(PS2ESDI_MAJOR, "ed");
-               return -ENOMEM;
-       }
-
-       /* some minor housekeeping - setup the global gendisk structure */
-       error = ps2esdi_geninit();
-       if (error) {
-               printk(KERN_WARNING "PS2ESDI: error initialising"
-                       " device, releasing resources\n");
-               unregister_blkdev(PS2ESDI_MAJOR, "ed");
-               blk_cleanup_queue(ps2esdi_queue);
-               return error;
-       }
-       return 0;
-}                              /* ps2esdi_init */
-
-#ifndef MODULE
-
-module_init(ps2esdi_init);
-
-#else
-
-static int cyl[MAX_HD] = {-1,-1};
-static int head[MAX_HD] = {-1, -1};
-static int sect[MAX_HD] = {-1, -1};
-
-module_param(tp720esdi, bool, 0);
-module_param_array(cyl, int, NULL, 0);
-module_param_array(head, int, NULL, 0);
-module_param_array(sect, int, NULL, 0);
-MODULE_LICENSE("GPL");
-
-int init_module(void) {
-       int drive;
-
-       for(drive = 0; drive < MAX_HD; drive++) {
-               struct ps2esdi_i_struct *info = &ps2esdi_info[drive];
-
-               if (cyl[drive] != -1) {
-                       info->cyl = info->lzone = cyl[drive];
-                       info->wpcom = 0;
-               }
-               if (head[drive] != -1) {
-                       info->head = head[drive];
-                       info->ctl = (head[drive] > 8 ? 8 : 0);
-               }
-               if (sect[drive] != -1) info->sect = sect[drive];
-       }
-       return ps2esdi_init();
-}
-
-void
-cleanup_module(void) {
-       int i;
-       if(ps2esdi_slot) {
-               mca_mark_as_unused(ps2esdi_slot);
-               mca_set_adapter_procfn(ps2esdi_slot, NULL, NULL);
-       }
-       release_region(io_base, 4);
-       free_dma(dma_arb_level);
-       free_irq(PS2ESDI_IRQ, &ps2esdi_gendisk);
-       unregister_blkdev(PS2ESDI_MAJOR, "ed");
-       blk_cleanup_queue(ps2esdi_queue);
-       for (i = 0; i < ps2esdi_drives; i++) {
-               del_gendisk(ps2esdi_gendisk[i]);
-               put_disk(ps2esdi_gendisk[i]);
-       }
-}
-#endif /* MODULE */
-
-/* handles boot time command line parameters */
-void __init tp720_setup(char *str, int *ints)
-{
-       /* no params, just sets the tp720esdi flag if it exists */
-
-       printk("%s: TP 720 ESDI flag set\n", DEVICE_NAME);
-       tp720esdi = 1;
-}
-
-void __init ed_setup(char *str, int *ints)
-{
-       int hdind = 0;
-
-       /* handles 3 parameters only - corresponding to
-          1. Number of cylinders
-          2. Number of heads
-          3. Sectors/track
-        */
-
-       if (ints[0] != 3)
-               return;
-
-       /* print out the information - seen at boot time */
-       printk("%s: ints[0]=%d ints[1]=%d ints[2]=%d ints[3]=%d\n",
-              DEVICE_NAME, ints[0], ints[1], ints[2], ints[3]);
-
-       /* set the index into device specific information table */
-       if (ps2esdi_info[0].head != 0)
-               hdind = 1;
-
-       /* set up all the device information */
-       ps2esdi_info[hdind].head = ints[2];
-       ps2esdi_info[hdind].sect = ints[3];
-       ps2esdi_info[hdind].cyl = ints[1];
-       ps2esdi_info[hdind].wpcom = 0;
-       ps2esdi_info[hdind].lzone = ints[1];
-       ps2esdi_info[hdind].ctl = (ints[2] > 8 ? 8 : 0);
-#if 0                          /* this may be needed for PS2/Mod.80, but it hurts ThinkPad! */
-       ps2esdi_drives = hdind + 1;     /* increment index for the next time */
-#endif
-}                              /* ed_setup */
-
-static int ps2esdi_getinfo(char *buf, int slot, void *d)
-{
-       int len = 0;
-
-       len += sprintf(buf + len, "DMA Arbitration Level: %d\n",
-                      dma_arb_level);
-       len += sprintf(buf + len, "IO Port: %x\n", io_base);
-       len += sprintf(buf + len, "IRQ: 14\n");
-       len += sprintf(buf + len, "Drives: %d\n", ps2esdi_drives);
-
-       return len;
-}
-
-/* ps2 esdi specific initialization - called thru the gendisk chain */
-static int __init ps2esdi_geninit(void)
-{
-       /*
-          The first part contains the initialization code
-          for the ESDI disk subsystem.  All we really do
-          is search for the POS registers of the controller
-          to do some simple setup operations.  First, we
-          must ensure that the controller is installed,
-          enabled, and configured as PRIMARY.  Then we must
-          determine the DMA arbitration level being used by
-          the controller so we can handle data transfer
-          operations properly.  If all of this works, then
-          we will set the INIT_FLAG to a non-zero value.
-        */
-
-       int slot = 0, i, reset_start, reset_end;
-       u_char status;
-       unsigned short adapterID;
-       int error = 0;
-
-       if ((slot = mca_find_adapter(INTG_ESDI_ID, 0)) != MCA_NOTFOUND) {
-               adapterID = INTG_ESDI_ID;
-               printk("%s: integrated ESDI adapter found in slot %d\n",
-                      DEVICE_NAME, slot+1);
-#ifndef MODULE
-               mca_set_adapter_name(slot, "PS/2 Integrated ESDI");
-#endif
-       } else if ((slot = mca_find_adapter(NRML_ESDI_ID, 0)) != -1) {
-               adapterID = NRML_ESDI_ID;
-               printk("%s: normal ESDI adapter found in slot %d\n",
-                      DEVICE_NAME, slot+1);
-               mca_set_adapter_name(slot, "PS/2 ESDI");
-       } else {
-               return -ENODEV;
-       }
-
-       ps2esdi_slot = slot;
-       mca_mark_as_used(slot);
-       mca_set_adapter_procfn(slot, (MCA_ProcFn) ps2esdi_getinfo, NULL);
-
-       /* Found the slot - read the POS register 2 to get the necessary
-          configuration and status information.  POS register 2 has the
-          following information :
-          Bit           Function
-          7             reserved = 0
-          6             arbitration method
-          0 - fairness enabled
-          1 - fairness disabled, linear priority assignment
-          5-2           arbitration level
-          1             alternate address
-          1              alternate address
-          0 - use addresses 0x3510 - 0x3517
-          0             adapter enable
-        */
-
-       status = mca_read_stored_pos(slot, 2);
-       /* is it enabled ? */
-       if (!(status & STATUS_ENABLED)) {
-               printk("%s: ESDI adapter disabled\n", DEVICE_NAME);
-               error = -ENODEV;
-               goto err_out1;
-       }
-       /* try to grab IRQ, and try to grab a slow IRQ if it fails, so we can
-          share with the SCSI driver */
-       if (request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler,
-                 IRQF_DISABLED | IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk)
-           && request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler,
-                          IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk)
-           ) {
-               printk("%s: Unable to get IRQ %d\n", DEVICE_NAME, PS2ESDI_IRQ);
-               error = -EBUSY;
-               goto err_out1;
-       }
-       if (status & STATUS_ALTERNATE)
-               io_base = ALT_IO_BASE;
-       else
-               io_base = PRIMARY_IO_BASE;
-
-       if (!request_region(io_base, 4, "ed")) {
-               printk(KERN_WARNING"Unable to request region 0x%x\n", io_base);
-               error = -EBUSY;
-               goto err_out2;
-       }
-       /* get the dma arbitration level */
-       dma_arb_level = (status >> 2) & 0xf;
-
-       /* BA */
-       printk("%s: DMA arbitration level : %d\n",
-              DEVICE_NAME, dma_arb_level);
-
-       LITE_ON;
-       current_int_handler = ps2esdi_initial_reset_int_handler;
-       reset_ctrl();
-       reset_status = 0;
-       reset_start = jiffies;
-       while (!reset_status) {
-               init_timer(&esdi_timer);
-               esdi_timer.expires = jiffies + HZ;
-               esdi_timer.data = 0;
-               add_timer(&esdi_timer);
-               sleep_on(&ps2esdi_int);
-       }
-       reset_end = jiffies;
-       LITE_OFF;
-       printk("%s: reset interrupt after %d jiffies,  %u.%02u secs\n",
-              DEVICE_NAME, reset_end - reset_start, (reset_end - reset_start) / HZ,
-              (reset_end - reset_start) % HZ);
-
-
-       /* Integrated ESDI Disk and Controller has only one drive! */
-       if (adapterID == INTG_ESDI_ID) {/* if not "normal" PS2 ESDI adapter */
-               ps2esdi_drives = 1;     /* then we have only one physical disk! */              intg_esdi = 1;
-       }
-
-
-
-       /* finally this part sets up some global data structures etc. */
-
-       ps2esdi_get_device_cfg();
-
-       /* some annoyance in the above routine returns TWO drives?
-        Is something else happining in the background?
-        Regaurdless we fix the # of drives again. AJK */
-       /* Integrated ESDI Disk and Controller has only one drive! */
-       if (adapterID == INTG_ESDI_ID)  /* if not "normal" PS2 ESDI adapter */
-               ps2esdi_drives = 1;     /* Not three or two, ONE DAMNIT! */
-
-       current_int_handler = ps2esdi_normal_interrupt_handler;
-
-       if (request_dma(dma_arb_level, "ed") !=0) {
-               printk(KERN_WARNING "PS2ESDI: Can't request dma-channel %d\n"
-                       ,(int) dma_arb_level);
-               error = -EBUSY;
-               goto err_out3;
-       }
-       blk_queue_max_sectors(ps2esdi_queue, 128);
-
-       error = -ENOMEM;
-       for (i = 0; i < ps2esdi_drives; i++) {
-               struct gendisk *disk = alloc_disk(64);
-               if (!disk)
-                       goto err_out4;
-               disk->major = PS2ESDI_MAJOR;
-               disk->first_minor = i<<6;
-               sprintf(disk->disk_name, "ed%c", 'a'+i);
-               disk->fops = &ps2esdi_fops;
-               ps2esdi_gendisk[i] = disk;
-       }
-
-       for (i = 0; i < ps2esdi_drives; i++) {
-               struct gendisk *disk = ps2esdi_gendisk[i];
-               set_capacity(disk, ps2esdi_info[i].head * ps2esdi_info[i].sect *
-                               ps2esdi_info[i].cyl);
-               disk->queue = ps2esdi_queue;
-               disk->private_data = &ps2esdi_info[i];
-               add_disk(disk);
-       }
-       return 0;
-err_out4:
-       while (i--)
-               put_disk(ps2esdi_gendisk[i]);
-err_out3:
-       release_region(io_base, 4);
-err_out2:
-       free_irq(PS2ESDI_IRQ, &ps2esdi_gendisk);
-err_out1:
-       if(ps2esdi_slot) {
-               mca_mark_as_unused(ps2esdi_slot);
-               mca_set_adapter_procfn(ps2esdi_slot, NULL, NULL);
-       }
-       return error;
-}
-
-static void __init ps2esdi_get_device_cfg(void)
-{
-       u_short cmd_blk[TYPE_0_CMD_BLK_LENGTH];
-
-       /*BA */ printk("%s: Drive 0\n", DEVICE_NAME);
-       current_int_handler = ps2esdi_geometry_int_handler;
-       cmd_blk[0] = CMD_GET_DEV_CONFIG | 0x600;
-       cmd_blk[1] = 0;
-       no_int_yet = TRUE;
-       ps2esdi_out_cmd_blk(cmd_blk);
-       if (no_int_yet)
-               sleep_on(&ps2esdi_int);
-
-       if (ps2esdi_drives > 1) {
-               printk("%s: Drive 1\n", DEVICE_NAME);   /*BA */
-               cmd_blk[0] = CMD_GET_DEV_CONFIG | (1 << 5) | 0x600;
-               cmd_blk[1] = 0;
-               no_int_yet = TRUE;
-               ps2esdi_out_cmd_blk(cmd_blk);
-               if (no_int_yet)
-                       sleep_on(&ps2esdi_int);
-       }                       /* if second physical drive is present */
-       return;
-}
-
-/* strategy routine that handles most of the IO requests */
-static void do_ps2esdi_request(struct request_queue * q)
-{
-       struct request *req;
-       /* since, this routine is called with interrupts cleared - they 
-          must be before it finishes  */
-
-       req = elv_next_request(q);
-       if (!req)
-               return;
-
-#if 0
-       printk("%s:got request. device : %s command : %d  sector : %ld count : %ld, buffer: %p\n",
-              DEVICE_NAME,
-              req->rq_disk->disk_name,
-              req->cmd, req->sector,
-              req->current_nr_sectors, req->buffer);
-#endif
-
-       /* check for above 16Mb dmas */
-       if (isa_virt_to_bus(req->buffer + req->current_nr_sectors * 512) > 16 * MB) {
-               printk("%s: DMA above 16MB not supported\n", DEVICE_NAME);
-               end_request(req, FAIL);
-               return;
-       }
-
-       if (req->sector+req->current_nr_sectors > get_capacity(req->rq_disk)) {
-               printk("Grrr. error. ps2esdi_drives: %d, %llu %llu\n",
-                   ps2esdi_drives, req->sector,
-                   (unsigned long long)get_capacity(req->rq_disk));
-               end_request(req, FAIL);
-               return;
-       }
-
-       switch (rq_data_dir(req)) {
-       case READ:
-               ps2esdi_readwrite(READ, req);
-               break;
-       case WRITE:
-               ps2esdi_readwrite(WRITE, req);
-               break;
-       default:
-               printk("%s: Unknown command\n", req->rq_disk->disk_name);
-               end_request(req, FAIL);
-               break;
-       }               /* handle different commands */
-}                              /* main strategy routine */
-
-/* resets the ESDI adapter */
-static void reset_ctrl(void)
-{
-
-       u_long expire;
-       u_short status;
-
-       /* enable interrupts on the controller */
-       status = inb(ESDI_INTRPT);
-       outb((status & 0xe0) | ATT_EOI, ESDI_ATTN);     /* to be sure we don't have
-                                                          any interrupt pending... */
-       outb_p(CTRL_ENABLE_INTR, ESDI_CONTROL);
-
-       /* read the ESDI status port - if the controller is not busy,
-          simply do a soft reset (fast) - otherwise we'll have to do a
-          hard (slow) reset.  */
-       if (!(inb_p(ESDI_STATUS) & STATUS_BUSY)) {
-               /*BA */ printk("%s: soft reset...\n", DEVICE_NAME);
-               outb_p(CTRL_SOFT_RESET, ESDI_ATTN);
-       }
-       /* soft reset */ 
-       else {
-               /*BA */
-               printk("%s: hard reset...\n", DEVICE_NAME);
-               outb_p(CTRL_HARD_RESET, ESDI_CONTROL);
-               expire = jiffies + 2*HZ;
-               while (time_before(jiffies, expire));
-               outb_p(1, ESDI_CONTROL);
-       }                       /* hard reset */
-
-
-}                              /* reset the controller */
-
-/* called by the strategy routine to handle read and write requests */
-static void ps2esdi_readwrite(int cmd, struct request *req)
-{
-       struct ps2esdi_i_struct *p = req->rq_disk->private_data;
-       unsigned block = req->sector;
-       unsigned count = req->current_nr_sectors;
-       int drive = p - ps2esdi_info;
-       u_short track, head, cylinder, sector;
-       u_short cmd_blk[TYPE_1_CMD_BLK_LENGTH];
-
-       /* do some relevant arithmatic */
-       track = block / p->sect;
-       head = track % p->head;
-       cylinder = track / p->head;
-       sector = block % p->sect;
-
-#if 0
-       printk("%s: cyl=%d head=%d sect=%d\n", DEVICE_NAME, cylinder, head, sector);
-#endif
-       /* call the routine that actually fills out a command block */
-       ps2esdi_fill_cmd_block
-           (cmd_blk,
-            (cmd == READ) ? CMD_READ : CMD_WRITE,
-            cylinder, head, sector, count, drive);
-
-       /* send the command block to the controller */
-       current_req = req;
-       spin_unlock_irq(&ps2esdi_lock);
-       if (ps2esdi_out_cmd_blk(cmd_blk)) {
-               spin_lock_irq(&ps2esdi_lock);
-               printk("%s: Controller failed\n", DEVICE_NAME);
-               if ((++req->errors) >= MAX_RETRIES)
-                       end_request(req, FAIL);
-       }
-       /* check for failure to put out the command block */ 
-       else {
-               spin_lock_irq(&ps2esdi_lock);
-#if 0
-               printk("%s: waiting for xfer\n", DEVICE_NAME);
-#endif
-               /* turn disk lights on */
-               LITE_ON;
-       }
-
-}                              /* ps2esdi_readwrite */
-
-/* fill out the command block */
-static void ps2esdi_fill_cmd_block(u_short * cmd_blk, u_short cmd,
- u_short cyl, u_short head, u_short sector, u_short length, u_char drive)
-{
-
-       cmd_blk[0] = (drive << 5) | cmd;
-       cmd_blk[1] = length;
-       cmd_blk[2] = ((cyl & 0x1f) << 11) | (head << 5) | sector;
-       cmd_blk[3] = (cyl & 0x3E0) >> 5;
-
-}                              /* fill out the command block */
-
-/* write a command block to the controller */
-static int ps2esdi_out_cmd_blk(u_short * cmd_blk)
-{
-
-       int i;
-       unsigned long jif;
-       u_char status;
-
-       /* enable interrupts */
-       outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-
-       /* do not write to the controller, if it is busy */
-       for (jif = jiffies + ESDI_STAT_TIMEOUT;
-               time_after(jif, jiffies) &&
-                       (inb(ESDI_STATUS) & STATUS_BUSY); )
-               ;
-
-#if 0
-       printk("%s: i(1)=%ld\n", DEVICE_NAME, jif);
-#endif
-
-       /* if device is still busy - then just time out */
-       if (inb(ESDI_STATUS) & STATUS_BUSY) {
-               printk("%s: ps2esdi_out_cmd timed out (1)\n", DEVICE_NAME);
-               return ERROR;
-       }                       /* timeout ??? */
-       /* Set up the attention register in the controller */
-       outb(((*cmd_blk) & 0xE0) | 1, ESDI_ATTN);
-
-#if 0
-       printk("%s: sending %d words to controller\n", DEVICE_NAME, (((*cmd_blk) >> 14) + 1) << 1);
-#endif
-
-       /* one by one send each word out */
-       for (i = (((*cmd_blk) >> 14) + 1) << 1; i; i--) {
-               status = inb(ESDI_STATUS);
-               for (jif = jiffies + ESDI_STAT_TIMEOUT;
-                    time_after(jif, jiffies) && (status & STATUS_BUSY) &&
-                  (status & STATUS_CMD_INF); status = inb(ESDI_STATUS));
-               if ((status & (STATUS_BUSY | STATUS_CMD_INF)) == STATUS_BUSY) {
-#if 0
-                       printk("%s: sending %04X\n", DEVICE_NAME, *cmd_blk);
-#endif
-                       outw(*cmd_blk++, ESDI_CMD_INT);
-               } else {
-                       printk("%s: ps2esdi_out_cmd timed out while sending command (status=%02X)\n",
-                              DEVICE_NAME, status);
-                       return ERROR;
-               }
-       }                       /* send all words out */
-       return OK;
-}                              /* send out the commands */
-
-
-/* prepare for dma - do all the necessary setup */
-static void ps2esdi_prep_dma(char *buffer, u_short length, u_char dma_xmode)
-{
-       unsigned long flags = claim_dma_lock();
-
-       mca_disable_dma(dma_arb_level);
-
-       mca_set_dma_addr(dma_arb_level, isa_virt_to_bus(buffer));
-
-       mca_set_dma_count(dma_arb_level, length * 512 / 2);
-
-       mca_set_dma_mode(dma_arb_level, dma_xmode);
-
-       mca_enable_dma(dma_arb_level);
-
-       release_dma_lock(flags);
-
-}                              /* prepare for dma */
-
-
-
-static irqreturn_t ps2esdi_interrupt_handler(int irq, void *dev_id)
-{
-       u_int int_ret_code;
-
-       if (inb(ESDI_STATUS) & STATUS_INTR) {
-               int_ret_code = inb(ESDI_INTRPT);
-               if (current_int_handler) {
-                       /* Disable adapter interrupts till processing is finished */
-                       outb(CTRL_DISABLE_INTR, ESDI_CONTROL);
-                       current_int_handler(int_ret_code);
-               } else
-                       printk("%s: help ! No interrupt handler.\n", DEVICE_NAME);
-       } else {
-               return IRQ_NONE;
-       }
-       return IRQ_HANDLED;
-}
-
-static void ps2esdi_initial_reset_int_handler(u_int int_ret_code)
-{
-
-       switch (int_ret_code & 0xf) {
-       case INT_RESET:
-               /*BA */
-               printk("%s: initial reset completed.\n", DEVICE_NAME);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               wake_up(&ps2esdi_int);
-               break;
-       case INT_ATTN_ERROR:
-               printk("%s: Attention error. interrupt status : %02X\n", DEVICE_NAME,
-                      int_ret_code);
-               printk("%s: status: %02x\n", DEVICE_NAME, inb(ESDI_STATUS));
-               break;
-       default:
-               printk("%s: initial reset handler received interrupt: %02X\n",
-                      DEVICE_NAME, int_ret_code);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               break;
-       }
-       outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-}
-
-
-static void ps2esdi_geometry_int_handler(u_int int_ret_code)
-{
-       u_int status, drive_num;
-       unsigned long rba;
-       int i;
-
-       drive_num = int_ret_code >> 5;
-       switch (int_ret_code & 0xf) {
-       case INT_CMD_COMPLETE:
-               for (i = ESDI_TIMEOUT; i && !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL); i--);
-               if (!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) {
-                       printk("%s: timeout reading status word\n", DEVICE_NAME);
-                       outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-                       break;
-               }
-               status = inw(ESDI_STT_INT);
-               if ((status & 0x1F) == CMD_GET_DEV_CONFIG) {
-#define REPLY_WORDS 5          /* we already read word 0 */
-                       u_short reply[REPLY_WORDS];
-
-                       if (ps2esdi_read_status_words((status >> 8) - 1, REPLY_WORDS, reply)) {
-                               /*BA */
-                               printk("%s: Device Configuration Status for drive %u\n",
-                                      DEVICE_NAME, drive_num);
-
-                               printk("%s: Spares/cyls: %u", DEVICE_NAME, reply[0] >> 8);
-
-                               printk
-                                   ("Config bits: %s%s%s%s%s\n",
-                                    (reply[0] & CONFIG_IS) ? "Invalid Secondary, " : "",
-                                    ((reply[0] & CONFIG_ZD) && !(reply[0] & CONFIG_IS))
-                                ? "Zero Defect, " : "Defects Present, ",
-                                    (reply[0] & CONFIG_SF) ? "Skewed Format, " : "",
-                                    (reply[0] & CONFIG_FR) ? "Removable, " : "Non-Removable, ",
-                                    (reply[0] & CONFIG_RT) ? "No Retries" : "Retries");
-
-                               rba = reply[1] | ((unsigned long) reply[2] << 16);
-                               printk("%s: Number of RBA's: %lu\n", DEVICE_NAME, rba);
-
-                               printk("%s: Physical number of cylinders: %u, Sectors/Track: %u, Heads: %u\n",
-                                      DEVICE_NAME, reply[3], reply[4] >> 8, reply[4] & 0xff);
-
-                               if (!ps2esdi_info[drive_num].head) {
-                                       ps2esdi_info[drive_num].head = 64;
-                                       ps2esdi_info[drive_num].sect = 32;
-                                       ps2esdi_info[drive_num].cyl = rba / (64 * 32);
-                                       ps2esdi_info[drive_num].wpcom = 0;
-                                       ps2esdi_info[drive_num].lzone = ps2esdi_info[drive_num].cyl;
-                                       ps2esdi_info[drive_num].ctl = 8;
-                                       if (tp720esdi) {        /* store the retrieved parameters */
-                                               ps2esdi_info[0].head = reply[4] & 0Xff;
-                                               ps2esdi_info[0].sect = reply[4] >> 8;
-                                               ps2esdi_info[0].cyl = reply[3];
-                                               ps2esdi_info[0].wpcom = 0;
-                                               ps2esdi_info[0].lzone = reply[3];
-                                       } else {
-                                               if (!intg_esdi)
-                                                       ps2esdi_drives++;
-                                       }
-                               }
-#ifdef OBSOLETE
-                               if (!ps2esdi_info[drive_num].head) {
-                                       ps2esdi_info[drive_num].head = reply[4] & 0Xff;
-                                       ps2esdi_info[drive_num].sect = reply[4] >> 8;
-                                       ps2esdi_info[drive_num].cyl = reply[3];
-                                       ps2esdi_info[drive_num].wpcom = 0;
-                                       ps2esdi_info[drive_num].lzone = reply[3];
-                                       if (tp720esdi) {        /* store the retrieved parameters */
-                                               ps2esdi_info[0].head = reply[4] & 0Xff;
-                                               ps2esdi_info[0].sect = reply[4] >> 8;
-                                               ps2esdi_info[0].cyl = reply[3];
-                                               ps2esdi_info[0].wpcom = 0;
-                                               ps2esdi_info[0].lzone = reply[3];
-                                       } else {
-                                               ps2esdi_drives++;
-                                       }
-                               }
-#endif
-
-                       } else
-                               printk("%s: failed while getting device config\n", DEVICE_NAME);
-#undef REPLY_WORDS
-               } else
-                       printk("%s: command %02X unknown by geometry handler\n",
-                              DEVICE_NAME, status & 0x1f);
-
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               break;
-
-       case INT_ATTN_ERROR:
-               printk("%s: Attention error. interrupt status : %02X\n", DEVICE_NAME,
-                      int_ret_code);
-               printk("%s: Device not available\n", DEVICE_NAME);
-               break;
-       case INT_CMD_ECC:
-       case INT_CMD_RETRY:
-       case INT_CMD_ECC_RETRY:
-       case INT_CMD_WARNING:
-       case INT_CMD_ABORT:
-       case INT_CMD_FAILED:
-       case INT_DMA_ERR:
-       case INT_CMD_BLK_ERR:
-               /*BA */ printk("%s: Whaa. Error occurred...\n", DEVICE_NAME);
-               dump_cmd_complete_status(int_ret_code);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               break;
-       default:
-               printk("%s: Unknown interrupt reason: %02X\n",
-                      DEVICE_NAME, int_ret_code & 0xf);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               break;
-       }
-
-       wake_up(&ps2esdi_int);
-       no_int_yet = FALSE;
-       outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-
-}
-
-static void ps2esdi_normal_interrupt_handler(u_int int_ret_code)
-{
-       unsigned long flags;
-       u_int status;
-       u_int ending;
-       int i;
-
-       switch (int_ret_code & 0x0f) {
-       case INT_TRANSFER_REQ:
-               ps2esdi_prep_dma(current_req->buffer,
-                                current_req->current_nr_sectors,
-                   (rq_data_dir(current_req) == READ)
-                   ? MCA_DMA_MODE_16 | MCA_DMA_MODE_WRITE | MCA_DMA_MODE_XFER
-                   : MCA_DMA_MODE_16 | MCA_DMA_MODE_READ);
-               outb(CTRL_ENABLE_DMA | CTRL_ENABLE_INTR, ESDI_CONTROL);
-               ending = -1;
-               break;
-
-       case INT_ATTN_ERROR:
-               printk("%s: Attention error. interrupt status : %02X\n", DEVICE_NAME,
-                      int_ret_code);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               ending = FAIL;
-               break;
-
-       case INT_CMD_COMPLETE:
-               for (i = ESDI_TIMEOUT; i && !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL); i--);
-               if (!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) {
-                       printk("%s: timeout reading status word\n", DEVICE_NAME);
-                       outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-                       outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-                       if ((++current_req->errors) >= MAX_RETRIES)
-                               ending = FAIL;
-                       else
-                               ending = -1;
-                       break;
-               }
-               status = inw(ESDI_STT_INT);
-               switch (status & 0x1F) {
-               case (CMD_READ & 0xff):
-               case (CMD_WRITE & 0xff):
-                       LITE_OFF;
-                       outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-                       outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-                       ending = SUCCES;
-                       break;
-               default:
-                       printk("%s: interrupt for unknown command %02X\n",
-                              DEVICE_NAME, status & 0x1f);
-                       outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-                       outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-                       ending = -1;
-                       break;
-               }
-               break;
-       case INT_CMD_ECC:
-       case INT_CMD_RETRY:
-       case INT_CMD_ECC_RETRY:
-               LITE_OFF;
-               dump_cmd_complete_status(int_ret_code);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               ending = SUCCES;
-               break;
-       case INT_CMD_WARNING:
-       case INT_CMD_ABORT:
-       case INT_CMD_FAILED:
-       case INT_DMA_ERR:
-               LITE_OFF;
-               dump_cmd_complete_status(int_ret_code);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               if ((++current_req->errors) >= MAX_RETRIES)
-                       ending = FAIL;
-               else
-                       ending = -1;
-               break;
-
-       case INT_CMD_BLK_ERR:
-               dump_cmd_complete_status(int_ret_code);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               ending = FAIL;
-               break;
-
-       case INT_CMD_FORMAT:
-               printk("%s: huh ? Who issued this format command ?\n"
-                      ,DEVICE_NAME);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               ending = -1;
-               break;
-
-       case INT_RESET:
-               /* BA printk("%s: reset completed.\n", DEVICE_NAME) */ ;
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               ending = -1;
-               break;
-
-       default:
-               printk("%s: Unknown interrupt reason: %02X\n",
-                      DEVICE_NAME, int_ret_code & 0xf);
-               outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               ending = -1;
-               break;
-       }
-       if(ending != -1) {
-               spin_lock_irqsave(&ps2esdi_lock, flags);
-               end_request(current_req, ending);
-               current_req = NULL;
-               do_ps2esdi_request(ps2esdi_queue);
-               spin_unlock_irqrestore(&ps2esdi_lock, flags);
-       }
-}                              /* handle interrupts */
-
-
-
-static int ps2esdi_read_status_words(int num_words,
-                                    int max_words,
-                                    u_short * buffer)
-{
-       int i;
-
-       for (; max_words && num_words; max_words--, num_words--, buffer++) {
-               for (i = ESDI_TIMEOUT; i && !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL); i--);
-               if (!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) {
-                       printk("%s: timeout reading status word\n", DEVICE_NAME);
-                       return FAIL;
-               }
-               *buffer = inw(ESDI_STT_INT);
-       }
-       return SUCCES;
-}
-
-
-
-
-static void dump_cmd_complete_status(u_int int_ret_code)
-{
-#define WAIT_FOR_STATUS \
-  for(i=ESDI_TIMEOUT;i && !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL);i--); \
-    if(!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) { \
-    printk("%s: timeout reading status word\n",DEVICE_NAME); \
-    return; \
-    }
-
-       int i, word_count;
-       u_short stat_word;
-       u_long rba;
-
-       printk("%s: Device: %u, interrupt ID: %02X\n",
-              DEVICE_NAME, int_ret_code >> 5,
-              int_ret_code & 0xf);
-
-       WAIT_FOR_STATUS;
-       stat_word = inw(ESDI_STT_INT);
-       word_count = (stat_word >> 8) - 1;
-       printk("%s: %u status words, command: %02X\n", DEVICE_NAME, word_count,
-              stat_word & 0xff);
-
-       if (word_count--) {
-               WAIT_FOR_STATUS;
-               stat_word = inw(ESDI_STT_INT);
-               printk("%s: command status code: %02X, command error code: %02X\n",
-                      DEVICE_NAME, stat_word >> 8, stat_word & 0xff);
-       }
-       if (word_count--) {
-               WAIT_FOR_STATUS;
-               stat_word = inw(ESDI_STT_INT);
-               printk("%s: device error code: %s%s%s%s%s,%02X\n", DEVICE_NAME,
-                      (stat_word & 0x1000) ? "Ready, " : "Not Ready, ",
-                 (stat_word & 0x0800) ? "Selected, " : "Not Selected, ",
-                      (stat_word & 0x0400) ? "Write Fault, " : "",
-                      (stat_word & 0x0200) ? "Track 0, " : "",
-               (stat_word & 0x0100) ? "Seek or command complete, " : "",
-                      stat_word >> 8);
-       }
-       if (word_count--) {
-               WAIT_FOR_STATUS;
-               stat_word = inw(ESDI_STT_INT);
-               printk("%s: Blocks to do: %u", DEVICE_NAME, stat_word);
-       }
-       if (word_count -= 2) {
-               WAIT_FOR_STATUS;
-               rba = inw(ESDI_STT_INT);
-               WAIT_FOR_STATUS;
-               rba |= inw(ESDI_STT_INT) << 16;
-               printk(", Last Cyl: %u Head: %u Sector: %u\n",
-                      (u_short) ((rba & 0x1ff80000) >> 11),
-                (u_short) ((rba & 0x7E0) >> 5), (u_short) (rba & 0x1f));
-       } else
-               printk("\n");
-
-       if (word_count--) {
-               WAIT_FOR_STATUS;
-               stat_word = inw(ESDI_STT_INT);
-               printk("%s: Blocks required ECC: %u", DEVICE_NAME, stat_word);
-       }
-       printk("\n");
-
-#undef WAIT_FOR_STATUS
-
-}
-
-static int ps2esdi_getgeo(struct block_device *bdev, struct hd_geometry *geo)
-{
-       struct ps2esdi_i_struct *p = bdev->bd_disk->private_data;
-
-       geo->heads = p->head;
-       geo->sectors = p->sect;
-       geo->cylinders = p->cyl;
-       return 0;
-}
-
-static void ps2esdi_reset_timer(unsigned long unused)
-{
-
-       int status;
-
-       status = inb(ESDI_INTRPT);
-       if ((status & 0xf) == INT_RESET) {
-               outb((status & 0xe0) | ATT_EOI, ESDI_ATTN);
-               outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-               reset_status = 1;
-       }
-       wake_up(&ps2esdi_int);
-}
index 9e61fca46117e618677483aa74c2ac90c310352c..41ca721d2523fec5987e02db1e9e7a26f35f60bb 100644 (file)
@@ -528,8 +528,7 @@ static int block_event_to_scatterlist(const struct vioblocklpevent *bevent,
                numsg = VIOMAXBLOCKDMA;
 
        *total_len = 0;
-       memset(sg, 0, sizeof(sg[0]) * VIOMAXBLOCKDMA);
-
+       sg_init_table(sg, VIOMAXBLOCKDMA);
        for (i = 0; (i < numsg) && (rw_data->dma_info[i].len > 0); ++i) {
                sg_dma_address(&sg[i]) = rw_data->dma_info[i].token;
                sg_dma_len(&sg[i]) = rw_data->dma_info[i].len;
index 3b1a68d6eddb3c0860794c778a643340b59ec920..0cfbe8c594a55c208a7727cc20a86db0e33ba704 100644 (file)
@@ -238,6 +238,7 @@ static int virtblk_probe(struct virtio_device *vdev)
        vblk->disk->first_minor = index_to_minor(index);
        vblk->disk->private_data = vblk;
        vblk->disk->fops = &virtblk_fops;
+       vblk->disk->driverfs_dev = &vdev->dev;
        index++;
 
        /* If barriers are supported, tell block layer that queue is ordered */
index f16c94cbf4888addf06fa0c8b29eb0f494d56c4a..8b884f87d8b7be56d4a290469cab518ebac62ba9 100644 (file)
@@ -149,6 +149,9 @@ static struct usb_device_id blacklist_ids[] = {
        { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC },
        { USB_DEVICE(0x0400, 0x080a), .driver_info = HCI_BROKEN_ISOC },
 
+       /* CONWISE Technology based adapters with buggy SCO support */
+       { USB_DEVICE(0x0e5e, 0x6622), .driver_info = HCI_BROKEN_ISOC },
+
        /* Belkin F8T012 and F8T013 devices */
        { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
        { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
index d352dbb4ccf7423f9bddca0bb9cc83cc055164f4..e5a0e97cfdda63b1e386013239d549368eaf4bf4 100644 (file)
 
 # define ATI_PCIGART_PAGE_SIZE         4096    /**< PCI GART page size */
 
-static void *drm_ati_alloc_pcigart_table(int order)
+static int drm_ati_alloc_pcigart_table(struct drm_device *dev,
+                                      struct drm_ati_pcigart_info *gart_info)
 {
-       unsigned long address;
-       struct page *page;
-       int i;
-
-       DRM_DEBUG("%d order\n", order);
-
-       address = __get_free_pages(GFP_KERNEL | __GFP_COMP,
-                                  order);
-       if (address == 0UL) {
-               return NULL;
-       }
-
-       page = virt_to_page(address);
+       gart_info->table_handle = drm_pci_alloc(dev, gart_info->table_size,
+                                               PAGE_SIZE,
+                                               gart_info->table_mask);
+       if (gart_info->table_handle == NULL)
+               return -ENOMEM;
 
-       for (i = 0; i < order; i++, page++)
-               SetPageReserved(page);
-
-       DRM_DEBUG("returning 0x%08lx\n", address);
-       return (void *)address;
+       return 0;
 }
 
-static void drm_ati_free_pcigart_table(void *address, int order)
+static void drm_ati_free_pcigart_table(struct drm_device *dev,
+                                      struct drm_ati_pcigart_info *gart_info)
 {
-       struct page *page;
-       int i;
-       int num_pages = 1 << order;
-       DRM_DEBUG("\n");
-
-       page = virt_to_page((unsigned long)address);
-
-       for (i = 0; i < num_pages; i++, page++)
-               ClearPageReserved(page);
-
-       free_pages((unsigned long)address, order);
+       drm_pci_free(dev, gart_info->table_handle);
+       gart_info->table_handle = NULL;
 }
 
 int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info)
@@ -78,8 +59,7 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
        struct drm_sg_mem *entry = dev->sg;
        unsigned long pages;
        int i;
-       int order;
-       int num_pages, max_pages;
+       int max_pages;
 
        /* we need to support large memory configurations */
        if (!entry) {
@@ -87,15 +67,7 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
                return 0;
        }
 
-       order = drm_order((gart_info->table_size + (PAGE_SIZE-1)) / PAGE_SIZE);
-       num_pages = 1 << order;
-
        if (gart_info->bus_addr) {
-               if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) {
-                       pci_unmap_single(dev->pdev, gart_info->bus_addr,
-                                        num_pages * PAGE_SIZE,
-                                        PCI_DMA_TODEVICE);
-               }
 
                max_pages = (gart_info->table_size / sizeof(u32));
                pages = (entry->pages <= max_pages)
@@ -112,10 +84,9 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
                        gart_info->bus_addr = 0;
        }
 
-       if (gart_info->gart_table_location == DRM_ATI_GART_MAIN
-           && gart_info->addr) {
-               drm_ati_free_pcigart_table(gart_info->addr, order);
-               gart_info->addr = NULL;
+       if (gart_info->gart_table_location == DRM_ATI_GART_MAIN &&
+           gart_info->table_handle) {
+               drm_ati_free_pcigart_table(dev, gart_info);
        }
 
        return 1;
@@ -127,11 +98,10 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
        struct drm_sg_mem *entry = dev->sg;
        void *address = NULL;
        unsigned long pages;
-       u32 *pci_gart, page_base, bus_address = 0;
+       u32 *pci_gart, page_base;
+       dma_addr_t bus_address = 0;
        int i, j, ret = 0;
-       int order;
        int max_pages;
-       int num_pages;
 
        if (!entry) {
                DRM_ERROR("no scatter/gather memory!\n");
@@ -141,31 +111,14 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
        if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) {
                DRM_DEBUG("PCI: no table in VRAM: using normal RAM\n");
 
-               order = drm_order((gart_info->table_size +
-                                  (PAGE_SIZE-1)) / PAGE_SIZE);
-               num_pages = 1 << order;
-               address = drm_ati_alloc_pcigart_table(order);
-               if (!address) {
+               ret = drm_ati_alloc_pcigart_table(dev, gart_info);
+               if (ret) {
                        DRM_ERROR("cannot allocate PCI GART page!\n");
                        goto done;
                }
 
-               if (!dev->pdev) {
-                       DRM_ERROR("PCI device unknown!\n");
-                       goto done;
-               }
-
-               bus_address = pci_map_single(dev->pdev, address,
-                                            num_pages * PAGE_SIZE,
-                                            PCI_DMA_TODEVICE);
-               if (bus_address == 0) {
-                       DRM_ERROR("unable to map PCIGART pages!\n");
-                       order = drm_order((gart_info->table_size +
-                                          (PAGE_SIZE-1)) / PAGE_SIZE);
-                       drm_ati_free_pcigart_table(address, order);
-                       address = NULL;
-                       goto done;
-               }
+               address = gart_info->table_handle->vaddr;
+               bus_address = gart_info->table_handle->busaddr;
        } else {
                address = gart_info->addr;
                bus_address = gart_info->bus_addr;
index a6789f25009b4858c1370104883601220f83be79..8ea9dd1717a9dc9b383120e7bbe730229d4e678c 100644 (file)
@@ -54,6 +54,7 @@
 #include <linux/pci.h>
 #include <linux/jiffies.h>
 #include <linux/smp_lock.h>    /* For (un)lock_kernel */
+#include <linux/dma-mapping.h>
 #include <linux/mm.h>
 #include <linux/cdev.h>
 #include <linux/mutex.h>
@@ -551,6 +552,8 @@ struct drm_ati_pcigart_info {
        int gart_reg_if;
        void *addr;
        dma_addr_t bus_addr;
+       dma_addr_t table_mask;
+       struct drm_dma_handle *table_handle;
        drm_local_map_t mapping;
        int table_size;
 };
index 3992f73299cc8e161ffd67db642040051a9c8243..f09d4b5002b0f19e8ec9421cce760d03ce7d7178 100644 (file)
@@ -326,6 +326,7 @@ int drm_release(struct inode *inode, struct file *filp)
        struct drm_file *file_priv = filp->private_data;
        struct drm_device *dev = file_priv->head->dev;
        int retcode = 0;
+       unsigned long irqflags;
 
        lock_kernel();
 
@@ -357,9 +358,11 @@ int drm_release(struct inode *inode, struct file *filp)
                         */
 
                        do{
-                               spin_lock(&dev->lock.spinlock);
+                               spin_lock_irqsave(&dev->lock.spinlock,
+                                                 irqflags);
                                locked = dev->lock.idle_has_lock;
-                               spin_unlock(&dev->lock.spinlock);
+                               spin_unlock_irqrestore(&dev->lock.spinlock,
+                                                      irqflags);
                                if (locked)
                                        break;
                                schedule();
index bea2a7d5b2b22f695d3c6131d2068450ed55f074..12dcdd1832f080b57574d02ecd4acfc6076ecd88 100644 (file)
@@ -53,6 +53,7 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
        DECLARE_WAITQUEUE(entry, current);
        struct drm_lock *lock = data;
        int ret = 0;
+       unsigned long irqflags;
 
        ++file_priv->lock_count;
 
@@ -71,9 +72,9 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
                        return -EINVAL;
 
        add_wait_queue(&dev->lock.lock_queue, &entry);
-       spin_lock(&dev->lock.spinlock);
+       spin_lock_irqsave(&dev->lock.spinlock, irqflags);
        dev->lock.user_waiters++;
-       spin_unlock(&dev->lock.spinlock);
+       spin_unlock_irqrestore(&dev->lock.spinlock, irqflags);
        for (;;) {
                __set_current_state(TASK_INTERRUPTIBLE);
                if (!dev->lock.hw_lock) {
@@ -95,9 +96,9 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
                        break;
                }
        }
-       spin_lock(&dev->lock.spinlock);
+       spin_lock_irqsave(&dev->lock.spinlock, irqflags);
        dev->lock.user_waiters--;
-       spin_unlock(&dev->lock.spinlock);
+       spin_unlock_irqrestore(&dev->lock.spinlock, irqflags);
        __set_current_state(TASK_RUNNING);
        remove_wait_queue(&dev->lock.lock_queue, &entry);
 
@@ -198,8 +199,9 @@ int drm_lock_take(struct drm_lock_data *lock_data,
 {
        unsigned int old, new, prev;
        volatile unsigned int *lock = &lock_data->hw_lock->lock;
+       unsigned long irqflags;
 
-       spin_lock(&lock_data->spinlock);
+       spin_lock_irqsave(&lock_data->spinlock, irqflags);
        do {
                old = *lock;
                if (old & _DRM_LOCK_HELD)
@@ -211,7 +213,7 @@ int drm_lock_take(struct drm_lock_data *lock_data,
                }
                prev = cmpxchg(lock, old, new);
        } while (prev != old);
-       spin_unlock(&lock_data->spinlock);
+       spin_unlock_irqrestore(&lock_data->spinlock, irqflags);
 
        if (_DRM_LOCKING_CONTEXT(old) == context) {
                if (old & _DRM_LOCK_HELD) {
@@ -272,15 +274,16 @@ int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context)
 {
        unsigned int old, new, prev;
        volatile unsigned int *lock = &lock_data->hw_lock->lock;
+       unsigned long irqflags;
 
-       spin_lock(&lock_data->spinlock);
+       spin_lock_irqsave(&lock_data->spinlock, irqflags);
        if (lock_data->kernel_waiters != 0) {
                drm_lock_transfer(lock_data, 0);
                lock_data->idle_has_lock = 1;
-               spin_unlock(&lock_data->spinlock);
+               spin_unlock_irqrestore(&lock_data->spinlock, irqflags);
                return 1;
        }
-       spin_unlock(&lock_data->spinlock);
+       spin_unlock_irqrestore(&lock_data->spinlock, irqflags);
 
        do {
                old = *lock;
@@ -344,19 +347,20 @@ static int drm_notifier(void *priv)
 void drm_idlelock_take(struct drm_lock_data *lock_data)
 {
        int ret = 0;
+       unsigned long irqflags;
 
-       spin_lock(&lock_data->spinlock);
+       spin_lock_irqsave(&lock_data->spinlock, irqflags);
        lock_data->kernel_waiters++;
        if (!lock_data->idle_has_lock) {
 
-               spin_unlock(&lock_data->spinlock);
+               spin_unlock_irqrestore(&lock_data->spinlock, irqflags);
                ret = drm_lock_take(lock_data, DRM_KERNEL_CONTEXT);
-               spin_lock(&lock_data->spinlock);
+               spin_lock_irqsave(&lock_data->spinlock, irqflags);
 
                if (ret == 1)
                        lock_data->idle_has_lock = 1;
        }
-       spin_unlock(&lock_data->spinlock);
+       spin_unlock_irqrestore(&lock_data->spinlock, irqflags);
 }
 EXPORT_SYMBOL(drm_idlelock_take);
 
@@ -364,8 +368,9 @@ void drm_idlelock_release(struct drm_lock_data *lock_data)
 {
        unsigned int old, prev;
        volatile unsigned int *lock = &lock_data->hw_lock->lock;
+       unsigned long irqflags;
 
-       spin_lock(&lock_data->spinlock);
+       spin_lock_irqsave(&lock_data->spinlock, irqflags);
        if (--lock_data->kernel_waiters == 0) {
                if (lock_data->idle_has_lock) {
                        do {
@@ -376,7 +381,7 @@ void drm_idlelock_release(struct drm_lock_data *lock_data)
                        lock_data->idle_has_lock = 0;
                }
        }
-       spin_unlock(&lock_data->spinlock);
+       spin_unlock_irqrestore(&lock_data->spinlock, irqflags);
 }
 EXPORT_SYMBOL(drm_idlelock_release);
 
index 715b361f0c2b37d39bb27f9b663b305c58761fbb..a6a499f97e2281980221fb65e172fb922fc12314 100644 (file)
        {0x1002, 0x71D6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV530|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x71DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV530|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x71DE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV530|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
-       {0x1002, 0x7200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV530|RADEON_NEW_MEMMAP}, \
-       {0x1002, 0x7210, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV530|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
-       {0x1002, 0x7211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV530|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x7200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV515|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x7210, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV515|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
+       {0x1002, 0x7211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV515|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x7240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R580|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x7243, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R580|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x7244, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R580|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x7834, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x7835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
        {0x1002, 0x791e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
+       {0x1002, 0x791f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
        {0, 0, 0}
 
 #define r128_PCI_IDS \
index 892e0a58984669ccbfdce83aba673e23fadb7cb1..f36adbd3aaf5cccac2db4e48921f484f3d3d076e 100644 (file)
@@ -558,6 +558,7 @@ static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init)
 #if __OS_HAS_AGP
        if (dev_priv->is_pci) {
 #endif
+               dev_priv->gart_info.table_mask = DMA_BIT_MASK(32);
                dev_priv->gart_info.gart_table_location = DRM_ATI_GART_MAIN;
                dev_priv->gart_info.table_size = R128_PCIGART_TABLE_SIZE;
                dev_priv->gart_info.addr = NULL;
index 833abc7e55fb35d4032d8dc2306ca48ddae9ab2b..9072e4a1894e4d773a64b82cf72865f04b4db1fb 100644 (file)
@@ -1807,6 +1807,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
        } else
 #endif
        {
+               dev_priv->gart_info.table_mask = DMA_BIT_MASK(32);
                /* if we have an offset set from userspace */
                if (dev_priv->pcigart_offset_set) {
                        dev_priv->gart_info.bus_addr =
index 94baec692b57713fe6f246d3a296edefafe40c7b..7a339dba6a69c2fb4d961a73851c048a0807f823 100644 (file)
@@ -126,6 +126,8 @@ via_cmdbuf_wait(drm_via_private_t * dev_priv, unsigned int size)
                             hw_addr, cur_addr, next_addr);
                        return -1;
                }
+               if  ((cur_addr < hw_addr) && (next_addr >= hw_addr))
+                       msleep(1);
        } while ((cur_addr < hw_addr) && (next_addr >= hw_addr));
        return 0;
 }
@@ -416,27 +418,50 @@ static int via_hook_segment(drm_via_private_t * dev_priv,
        int paused, count;
        volatile uint32_t *paused_at = dev_priv->last_pause_ptr;
        uint32_t reader,ptr;
+       uint32_t diff;
 
        paused = 0;
        via_flush_write_combine();
        (void) *(volatile uint32_t *)(via_get_dma(dev_priv) -1);
+
        *paused_at = pause_addr_lo;
        via_flush_write_combine();
        (void) *paused_at;
+
        reader = *(dev_priv->hw_addr_ptr);
        ptr = ((volatile char *)paused_at - dev_priv->dma_ptr) +
                dev_priv->dma_offset + (uint32_t) dev_priv->agpAddr + 4;
+
        dev_priv->last_pause_ptr = via_get_dma(dev_priv) - 1;
 
-       if ((ptr - reader) <= dev_priv->dma_diff ) {
-               count = 10000000;
-               while (!(paused = (VIA_READ(0x41c) & 0x80000000)) && count--);
+       /*
+        * If there is a possibility that the command reader will 
+        * miss the new pause address and pause on the old one,
+        * In that case we need to program the new start address
+        * using PCI.
+        */
+
+       diff = (uint32_t) (ptr - reader) - dev_priv->dma_diff;
+       count = 10000000;
+       while(diff == 0 && count--) {
+               paused = (VIA_READ(0x41c) & 0x80000000);
+               if (paused) 
+                       break;
+               reader = *(dev_priv->hw_addr_ptr);
+               diff = (uint32_t) (ptr - reader) - dev_priv->dma_diff;
        }
 
+       paused = VIA_READ(0x41c) & 0x80000000;
+
        if (paused && !no_pci_fire) {
                reader = *(dev_priv->hw_addr_ptr);
-               if ((ptr - reader) == dev_priv->dma_diff) {
-
+               diff = (uint32_t) (ptr - reader) - dev_priv->dma_diff;
+               diff &= (dev_priv->dma_high - 1);
+               if (diff != 0 && diff < (dev_priv->dma_high >> 1)) {
+                       DRM_ERROR("Paused at incorrect address. "
+                                 "0x%08x, 0x%08x 0x%08x\n",
+                                 ptr, reader, dev_priv->dma_diff);
+               } else if (diff == 0) {
                        /*
                         * There is a concern that these writes may stall the PCI bus
                         * if the GPU is not idle. However, idling the GPU first
@@ -577,6 +602,7 @@ static void via_cmdbuf_jump(drm_via_private_t * dev_priv)
        uint32_t pause_addr_lo, pause_addr_hi;
        uint32_t jump_addr_lo, jump_addr_hi;
        volatile uint32_t *last_pause_ptr;
+       uint32_t dma_low_save1, dma_low_save2;
 
        agp_base = dev_priv->dma_offset + (uint32_t) dev_priv->agpAddr;
        via_align_cmd(dev_priv, HC_HAGPBpID_JUMP, 0, &jump_addr_hi,
@@ -603,8 +629,29 @@ static void via_cmdbuf_jump(drm_via_private_t * dev_priv)
                      &pause_addr_lo, 0);
 
        *last_pause_ptr = pause_addr_lo;
+       dma_low_save1 = dev_priv->dma_low;
 
-       via_hook_segment( dev_priv, jump_addr_hi, jump_addr_lo, 0);
+       /*
+        * Now, set a trap that will pause the regulator if it tries to rerun the old
+        * command buffer. (Which may happen if via_hook_segment detecs a command regulator pause
+        * and reissues the jump command over PCI, while the regulator has already taken the jump
+        * and actually paused at the current buffer end).
+        * There appears to be no other way to detect this condition, since the hw_addr_pointer
+        * does not seem to get updated immediately when a jump occurs.
+        */
+
+       last_pause_ptr =
+               via_align_cmd(dev_priv, HC_HAGPBpID_PAUSE, 0, &pause_addr_hi,
+                             &pause_addr_lo, 0) - 1;
+       via_align_cmd(dev_priv, HC_HAGPBpID_PAUSE, 0, &pause_addr_hi,
+                     &pause_addr_lo, 0);
+       *last_pause_ptr = pause_addr_lo;
+
+       dma_low_save2 = dev_priv->dma_low;
+       dev_priv->dma_low = dma_low_save1;
+       via_hook_segment(dev_priv, jump_addr_hi, jump_addr_lo, 0);
+       dev_priv->dma_low = dma_low_save2;
+       via_hook_segment(dev_priv, pause_addr_hi, pause_addr_lo, 0);
 }
 
 
index 33c5197b73c4a79b9c6b95849debe94b68dda549..409e00afdd0754f6eb60707810a262df43a75fe9 100644 (file)
@@ -603,7 +603,7 @@ via_build_sg_info(struct drm_device *dev, drm_via_sg_info_t *vsg, drm_via_dmabli
         * (Not a big limitation anyway.)
         */
 
-       if ((xfer->mem_stride - xfer->line_length) >PAGE_SIZE) {
+       if ((xfer->mem_stride - xfer->line_length) > 2*PAGE_SIZE) {
                DRM_ERROR("Too large system memory stride. Stride: %d, "
                          "Length: %d\n", xfer->mem_stride, xfer->line_length);
                return -EINVAL;
index 589ac6f65b9afe21d2e73d15d31be29e0c53b95a..3f9d0a9ac36d5988408f29a133e5a9c8fa1763ae 100644 (file)
@@ -1709,7 +1709,7 @@ static int __init riscom8_init_module (void)
 
        if (iobase || iobase1 || iobase2 || iobase3) {
                for(i = 0; i < RC_NBOARD; i++)
-                       rc_board[0].base = 0;
+                       rc_board[i].base = 0;
        }
 
        if (iobase)
index 29965231b9127e6e9e658997f26b72ffb69c4d3c..8db0e7f9d3f44c959bd8aac097a7448b95395721 100644 (file)
@@ -357,7 +357,7 @@ int dma_async_device_register(struct dma_device *device)
                !device->device_prep_dma_zero_sum);
        BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) &&
                !device->device_prep_dma_memset);
-       BUG_ON(dma_has_cap(DMA_ZERO_SUM, device->cap_mask) &&
+       BUG_ON(dma_has_cap(DMA_INTERRUPT, device->cap_mask) &&
                !device->device_prep_dma_interrupt);
 
        BUG_ON(!device->device_alloc_chan_resources);
index cc9a68158d992311185d96a9428bc3a627dccaf4..ad2f938597e21a06f7c751eedabc97bdab37b6d9 100644 (file)
@@ -57,12 +57,12 @@ static void dma_init(struct fsl_dma_chan *fsl_chan)
 
 }
 
-static void set_sr(struct fsl_dma_chan *fsl_chan, dma_addr_t val)
+static void set_sr(struct fsl_dma_chan *fsl_chan, u32 val)
 {
        DMA_OUT(fsl_chan, &fsl_chan->reg_base->sr, val, 32);
 }
 
-static dma_addr_t get_sr(struct fsl_dma_chan *fsl_chan)
+static u32 get_sr(struct fsl_dma_chan *fsl_chan)
 {
        return DMA_IN(fsl_chan, &fsl_chan->reg_base->sr, 32);
 }
@@ -406,6 +406,32 @@ static void fsl_dma_free_chan_resources(struct dma_chan *chan)
        dma_pool_destroy(fsl_chan->desc_pool);
 }
 
+static struct dma_async_tx_descriptor *
+fsl_dma_prep_interrupt(struct dma_chan *chan)
+{
+       struct fsl_dma_chan *fsl_chan;
+       struct fsl_desc_sw *new;
+
+       if (!chan)
+               return NULL;
+
+       fsl_chan = to_fsl_chan(chan);
+
+       new = fsl_dma_alloc_descriptor(fsl_chan);
+       if (!new) {
+               dev_err(fsl_chan->dev, "No free memory for link descriptor\n");
+               return NULL;
+       }
+
+       new->async_tx.cookie = -EBUSY;
+       new->async_tx.ack = 0;
+
+       /* Set End-of-link to the last link descriptor of new list*/
+       set_ld_eol(fsl_chan, new);
+
+       return &new->async_tx;
+}
+
 static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy(
        struct dma_chan *chan, dma_addr_t dma_dest, dma_addr_t dma_src,
        size_t len, unsigned long flags)
@@ -436,7 +462,7 @@ static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy(
                dev_dbg(fsl_chan->dev, "new link desc alloc %p\n", new);
 #endif
 
-               copy = min(len, FSL_DMA_BCR_MAX_CNT);
+               copy = min(len, (size_t)FSL_DMA_BCR_MAX_CNT);
 
                set_desc_cnt(fsl_chan, &new->hw, copy);
                set_desc_src(fsl_chan, &new->hw, dma_src);
@@ -513,7 +539,6 @@ static void fsl_chan_ld_cleanup(struct fsl_dma_chan *fsl_chan)
 
        spin_lock_irqsave(&fsl_chan->desc_lock, flags);
 
-       fsl_dma_update_completed_cookie(fsl_chan);
        dev_dbg(fsl_chan->dev, "chan completed_cookie = %d\n",
                        fsl_chan->completed_cookie);
        list_for_each_entry_safe(desc, _desc, &fsl_chan->ld_queue, node) {
@@ -581,8 +606,8 @@ static void fsl_chan_xfer_ld_queue(struct fsl_dma_chan *fsl_chan)
        if (ld_node != &fsl_chan->ld_queue) {
                /* Get the ld start address from ld_queue */
                next_dest_addr = to_fsl_desc(ld_node)->async_tx.phys;
-               dev_dbg(fsl_chan->dev, "xfer LDs staring from 0x%016llx\n",
-                               (u64)next_dest_addr);
+               dev_dbg(fsl_chan->dev, "xfer LDs staring from %p\n",
+                               (void *)next_dest_addr);
                set_cdar(fsl_chan, next_dest_addr);
                dma_start(fsl_chan);
        } else {
@@ -662,7 +687,7 @@ static enum dma_status fsl_dma_is_complete(struct dma_chan *chan,
 static irqreturn_t fsl_dma_chan_do_interrupt(int irq, void *data)
 {
        struct fsl_dma_chan *fsl_chan = (struct fsl_dma_chan *)data;
-       dma_addr_t stat;
+       u32 stat;
 
        stat = get_sr(fsl_chan);
        dev_dbg(fsl_chan->dev, "event: channel %d, stat = 0x%x\n",
@@ -681,10 +706,10 @@ static irqreturn_t fsl_dma_chan_do_interrupt(int irq, void *data)
         */
        if (stat & FSL_DMA_SR_EOSI) {
                dev_dbg(fsl_chan->dev, "event: End-of-segments INT\n");
-               dev_dbg(fsl_chan->dev, "event: clndar 0x%016llx, "
-                               "nlndar 0x%016llx\n", (u64)get_cdar(fsl_chan),
-                               (u64)get_ndar(fsl_chan));
+               dev_dbg(fsl_chan->dev, "event: clndar %p, nlndar %p\n",
+                       (void *)get_cdar(fsl_chan), (void *)get_ndar(fsl_chan));
                stat &= ~FSL_DMA_SR_EOSI;
+               fsl_dma_update_completed_cookie(fsl_chan);
        }
 
        /* If it current transfer is the end-of-transfer,
@@ -726,12 +751,15 @@ static void dma_do_tasklet(unsigned long data)
        fsl_chan_ld_cleanup(fsl_chan);
 }
 
+#ifdef FSL_DMA_CALLBACKTEST
 static void fsl_dma_callback_test(struct fsl_dma_chan *fsl_chan)
 {
        if (fsl_chan)
                dev_info(fsl_chan->dev, "selftest: callback is ok!\n");
 }
+#endif
 
+#ifdef CONFIG_FSL_DMA_SELFTEST
 static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan)
 {
        struct dma_chan *chan;
@@ -837,9 +865,9 @@ static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan)
        if (err) {
                for (i = 0; (*(src + i) == *(dest + i)) && (i < test_size);
                                i++);
-               dev_err(fsl_chan->dev, "selftest: Test failed, data %d/%d is "
+               dev_err(fsl_chan->dev, "selftest: Test failed, data %d/%ld is "
                                "error! src 0x%x, dest 0x%x\n",
-                               i, test_size, *(src + i), *(dest + i));
+                               i, (long)test_size, *(src + i), *(dest + i));
        }
 
 free_resources:
@@ -848,6 +876,7 @@ out:
        kfree(src);
        return err;
 }
+#endif
 
 static int __devinit of_fsl_dma_chan_probe(struct of_device *dev,
                        const struct of_device_id *match)
@@ -1008,8 +1037,8 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
        }
 
        dev_info(&dev->dev, "Probe the Freescale DMA driver for %s "
-                       "controller at 0x%08x...\n",
-                       match->compatible, fdev->reg.start);
+                       "controller at %p...\n",
+                       match->compatible, (void *)fdev->reg.start);
        fdev->reg_base = ioremap(fdev->reg.start, fdev->reg.end
                                                - fdev->reg.start + 1);
 
@@ -1017,6 +1046,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
        dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask);
        fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources;
        fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources;
+       fdev->common.device_prep_dma_interrupt = fsl_dma_prep_interrupt;
        fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy;
        fdev->common.device_is_tx_complete = fsl_dma_is_complete;
        fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending;
index 3986d54492bde18d2b0d45d2e64a449dac5af227..f82b0906d4666bb79483dd1d5f5d64109e164907 100644 (file)
@@ -140,7 +140,7 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan)
        int busy = iop_chan_is_busy(iop_chan);
        int seen_current = 0, slot_cnt = 0, slots_per_op = 0;
 
-       dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(iop_chan->device->common.dev, "%s\n", __func__);
        /* free completed slots from the chain starting with
         * the oldest descriptor
         */
@@ -438,7 +438,7 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx)
        spin_unlock_bh(&iop_chan->lock);
 
        dev_dbg(iop_chan->device->common.dev, "%s cookie: %d slot: %d\n",
-               __FUNCTION__, sw_desc->async_tx.cookie, sw_desc->idx);
+               __func__, sw_desc->async_tx.cookie, sw_desc->idx);
 
        return cookie;
 }
@@ -520,7 +520,7 @@ iop_adma_prep_dma_interrupt(struct dma_chan *chan)
        struct iop_adma_desc_slot *sw_desc, *grp_start;
        int slot_cnt, slots_per_op;
 
-       dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(iop_chan->device->common.dev, "%s\n", __func__);
 
        spin_lock_bh(&iop_chan->lock);
        slot_cnt = iop_chan_interrupt_slot_count(&slots_per_op, iop_chan);
@@ -548,7 +548,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest,
        BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT));
 
        dev_dbg(iop_chan->device->common.dev, "%s len: %u\n",
-               __FUNCTION__, len);
+               __func__, len);
 
        spin_lock_bh(&iop_chan->lock);
        slot_cnt = iop_chan_memcpy_slot_count(len, &slots_per_op);
@@ -580,7 +580,7 @@ iop_adma_prep_dma_memset(struct dma_chan *chan, dma_addr_t dma_dest,
        BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT));
 
        dev_dbg(iop_chan->device->common.dev, "%s len: %u\n",
-               __FUNCTION__, len);
+               __func__, len);
 
        spin_lock_bh(&iop_chan->lock);
        slot_cnt = iop_chan_memset_slot_count(len, &slots_per_op);
@@ -614,7 +614,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest,
 
        dev_dbg(iop_chan->device->common.dev,
                "%s src_cnt: %d len: %u flags: %lx\n",
-               __FUNCTION__, src_cnt, len, flags);
+               __func__, src_cnt, len, flags);
 
        spin_lock_bh(&iop_chan->lock);
        slot_cnt = iop_chan_xor_slot_count(len, src_cnt, &slots_per_op);
@@ -648,7 +648,7 @@ iop_adma_prep_dma_zero_sum(struct dma_chan *chan, dma_addr_t *dma_src,
                return NULL;
 
        dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n",
-               __FUNCTION__, src_cnt, len);
+               __func__, src_cnt, len);
 
        spin_lock_bh(&iop_chan->lock);
        slot_cnt = iop_chan_zero_sum_slot_count(len, src_cnt, &slots_per_op);
@@ -659,7 +659,7 @@ iop_adma_prep_dma_zero_sum(struct dma_chan *chan, dma_addr_t *dma_src,
                iop_desc_set_zero_sum_byte_count(grp_start, len);
                grp_start->xor_check_result = result;
                pr_debug("\t%s: grp_start->xor_check_result: %p\n",
-                       __FUNCTION__, grp_start->xor_check_result);
+                       __func__, grp_start->xor_check_result);
                sw_desc->unmap_src_cnt = src_cnt;
                sw_desc->unmap_len = len;
                while (src_cnt--)
@@ -700,7 +700,7 @@ static void iop_adma_free_chan_resources(struct dma_chan *chan)
        iop_chan->last_used = NULL;
 
        dev_dbg(iop_chan->device->common.dev, "%s slots_allocated %d\n",
-               __FUNCTION__, iop_chan->slots_allocated);
+               __func__, iop_chan->slots_allocated);
        spin_unlock_bh(&iop_chan->lock);
 
        /* one is ok since we left it on there on purpose */
@@ -753,7 +753,7 @@ static irqreturn_t iop_adma_eot_handler(int irq, void *data)
 {
        struct iop_adma_chan *chan = data;
 
-       dev_dbg(chan->device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(chan->device->common.dev, "%s\n", __func__);
 
        tasklet_schedule(&chan->irq_tasklet);
 
@@ -766,7 +766,7 @@ static irqreturn_t iop_adma_eoc_handler(int irq, void *data)
 {
        struct iop_adma_chan *chan = data;
 
-       dev_dbg(chan->device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(chan->device->common.dev, "%s\n", __func__);
 
        tasklet_schedule(&chan->irq_tasklet);
 
@@ -823,7 +823,7 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device)
        int err = 0;
        struct iop_adma_chan *iop_chan;
 
-       dev_dbg(device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(device->common.dev, "%s\n", __func__);
 
        src = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL);
        if (!src)
@@ -906,7 +906,7 @@ iop_adma_xor_zero_sum_self_test(struct iop_adma_device *device)
        int err = 0;
        struct iop_adma_chan *iop_chan;
 
-       dev_dbg(device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(device->common.dev, "%s\n", __func__);
 
        for (src_idx = 0; src_idx < IOP_ADMA_NUM_SRC_TEST; src_idx++) {
                xor_srcs[src_idx] = alloc_page(GFP_KERNEL);
@@ -1159,7 +1159,7 @@ static int __devinit iop_adma_probe(struct platform_device *pdev)
        }
 
        dev_dbg(&pdev->dev, "%s: allocted descriptor pool virt %p phys %p\n",
-               __FUNCTION__, adev->dma_desc_pool_virt,
+               __func__, adev->dma_desc_pool_virt,
                (void *) adev->dma_desc_pool);
 
        adev->id = plat_data->hw_id;
@@ -1289,7 +1289,7 @@ static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan)
        dma_cookie_t cookie;
        int slot_cnt, slots_per_op;
 
-       dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(iop_chan->device->common.dev, "%s\n", __func__);
 
        spin_lock_bh(&iop_chan->lock);
        slot_cnt = iop_chan_memcpy_slot_count(0, &slots_per_op);
@@ -1346,7 +1346,7 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan)
        dma_cookie_t cookie;
        int slot_cnt, slots_per_op;
 
-       dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__);
+       dev_dbg(iop_chan->device->common.dev, "%s\n", __func__);
 
        spin_lock_bh(&iop_chan->lock);
        slot_cnt = iop_chan_xor_slot_count(0, 2, &slots_per_op);
index fe9e768cfbc4d28aa462d73fb60d79b689d160e9..25bdc2dd9ce10cf5cb8bfe2fd19ac130c27cdb33 100644 (file)
@@ -1,5 +1,3 @@
-# -*- shell-script -*-
-
 comment "An alternative FireWire stack is available with EXPERIMENTAL=y"
        depends on EXPERIMENTAL=n
 
@@ -21,27 +19,7 @@ config FIREWIRE
           NOTE:
 
          You should only build ONE of the stacks, unless you REALLY know what
-         you are doing.  If you install both, you should configure them only as
-         modules rather than link them statically, and you should blacklist one
-         of the concurrent low-level drivers in /etc/modprobe.conf.  Add either
-
-             blacklist firewire-ohci
-         or
-             blacklist ohci1394
-
-         there depending on which driver you DON'T want to have auto-loaded.
-         You can optionally do the same with the other IEEE 1394/ FireWire
-         drivers.
-
-         If you have an old modprobe which doesn't implement the blacklist
-         directive, use either
-
-              install firewire-ohci /bin/true
-         or
-              install ohci1394 /bin/true
-
-         and so on, depending on which modules you DON't want to have
-         auto-loaded.
+         you are doing.
 
 config FIREWIRE_OHCI
        tristate "Support for OHCI FireWire host controllers"
@@ -57,8 +35,24 @@ config FIREWIRE_OHCI
 
           NOTE:
 
-         If you also build ohci1394 of the classic stack, blacklist either
-         ohci1394 or firewire-ohci to let hotplug load only the desired driver.
+         You should only build ohci1394 or firewire-ohci, but not both.
+         If you nevertheless want to install both, you should configure them
+         only as modules and blacklist the driver(s) which you don't want to
+         have auto-loaded.  Add either
+
+             blacklist firewire-ohci
+         or
+             blacklist ohci1394
+             blacklist video1394
+             blacklist dv1394
+
+         to /etc/modprobe.conf or /etc/modprobe.d/* and update modprobe.conf
+         depending on your distribution.  The latter two modules should be
+         blacklisted together with ohci1394 because they depend on ohci1394.
+
+         If you have an old modprobe which doesn't implement the blacklist
+         directive, use "install modulename /bin/true" for the modules to be
+         blacklisted.
 
 config FIREWIRE_SBP2
        tristate "Support for storage devices (SBP-2 protocol driver)"
@@ -75,9 +69,3 @@ config FIREWIRE_SBP2
 
          You should also enable support for disks, CD-ROMs, etc. in the SCSI
          configuration section.
-
-          NOTE:
-
-         If you also build sbp2 of the classic stack, blacklist either sbp2
-         or firewire-sbp2 to let hotplug load only the desired driver.
-
index 7ebad3c14cb80bbd62b930551494400c901f81f0..996d61f0d4602cf0cd942aea5daf54e08739c1cb 100644 (file)
 #include <asm/page.h>
 #include <asm/system.h>
 
+#ifdef CONFIG_PPC_PMAC
+#include <asm/pmac_feature.h>
+#endif
+
 #include "fw-ohci.h"
 #include "fw-transaction.h"
 
@@ -175,6 +179,7 @@ struct fw_ohci {
        int generation;
        int request_generation;
        u32 bus_seconds;
+       bool old_uninorth;
 
        /*
         * Spinlock for accessing fw_ohci data.  Never call out of
@@ -276,19 +281,13 @@ static int ar_context_add_page(struct ar_context *ctx)
 {
        struct device *dev = ctx->ohci->card.device;
        struct ar_buffer *ab;
-       dma_addr_t ab_bus;
+       dma_addr_t uninitialized_var(ab_bus);
        size_t offset;
 
-       ab = (struct ar_buffer *) __get_free_page(GFP_ATOMIC);
+       ab = dma_alloc_coherent(dev, PAGE_SIZE, &ab_bus, GFP_ATOMIC);
        if (ab == NULL)
                return -ENOMEM;
 
-       ab_bus = dma_map_single(dev, ab, PAGE_SIZE, DMA_BIDIRECTIONAL);
-       if (dma_mapping_error(ab_bus)) {
-               free_page((unsigned long) ab);
-               return -ENOMEM;
-       }
-
        memset(&ab->descriptor, 0, sizeof(ab->descriptor));
        ab->descriptor.control        = cpu_to_le16(DESCRIPTOR_INPUT_MORE |
                                                    DESCRIPTOR_STATUS |
@@ -299,8 +298,6 @@ static int ar_context_add_page(struct ar_context *ctx)
        ab->descriptor.res_count      = cpu_to_le16(PAGE_SIZE - offset);
        ab->descriptor.branch_address = 0;
 
-       dma_sync_single_for_device(dev, ab_bus, PAGE_SIZE, DMA_BIDIRECTIONAL);
-
        ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1);
        ctx->last_buffer->next = ab;
        ctx->last_buffer = ab;
@@ -311,15 +308,22 @@ static int ar_context_add_page(struct ar_context *ctx)
        return 0;
 }
 
+#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
+#define cond_le32_to_cpu(v) \
+       (ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v))
+#else
+#define cond_le32_to_cpu(v) le32_to_cpu(v)
+#endif
+
 static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
 {
        struct fw_ohci *ohci = ctx->ohci;
        struct fw_packet p;
        u32 status, length, tcode;
 
-       p.header[0] = le32_to_cpu(buffer[0]);
-       p.header[1] = le32_to_cpu(buffer[1]);
-       p.header[2] = le32_to_cpu(buffer[2]);
+       p.header[0] = cond_le32_to_cpu(buffer[0]);
+       p.header[1] = cond_le32_to_cpu(buffer[1]);
+       p.header[2] = cond_le32_to_cpu(buffer[2]);
 
        tcode = (p.header[0] >> 4) & 0x0f;
        switch (tcode) {
@@ -331,7 +335,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
                break;
 
        case TCODE_READ_BLOCK_REQUEST :
-               p.header[3] = le32_to_cpu(buffer[3]);
+               p.header[3] = cond_le32_to_cpu(buffer[3]);
                p.header_length = 16;
                p.payload_length = 0;
                break;
@@ -340,7 +344,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
        case TCODE_READ_BLOCK_RESPONSE:
        case TCODE_LOCK_REQUEST:
        case TCODE_LOCK_RESPONSE:
-               p.header[3] = le32_to_cpu(buffer[3]);
+               p.header[3] = cond_le32_to_cpu(buffer[3]);
                p.header_length = 16;
                p.payload_length = p.header[3] >> 16;
                break;
@@ -357,7 +361,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
 
        /* FIXME: What to do about evt_* errors? */
        length = (p.header_length + p.payload_length + 3) / 4;
-       status = le32_to_cpu(buffer[length]);
+       status = cond_le32_to_cpu(buffer[length]);
 
        p.ack        = ((status >> 16) & 0x1f) - 16;
        p.speed      = (status >> 21) & 0x7;
@@ -375,7 +379,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
         */
 
        if (p.ack + 16 == 0x09)
-               ohci->request_generation = (buffer[2] >> 16) & 0xff;
+               ohci->request_generation = (p.header[2] >> 16) & 0xff;
        else if (ctx == &ohci->ar_request_ctx)
                fw_core_handle_request(&ohci->card, &p);
        else
@@ -397,6 +401,7 @@ static void ar_context_tasklet(unsigned long data)
 
        if (d->res_count == 0) {
                size_t size, rest, offset;
+               dma_addr_t buffer_bus;
 
                /*
                 * This descriptor is finished and we may have a
@@ -405,9 +410,7 @@ static void ar_context_tasklet(unsigned long data)
                 */
 
                offset = offsetof(struct ar_buffer, data);
-               dma_unmap_single(ohci->card.device,
-                       le32_to_cpu(ab->descriptor.data_address) - offset,
-                       PAGE_SIZE, DMA_BIDIRECTIONAL);
+               buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
 
                buffer = ab;
                ab = ab->next;
@@ -423,7 +426,8 @@ static void ar_context_tasklet(unsigned long data)
                while (buffer < end)
                        buffer = handle_ar_packet(ctx, buffer);
 
-               free_page((unsigned long)buffer);
+               dma_free_coherent(ohci->card.device, PAGE_SIZE,
+                                 buffer, buffer_bus);
                ar_context_add_page(ctx);
        } else {
                buffer = ctx->pointer;
@@ -532,7 +536,7 @@ static int
 context_add_buffer(struct context *ctx)
 {
        struct descriptor_buffer *desc;
-       dma_addr_t bus_addr;
+       dma_addr_t uninitialized_var(bus_addr);
        int offset;
 
        /*
@@ -1022,13 +1026,14 @@ static void bus_reset_tasklet(unsigned long data)
         */
 
        self_id_count = (reg_read(ohci, OHCI1394_SelfIDCount) >> 3) & 0x3ff;
-       generation = (le32_to_cpu(ohci->self_id_cpu[0]) >> 16) & 0xff;
+       generation = (cond_le32_to_cpu(ohci->self_id_cpu[0]) >> 16) & 0xff;
        rmb();
 
        for (i = 1, j = 0; j < self_id_count; i += 2, j++) {
                if (ohci->self_id_cpu[i] != ~ohci->self_id_cpu[i + 1])
                        fw_error("inconsistent self IDs\n");
-               ohci->self_id_buffer[j] = le32_to_cpu(ohci->self_id_cpu[i]);
+               ohci->self_id_buffer[j] =
+                               cond_le32_to_cpu(ohci->self_id_cpu[i]);
        }
        rmb();
 
@@ -1316,7 +1321,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
        unsigned long flags;
        int retval = -EBUSY;
        __be32 *next_config_rom;
-       dma_addr_t next_config_rom_bus;
+       dma_addr_t uninitialized_var(next_config_rom_bus);
 
        ohci = fw_ohci(card);
 
@@ -1487,7 +1492,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
        void *p, *end;
        int i;
 
-       if (db->first_res_count > 0 && db->second_res_count > 0) {
+       if (db->first_res_count != 0 && db->second_res_count != 0) {
                if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) {
                        /* This descriptor isn't done yet, stop iteration. */
                        return 0;
@@ -1513,7 +1518,7 @@ static int handle_ir_dualbuffer_packet(struct context *context,
                memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4);
                i += ctx->base.header_size;
                ctx->excess_bytes +=
-                       (le32_to_cpu(*(u32 *)(p + 4)) >> 16) & 0xffff;
+                       (le32_to_cpu(*(__le32 *)(p + 4)) >> 16) & 0xffff;
                p += ctx->base.header_size + 4;
        }
        ctx->header_length = i;
@@ -2048,6 +2053,18 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
        int err;
        size_t size;
 
+#ifdef CONFIG_PPC_PMAC
+       /* Necessary on some machines if fw-ohci was loaded/ unloaded before */
+       if (machine_is(powermac)) {
+               struct device_node *ofn = pci_device_to_OF_node(dev);
+
+               if (ofn) {
+                       pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 1);
+                       pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1);
+               }
+       }
+#endif /* CONFIG_PPC_PMAC */
+
        ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
        if (ohci == NULL) {
                fw_error("Could not malloc fw_ohci data.\n");
@@ -2066,6 +2083,10 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
        pci_write_config_dword(dev, OHCI1394_PCI_HCI_Control, 0);
        pci_set_drvdata(dev, ohci);
 
+#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
+       ohci->old_uninorth = dev->vendor == PCI_VENDOR_ID_APPLE &&
+                            dev->device == PCI_DEVICE_ID_APPLE_UNI_N_FW;
+#endif
        spin_lock_init(&ohci->lock);
 
        tasklet_init(&ohci->bus_reset_tasklet,
@@ -2182,6 +2203,19 @@ static void pci_remove(struct pci_dev *dev)
        pci_disable_device(dev);
        fw_card_put(&ohci->card);
 
+#ifdef CONFIG_PPC_PMAC
+       /* On UniNorth, power down the cable and turn off the chip clock
+        * to save power on laptops */
+       if (machine_is(powermac)) {
+               struct device_node *ofn = pci_device_to_OF_node(dev);
+
+               if (ofn) {
+                       pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
+                       pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 0);
+               }
+       }
+#endif /* CONFIG_PPC_PMAC */
+
        fw_notify("Removed fw-ohci device.\n");
 }
 
@@ -2202,6 +2236,16 @@ static int pci_suspend(struct pci_dev *pdev, pm_message_t state)
        if (err)
                fw_error("pci_set_power_state failed with %d\n", err);
 
+/* PowerMac suspend code comes last */
+#ifdef CONFIG_PPC_PMAC
+       if (machine_is(powermac)) {
+               struct device_node *ofn = pci_device_to_OF_node(pdev);
+
+               if (ofn)
+                       pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
+       }
+#endif /* CONFIG_PPC_PMAC */
+
        return 0;
 }
 
@@ -2210,6 +2254,16 @@ static int pci_resume(struct pci_dev *pdev)
        struct fw_ohci *ohci = pci_get_drvdata(pdev);
        int err;
 
+/* PowerMac resume code comes first */
+#ifdef CONFIG_PPC_PMAC
+       if (machine_is(powermac)) {
+               struct device_node *ofn = pci_device_to_OF_node(pdev);
+
+               if (ofn)
+                       pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1);
+       }
+#endif /* CONFIG_PPC_PMAC */
+
        pci_set_power_state(pdev, PCI_D0);
        pci_restore_state(pdev);
        err = pci_enable_device(pdev);
index 03069a454c07c57ec9eb53c177f586d0565981ac..62b4e47d0cc00bb19e58de01c3722c522bd2e55a 100644 (file)
@@ -173,6 +173,7 @@ struct sbp2_target {
 #define SBP2_ORB_TIMEOUT               2000U   /* Timeout in ms */
 #define SBP2_ORB_NULL                  0x80000000
 #define SBP2_MAX_SG_ELEMENT_LENGTH     0xf000
+#define SBP2_RETRY_LIMIT               0xf     /* 15 retries */
 
 #define SBP2_DIRECTION_TO_MEDIA                0x0
 #define SBP2_DIRECTION_FROM_MEDIA      0x1
@@ -330,6 +331,11 @@ static const struct {
                .model                  = ~0,
                .workarounds            = SBP2_WORKAROUND_128K_MAX_TRANS,
        },
+       /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ {
+               .firmware_revision      = 0x002600,
+               .model                  = ~0,
+               .workarounds            = SBP2_WORKAROUND_128K_MAX_TRANS,
+       },
 
        /*
         * There are iPods (2nd gen, 3rd gen) with model_id == 0, but
@@ -812,6 +818,30 @@ static void sbp2_target_put(struct sbp2_target *tgt)
        kref_put(&tgt->kref, sbp2_release_target);
 }
 
+static void
+complete_set_busy_timeout(struct fw_card *card, int rcode,
+                         void *payload, size_t length, void *done)
+{
+       complete(done);
+}
+
+static void sbp2_set_busy_timeout(struct sbp2_logical_unit *lu)
+{
+       struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+       DECLARE_COMPLETION_ONSTACK(done);
+       struct fw_transaction t;
+       static __be32 busy_timeout;
+
+       /* FIXME: we should try to set dual-phase cycle_limit too */
+       busy_timeout = cpu_to_be32(SBP2_RETRY_LIMIT);
+
+       fw_send_request(device->card, &t, TCODE_WRITE_QUADLET_REQUEST,
+                       lu->tgt->node_id, lu->generation, device->max_speed,
+                       CSR_REGISTER_BASE + CSR_BUSY_TIMEOUT, &busy_timeout,
+                       sizeof(busy_timeout), complete_set_busy_timeout, &done);
+       wait_for_completion(&done);
+}
+
 static void sbp2_reconnect(struct work_struct *work);
 
 static void sbp2_login(struct work_struct *work)
@@ -864,10 +894,8 @@ static void sbp2_login(struct work_struct *work)
        fw_notify("%s: logged in to LUN %04x (%d retries)\n",
                  tgt->bus_id, lu->lun, lu->retries);
 
-#if 0
-       /* FIXME: The linux1394 sbp2 does this last step. */
-       sbp2_set_busy_timeout(scsi_id);
-#endif
+       /* set appropriate retry limit(s) in BUSY_TIMEOUT register */
+       sbp2_set_busy_timeout(lu);
 
        PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect);
        sbp2_agent_reset(lu);
index e47bb040197afb229f8c1078bca1741c18e6c7fc..d2c7a3d7e1cbb7711e8c76af6a76f448ea9d59f1 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/wait.h>
 #include <linux/errno.h>
+#include <asm/bug.h>
 #include <asm/system.h>
 #include "fw-transaction.h"
 #include "fw-topology.h"
@@ -424,8 +425,8 @@ update_tree(struct fw_card *card, struct fw_node *root)
        node1 = fw_node(list1.next);
 
        while (&node0->link != &list0) {
+               WARN_ON(node0->port_count != node1->port_count);
 
-               /* assert(node0->port_count == node1->port_count); */
                if (node0->link_on && !node1->link_on)
                        event = FW_NODE_LINK_OFF;
                else if (!node0->link_on && node1->link_on)
index 7fcc59dedf08cfa038d652336d1f85383614ccd3..99529e59a0b13e4f5173205f5ab4d338ce6ebe3b 100644 (file)
@@ -751,7 +751,7 @@ handle_topology_map(struct fw_card *card, struct fw_request *request,
                    void *payload, size_t length, void *callback_data)
 {
        int i, start, end;
-       u32 *map;
+       __be32 *map;
 
        if (!TCODE_IS_READ_REQUEST(tcode)) {
                fw_send_response(card, request, RCODE_TYPE_ERROR);
index 09cb72870454ea72ceee81f5139c3460665d9ae8..a43bb22912f9da9488fd83a2060b80c78bdfe55b 100644 (file)
 static inline void
 fw_memcpy_from_be32(void *_dst, void *_src, size_t size)
 {
-       u32 *dst = _dst;
-       u32 *src = _src;
+       u32    *dst = _dst;
+       __be32 *src = _src;
        int i;
 
        for (i = 0; i < size / 4; i++)
-               dst[i] = cpu_to_be32(src[i]);
+               dst[i] = be32_to_cpu(src[i]);
 }
 
 static inline void
index 573abe4408426fb6ce288cc3ada689e956fdc35e..2fa43183d3759bc8b2d1ea284ca30984aee44fad 100644 (file)
@@ -335,7 +335,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
        u8 temp;
        
        /* driver_data might come from user-space, so check it */
-       if (id->driver_data > ARRAY_SIZE(chipname))
+       if (id->driver_data >= ARRAY_SIZE(chipname))
                return -EINVAL;
 
        if (amd756_ioport) {
index 501f00cea78284cc1c5e731ceb3b8a1c7fbcd2b8..e47aca0ca5aebda2bb70bc44d3f625a827301ea2 100644 (file)
@@ -1,6 +1,13 @@
 #
 # Makefile for miscellaneous I2C chip drivers.
 #
+# Think twice before you add a new driver to this directory.
+# Device drivers are better grouped according to the functionality they
+# implement rather than to the bus they are connected to. In particular:
+# * Hardware monitoring chip drivers go to drivers/hwmon
+# * RTC chip drivers go to drivers/rtc
+# * I/O expander drivers go to drivers/gpio
+#
 
 obj-$(CONFIG_DS1682)           += ds1682.o
 obj-$(CONFIG_SENSORS_EEPROM)   += eeprom.o
index 96da22e9a5a44dbe32b247694a2b72bdea20c0d8..fd84b2a363381a6571a09d883cc3d7fe3cc676fa 100644 (file)
@@ -90,12 +90,16 @@ static int i2c_device_probe(struct device *dev)
 {
        struct i2c_client       *client = to_i2c_client(dev);
        struct i2c_driver       *driver = to_i2c_driver(dev->driver);
+       int status;
 
        if (!driver->probe)
                return -ENODEV;
        client->driver = driver;
        dev_dbg(dev, "probe\n");
-       return driver->probe(client);
+       status = driver->probe(client);
+       if (status)
+               client->driver = NULL;
+       return status;
 }
 
 static int i2c_device_remove(struct device *dev)
index 9e2b1964d71add2103a735164cc7560de5ca3b38..f53f72daae34322390be1c8ca52849996e30c3e5 100644 (file)
@@ -376,6 +376,11 @@ static const struct {
                .model_id               = SBP2_ROM_VALUE_WILDCARD,
                .workarounds            = SBP2_WORKAROUND_128K_MAX_TRANS,
        },
+       /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ {
+               .firmware_revision      = 0x002600,
+               .model_id               = SBP2_ROM_VALUE_WILDCARD,
+               .workarounds            = SBP2_WORKAROUND_128K_MAX_TRANS,
+       },
        /* iPod 4th generation */ {
                .firmware_revision      = 0x0a2700,
                .model_id               = 0x000021,
index 414621095540e4eb38d18708109bd550a7b7a0c0..591901aab6b75839e9242c0743c8938e14fabd82 100644 (file)
@@ -75,7 +75,7 @@
 #define IPATH_IB_LINKDOWN              0
 #define IPATH_IB_LINKARM               1
 #define IPATH_IB_LINKACTIVE            2
-#define IPATH_IB_LINKINIT              3
+#define IPATH_IB_LINKDOWN_ONLY         3
 #define IPATH_IB_LINKDOWN_SLEEP                4
 #define IPATH_IB_LINKDOWN_DISABLE      5
 #define IPATH_IB_LINK_LOOPBACK 6 /* enable local loopback */
index d5ff6ca2db30aaaba1ecb0265c9527e7c917621f..ca4d0acc6786768177126ca15af89407fbba235a 100644 (file)
@@ -851,8 +851,7 @@ void ipath_disarm_piobufs(struct ipath_devdata *dd, unsigned first,
  * -ETIMEDOUT state can have multiple states set, for any of several
  * transitions.
  */
-static int ipath_wait_linkstate(struct ipath_devdata *dd, u32 state,
-                               int msecs)
+int ipath_wait_linkstate(struct ipath_devdata *dd, u32 state, int msecs)
 {
        dd->ipath_state_wanted = state;
        wait_event_interruptible_timeout(ipath_state_wait,
@@ -1656,8 +1655,8 @@ void ipath_cancel_sends(struct ipath_devdata *dd, int restore_sendctrl)
 static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)
 {
        static const char *what[4] = {
-               [0] = "DOWN",
-               [INFINIPATH_IBCC_LINKCMD_INIT] = "INIT",
+               [0] = "NOP",
+               [INFINIPATH_IBCC_LINKCMD_DOWN] = "DOWN",
                [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED",
                [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE"
        };
@@ -1672,9 +1671,9 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)
                            (dd, dd->ipath_kregs->kr_ibcstatus) >>
                            INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) &
                           INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]);
-       /* flush all queued sends when going to DOWN or INIT, to be sure that
+       /* flush all queued sends when going to DOWN to be sure that
         * they don't block MAD packets */
-       if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT)
+       if (linkcmd == INFINIPATH_IBCC_LINKCMD_DOWN)
                ipath_cancel_sends(dd, 1);
 
        ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl,
@@ -1687,6 +1686,13 @@ int ipath_set_linkstate(struct ipath_devdata *dd, u8 newstate)
        int ret;
 
        switch (newstate) {
+       case IPATH_IB_LINKDOWN_ONLY:
+               ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKCMD_DOWN <<
+                                   INFINIPATH_IBCC_LINKCMD_SHIFT);
+               /* don't wait */
+               ret = 0;
+               goto bail;
+
        case IPATH_IB_LINKDOWN:
                ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKINITCMD_POLL <<
                                    INFINIPATH_IBCC_LINKINITCMD_SHIFT);
@@ -1709,16 +1715,6 @@ int ipath_set_linkstate(struct ipath_devdata *dd, u8 newstate)
                ret = 0;
                goto bail;
 
-       case IPATH_IB_LINKINIT:
-               if (dd->ipath_flags & IPATH_LINKINIT) {
-                       ret = 0;
-                       goto bail;
-               }
-               ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKCMD_INIT <<
-                                   INFINIPATH_IBCC_LINKCMD_SHIFT);
-               lstate = IPATH_LINKINIT;
-               break;
-
        case IPATH_IB_LINKARM:
                if (dd->ipath_flags & IPATH_LINKARMED) {
                        ret = 0;
index 4cc0f95ea8777ee7aaf040e1089fe48d9d7cba66..ecf3f7ff77177837012af805c673b81b6b3a9bd9 100644 (file)
@@ -767,6 +767,7 @@ void ipath_kreceive(struct ipath_portdata *);
 int ipath_setrcvhdrsize(struct ipath_devdata *, unsigned);
 int ipath_reset_device(int);
 void ipath_get_faststats(unsigned long);
+int ipath_wait_linkstate(struct ipath_devdata *, u32, int);
 int ipath_set_linkstate(struct ipath_devdata *, u8);
 int ipath_set_mtu(struct ipath_devdata *, u16);
 int ipath_set_lid(struct ipath_devdata *, u32, u8);
index d98d5f103700faab9fd94373f18604d61c214115..b34b91d3723a58f4a2e58f0d6233ed3e264f9338 100644 (file)
@@ -555,10 +555,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
                /* FALLTHROUGH */
        case IB_PORT_DOWN:
                if (lstate == 0)
-                       if (get_linkdowndefaultstate(dd))
-                               lstate = IPATH_IB_LINKDOWN_SLEEP;
-                       else
-                               lstate = IPATH_IB_LINKDOWN;
+                       lstate = IPATH_IB_LINKDOWN_ONLY;
                else if (lstate == 1)
                        lstate = IPATH_IB_LINKDOWN_SLEEP;
                else if (lstate == 2)
@@ -568,6 +565,8 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
                else
                        goto err;
                ipath_set_linkstate(dd, lstate);
+               ipath_wait_linkstate(dd, IPATH_LINKINIT | IPATH_LINKARMED |
+                               IPATH_LINKACTIVE, 1000);
                break;
        case IB_PORT_ARMED:
                ipath_set_linkstate(dd, IPATH_IB_LINKARM);
index 80dc623cee403637c5d828cc33a519204b869b1d..087ed316647952a13118f7e190e414017f8a0f30 100644 (file)
@@ -329,8 +329,9 @@ struct ipath_qp *ipath_lookup_qpn(struct ipath_qp_table *qpt, u32 qpn)
 /**
  * ipath_reset_qp - initialize the QP state to the reset state
  * @qp: the QP to reset
+ * @type: the QP type
  */
-static void ipath_reset_qp(struct ipath_qp *qp)
+static void ipath_reset_qp(struct ipath_qp *qp, enum ib_qp_type type)
 {
        qp->remote_qpn = 0;
        qp->qkey = 0;
@@ -342,7 +343,7 @@ static void ipath_reset_qp(struct ipath_qp *qp)
        qp->s_psn = 0;
        qp->r_psn = 0;
        qp->r_msn = 0;
-       if (qp->ibqp.qp_type == IB_QPT_RC) {
+       if (type == IB_QPT_RC) {
                qp->s_state = IB_OPCODE_RC_SEND_LAST;
                qp->r_state = IB_OPCODE_RC_SEND_LAST;
        } else {
@@ -414,7 +415,7 @@ int ipath_error_qp(struct ipath_qp *qp, enum ib_wc_status err)
                wc.wr_id = qp->r_wr_id;
                wc.opcode = IB_WC_RECV;
                wc.status = err;
-               ipath_cq_enter(to_icq(qp->ibqp.send_cq), &wc, 1);
+               ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 1);
        }
        wc.status = IB_WC_WR_FLUSH_ERR;
 
@@ -534,7 +535,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 
        switch (new_state) {
        case IB_QPS_RESET:
-               ipath_reset_qp(qp);
+               ipath_reset_qp(qp, ibqp->qp_type);
                break;
 
        case IB_QPS_ERR:
@@ -647,7 +648,7 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
        attr->port_num = 1;
        attr->timeout = qp->timeout;
        attr->retry_cnt = qp->s_retry_cnt;
-       attr->rnr_retry = qp->s_rnr_retry;
+       attr->rnr_retry = qp->s_rnr_retry_cnt;
        attr->alt_port_num = 0;
        attr->alt_timeout = 0;
 
@@ -839,7 +840,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
                        goto bail_qp;
                }
                qp->ip = NULL;
-               ipath_reset_qp(qp);
+               ipath_reset_qp(qp, init_attr->qp_type);
                break;
 
        default:
index 459e46e2c016b93926c2221fc2a3f73a2deeaefd..40f3e37d7adc3e883a8b3eff1a4c05cf7d7820f2 100644 (file)
@@ -1196,6 +1196,10 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
                        list_move_tail(&qp->timerwait,
                                       &dev->pending[dev->pending_index]);
                spin_unlock(&dev->pending_lock);
+
+               if (opcode == OP(RDMA_READ_RESPONSE_MIDDLE))
+                       qp->s_retry = qp->s_retry_cnt;
+
                /*
                 * Update the RDMA receive state but do the copy w/o
                 * holding the locks and blocking interrupts.
index 6d2a17f9c1da919193e260160033ad57bf3e05f8..92ad73a7fff0f20f353a1f63e2efe0bd265e0ce3 100644 (file)
 #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3
 #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16
 #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL
-#define INFINIPATH_IBCC_LINKCMD_INIT 1 /* move to 0x11 */
+#define INFINIPATH_IBCC_LINKCMD_DOWN 1 /* move to 0x11 */
 #define INFINIPATH_IBCC_LINKCMD_ARMED 2        /* move to 0x21 */
 #define INFINIPATH_IBCC_LINKCMD_ACTIVE 3       /* move to 0x31 */
 #define INFINIPATH_IBCC_LINKCMD_SHIFT 18
index 52b1bebfa74482dc2586667e6c35c68f4b5e5c04..2490b2d79dbb739713422c07fc4457700500928b 100644 (file)
@@ -38,6 +38,7 @@
 #include <net/icmp.h>
 #include <linux/icmpv6.h>
 #include <linux/delay.h>
+#include <linux/vmalloc.h>
 
 #include "ipoib.h"
 
@@ -637,6 +638,7 @@ static inline int post_send(struct ipoib_dev_priv *priv,
        priv->tx_sge[0].addr          = addr;
        priv->tx_sge[0].length        = len;
 
+       priv->tx_wr.num_sge     = 1;
        priv->tx_wr.wr_id       = wr_id | IPOIB_OP_CM;
 
        return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr);
@@ -1030,13 +1032,13 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
        struct ipoib_dev_priv *priv = netdev_priv(p->dev);
        int ret;
 
-       p->tx_ring = kzalloc(ipoib_sendq_size * sizeof *p->tx_ring,
-                               GFP_KERNEL);
+       p->tx_ring = vmalloc(ipoib_sendq_size * sizeof *p->tx_ring);
        if (!p->tx_ring) {
                ipoib_warn(priv, "failed to allocate tx ring\n");
                ret = -ENOMEM;
                goto err_tx;
        }
+       memset(p->tx_ring, 0, ipoib_sendq_size * sizeof *p->tx_ring);
 
        p->qp = ipoib_cm_create_tx_qp(p->dev, p);
        if (IS_ERR(p->qp)) {
@@ -1077,6 +1079,7 @@ err_id:
        ib_destroy_qp(p->qp);
 err_qp:
        p->qp = NULL;
+       vfree(p->tx_ring);
 err_tx:
        return ret;
 }
@@ -1127,7 +1130,7 @@ timeout:
        if (p->qp)
                ib_destroy_qp(p->qp);
 
-       kfree(p->tx_ring);
+       vfree(p->tx_ring);
        kfree(p);
 }
 
index f96477a8ca5ac96121ae618d24153870e23f4a48..57282048865c1c66c9df6a061fefb3cfba07defb 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>
+#include <linux/vmalloc.h>
 
 #include <linux/if_arp.h>      /* For ARPHRD_xxx */
 
@@ -887,13 +888,13 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
                goto out;
        }
 
-       priv->tx_ring = kzalloc(ipoib_sendq_size * sizeof *priv->tx_ring,
-                               GFP_KERNEL);
+       priv->tx_ring = vmalloc(ipoib_sendq_size * sizeof *priv->tx_ring);
        if (!priv->tx_ring) {
                printk(KERN_WARNING "%s: failed to allocate TX ring (%d entries)\n",
                       ca->name, ipoib_sendq_size);
                goto out_rx_ring_cleanup;
        }
+       memset(priv->tx_ring, 0, ipoib_sendq_size * sizeof *priv->tx_ring);
 
        /* priv->tx_head, tx_tail & tx_outstanding are already 0 */
 
@@ -903,7 +904,7 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
        return 0;
 
 out_tx_ring_cleanup:
-       kfree(priv->tx_ring);
+       vfree(priv->tx_ring);
 
 out_rx_ring_cleanup:
        kfree(priv->rx_ring);
@@ -928,7 +929,7 @@ void ipoib_dev_cleanup(struct net_device *dev)
        ipoib_ib_dev_cleanup(dev);
 
        kfree(priv->rx_ring);
-       kfree(priv->tx_ring);
+       vfree(priv->tx_ring);
 
        priv->rx_ring = NULL;
        priv->tx_ring = NULL;
index 2628339e3a9973b01402250f8e6bf73be5d37c04..31a53c5bcb1317cd52dc2be80dd3f43238184d6e 100644 (file)
@@ -650,7 +650,7 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
         */
        spin_lock(&priv->lock);
 
-       if (!test_bit(IPOIB_MCAST_STARTED, &priv->flags)        ||
+       if (!test_bit(IPOIB_FLAG_OPER_UP, &priv->flags)         ||
            !priv->broadcast                                    ||
            !test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) {
                ++dev->stats.tx_dropped;
index 9cef6fcf587b6baaef9df48c3616779262d6d3a9..d4ad6992f776c895d637b72c779b04fd5dd7915e 100644 (file)
@@ -981,13 +981,13 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack)
 }
 
 
-static __inline int
+static inline int
 isdn_minor2drv(int minor)
 {
        return (dev->drvmap[minor]);
 }
 
-static __inline int
+static inline int
 isdn_minor2chan(int minor)
 {
        return (dev->chanmap[minor]);
index 5484d3c38a5761b76ab888d146cab65719add51b..c5d02b6aafabb614ed731ff9318b9e7281ec93a2 100644 (file)
@@ -62,7 +62,7 @@ static unsigned char V110_OffMatrix_38400[] =
  * and to 67452301 when keylen = 2. This is necessary because ordering on
  * the isdn line is the other way.
  */
-static __inline unsigned char
+static inline unsigned char
 FlipBits(unsigned char c, int keylen)
 {
        unsigned char b = c;
index 741a2e3f4fc6e34ce237beed4d1bebea7b0565b0..a348bb0791d37b764a2e61ffe55bacd57a12e182 100644 (file)
@@ -17,7 +17,7 @@
 
 static struct backlight_ops pmu_backlight_data;
 static DEFINE_SPINLOCK(pmu_backlight_lock);
-static int sleeping;
+static int sleeping, uses_pmu_bl;
 static u8 bl_curve[FB_BACKLIGHT_LEVELS];
 
 static void pmu_backlight_init_curve(u8 off, u8 min, u8 max)
@@ -128,7 +128,7 @@ void pmu_backlight_set_sleep(int sleep)
 
        spin_lock_irqsave(&pmu_backlight_lock, flags);
        sleeping = sleep;
-       if (pmac_backlight) {
+       if (pmac_backlight && uses_pmu_bl) {
                if (sleep) {
                        struct adb_request req;
 
@@ -166,6 +166,7 @@ void __init pmu_backlight_init()
                printk(KERN_ERR "PMU Backlight registration failed\n");
                return;
        }
+       uses_pmu_bl = 1;
        bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
        pmu_backlight_init_curve(0x7F, 0x46, 0x0E);
 
index ebec663d5d3708d74a8197ddfe16e7e761e71c87..d6365a9f0637407f020b901423dd1d06d851edeb 100644 (file)
@@ -2528,7 +2528,7 @@ EXPORT_SYMBOL(pmu_wait_complete);
 EXPORT_SYMBOL(pmu_suspend);
 EXPORT_SYMBOL(pmu_resume);
 EXPORT_SYMBOL(pmu_unlock);
-#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
+#if defined(CONFIG_PPC32)
 EXPORT_SYMBOL(pmu_enable_irled);
 EXPORT_SYMBOL(pmu_battery_count);
 EXPORT_SYMBOL(pmu_batteries);
index 982e27b86d101a15ebb2f579652a67d4ae08f806..962817e49fba02e063dc164a3d0971e221eaa3a7 100644 (file)
@@ -108,6 +108,7 @@ config ACER_WMI
        depends on ACPI
        depends on LEDS_CLASS
        depends on BACKLIGHT_CLASS_DEVICE
+       depends on SERIO_I8042
        select ACPI_WMI
        ---help---
          This is a driver for newer Acer (and Wistron) laptops. It adds
index 74d12b4a3abdae48be072857ec75a34c90496dcb..dd13a3749927494804aa4566c59df652d963f40b 100644 (file)
@@ -217,6 +217,15 @@ static struct dmi_system_id acer_quirks[] = {
                },
                .driver_data = &quirk_acer_travelmate_2490,
        },
+       {
+               .callback = dmi_matched,
+               .ident = "Acer Aspire 3610",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3610"),
+               },
+               .driver_data = &quirk_acer_travelmate_2490,
+       },
        {
                .callback = dmi_matched,
                .ident = "Acer Aspire 5100",
@@ -226,6 +235,15 @@ static struct dmi_system_id acer_quirks[] = {
                },
                .driver_data = &quirk_acer_travelmate_2490,
        },
+       {
+               .callback = dmi_matched,
+               .ident = "Acer Aspire 5610",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"),
+               },
+               .driver_data = &quirk_acer_travelmate_2490,
+       },
        {
                .callback = dmi_matched,
                .ident = "Acer Aspire 5630",
@@ -761,11 +779,11 @@ enum led_brightness value)
 }
 
 static struct led_classdev mail_led = {
-       .name = "acer-mail:green",
+       .name = "acer-wmi::mail",
        .brightness_set = mail_led_set,
 };
 
-static int __init acer_led_init(struct device *dev)
+static int __devinit acer_led_init(struct device *dev)
 {
        return led_classdev_register(dev, &mail_led);
 }
@@ -798,7 +816,7 @@ static struct backlight_ops acer_bl_ops = {
        .update_status = update_bl_status,
 };
 
-static int __init acer_backlight_init(struct device *dev)
+static int __devinit acer_backlight_init(struct device *dev)
 {
        struct backlight_device *bd;
 
@@ -817,7 +835,7 @@ static int __init acer_backlight_init(struct device *dev)
        return 0;
 }
 
-static void __exit acer_backlight_exit(void)
+static void acer_backlight_exit(void)
 {
        backlight_device_unregister(acer_backlight_device);
 }
@@ -1052,11 +1070,12 @@ static int __init acer_wmi_init(void)
 
        if (wmi_has_guid(WMID_GUID2) && interface) {
                if (ACPI_FAILURE(WMID_set_capabilities())) {
-                       printk(ACER_ERR "Unable to detect available devices\n");
+                       printk(ACER_ERR "Unable to detect available WMID "
+                                       "devices\n");
                        return -ENODEV;
                }
        } else if (!wmi_has_guid(WMID_GUID2) && interface) {
-               printk(ACER_ERR "Unable to detect available devices\n");
+               printk(ACER_ERR "No WMID device detection method found\n");
                return -ENODEV;
        }
 
@@ -1064,21 +1083,20 @@ static int __init acer_wmi_init(void)
                interface = &AMW0_interface;
 
                if (ACPI_FAILURE(AMW0_set_capabilities())) {
-                       printk(ACER_ERR "Unable to detect available devices\n");
+                       printk(ACER_ERR "Unable to detect available AMW0 "
+                                       "devices\n");
                        return -ENODEV;
                }
        }
 
-       if (wmi_has_guid(AMW0_GUID1)) {
-               if (ACPI_FAILURE(AMW0_find_mailled()))
-                       printk(ACER_ERR "Unable to detect mail LED\n");
-       }
+       if (wmi_has_guid(AMW0_GUID1))
+               AMW0_find_mailled();
 
        find_quirks();
 
        if (!interface) {
-               printk(ACER_ERR "No or unsupported WMI interface, unable to ");
-               printk(KERN_CONT "load.\n");
+               printk(ACER_ERR "No or unsupported WMI interface, unable to "
+                               "load\n");
                return -ENODEV;
        }
 
index 899e3f75f288dd853a50f61e9c15772ea3d60b01..02ff3d19b1ccaf40981c861e9977c43eea634f3f 100644 (file)
@@ -315,7 +315,7 @@ static void sony_laptop_report_input_event(u8 event)
                break;
 
        default:
-               if (event > ARRAY_SIZE(sony_laptop_input_index)) {
+               if (event >= ARRAY_SIZE(sony_laptop_input_index)) {
                        dprintk("sony_laptop_report_input_event, event not known: %d\n", event);
                        break;
                }
index 20d5c7bd940a7c48eaa42b8af06484d918e6e6b8..1c14a186f000acc10b23b59b5bc554533bf6a4ec 100644 (file)
@@ -180,7 +180,7 @@ static void tifm_sd_transfer_data(struct tifm_sd *host)
                        host->sg_pos++;
                        if (host->sg_pos == host->sg_len) {
                                if ((r_data->flags & MMC_DATA_WRITE)
-                                   && DATA_CARRY)
+                                   && (host->cmd_flags & DATA_CARRY))
                                        writel(host->bounce_buf_data[0],
                                               host->dev->addr
                                               + SOCK_MMCSD_DATA);
index a0f0e605d630389bbed8450c1446905002e1a836..fe7b5ec09708adac2efa77442066a095608a802a 100644 (file)
@@ -2366,15 +2366,15 @@ config GELIC_NET
          module will be called ps3_gelic.
 
 config GELIC_WIRELESS
-       bool "PS3 Wireless support"
-       depends on GELIC_NET
-       select WIRELESS_EXT
-       help
-        This option adds the support for the wireless feature of PS3.
-        If you have the wireless-less model of PS3 or have no plan to
-        use wireless feature, disabling this option saves memory.  As
-        the driver automatically distinguishes the models, you can
-        safely enable this option even if you have a wireless-less model.
+       bool "PS3 Wireless support"
+       depends on GELIC_NET
+       select WIRELESS_EXT
+       help
+         This option adds the support for the wireless feature of PS3.
+         If you have the wireless-less model of PS3 or have no plan to
+         use wireless feature, disabling this option saves memory.  As
+         the driver automatically distinguishes the models, you can
+         safely enable this option even if you have a wireless-less model.
 
 config GIANFAR
        tristate "Gianfar Ethernet"
@@ -2519,7 +2519,7 @@ config CHELSIO_T3
 
 config EHEA
        tristate "eHEA Ethernet support"
-       depends on IBMEBUS && INET
+       depends on IBMEBUS && INET && SPARSEMEM
        select INET_LRO
        ---help---
          This driver supports the IBM pSeries eHEA ethernet adapter.
index 5136d94923aa3910e0007982dd7893c493e2fd62..b1448637107f3fada6f1a97536dfd6492a9d9117 100644 (file)
@@ -369,7 +369,7 @@ MODULE_PARM_DESC(mem, "Memory base address(es)");
 MODULE_DESCRIPTION("Ansel AC3200 EISA ethernet driver");
 MODULE_LICENSE("GPL");
 
-int __init init_module(void)
+static int __init ac3200_module_init(void)
 {
        struct net_device *dev;
        int this_dev, found = 0;
@@ -404,8 +404,7 @@ static void cleanup_card(struct net_device *dev)
        iounmap(ei_status.mem);
 }
 
-void __exit
-cleanup_module(void)
+static void __exit ac3200_module_exit(void)
 {
        int this_dev;
 
@@ -418,4 +417,6 @@ cleanup_module(void)
                }
        }
 }
+module_init(ac3200_module_init);
+module_exit(ac3200_module_exit);
 #endif /* MODULE */
index c12cbdf368b1edbe37b3077e9debdcf4f93cc847..47a8275d396281bd79f6a2631dbfd1da93273529 100644 (file)
@@ -569,7 +569,7 @@ static irqreturn_t apne_interrupt(int irq, void *dev_id)
 #ifdef MODULE
 static struct net_device *apne_dev;
 
-int __init init_module(void)
+static int __init apne_module_init(void)
 {
        apne_dev = apne_probe(-1);
        if (IS_ERR(apne_dev))
@@ -577,7 +577,7 @@ int __init init_module(void)
        return 0;
 }
 
-void __exit cleanup_module(void)
+static void __exit apne_module_exit(void)
 {
        unregister_netdev(apne_dev);
 
@@ -591,7 +591,8 @@ void __exit cleanup_module(void)
 
        free_netdev(apne_dev);
 }
-
+module_init(apne_module_init);
+module_exit(apne_module_exit);
 #endif
 
 static int init_pcmcia(void)
index 6ab2c2d4d673de32baf44307a32a0d5baf00183b..fef5560bc7a2ee2d8c6aee66f6e413022fdfdca1 100644 (file)
@@ -1252,7 +1252,7 @@ module_param(irq, int, 0);
 module_param(dma, int, 0);
 
 
-int __init init_module(void)
+static int __init ltpc_module_init(void)
 {
         if(io == 0)
                printk(KERN_NOTICE
@@ -1263,6 +1263,7 @@ int __init init_module(void)
                return PTR_ERR(dev_ltpc);
        return 0;
 }
+module_init(ltpc_module_init);
 #endif
 
 static void __exit ltpc_cleanup(void)
index cc4610db6395f9e743e16ff374fd88f860d5dbe2..02cb8f1c11484b23460100c85f60faec62bd3ea5 100644 (file)
@@ -80,17 +80,19 @@ void arcnet_cap_init(void)
 
 #ifdef MODULE
 
-int __init init_module(void)
+static int __init capmode_module_init(void)
 {
        printk(VERSION);
        arcnet_cap_init();
        return 0;
 }
 
-void cleanup_module(void)
+static void __exit capmode_module_exit(void)
 {
        arcnet_unregister_proto(&capmode_proto);
 }
+module_init(capmode_module_init);
+module_exit(capmode_module_exit);
 
 MODULE_LICENSE("GPL");
 #endif                         /* MODULE */
index b74dbeef805018f2d64f246130239f147fce8191..13c293b286de37f4509e039c66a384b00ebc0249 100644 (file)
@@ -336,8 +336,6 @@ struct lance_addr {
 
 /***************************** Prototypes *****************************/
 
-static int addr_accessible( volatile void *regp, int wordflag, int
-                            writeflag );
 static unsigned long lance_probe1( struct net_device *dev, struct lance_addr
                                    *init_rec );
 static int lance_open( struct net_device *dev );
@@ -406,7 +404,8 @@ struct net_device * __init atarilance_probe(int unit)
 
 /* Derived from hwreg_present() in atari/config.c: */
 
-static int __init addr_accessible( volatile void *regp, int wordflag, int writeflag )
+static noinline int __init addr_accessible(volatile void *regp, int wordflag,
+                                          int writeflag)
 {
        int             ret;
        long    flags;
index 36ba6dc96acc8494605c41315a8acecaa13f702f..cdf3090a1885fbe6ebfdc537c313af036aaf4b76 100644 (file)
@@ -2782,16 +2782,13 @@ static void __devexit e100_remove(struct pci_dev *pdev)
        }
 }
 
-#ifdef CONFIG_PM
 static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
 {
        struct net_device *netdev = pci_get_drvdata(pdev);
        struct nic *nic = netdev_priv(netdev);
 
        if (netif_running(netdev))
-               napi_disable(&nic->napi);
-       del_timer_sync(&nic->watchdog);
-       netif_carrier_off(nic->netdev);
+               e100_down(nic);
        netif_device_detach(netdev);
 
        pci_save_state(pdev);
@@ -2804,14 +2801,13 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
                pci_enable_wake(pdev, PCI_D3cold, 0);
        }
 
-       free_irq(pdev->irq, netdev);
-
        pci_disable_device(pdev);
        pci_set_power_state(pdev, PCI_D3hot);
 
        return 0;
 }
 
+#ifdef CONFIG_PM
 static int e100_resume(struct pci_dev *pdev)
 {
        struct net_device *netdev = pci_get_drvdata(pdev);
@@ -2832,26 +2828,7 @@ static int e100_resume(struct pci_dev *pdev)
 
 static void e100_shutdown(struct pci_dev *pdev)
 {
-       struct net_device *netdev = pci_get_drvdata(pdev);
-       struct nic *nic = netdev_priv(netdev);
-
-       if (netif_running(netdev))
-               napi_disable(&nic->napi);
-       del_timer_sync(&nic->watchdog);
-       netif_carrier_off(nic->netdev);
-
-       if ((nic->flags & wol_magic) | e100_asf(nic)) {
-               pci_enable_wake(pdev, PCI_D3hot, 1);
-               pci_enable_wake(pdev, PCI_D3cold, 1);
-       } else {
-               pci_enable_wake(pdev, PCI_D3hot, 0);
-               pci_enable_wake(pdev, PCI_D3cold, 0);
-       }
-
-       free_irq(pdev->irq, netdev);
-
-       pci_disable_device(pdev);
-       pci_set_power_state(pdev, PCI_D3hot);
+       e100_suspend(pdev, PMSG_SUSPEND);
 }
 
 /* ------------------ PCI Error Recovery infrastructure  -------------- */
index 0809a6a5a286ec8325a562a4acc510a2b60ae765..46a90e9ec56320e4eaca6d48ba21c6d463981ddc 100644 (file)
@@ -900,7 +900,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
                if (RSV_GETBIT(rxstat, RSV_LENCHECKERR))
                        ndev->stats.rx_frame_errors++;
        } else {
-               skb = dev_alloc_skb(len);
+               skb = dev_alloc_skb(len + NET_IP_ALIGN);
                if (!skb) {
                        if (netif_msg_rx_err(priv))
                                dev_err(&ndev->dev,
@@ -908,6 +908,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
                        ndev->stats.rx_dropped++;
                } else {
                        skb->dev = ndev;
+                       skb_reserve(skb, NET_IP_ALIGN);
                        /* copy the packet from the receive buffer */
                        enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv),
                                        len, skb_put(skb, len));
index 23d0a4afe0e1d786db4ace8b93ba352f7eef28c1..c2095ce531c9b7fdb9785a0dea063f45516b8f10 100644 (file)
@@ -2133,7 +2133,7 @@ static void ixgbe_watchdog(unsigned long data)
                                (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
                                 "10 Gbps" :
                                 (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
-                                 "1 Gpbs" : "unknown speed")),
+                                 "1 Gbps" : "unknown speed")),
                                ((FLOW_RX && FLOW_TX) ? "RX/TX" :
                                 (FLOW_RX ? "RX" :
                                 (FLOW_TX ? "TX" : "None"))));
index b528ce77c4069997d67ffaac2e0c00b1b6f5d383..771139e283af3609b3ae1b0e46b989ec6ea1a9be 100644 (file)
@@ -2104,6 +2104,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani"
                " and Dale Farnsworth");
 MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX");
+MODULE_ALIAS("platform:mv643xx_eth");
 
 /*
  * The second part is the low level driver of the gigE ethernet ports.
index e8a63e483a2be034f9c4a057d0b3cc8457ac645a..ce95c5d168fe9922382726ce71e295392548f2a3 100644 (file)
@@ -1268,7 +1268,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
                }
        }
     
-       if (interrupts && ei_debug) 
+       if (interrupts && ei_debug > 3
        {
                handled = 1;
                if (nr_serviced >= MAX_SERVICE) 
index f4ca0591231d233f63a2d98cb6036f106fde21c4..3ac8529bb92ca9915b76b2cb1026f5308f05c107 100644 (file)
@@ -67,6 +67,7 @@ config REALTEK_PHY
 
 config FIXED_PHY
        bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
+       depends on PHYLIB=y
        ---help---
          Adds the platform "fixed" MDIO Bus to cover the boards that use
          PHYs that are not connected to the real MDIO bus.
index 7ed632db00d77dac9fb36df9629d74ea8e217b6d..d926168bc7809c62e46d32d5d9fe98e493ad6e7e 100644 (file)
@@ -37,6 +37,7 @@
 
 #define MII_DM9161_SCR         0x10
 #define MII_DM9161_SCR_INIT    0x0610
+#define MII_DM9161_SCR_RMII    0x0100
 
 /* DM9161 Interrupt Register */
 #define MII_DM9161_INTR        0x15
@@ -103,7 +104,7 @@ static int dm9161_config_aneg(struct phy_device *phydev)
 
 static int dm9161_config_init(struct phy_device *phydev)
 {
-       int err;
+       int err, temp;
 
        /* Isolate the PHY */
        err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE);
@@ -111,9 +112,19 @@ static int dm9161_config_init(struct phy_device *phydev)
        if (err < 0)
                return err;
 
-       /* Do not bypass the scrambler/descrambler */
-       err = phy_write(phydev, MII_DM9161_SCR, MII_DM9161_SCR_INIT);
+       switch (phydev->interface) {
+       case PHY_INTERFACE_MODE_MII:
+               temp = MII_DM9161_SCR_INIT;
+               break;
+       case PHY_INTERFACE_MODE_RMII:
+               temp =  MII_DM9161_SCR_INIT | MII_DM9161_SCR_RMII;
+               break;
+       default:
+               return -EINVAL;
+       }
 
+       /* Do not bypass the scrambler/descrambler */
+       err = phy_write(phydev, MII_DM9161_SCR, temp);
        if (err < 0)
                return err;
 
index 86e5dba079fed6d9a62bcd6d9e9e31fb40888999..3d10ca050b7991b9f53cf4a6cc3d5adb873137aa 100644 (file)
@@ -302,14 +302,14 @@ pppol2tp_session_find(struct pppol2tp_tunnel *tunnel, u16 session_id)
        struct pppol2tp_session *session;
        struct hlist_node *walk;
 
-       read_lock(&tunnel->hlist_lock);
+       read_lock_bh(&tunnel->hlist_lock);
        hlist_for_each_entry(session, walk, session_list, hlist) {
                if (session->tunnel_addr.s_session == session_id) {
-                       read_unlock(&tunnel->hlist_lock);
+                       read_unlock_bh(&tunnel->hlist_lock);
                        return session;
                }
        }
-       read_unlock(&tunnel->hlist_lock);
+       read_unlock_bh(&tunnel->hlist_lock);
 
        return NULL;
 }
@@ -320,14 +320,14 @@ static struct pppol2tp_tunnel *pppol2tp_tunnel_find(u16 tunnel_id)
 {
        struct pppol2tp_tunnel *tunnel = NULL;
 
-       read_lock(&pppol2tp_tunnel_list_lock);
+       read_lock_bh(&pppol2tp_tunnel_list_lock);
        list_for_each_entry(tunnel, &pppol2tp_tunnel_list, list) {
                if (tunnel->stats.tunnel_id == tunnel_id) {
-                       read_unlock(&pppol2tp_tunnel_list_lock);
+                       read_unlock_bh(&pppol2tp_tunnel_list_lock);
                        return tunnel;
                }
        }
-       read_unlock(&pppol2tp_tunnel_list_lock);
+       read_unlock_bh(&pppol2tp_tunnel_list_lock);
 
        return NULL;
 }
@@ -342,10 +342,11 @@ static struct pppol2tp_tunnel *pppol2tp_tunnel_find(u16 tunnel_id)
 static void pppol2tp_recv_queue_skb(struct pppol2tp_session *session, struct sk_buff *skb)
 {
        struct sk_buff *skbp;
+       struct sk_buff *tmp;
        u16 ns = PPPOL2TP_SKB_CB(skb)->ns;
 
-       spin_lock(&session->reorder_q.lock);
-       skb_queue_walk(&session->reorder_q, skbp) {
+       spin_lock_bh(&session->reorder_q.lock);
+       skb_queue_walk_safe(&session->reorder_q, skbp, tmp) {
                if (PPPOL2TP_SKB_CB(skbp)->ns > ns) {
                        __skb_insert(skb, skbp->prev, skbp, &session->reorder_q);
                        PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG,
@@ -360,7 +361,7 @@ static void pppol2tp_recv_queue_skb(struct pppol2tp_session *session, struct sk_
        __skb_queue_tail(&session->reorder_q, skb);
 
 out:
-       spin_unlock(&session->reorder_q.lock);
+       spin_unlock_bh(&session->reorder_q.lock);
 }
 
 /* Dequeue a single skb.
@@ -371,10 +372,9 @@ static void pppol2tp_recv_dequeue_skb(struct pppol2tp_session *session, struct s
        int length = PPPOL2TP_SKB_CB(skb)->length;
        struct sock *session_sock = NULL;
 
-       /* We're about to requeue the skb, so unlink it and return resources
+       /* We're about to requeue the skb, so return resources
         * to its current owner (a socket receive buffer).
         */
-       skb_unlink(skb, &session->reorder_q);
        skb_orphan(skb);
 
        tunnel->stats.rx_packets++;
@@ -442,7 +442,7 @@ static void pppol2tp_recv_dequeue(struct pppol2tp_session *session)
         * expect to send up next, dequeue it and any other
         * in-sequence packets behind it.
         */
-       spin_lock(&session->reorder_q.lock);
+       spin_lock_bh(&session->reorder_q.lock);
        skb_queue_walk_safe(&session->reorder_q, skb, tmp) {
                if (time_after(jiffies, PPPOL2TP_SKB_CB(skb)->expires)) {
                        session->stats.rx_seq_discards++;
@@ -470,13 +470,18 @@ static void pppol2tp_recv_dequeue(struct pppol2tp_session *session)
                                goto out;
                        }
                }
-               spin_unlock(&session->reorder_q.lock);
+               __skb_unlink(skb, &session->reorder_q);
+
+               /* Process the skb. We release the queue lock while we
+                * do so to let other contexts process the queue.
+                */
+               spin_unlock_bh(&session->reorder_q.lock);
                pppol2tp_recv_dequeue_skb(session, skb);
-               spin_lock(&session->reorder_q.lock);
+               spin_lock_bh(&session->reorder_q.lock);
        }
 
 out:
-       spin_unlock(&session->reorder_q.lock);
+       spin_unlock_bh(&session->reorder_q.lock);
 }
 
 /* Internal receive frame. Do the real work of receiving an L2TP data frame
@@ -1059,7 +1064,7 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
 
        /* Get routing info from the tunnel socket */
        dst_release(skb->dst);
-       skb->dst = sk_dst_get(sk_tun);
+       skb->dst = dst_clone(__sk_dst_get(sk_tun));
        skb_orphan(skb);
        skb->sk = sk_tun;
 
@@ -1107,7 +1112,7 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel)
        PRINTK(tunnel->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO,
               "%s: closing all sessions...\n", tunnel->name);
 
-       write_lock(&tunnel->hlist_lock);
+       write_lock_bh(&tunnel->hlist_lock);
        for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) {
 again:
                hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
@@ -1129,7 +1134,7 @@ again:
                         * disappear as we're jumping between locks.
                         */
                        sock_hold(sk);
-                       write_unlock(&tunnel->hlist_lock);
+                       write_unlock_bh(&tunnel->hlist_lock);
                        lock_sock(sk);
 
                        if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) {
@@ -1154,11 +1159,11 @@ again:
                         * list so we are guaranteed to make forward
                         * progress.
                         */
-                       write_lock(&tunnel->hlist_lock);
+                       write_lock_bh(&tunnel->hlist_lock);
                        goto again;
                }
        }
-       write_unlock(&tunnel->hlist_lock);
+       write_unlock_bh(&tunnel->hlist_lock);
 }
 
 /* Really kill the tunnel.
@@ -1167,9 +1172,9 @@ again:
 static void pppol2tp_tunnel_free(struct pppol2tp_tunnel *tunnel)
 {
        /* Remove from socket list */
-       write_lock(&pppol2tp_tunnel_list_lock);
+       write_lock_bh(&pppol2tp_tunnel_list_lock);
        list_del_init(&tunnel->list);
-       write_unlock(&pppol2tp_tunnel_list_lock);
+       write_unlock_bh(&pppol2tp_tunnel_list_lock);
 
        atomic_dec(&pppol2tp_tunnel_count);
        kfree(tunnel);
@@ -1245,9 +1250,9 @@ static void pppol2tp_session_destruct(struct sock *sk)
                                /* Delete the session socket from the
                                 * hash
                                 */
-                               write_lock(&tunnel->hlist_lock);
+                               write_lock_bh(&tunnel->hlist_lock);
                                hlist_del_init(&session->hlist);
-                               write_unlock(&tunnel->hlist_lock);
+                               write_unlock_bh(&tunnel->hlist_lock);
 
                                atomic_dec(&pppol2tp_session_count);
                        }
@@ -1392,9 +1397,9 @@ static struct sock *pppol2tp_prepare_tunnel_socket(int fd, u16 tunnel_id,
 
        /* Add tunnel to our list */
        INIT_LIST_HEAD(&tunnel->list);
-       write_lock(&pppol2tp_tunnel_list_lock);
+       write_lock_bh(&pppol2tp_tunnel_list_lock);
        list_add(&tunnel->list, &pppol2tp_tunnel_list);
-       write_unlock(&pppol2tp_tunnel_list_lock);
+       write_unlock_bh(&pppol2tp_tunnel_list_lock);
        atomic_inc(&pppol2tp_tunnel_count);
 
        /* Bump the reference count. The tunnel context is deleted
@@ -1599,11 +1604,11 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
        sk->sk_user_data = session;
 
        /* Add session to the tunnel's hash list */
-       write_lock(&tunnel->hlist_lock);
+       write_lock_bh(&tunnel->hlist_lock);
        hlist_add_head(&session->hlist,
                       pppol2tp_session_id_hash(tunnel,
                                                session->tunnel_addr.s_session));
-       write_unlock(&tunnel->hlist_lock);
+       write_unlock_bh(&tunnel->hlist_lock);
 
        atomic_inc(&pppol2tp_session_count);
 
@@ -2205,7 +2210,7 @@ static struct pppol2tp_session *next_session(struct pppol2tp_tunnel *tunnel, str
        int next = 0;
        int i;
 
-       read_lock(&tunnel->hlist_lock);
+       read_lock_bh(&tunnel->hlist_lock);
        for (i = 0; i < PPPOL2TP_HASH_SIZE; i++) {
                hlist_for_each_entry(session, walk, &tunnel->session_hlist[i], hlist) {
                        if (curr == NULL) {
@@ -2223,7 +2228,7 @@ static struct pppol2tp_session *next_session(struct pppol2tp_tunnel *tunnel, str
                }
        }
 out:
-       read_unlock(&tunnel->hlist_lock);
+       read_unlock_bh(&tunnel->hlist_lock);
        if (!found)
                session = NULL;
 
@@ -2234,13 +2239,13 @@ static struct pppol2tp_tunnel *next_tunnel(struct pppol2tp_tunnel *curr)
 {
        struct pppol2tp_tunnel *tunnel = NULL;
 
-       read_lock(&pppol2tp_tunnel_list_lock);
+       read_lock_bh(&pppol2tp_tunnel_list_lock);
        if (list_is_last(&curr->list, &pppol2tp_tunnel_list)) {
                goto out;
        }
        tunnel = list_entry(curr->list.next, struct pppol2tp_tunnel, list);
 out:
-       read_unlock(&pppol2tp_tunnel_list_lock);
+       read_unlock_bh(&pppol2tp_tunnel_list_lock);
 
        return tunnel;
 }
index 6179a0a2032c0ec50681d8f02bb5a693baf6b8d4..c72787adeba33bbe31dbbc52d9559551226c1d81 100644 (file)
@@ -1088,7 +1088,7 @@ static int s2io_print_pci_mode(struct s2io_nic *nic)
  *  '-1' on failure
  */
 
-int init_tti(struct s2io_nic *nic, int link)
+static int init_tti(struct s2io_nic *nic, int link)
 {
        struct XENA_dev_config __iomem *bar0 = nic->bar0;
        register u64 val64 = 0;
index 77d9dd7ea34f647f77e04d1c30bc20257146de55..567c62757e9d154ec39b5083d1f0f4b28bcf18ad 100644 (file)
@@ -910,7 +910,8 @@ static void de_set_media (struct de_private *de)
        unsigned media = de->media_type;
        u32 macmode = dr32(MacMode);
 
-       BUG_ON(de_is_running(de));
+       if (de_is_running(de))
+               printk(KERN_WARNING "%s: chip is running while changing media!\n", de->dev->name);
 
        if (de->de21040)
                dw32(CSR11, FULL_DUPLEX_MAGIC);
index 19fd4cb0ddf8583cbd9235b6085a7ad1100dfa19..b58472cf76f862c16fa861b02bcb494008c00f90 100644 (file)
@@ -203,8 +203,11 @@ again:
        if (received < budget) {
                netif_rx_complete(vi->dev, napi);
                if (unlikely(!vi->rvq->vq_ops->enable_cb(vi->rvq))
-                   && netif_rx_reschedule(vi->dev, napi))
+                   && napi_schedule_prep(napi)) {
+                       vi->rvq->vq_ops->disable_cb(vi->rvq);
+                       __netif_rx_schedule(vi->dev, napi);
                        goto again;
+               }
        }
 
        return received;
@@ -278,10 +281,11 @@ again:
                pr_debug("%s: virtio not prepared to send\n", dev->name);
                netif_stop_queue(dev);
 
-               /* Activate callback for using skbs: if this fails it
+               /* Activate callback for using skbs: if this returns false it
                 * means some were used in the meantime. */
                if (unlikely(!vi->svq->vq_ops->enable_cb(vi->svq))) {
-                       printk("Unlikely: restart svq failed\n");
+                       printk("Unlikely: restart svq race\n");
+                       vi->svq->vq_ops->disable_cb(vi->svq);
                        netif_start_queue(dev);
                        goto again;
                }
@@ -294,6 +298,15 @@ again:
        return 0;
 }
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void virtnet_netpoll(struct net_device *dev)
+{
+       struct virtnet_info *vi = netdev_priv(dev);
+
+       napi_schedule(&vi->napi);
+}
+#endif
+
 static int virtnet_open(struct net_device *dev)
 {
        struct virtnet_info *vi = netdev_priv(dev);
@@ -336,6 +349,9 @@ static int virtnet_probe(struct virtio_device *vdev)
        dev->stop = virtnet_close;
        dev->hard_start_xmit = start_xmit;
        dev->features = NETIF_F_HIGHDMA;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       dev->poll_controller = virtnet_netpoll;
+#endif
        SET_NETDEV_DEV(dev, &vdev->dev);
 
        /* Do we support "hardware" checksums? */
index 15d5c58e57bcf5a170958afd69e9e57b960cc453..e59255a155a91e34719b11e70c9a471d4fd36e6d 100644 (file)
@@ -751,7 +751,7 @@ upload_data( struct net_device  *dev,  unsigned  framelen,  unsigned  frameno,
 }
 
 
-static __inline void
+static inline void
 send_complete( struct net_local  *nl )
 {
 #ifdef CONFIG_SBNI_MULTILINE
index bdc6a1cc21033f44f1c322e38d2c3a626ab31fc5..f0ef7081bdeba69c4213e32e529b0477149ee3aa 100644 (file)
@@ -578,7 +578,7 @@ int lbs_process_rx_command(struct lbs_private *priv)
                goto done;
        }
        if (respcmd != CMD_RET(curcmd) &&
-           respcmd != CMD_802_11_ASSOCIATE && curcmd != CMD_RET_802_11_ASSOCIATE) {
+           respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) {
                lbs_pr_info("Invalid CMD_RESP %x to command %x!\n", respcmd, curcmd);
                spin_unlock_irqrestore(&priv->driver_lock, flags);
                ret = -1;
index e808db98f2f57b09c3815fb7cb07be91386b09eb..93ea212fedd51358f7e893688186895e7f858c58 100644 (file)
@@ -2302,9 +2302,9 @@ static void rt61pci_configure_filter(struct ieee80211_hw *hw,
         * Apply some rules to the filters:
         * - Some filters imply different filters to be set.
         * - Some things we can't filter out at all.
+        * - Multicast filter seems to kill broadcast traffic so never use it.
         */
-       if (mc_count)
-               *total_flags |= FIF_ALLMULTI;
+       *total_flags |= FIF_ALLMULTI;
        if (*total_flags & FIF_OTHER_BSS ||
            *total_flags & FIF_PROMISC_IN_BSS)
                *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS;
index 4fac2d414d845401067120dbe72ea3af9a13f9c8..8103d41a1543d04461611fada2d53d684d873962 100644 (file)
@@ -1869,9 +1869,9 @@ static void rt73usb_configure_filter(struct ieee80211_hw *hw,
         * Apply some rules to the filters:
         * - Some filters imply different filters to be set.
         * - Some things we can't filter out at all.
+        * - Multicast filter seems to kill broadcast traffic so never use it.
         */
-       if (mc_count)
-               *total_flags |= FIF_ALLMULTI;
+       *total_flags |= FIF_ALLMULTI;
        if (*total_flags & FIF_OTHER_BSS ||
            *total_flags & FIF_PROMISC_IN_BSS)
                *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS;
@@ -2098,6 +2098,7 @@ static struct usb_device_id rt73usb_device_table[] = {
        /* D-Link */
        { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) },
        { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) },
+       { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Gemtek */
        { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) },
        /* Gigabyte */
index de34aa9d3136055566204767cd2f5b9cbb28bfb6..f9f9a5f1bbd0f9d74c5f505c4dea7f7a1ac6c129 100644 (file)
@@ -829,7 +829,7 @@ static ssize_t pdcs_autoboot_write(struct kobject *kobj,
                                   struct kobj_attribute *attr,
                                   const char *buf, size_t count)
 {
-       return pdcs_auto_write(kset, attr, buf, count, PF_AUTOBOOT);
+       return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOBOOT);
 }
 
 /**
@@ -845,7 +845,7 @@ static ssize_t pdcs_autosearch_write(struct kobject *kobj,
                                     struct kobj_attribute *attr,
                                     const char *buf, size_t count)
 {
-       return pdcs_auto_write(kset, attr, buf, count, PF_AUTOSEARCH);
+       return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOSEARCH);
 }
 
 /**
@@ -1066,7 +1066,7 @@ pdc_stable_init(void)
        }
 
        /* Don't forget the root entries */
-       error = sysfs_create_group(stable_kobj, pdcs_attr_group);
+       error = sysfs_create_group(stable_kobj, &pdcs_attr_group);
 
        /* register the paths kset as a child of the stable kset */
        paths_kset = kset_create_and_add("paths", NULL, stable_kobj);
index bdbe780e21c51e36de99d359c4304bfac2cc2054..8c4d2c13d5f246057a42d73ac518637973fca79e 100644 (file)
@@ -314,8 +314,8 @@ sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents)
 #define RESMAP_MASK(n)    (~0UL << (BITS_PER_LONG - (n)))
 #define RESMAP_IDX_MASK   (sizeof(unsigned long) - 1)
 
-unsigned long ptr_to_pide(struct ioc *ioc, unsigned long *res_ptr,
-                         unsigned int bitshiftcnt)
+static unsigned long ptr_to_pide(struct ioc *ioc, unsigned long *res_ptr,
+                                unsigned int bitshiftcnt)
 {
        return (((unsigned long)res_ptr - (unsigned long)ioc->res_map) << 3)
                + bitshiftcnt;
index 6a9403d79e0c6fdd70ab80daecf85c6fed514488..d708358326e556ae03e00b213e89dd1baf0dceff 100644 (file)
@@ -143,14 +143,18 @@ void pci_bus_add_devices(struct pci_bus *bus)
                        /* register the bus with sysfs as the parent is now
                         * properly registered. */
                        child_bus = dev->subordinate;
+                       if (child_bus->is_added)
+                               continue;
                        child_bus->dev.parent = child_bus->bridge;
                        retval = device_register(&child_bus->dev);
                        if (retval)
                                dev_err(&dev->dev, "Error registering pci_bus,"
                                        " continuing...\n");
-                       else
+                       else {
+                               child_bus->is_added = 1;
                                retval = device_create_file(&child_bus->dev,
                                                        &dev_attr_cpuaffinity);
+                       }
                        if (retval)
                                dev_err(&dev->dev, "Error creating cpuaffinity"
                                        " file, continuing...\n");
index 7f4836b8e71e31e9c68071d120114d9a4b8a3317..5fa4ba0d9934e42418eb5e07451685dc7ac5956a 100644 (file)
@@ -467,7 +467,7 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
        t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
 
        t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
-       if (value) {
+       if (value && pciehp_force) {
                rc = pciehp_enable_slot(t_slot);
                if (rc) /* -ENODEV: shouldn't happen, but deal with it */
                        value = 0;
index 4a23654184fc04da02eb1a73468818709fbe6371..72f7476930c857ffa20a4c323dff3af6bf7c9baa 100644 (file)
@@ -272,21 +272,29 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 {
        acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
        acpi_handle tmp;
-       static int state_conv[] = {
-               [0] = 0,
-               [1] = 1,
-               [2] = 2,
-               [3] = 3,
-               [4] = 3
+       static const u8 state_conv[] = {
+               [PCI_D0] = ACPI_STATE_D0,
+               [PCI_D1] = ACPI_STATE_D1,
+               [PCI_D2] = ACPI_STATE_D2,
+               [PCI_D3hot] = ACPI_STATE_D3,
+               [PCI_D3cold] = ACPI_STATE_D3
        };
-       int acpi_state = state_conv[(int __force) state];
 
        if (!handle)
                return -ENODEV;
        /* If the ACPI device has _EJ0, ignore the device */
        if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp)))
                return 0;
-       return acpi_bus_set_power(handle, acpi_state);
+
+       switch (state) {
+       case PCI_D0:
+       case PCI_D1:
+       case PCI_D2:
+       case PCI_D3hot:
+       case PCI_D3cold:
+               return acpi_bus_set_power(handle, state_conv[state]);
+       }
+       return -EINVAL;
 }
 
 
index 4065139753b6c4b6e9e1becf06df11234bde8b5f..37993206ae5dd149d98672345ef5d16c6c21743c 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/slab.h>
 #include <linux/pnp.h>
 #include <linux/io.h>
-#include <linux/dmi.h>
 #include <linux/kallsyms.h>
 #include "base.h"
 
@@ -109,42 +108,73 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev)
                       "pnp: SB audio device quirk - increasing port range\n");
 }
 
-static void quirk_supermicro_h8dce_system(struct pnp_dev *dev)
+
+#include <linux/pci.h>
+
+static void quirk_system_pci_resources(struct pnp_dev *dev)
 {
-       int i;
-       static struct dmi_system_id supermicro_h8dce[] = {
-               {
-                       .ident = "Supermicro H8DCE",
-                       .matches = {
-                               DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"),
-                               DMI_MATCH(DMI_PRODUCT_NAME, "H8DCE"),
-                       },
-               },
-               { }
-       };
-
-       if (!dmi_check_system(supermicro_h8dce))
-               return;
+       struct pci_dev *pdev = NULL;
+       resource_size_t pnp_start, pnp_end, pci_start, pci_end;
+       int i, j;
 
        /*
-        * On the Supermicro H8DCE, there's a system device with resources
-        * that overlap BAR 6 of the built-in SATA PCI adapter.  If the PNP
-        * system device claims them, the sata_nv driver won't be able to.
-        * More details at:
-        *     https://bugzilla.redhat.com/show_bug.cgi?id=280641
-        *     https://bugzilla.redhat.com/show_bug.cgi?id=313491
-        *     http://lkml.org/lkml/2008/1/9/449
-        *     http://thread.gmane.org/gmane.linux.acpi.devel/27312
+        * Some BIOSes have PNP motherboard devices with resources that
+        * partially overlap PCI BARs.  The PNP system driver claims these
+        * motherboard resources, which prevents the normal PCI driver from
+        * requesting them later.
+        *
+        * This patch disables the PNP resources that conflict with PCI BARs
+        * so they won't be claimed by the PNP system driver.
         */
-       for (i = 0; i < PNP_MAX_MEM; i++) {
-               if (pnp_mem_valid(dev, i) && pnp_mem_len(dev, i) &&
-                   (pnp_mem_start(dev, i) & 0xdfef0000) == 0xdfef0000) {
-                       dev_warn(&dev->dev, "disabling 0x%llx-0x%llx to prevent"
-                               " conflict with sata_nv PCI device\n",
-                               (unsigned long long) pnp_mem_start(dev, i),
-                               (unsigned long long) (pnp_mem_start(dev, i) +
-                                       pnp_mem_len(dev, i) - 1));
-                       pnp_mem_flags(dev, i) = 0;
+       for_each_pci_dev(pdev) {
+               for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+                       if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM) ||
+                           pci_resource_len(pdev, i) == 0)
+                               continue;
+
+                       pci_start = pci_resource_start(pdev, i);
+                       pci_end = pci_resource_end(pdev, i);
+                       for (j = 0; j < PNP_MAX_MEM; j++) {
+                               if (!pnp_mem_valid(dev, j) ||
+                                   pnp_mem_len(dev, j) == 0)
+                                       continue;
+
+                               pnp_start = pnp_mem_start(dev, j);
+                               pnp_end = pnp_mem_end(dev, j);
+
+                               /*
+                                * If the PNP region doesn't overlap the PCI
+                                * region at all, there's no problem.
+                                */
+                               if (pnp_end < pci_start || pnp_start > pci_end)
+                                       continue;
+
+                               /*
+                                * If the PNP region completely encloses (or is
+                                * at least as large as) the PCI region, that's
+                                * also OK.  For example, this happens when the
+                                * PNP device describes a bridge with PCI
+                                * behind it.
+                                */
+                               if (pnp_start <= pci_start &&
+                                   pnp_end >= pci_end)
+                                       continue;
+
+                               /*
+                                * Otherwise, the PNP region overlaps *part* of
+                                * the PCI region, and that might prevent a PCI
+                                * driver from requesting its resources.
+                                */
+                               dev_warn(&dev->dev, "mem resource "
+                                       "(0x%llx-0x%llx) overlaps %s BAR %d "
+                                       "(0x%llx-0x%llx), disabling\n",
+                                       (unsigned long long) pnp_start,
+                                       (unsigned long long) pnp_end,
+                                       pci_name(pdev), i,
+                                       (unsigned long long) pci_start,
+                                       (unsigned long long) pci_end);
+                               pnp_mem_flags(dev, j) = 0;
+                       }
                }
        }
 }
@@ -169,8 +199,8 @@ static struct pnp_fixup pnp_fixups[] = {
        {"CTL0043", quirk_sb16audio_resources},
        {"CTL0044", quirk_sb16audio_resources},
        {"CTL0045", quirk_sb16audio_resources},
-       {"PNP0c01", quirk_supermicro_h8dce_system},
-       {"PNP0c02", quirk_supermicro_h8dce_system},
+       {"PNP0c01", quirk_system_pci_resources},
+       {"PNP0c02", quirk_system_pci_resources},
        {""}
 };
 
index c47a650183a14beeec627db2f439d47b7a08c401..41a3d00c45156f27d9c59c1663f02c95f4993265 100644 (file)
@@ -99,7 +99,7 @@ static dbdev_tab_t au1550_spi_mem_dbdev =
 static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw);
 
 
-/**
+/*
  *  compute BRG and DIV bits to setup spi clock based on main input clock rate
  *  that was specified in platform data structure
  *  according to au1550 datasheet:
@@ -650,7 +650,7 @@ static int au1550_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
        return hw->txrx_bufs(spi, t);
 }
 
-static irqreturn_t au1550_spi_irq(int irq, void *dev, struct pt_regs *regs)
+static irqreturn_t au1550_spi_irq(int irq, void *dev)
 {
        struct au1550_spi *hw = dev;
        return hw->irq_callback(hw);
index f7f8580edad86c9be126ce1b6abd97d7629ee261..71e881419cddaa6ba9c77f588ae6723ff633249a 100644 (file)
@@ -344,12 +344,14 @@ static void bitbang_work(struct work_struct *work)
                                        t->rx_dma = t->tx_dma = 0;
                                status = bitbang->txrx_bufs(spi, t);
                        }
+                       if (status > 0)
+                               m->actual_length += status;
                        if (status != t->len) {
-                               if (status > 0)
-                                       status = -EMSGSIZE;
+                               /* always report some kind of error */
+                               if (status >= 0)
+                                       status = -EREMOTEIO;
                                break;
                        }
-                       m->actual_length += status;
                        status = 0;
 
                        /* protocol tweaks before next transfer */
index 69f19f22487566e2e12110236c550265da7b7ff5..3ab313ed441cc07a4c9ef17ee62c3e325493a32c 100644 (file)
@@ -4,6 +4,7 @@
 
 menuconfig THERMAL
        bool "Generic Thermal sysfs driver"
+       select HWMON
        default y
        help
          Generic Thermal Sysfs driver offers a generic mechanism for
index 8b86e53ccf7a081586d32d09350dce072f2ef75e..41bd4c805ace249c6c43f44066df7c049d0cdac4 100644 (file)
 #include <linux/idr.h>
 #include <linux/thermal.h>
 #include <linux/spinlock.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
 
-MODULE_AUTHOR("Zhang Rui")
+MODULE_AUTHOR("Zhang Rui");
 MODULE_DESCRIPTION("Generic thermal management sysfs support");
 MODULE_LICENSE("GPL");
 
@@ -56,6 +58,9 @@ static LIST_HEAD(thermal_tz_list);
 static LIST_HEAD(thermal_cdev_list);
 static DEFINE_MUTEX(thermal_list_lock);
 
+static struct device *thermal_hwmon;
+#define MAX_THERMAL_ZONES      10
+
 static int get_idr(struct idr *idr, struct mutex *lock, int *id)
 {
        int err;
@@ -87,7 +92,67 @@ static void release_idr(struct idr *idr, struct mutex *lock, int id)
                mutex_unlock(lock);
 }
 
-/* sys I/F for thermal zone */
+/* hwmon sys I/F*/
+static ssize_t
+name_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+       return sprintf(buf, "thermal_sys_class\n");
+}
+
+static ssize_t
+temp_input_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+       struct thermal_zone_device *tz;
+       struct sensor_device_attribute *sensor_attr
+                                               = to_sensor_dev_attr(attr);
+
+       list_for_each_entry(tz, &thermal_tz_list, node)
+               if (tz->id == sensor_attr->index)
+                       return tz->ops->get_temp(tz, buf);
+
+       return -ENODEV;
+}
+
+static ssize_t
+temp_crit_show(struct device *dev, struct device_attribute *attr,
+               char *buf)
+{
+       struct thermal_zone_device *tz;
+       struct sensor_device_attribute *sensor_attr
+                                               = to_sensor_dev_attr(attr);
+
+       list_for_each_entry(tz, &thermal_tz_list, node)
+               if (tz->id == sensor_attr->index)
+                       return tz->ops->get_trip_temp(tz, 0, buf);
+
+       return -ENODEV;
+}
+
+static DEVICE_ATTR(name, 0444, name_show, NULL);
+static struct sensor_device_attribute sensor_attrs[] = {
+       SENSOR_ATTR(temp1_input, 0444, temp_input_show, NULL, 0),
+       SENSOR_ATTR(temp1_crit, 0444, temp_crit_show, NULL, 0),
+       SENSOR_ATTR(temp2_input, 0444, temp_input_show, NULL, 1),
+       SENSOR_ATTR(temp2_crit, 0444, temp_crit_show, NULL, 1),
+       SENSOR_ATTR(temp3_input, 0444, temp_input_show, NULL, 2),
+       SENSOR_ATTR(temp3_crit, 0444, temp_crit_show, NULL, 2),
+       SENSOR_ATTR(temp4_input, 0444, temp_input_show, NULL, 3),
+       SENSOR_ATTR(temp4_crit, 0444, temp_crit_show, NULL, 3),
+       SENSOR_ATTR(temp5_input, 0444, temp_input_show, NULL, 4),
+       SENSOR_ATTR(temp5_crit, 0444, temp_crit_show, NULL, 4),
+       SENSOR_ATTR(temp6_input, 0444, temp_input_show, NULL, 5),
+       SENSOR_ATTR(temp6_crit, 0444, temp_crit_show, NULL, 5),
+       SENSOR_ATTR(temp7_input, 0444, temp_input_show, NULL, 6),
+       SENSOR_ATTR(temp7_crit, 0444, temp_crit_show, NULL, 6),
+       SENSOR_ATTR(temp8_input, 0444, temp_input_show, NULL, 7),
+       SENSOR_ATTR(temp8_crit, 0444, temp_crit_show, NULL, 7),
+       SENSOR_ATTR(temp9_input, 0444, temp_input_show, NULL, 8),
+       SENSOR_ATTR(temp9_crit, 0444, temp_crit_show, NULL, 8),
+       SENSOR_ATTR(temp10_input, 0444, temp_input_show, NULL, 9),
+       SENSOR_ATTR(temp10_crit, 0444, temp_crit_show, NULL, 9),
+};
+
+/* thermal zone sys I/F */
 
 #define to_thermal_zone(_dev) \
        container_of(_dev, struct thermal_zone_device, device)
@@ -214,7 +279,7 @@ do {        \
        device_remove_file(_dev, &trip_point_attrs[_index * 2 + 1]);    \
 } while (0)
 
-/* sys I/F for cooling device */
+/* cooling device sys I/F */
 #define to_cooling_device(_dev)        \
        container_of(_dev, struct thermal_cooling_device, device)
 
@@ -447,6 +512,9 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
        struct thermal_zone_device *pos;
        int result;
 
+       if (!type)
+               return ERR_PTR(-EINVAL);
+
        if (strlen(type) >= THERMAL_NAME_LENGTH)
                return ERR_PTR(-EINVAL);
 
@@ -477,11 +545,9 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
        }
 
        /* sys I/F */
-       if (type) {
-               result = device_create_file(&cdev->device, &dev_attr_cdev_type);
-               if (result)
-                       goto unregister;
-       }
+       result = device_create_file(&cdev->device, &dev_attr_cdev_type);
+       if (result)
+               goto unregister;
 
        result = device_create_file(&cdev->device, &dev_attr_max_state);
        if (result)
@@ -547,8 +613,8 @@ void thermal_cooling_device_unregister(struct
                tz->ops->unbind(tz, cdev);
        }
        mutex_unlock(&thermal_list_lock);
-       if (cdev->type[0])
-               device_remove_file(&cdev->device, &dev_attr_cdev_type);
+
+       device_remove_file(&cdev->device, &dev_attr_cdev_type);
        device_remove_file(&cdev->device, &dev_attr_max_state);
        device_remove_file(&cdev->device, &dev_attr_cur_state);
 
@@ -580,6 +646,9 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
        int result;
        int count;
 
+       if (!type)
+               return ERR_PTR(-EINVAL);
+
        if (strlen(type) >= THERMAL_NAME_LENGTH)
                return ERR_PTR(-EINVAL);
 
@@ -601,6 +670,13 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
                kfree(tz);
                return ERR_PTR(result);
        }
+       if (tz->id >= MAX_THERMAL_ZONES) {
+               printk(KERN_ERR PREFIX
+                       "Too many thermal zones\n");
+               release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);
+               kfree(tz);
+               return ERR_PTR(-EINVAL);
+       }
 
        strcpy(tz->type, type);
        tz->ops = ops;
@@ -615,13 +691,28 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
                return ERR_PTR(result);
        }
 
-       /* sys I/F */
-       if (type) {
-               result = device_create_file(&tz->device, &dev_attr_type);
-               if (result)
-                       goto unregister;
+       /* hwmon sys I/F */
+       result = device_create_file(thermal_hwmon,
+                                       &sensor_attrs[tz->id * 2].dev_attr);
+       if (result)
+               goto unregister;
+
+       if (trips > 0) {
+               char buf[40];
+               result = tz->ops->get_trip_type(tz, 0, buf);
+               if (result > 0 && !strcmp(buf, "critical\n")) {
+                       result = device_create_file(thermal_hwmon,
+                                       &sensor_attrs[tz->id * 2 + 1].dev_attr);
+                       if (result)
+                               goto unregister;
+               }
        }
 
+       /* sys I/F */
+       result = device_create_file(&tz->device, &dev_attr_type);
+       if (result)
+               goto unregister;
+
        result = device_create_file(&tz->device, &dev_attr_temp);
        if (result)
                goto unregister;
@@ -687,8 +778,17 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)
                    tz->ops->unbind(tz, cdev);
        mutex_unlock(&thermal_list_lock);
 
-       if (tz->type[0])
-               device_remove_file(&tz->device, &dev_attr_type);
+       device_remove_file(thermal_hwmon,
+                               &sensor_attrs[tz->id * 2].dev_attr);
+       if (tz->trips > 0) {
+               char buf[40];
+               if (tz->ops->get_trip_type(tz, 0, buf) > 0)
+                       if (!strcmp(buf, "critical\n"))
+                               device_remove_file(thermal_hwmon,
+                               &sensor_attrs[tz->id * 2 + 1].dev_attr);
+       }
+
+       device_remove_file(&tz->device, &dev_attr_type);
        device_remove_file(&tz->device, &dev_attr_temp);
        if (tz->ops->get_mode)
                device_remove_file(&tz->device, &dev_attr_mode);
@@ -705,6 +805,19 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)
 
 EXPORT_SYMBOL(thermal_zone_device_unregister);
 
+static void thermal_exit(void)
+{
+       if (thermal_hwmon) {
+               device_remove_file(thermal_hwmon, &dev_attr_name);
+               hwmon_device_unregister(thermal_hwmon);
+       }
+       class_unregister(&thermal_class);
+       idr_destroy(&thermal_tz_idr);
+       idr_destroy(&thermal_cdev_idr);
+       mutex_destroy(&thermal_idr_lock);
+       mutex_destroy(&thermal_list_lock);
+}
+
 static int __init thermal_init(void)
 {
        int result = 0;
@@ -716,16 +829,20 @@ static int __init thermal_init(void)
                mutex_destroy(&thermal_idr_lock);
                mutex_destroy(&thermal_list_lock);
        }
-       return result;
-}
 
-static void __exit thermal_exit(void)
-{
-       class_unregister(&thermal_class);
-       idr_destroy(&thermal_tz_idr);
-       idr_destroy(&thermal_cdev_idr);
-       mutex_destroy(&thermal_idr_lock);
-       mutex_destroy(&thermal_list_lock);
+       thermal_hwmon = hwmon_device_register(NULL);
+       if (IS_ERR(thermal_hwmon)) {
+               result = PTR_ERR(thermal_hwmon);
+               thermal_hwmon = NULL;
+               printk(KERN_ERR PREFIX
+                       "unable to register hwmon device\n");
+               thermal_exit();
+               return result;
+       }
+
+       result = device_create_file(thermal_hwmon, &dev_attr_name);
+
+       return result;
 }
 
 subsys_initcall(thermal_init);
index c8a4332d1132ef465c5aa0d522787cbd255ce293..0b3efc31ee6d38620f97855a8c2d4941eea5f5b9 100644 (file)
@@ -152,7 +152,7 @@ static void virtballoon_changed(struct virtio_device *vdev)
        wake_up(&vb->config_change);
 }
 
-static inline int towards_target(struct virtio_balloon *vb)
+static inline s64 towards_target(struct virtio_balloon *vb)
 {
        u32 v;
        __virtio_config_val(vb->vdev,
@@ -176,7 +176,7 @@ static int balloon(void *_vballoon)
 
        set_freezable();
        while (!kthread_should_stop()) {
-               int diff;
+               s64 diff;
 
                try_to_freeze();
                wait_event_interruptible(vb->config_change,
index 26f787ddd5ff58b81165d8d443bb3bda23db2586..59a8f73dec730421c3dcff6b52c0c9de59798b43 100644 (file)
@@ -177,6 +177,7 @@ static irqreturn_t vp_interrupt(int irq, void *opaque)
        struct virtio_pci_device *vp_dev = opaque;
        struct virtio_pci_vq_info *info;
        irqreturn_t ret = IRQ_NONE;
+       unsigned long flags;
        u8 isr;
 
        /* reading the ISR has the effect of also clearing it so it's very
@@ -197,12 +198,12 @@ static irqreturn_t vp_interrupt(int irq, void *opaque)
                        drv->config_changed(&vp_dev->vdev);
        }
 
-       spin_lock(&vp_dev->lock);
+       spin_lock_irqsave(&vp_dev->lock, flags);
        list_for_each_entry(info, &vp_dev->virtqueues, node) {
                if (vring_interrupt(irq, info->vq) == IRQ_HANDLED)
                        ret = IRQ_HANDLED;
        }
-       spin_unlock(&vp_dev->lock);
+       spin_unlock_irqrestore(&vp_dev->lock, flags);
 
        return ret;
 }
@@ -214,6 +215,7 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
        struct virtio_pci_device *vp_dev = to_vp_device(vdev);
        struct virtio_pci_vq_info *info;
        struct virtqueue *vq;
+       unsigned long flags;
        u16 num;
        int err;
 
@@ -255,9 +257,9 @@ static struct virtqueue *vp_find_vq(struct virtio_device *vdev, unsigned index,
        vq->priv = info;
        info->vq = vq;
 
-       spin_lock(&vp_dev->lock);
+       spin_lock_irqsave(&vp_dev->lock, flags);
        list_add(&info->node, &vp_dev->virtqueues);
-       spin_unlock(&vp_dev->lock);
+       spin_unlock_irqrestore(&vp_dev->lock, flags);
 
        return vq;
 
@@ -274,10 +276,11 @@ static void vp_del_vq(struct virtqueue *vq)
 {
        struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev);
        struct virtio_pci_vq_info *info = vq->priv;
+       unsigned long flags;
 
-       spin_lock(&vp_dev->lock);
+       spin_lock_irqsave(&vp_dev->lock, flags);
        list_del(&info->node);
-       spin_unlock(&vp_dev->lock);
+       spin_unlock_irqrestore(&vp_dev->lock, flags);
 
        vring_del_virtqueue(vq);
 
index 3a28c1382131d04940035448d24aada5244e7589..aa714028641e630b068f683fc67e6707d6c6a853 100644 (file)
@@ -232,7 +232,6 @@ static bool vring_enable_cb(struct virtqueue *_vq)
        vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT;
        mb();
        if (unlikely(more_used(vq))) {
-               vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
                END_USE(vq);
                return false;
        }
index 3312fcc3c0986401511c1fc7c3948a6af6c69876..553b5b7960ad1a3f380f03afbf780f0867767972 100644 (file)
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1194,6 +1194,8 @@ EXPORT_SYMBOL(bio_hw_segments);
 EXPORT_SYMBOL(bio_add_page);
 EXPORT_SYMBOL(bio_add_pc_page);
 EXPORT_SYMBOL(bio_get_nr_vecs);
+EXPORT_SYMBOL(bio_map_user);
+EXPORT_SYMBOL(bio_unmap_user);
 EXPORT_SYMBOL(bio_map_kern);
 EXPORT_SYMBOL(bio_pair_release);
 EXPORT_SYMBOL(bio_split);
index 878bf25dbc6a8c60d8ffc9736c0d6bf5c20ed699..92fb358ce824325e6b8275388b111e70728463dc 100644 (file)
@@ -229,7 +229,7 @@ skip:
 static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
 {
        struct hfs_btree *tree;
-       struct hfs_bnode *node, *new_node;
+       struct hfs_bnode *node, *new_node, *next_node;
        struct hfs_bnode_desc node_desc;
        int num_recs, new_rec_off, new_off, old_rec_off;
        int data_start, data_end, size;
@@ -248,6 +248,17 @@ static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
        new_node->type = node->type;
        new_node->height = node->height;
 
+       if (node->next)
+               next_node = hfs_bnode_find(tree, node->next);
+       else
+               next_node = NULL;
+
+       if (IS_ERR(next_node)) {
+               hfs_bnode_put(node);
+               hfs_bnode_put(new_node);
+               return next_node;
+       }
+
        size = tree->node_size / 2 - node->num_recs * 2 - 14;
        old_rec_off = tree->node_size - 4;
        num_recs = 1;
@@ -261,6 +272,8 @@ static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
                /* panic? */
                hfs_bnode_put(node);
                hfs_bnode_put(new_node);
+               if (next_node)
+                       hfs_bnode_put(next_node);
                return ERR_PTR(-ENOSPC);
        }
 
@@ -315,8 +328,7 @@ static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd)
        hfs_bnode_write(node, &node_desc, 0, sizeof(node_desc));
 
        /* update next bnode header */
-       if (new_node->next) {
-               struct hfs_bnode *next_node = hfs_bnode_find(tree, new_node->next);
+       if (next_node) {
                next_node->prev = new_node->this;
                hfs_bnode_read(next_node, &node_desc, 0, sizeof(node_desc));
                node_desc.prev = cpu_to_be32(next_node->prev);
index 1eb771d79cca09a51326541dc76f3db3405f9245..3e6b3f41ee1f342918e6e3f57493f3c0ab21b033 100644 (file)
@@ -232,6 +232,7 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
                fhp->fh_dentry = dentry;
                fhp->fh_export = exp;
                nfsd_nr_verified++;
+               cache_get(&exp->h);
        } else {
                /*
                 * just rechecking permissions
@@ -241,6 +242,7 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
                dprintk("nfsd: fh_verify - just checking\n");
                dentry = fhp->fh_dentry;
                exp = fhp->fh_export;
+               cache_get(&exp->h);
                /*
                 * Set user creds for this exportpoint; necessary even
                 * in the "just checking" case because this may be a
@@ -252,8 +254,6 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
                if (error)
                        goto out;
        }
-       cache_get(&exp->h);
-
 
        error = nfsd_mode_check(rqstp, dentry->d_inode->i_mode, type);
        if (error)
index 91a1bd67ac1d6dd58da1d3db5c0691cdb7ea7525..9a4da0aae02e442e5be76fa84a0907a43e1bf848 100644 (file)
@@ -2269,6 +2269,9 @@ static const struct pid_entry tgid_base_stuff[] = {
        DIR("task",       S_IRUGO|S_IXUGO, task),
        DIR("fd",         S_IRUSR|S_IXUSR, fd),
        DIR("fdinfo",     S_IRUSR|S_IXUSR, fdinfo),
+#ifdef CONFIG_NET
+       DIR("net",        S_IRUGO|S_IXUSR, net),
+#endif
        REG("environ",    S_IRUSR, environ),
        INF("auxv",       S_IRUSR, pid_auxv),
        ONE("status",     S_IRUGO, pid_status),
index 68971e66cd41ca438f7dff0e6047322fca2b5d5f..a36ad3c75cf43bbc0cb9f34d550893d952316ac1 100644 (file)
@@ -377,15 +377,14 @@ static struct dentry_operations proc_dentry_operations =
  * Don't create negative dentries here, return -ENOENT by hand
  * instead.
  */
-struct dentry *proc_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd)
+struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir,
+               struct dentry *dentry)
 {
        struct inode *inode = NULL;
-       struct proc_dir_entry * de;
        int error = -ENOENT;
 
        lock_kernel();
        spin_lock(&proc_subdir_lock);
-       de = PDE(dir);
        if (de) {
                for (de = de->subdir; de ; de = de->next) {
                        if (de->namelen != dentry->d_name.len)
@@ -393,8 +392,6 @@ struct dentry *proc_lookup(struct inode * dir, struct dentry *dentry, struct nam
                        if (!memcmp(dentry->d_name.name, de->name, de->namelen)) {
                                unsigned int ino;
 
-                               if (de->shadow_proc)
-                                       de = de->shadow_proc(current, de);
                                ino = de->low_ino;
                                de_get(de);
                                spin_unlock(&proc_subdir_lock);
@@ -417,6 +414,12 @@ out_unlock:
        return ERR_PTR(error);
 }
 
+struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry,
+               struct nameidata *nd)
+{
+       return proc_lookup_de(PDE(dir), dir, dentry);
+}
+
 /*
  * This returns non-zero if at EOF, so that the /proc
  * root directory can use this and check if it should
@@ -426,10 +429,9 @@ out_unlock:
  * value of the readdir() call, as long as it's non-negative
  * for success..
  */
-int proc_readdir(struct file * filp,
-       void * dirent, filldir_t filldir)
+int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent,
+               filldir_t filldir)
 {
-       struct proc_dir_entry * de;
        unsigned int ino;
        int i;
        struct inode *inode = filp->f_path.dentry->d_inode;
@@ -438,7 +440,6 @@ int proc_readdir(struct file * filp,
        lock_kernel();
 
        ino = inode->i_ino;
-       de = PDE(inode);
        if (!de) {
                ret = -EINVAL;
                goto out;
@@ -499,6 +500,13 @@ out:       unlock_kernel();
        return ret;     
 }
 
+int proc_readdir(struct file *filp, void *dirent, filldir_t filldir)
+{
+       struct inode *inode = filp->f_path.dentry->d_inode;
+
+       return proc_readdir_de(PDE(inode), filp, dirent, filldir);
+}
+
 /*
  * These are the generic /proc directory operations. They
  * use the in-memory "struct proc_dir_entry" tree to parse
index 1c81c8f1aeed411d05331e3bcd61c39e43343b4e..bc72f5c8c47d34704cb6a76ef450e1bd6dc84f0d 100644 (file)
@@ -64,6 +64,8 @@ extern const struct file_operations proc_numa_maps_operations;
 extern const struct file_operations proc_smaps_operations;
 extern const struct file_operations proc_clear_refs_operations;
 extern const struct file_operations proc_pagemap_operations;
+extern const struct file_operations proc_net_operations;
+extern const struct inode_operations proc_net_inode_operations;
 
 void free_proc_entry(struct proc_dir_entry *de);
 
@@ -83,3 +85,8 @@ static inline int proc_fd(struct inode *inode)
 {
        return PROC_I(inode)->fd;
 }
+
+struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *ino,
+               struct dentry *dentry);
+int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent,
+               filldir_t filldir);
index 14e9b5aaf863bce23d6ccb03aa582cb9b6a4c566..4caa5f774fb7975136d04e2baf81826e1c392dba 100644 (file)
@@ -63,6 +63,82 @@ int seq_release_net(struct inode *ino, struct file *f)
 }
 EXPORT_SYMBOL_GPL(seq_release_net);
 
+static struct net *get_proc_task_net(struct inode *dir)
+{
+       struct task_struct *task;
+       struct nsproxy *ns;
+       struct net *net = NULL;
+
+       rcu_read_lock();
+       task = pid_task(proc_pid(dir), PIDTYPE_PID);
+       if (task != NULL) {
+               ns = task_nsproxy(task);
+               if (ns != NULL)
+                       net = get_net(ns->net_ns);
+       }
+       rcu_read_unlock();
+
+       return net;
+}
+
+static struct dentry *proc_tgid_net_lookup(struct inode *dir,
+               struct dentry *dentry, struct nameidata *nd)
+{
+       struct dentry *de;
+       struct net *net;
+
+       de = ERR_PTR(-ENOENT);
+       net = get_proc_task_net(dir);
+       if (net != NULL) {
+               de = proc_lookup_de(net->proc_net, dir, dentry);
+               put_net(net);
+       }
+       return de;
+}
+
+static int proc_tgid_net_getattr(struct vfsmount *mnt, struct dentry *dentry,
+               struct kstat *stat)
+{
+       struct inode *inode = dentry->d_inode;
+       struct net *net;
+
+       net = get_proc_task_net(inode);
+
+       generic_fillattr(inode, stat);
+
+       if (net != NULL) {
+               stat->nlink = net->proc_net->nlink;
+               put_net(net);
+       }
+
+       return 0;
+}
+
+const struct inode_operations proc_net_inode_operations = {
+       .lookup         = proc_tgid_net_lookup,
+       .getattr        = proc_tgid_net_getattr,
+};
+
+static int proc_tgid_net_readdir(struct file *filp, void *dirent,
+               filldir_t filldir)
+{
+       int ret;
+       struct net *net;
+
+       ret = -EINVAL;
+       net = get_proc_task_net(filp->f_path.dentry->d_inode);
+       if (net != NULL) {
+               ret = proc_readdir_de(net->proc_net, filp, dirent, filldir);
+               put_net(net);
+       }
+       return ret;
+}
+
+const struct file_operations proc_net_operations = {
+       .read           = generic_read_dir,
+       .readdir        = proc_tgid_net_readdir,
+};
+
 
 struct proc_dir_entry *proc_net_fops_create(struct net *net,
        const char *name, mode_t mode, const struct file_operations *fops)
@@ -83,14 +159,6 @@ struct net *get_proc_net(const struct inode *inode)
 }
 EXPORT_SYMBOL_GPL(get_proc_net);
 
-static struct proc_dir_entry *shadow_pde;
-
-static struct proc_dir_entry *proc_net_shadow(struct task_struct *task,
-                                               struct proc_dir_entry *de)
-{
-       return task->nsproxy->net_ns->proc_net;
-}
-
 struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
                struct proc_dir_entry *parent)
 {
@@ -104,45 +172,39 @@ EXPORT_SYMBOL_GPL(proc_net_mkdir);
 
 static __net_init int proc_net_ns_init(struct net *net)
 {
-       struct proc_dir_entry *root, *netd, *net_statd;
+       struct proc_dir_entry *netd, *net_statd;
        int err;
 
        err = -ENOMEM;
-       root = kzalloc(sizeof(*root), GFP_KERNEL);
-       if (!root)
+       netd = kzalloc(sizeof(*netd), GFP_KERNEL);
+       if (!netd)
                goto out;
 
-       err = -EEXIST;
-       netd = proc_net_mkdir(net, "net", root);
-       if (!netd)
-               goto free_root;
+       netd->data = net;
+       netd->nlink = 2;
+       netd->name = "net";
+       netd->namelen = 3;
+       netd->parent = &proc_root;
 
        err = -EEXIST;
        net_statd = proc_net_mkdir(net, "stat", netd);
        if (!net_statd)
                goto free_net;
 
-       root->data = net;
-
-       net->proc_net_root = root;
        net->proc_net = netd;
        net->proc_net_stat = net_statd;
-       err = 0;
+       return 0;
 
+free_net:
+       kfree(netd);
 out:
        return err;
-free_net:
-       remove_proc_entry("net", root);
-free_root:
-       kfree(root);
-       goto out;
 }
 
 static __net_exit void proc_net_ns_exit(struct net *net)
 {
        remove_proc_entry("stat", net->proc_net);
-       remove_proc_entry("net", net->proc_net_root);
-       kfree(net->proc_net_root);
+       kfree(net->proc_net);
 }
 
 static struct pernet_operations __net_initdata proc_net_ns_ops = {
@@ -152,8 +214,7 @@ static struct pernet_operations __net_initdata proc_net_ns_ops = {
 
 int __init proc_net_init(void)
 {
-       shadow_pde = proc_mkdir("net", NULL);
-       shadow_pde->shadow_proc = proc_net_shadow;
+       proc_symlink("net", NULL, "self/net");
 
        return register_pernet_subsys(&proc_net_ns_ops);
 }
index 6dc0334815f7f1243691ff714b175e2bc2b4dd54..4206454734e09d464d34a5c5a3bd86a6b51cfa9d 100644 (file)
@@ -640,17 +640,17 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
 
        ret = -EACCES;
        if (!ptrace_may_attach(task))
-               goto out;
+               goto out_task;
 
        ret = -EINVAL;
        /* file position must be aligned */
        if (*ppos % PM_ENTRY_BYTES)
-               goto out;
+               goto out_task;
 
        ret = 0;
        mm = get_task_mm(task);
        if (!mm)
-               goto out;
+               goto out_task;
 
        ret = -ENOMEM;
        uaddr = (unsigned long)buf & PAGE_MASK;
@@ -658,7 +658,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
        pagecount = (PAGE_ALIGN(uend) - uaddr) / PAGE_SIZE;
        pages = kmalloc(pagecount * sizeof(struct page *), GFP_KERNEL);
        if (!pages)
-               goto out_task;
+               goto out_mm;
 
        down_read(&current->mm->mmap_sem);
        ret = get_user_pages(current, current->mm, uaddr, pagecount,
@@ -668,6 +668,12 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
        if (ret < 0)
                goto out_free;
 
+       if (ret != pagecount) {
+               pagecount = ret;
+               ret = -EFAULT;
+               goto out_pages;
+       }
+
        pm.out = buf;
        pm.end = buf + count;
 
@@ -699,15 +705,17 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
                        ret = pm.out - buf;
        }
 
+out_pages:
        for (; pagecount; pagecount--) {
                page = pages[pagecount-1];
                if (!PageReserved(page))
                        SetPageDirty(page);
                page_cache_release(page);
        }
-       mmput(mm);
 out_free:
        kfree(pages);
+out_mm:
+       mmput(mm);
 out_task:
        put_task_struct(task);
 out:
index 1c2b55c61ca013b1f4704511a8e04b645368fdac..0f6404435ea8f11d38ab1998fdb98696076e5168 100644 (file)
@@ -36,7 +36,7 @@
 
 #define NR_IRQS                                (MAXIRQNUM + 1)
 
-extern void __init h3_mmc_init(void);
+extern void h3_mmc_init(void);
 extern void h3_mmc_slot_cover_handler(void *arg, int state);
 
 #endif /*  __ASM_ARCH_OMAP_H3_H */
index 442aecbb8f44b23f3392906b9c790dc5e651f626..224e009e529633a07042429c4f51cf93c5781799 100644 (file)
@@ -27,9 +27,7 @@
 #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
 #define __ARCH_ARM_MACH_OMAP_COMMON_H
 
-#ifdef CONFIG_I2C_OMAP
 #include <linux/i2c.h>
-#endif
 
 struct sys_timer;
 
@@ -41,7 +39,12 @@ extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
                                 struct i2c_board_info const *info,
                                 unsigned len);
 #else
-#define omap_register_i2c_bus(a, b, c, d)      0
+static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
+                                struct i2c_board_info const *info,
+                                unsigned len)
+{
+       return 0;
+}
 #endif
 
 #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
index 7a43b0a912e4ec9826440cf6ab4d30fe031a8065..4eed1f80e2fb57c6ae4cd7c84d2b9ddefede12be 100644 (file)
 
 /* Function Prototypes for GPIO Expander functions */
 
+#ifdef CONFIG_GPIOEXPANDER_OMAP
 int read_gpio_expa(u8 *, int);
 int write_gpio_expa(u8 , int);
+#else
+static inline int read_gpio_expa(u8 *val, int addr)
+{
+       return 0;
+}
+static inline int write_gpio_expa(u8 val, int addr)
+{
+       return 0;
+}
+#endif
 
 #endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */
index 33c83dd879654aa5e3c83f18b4ad022a1603ac3a..2e5868bbe03bd9dba8c0a3c791cbe1d9c02642ea 100644 (file)
@@ -92,6 +92,8 @@ extern unsigned int kobjsize(const void *objp);
 
 #define FIRST_USER_ADDRESS      (0)
 
+#include <asm-generic/pgtable.h>
+
 #else 
 
 /*
index b5e6208175d1738fb203450bd39793aa053fc040..19b9eda39485191ac13405ce02b8e0531f997ae1 100644 (file)
@@ -27,8 +27,8 @@ static void arch_detect_cpu(void);
 
 /* defines for UART registers */
 
-#include "asm/plat-s3c/regs-serial.h"
-#include "asm/plat-s3c/regs-watchdog.h"
+#include <asm/plat-s3c/regs-serial.h>
+#include <asm/plat-s3c/regs-watchdog.h>
 
 /* working in physical space... */
 #undef S3C2410_WDOGREG
index a4ce457199d3279fb3d07856cf5a5b178e9be687..75ec760f4c748a0bb9ab5722e552c45b866599b8 100644 (file)
 #ifndef __ASSEMBLY__
 
 #ifndef MULTI_CPU
-#include "asm/cpu-single.h"
+#include <asm/cpu-single.h>
 #else
-#include "asm/cpu-multi32.h"
+#include <asm/cpu-multi32.h>
 #endif
 
 #include <asm/memory.h>
index a22350ec271aae96e494fdcc6c90c432010a296d..356068cd0879bdf145bd68f12857b75cfd95ab4c 100644 (file)
@@ -91,22 +91,19 @@ extern int __put_user_bad(void);
 #define get_user(x, ptr)                                       \
 ({                                                             \
     int __gu_err = 0;                                          \
-    uint32_t __gu_val = 0;                             \
+    typeof(*(ptr)) __gu_val = *ptr;                            \
     switch (sizeof(*(ptr))) {                                  \
     case 1:                                                    \
     case 2:                                                    \
     case 4:                                                    \
-       __gu_val = *(ptr);                                      \
-       break;                                                  \
-    case 8:                                                    \
-       memcpy(&__gu_val, ptr, sizeof (*(ptr)));                \
+    case 8:                                                    \
        break;                                                  \
     default:                                                   \
-       __gu_val = 0;                                           \
        __gu_err = __get_user_bad();                            \
+       __gu_val = 0;                                           \
        break;                                                  \
     }                                                          \
-    (x) = (typeof(*(ptr)))__gu_val;                            \
+    (x) = __gu_val;                                            \
     __gu_err;                                                  \
 })
 #define __get_user(x, ptr) get_user(x, ptr)
index 4933b4947ed0c9008b761e95c9d4ff1aab25879d..01e7eadc97e2fdbd28d79f056f2c3336a8aeb652 100644 (file)
@@ -93,7 +93,7 @@ extern void (*flush_data_cache_page)(unsigned long addr);
        clear_bit(PG_dcache_dirty, &(page)->flags)
 
 /* Run kernel code uncached, useful for cache probing functions. */
-unsigned long __init run_uncached(void *func);
+unsigned long run_uncached(void *func);
 
 extern void *kmap_coherent(struct page *page, unsigned long addr);
 extern void kunmap_coherent(void);
index 4d6bd5c31c7bf38f5551d08a2db3b980ed1cac37..4374ab2adc756626cd5d9278b37679737a9db6ca 100644 (file)
@@ -39,7 +39,6 @@ extern pte_t *pkmap_page_table;
  * easily, subsequent pte tables have to be allocated in one physical
  * chunk of RAM.
  */
-#define PKMAP_BASE (0xfe000000UL)
 #define LAST_PKMAP 1024
 #define LAST_PKMAP_MASK (LAST_PKMAP-1)
 #define PKMAP_NR(virt)  ((virt-PKMAP_BASE) >> PAGE_SHIFT)
index fe076380c1891175549b62b180dea3dba1aaf122..7d3112b148d905f999049f596c3caf6eeb84ab50 100644 (file)
 #define cpu_has_64bits         1
 
 #define cpu_has_4kex           1
+#define cpu_has_3k_cache       0
+#define cpu_has_6k_cache       0
 #define cpu_has_4k_cache       1
+#define cpu_has_8k_cache       0
+#define cpu_has_tx39_cache     0
 
 #define cpu_has_inclusive_pcaches      1
 
index aa131ad7f7177c9de0698ddfdcfea3061e361ff7..29989ff10d663254da95f7dcb4619f7ef5da2dcb 100644 (file)
@@ -25,7 +25,7 @@ static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size,
 {
 #define TXX9_DIRECTMAP_BASE    0xff000000ul
        if (offset >= TXX9_DIRECTMAP_BASE &&
-           offset < TXX9_DIRECTMAP_BASE + 0xf0000)
+           offset < TXX9_DIRECTMAP_BASE + 0xff0000)
                return (void __iomem *)offset;
        return NULL;
 }
index da75f89f37235900e4c06620f94bfc4d783953b0..3a282419d5f93a87dc2da42891aab61b3de60076 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _ASM_MACH_LASAT_IRQ_H
 #define _ASM_MACH_LASAT_IRQ_H
 
-#define LASAT_CASCADE_IRQ      (MIPS_CPU_IRQ_BASE + 0)
+#define LASAT_CASCADE_IRQ      (MIPS_CPU_IRQ_BASE + 2)
 
 #define LASAT_IRQ_BASE         8
 #define LASAT_IRQ_END          23
index a0947092d0e0f11607f03193a87ee098dc061bf3..ceefe027c76104176a985751ea45d76a972db76f 100644 (file)
@@ -65,6 +65,8 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
 
 #define VMALLOC_START     MAP_BASE
 
+#define PKMAP_BASE             (0xfe000000UL)
+
 #ifdef CONFIG_HIGHMEM
 # define VMALLOC_END   (PKMAP_BASE-2*PAGE_SIZE)
 #else
index a8fd16e1981f36fd7837835366cc412b32465506..d3bd5c5aa2ecd0ae1fa34c9083debcac6c4107e0 100644 (file)
@@ -64,10 +64,11 @@ static inline int mips_clockevent_init(void)
  * Initialize the count register as a clocksource
  */
 #ifdef CONFIG_CEVT_R4K
-extern void init_mips_clocksource(void);
+extern int init_mips_clocksource(void);
 #else
-static inline void init_mips_clocksource(void)
+static inline int init_mips_clocksource(void)
 {
+       return 0;
 }
 #endif
 
index ce0c0d844c7dfe40addc2488e94d2af5c7b2cb72..d0a4a82628181578a943ae082c60ae8b63959411 100644 (file)
@@ -204,7 +204,7 @@ typedef struct elf64_fdesc {
 /*
  * The following definitions are those for 32-bit ELF binaries on a 32-bit
  * kernel and for 64-bit binaries on a 64-bit kernel.  To run 32-bit binaries
- * on a 64-bit kernel, arch/parisc64/kernel/binfmt_elf32.c defines these
+ * on a 64-bit kernel, arch/parisc/kernel/binfmt_elf32.c defines these
  * macros appropriately and then #includes binfmt_elf.c, which then includes
  * this file.
  */
@@ -216,26 +216,25 @@ typedef struct elf64_fdesc {
  * Note that this header file is used by default in fs/binfmt_elf.c. So
  * the following macros are for the default case. However, for the 64
  * bit kernel we also support 32 bit parisc binaries. To do that
- * arch/parisc64/kernel/binfmt_elf32.c defines its own set of these
+ * arch/parisc/kernel/binfmt_elf32.c defines its own set of these
  * macros, and then it includes fs/binfmt_elf.c to provide an alternate
  * elf binary handler for 32 bit binaries (on the 64 bit kernel).
  */
 #ifdef CONFIG_64BIT
-#define ELF_CLASS       ELFCLASS64
+#define ELF_CLASS   ELFCLASS64
 #else
 #define ELF_CLASS      ELFCLASS32
 #endif
 
 typedef unsigned long elf_greg_t;
 
-/* This yields a string that ld.so will use to load implementation
-   specific libraries for optimization.  This is more specific in
-   intent than poking at uname or /proc/cpuinfo.
-
-   For the moment, we have only optimizations for the Intel generations,
-   but that could change... */
+/*
+ * This yields a string that ld.so will use to load implementation
+ * specific libraries for optimization.  This is more specific in
+ * intent than poking at uname or /proc/cpuinfo.
+ */
 
-#define ELF_PLATFORM  ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */)
+#define ELF_PLATFORM  ("PARISC\0")
 
 #define SET_PERSONALITY(ex, ibcs2) \
        current->personality = PER_LINUX; \
@@ -310,7 +309,7 @@ struct pt_regs;     /* forward declaration... */
 #define ELF_OSABI      ELFOSABI_LINUX
 
 /* %r23 is set by ld.so to a pointer to a function which might be 
-   registered using atexit.  This provides a mean for the dynamic
+   registered using atexit.  This provides a means for the dynamic
    linker to call DT_FINI functions for shared libraries that have
    been loaded before the code runs.
 
@@ -339,6 +338,5 @@ struct pt_regs;     /* forward declaration... */
    but it's not easy, and we've already done it here.  */
 
 #define ELF_HWCAP      0
-/* (boot_cpu_data.x86_capability) */
 
 #endif
index a5caf4b122b7c323b5abc9d233006d992214ceca..de3fe3a18229a23e99cea0ec2ec6a7cc7a9e6669 100644 (file)
 #define KERNEL_MAP_START       (GATEWAY_PAGE_SIZE)
 #define KERNEL_MAP_END         (TMPALIAS_MAP_START)
 
-#endif
+#ifndef __ASSEMBLY__
+extern void *vmalloc_start;
+#define PCXL_DMA_MAP_SIZE      (8*1024*1024)
+#define VMALLOC_START          ((unsigned long)vmalloc_start)
+#define VMALLOC_END            (KERNEL_MAP_END)
+#endif /*__ASSEMBLY__*/
+
+#endif /*_ASM_FIXMAP_H*/
index dbee6e60aa8139e66897ba65ba4ac9155bf00dab..fdc6d055ef7f2af68872f2f195d8b417ebb9558f 100644 (file)
@@ -56,6 +56,12 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
        int err = 0;
        int uval;
 
+       /* futex.c wants to do a cmpxchg_inatomic on kernel NULL, which is
+        * our gateway page, and causes no end of trouble...
+        */
+       if (segment_eq(KERNEL_DS, get_fs()) && !uaddr)
+               return -EFAULT;
+
        if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
                return -EFAULT;
 
@@ -67,5 +73,5 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
        return uval;
 }
 
-#endif
-#endif
+#endif /*__KERNEL__*/
+#endif /*_ASM_PARISC_FUTEX_H*/
index deda8c311373bb685771e38c44bc44668772d4d0..9eaa794c3e4a3f1de70716e450896e1cddf8d570 100644 (file)
@@ -645,8 +645,7 @@ int pdc_soft_power_button(int sw_control);
 void pdc_io_reset(void);
 void pdc_io_reset_devices(void);
 int pdc_iodc_getc(void);
-int pdc_iodc_print(unsigned char *str, unsigned count);
-void pdc_printf(const char *fmt, ...);
+int pdc_iodc_print(const unsigned char *str, unsigned count);
 
 void pdc_emergency_unlock(void);
 int pdc_sti_call(unsigned long func, unsigned long flags,
index 3996dfc30a3f3366aebd714d63b35fb8455fcbac..fc987a1c12a88828d66c9c322da3d0a514fd5143 100644 (file)
@@ -138,10 +138,10 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
        free_page((unsigned long)pte);
 }
 
-static inline void pte_free_kernel(struct mm_struct *mm, struct page *pte)
+static inline void pte_free(struct mm_struct *mm, struct page *pte)
 {
        pgtable_page_dtor(pte);
-       pte_free_kernel(page_address((pte));
+       pte_free_kernel(mm, page_address(pte));
 }
 
 #define check_pgt_cache()      do { } while (0)
index cd0fa4f73320fdbe72dd63b9a9aae1d425978d17..dc86adbec916da26e7825523324c39dc8a642fec 100644 (file)
 
 #define FIRST_USER_ADDRESS     0
 
-#ifndef __ASSEMBLY__
-extern  void *vmalloc_start;
-#define PCXL_DMA_MAP_SIZE   (8*1024*1024)
-#define VMALLOC_START   ((unsigned long)vmalloc_start)
-/* this is a fixmap remnant, see fixmap.h */
-#define VMALLOC_END    (KERNEL_MAP_END)
-#endif
-
 /* NB: The tlb miss handlers make certain assumptions about the order */
 /*     of the following bits, so be careful (One example, bits 25-31  */
 /*     are moved together in one instruction).                        */
index 081b4ae6186682aeaeffff35a677eab29b869f95..a7d857f0e4f404963c86f2baeb240f80d7a6f110 100644 (file)
 #define __NR_timerfd           (__NR_Linux + 303)
 #define __NR_eventfd           (__NR_Linux + 304)
 #define __NR_fallocate         (__NR_Linux + 305)
+#define __NR_timerfd_create    (__NR_Linux + 306)
+#define __NR_timerfd_settime   (__NR_Linux + 307)
+#define __NR_timerfd_gettime   (__NR_Linux + 308)
 
-#define __NR_Linux_syscalls    (__NR_fallocate + 1)
+#define __NR_Linux_syscalls    (__NR_timerfd_gettime + 1)
 
 
 #define __IGNORE_select                /* newselect */
index d1332bbcbd9ba29eee90b389cffdc6ea90d3e5ca..2c79f550272bf08bade81d3ec7cd3eb88e02895a 100644 (file)
@@ -339,14 +339,6 @@ extern int icache_44x_need_flush;
 #define _PMD_PAGE_MASK 0x000c
 #define _PMD_PAGE_8M   0x000c
 
-/*
- * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE
- * for an address even if _PAGE_PRESENT is not set, as a performance
- * optimization.  This is a bug if you ever want to use swap unless
- * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific
- * definitions for __swp_entry etc. below, which would be gross.
- *  -- paulus
- */
 #define _PTE_NONE_MASK _PAGE_ACCESSED
 
 #else /* CONFIG_6xx */
index 69347bdbb4015617eb2ac5c30d615a32d0af654b..70435d32129a5dd3ea43335ed46755148ac4fe3e 100644 (file)
@@ -299,14 +299,6 @@ extern unsigned long ioremap_bot, ioremap_base;
 #define _PMD_PAGE_MASK 0x000c
 #define _PMD_PAGE_8M   0x000c
 
-/*
- * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE
- * for an address even if _PAGE_PRESENT is not set, as a performance
- * optimization.  This is a bug if you ever want to use swap unless
- * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific
- * definitions for __swp_entry etc. below, which would be gross.
- *  -- paulus
- */
 #define _PTE_NONE_MASK _PAGE_ACCESSED
 
 #else /* CONFIG_6xx */
index 994df3780007c7da7ea42f773cb67b50ffd9e81b..4108b38ebb16f2c3e9f715e62915d1e29c64f513 100644 (file)
@@ -127,7 +127,6 @@ header-y += pkt_sched.h
 header-y += posix_types.h
 header-y += ppdev.h
 header-y += prctl.h
-header-y += ps2esdi.h
 header-y += qnxtypes.h
 header-y += quotaio_v1.h
 header-y += quotaio_v2.h
@@ -205,7 +204,6 @@ unifdef-y += futex.h
 unifdef-y += fs.h
 unifdef-y += gameport.h
 unifdef-y += generic_serial.h
-unifdef-y += genhd.h
 unifdef-y += gfs2_ondisk.h
 unifdef-y += hayesesp.h
 unifdef-y += hdlcdrv.h
index fcbe8b640ffba57f04a35c986728bf850717bb6c..c8d216357865dda3e22bd503df478055b3d888b9 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef _LINUX_ETHTOOL_H
 #define _LINUX_ETHTOOL_H
 
+#include <linux/types.h>
 
 /* This should work for both 32 and 64 bit userland. */
 struct ethtool_cmd {
index 51d214138814a509803e22db093c8a9f91108227..adcbb05b120b156758c4a8894990869ad473e103 100644 (file)
@@ -49,11 +49,11 @@ struct fid {
 
 /**
  * struct export_operations - for nfsd to communicate with file systems
- * @decode_fh:      decode a file handle fragment and return a &struct dentry
  * @encode_fh:      encode a file handle fragment from a dentry
+ * @fh_to_dentry:   find the implied object and get a dentry for it
+ * @fh_to_parent:   find the implied object's parent and get a dentry for it
  * @get_name:       find the name for a given inode in a given directory
  * @get_parent:     find the parent of a given directory
- * @get_dentry:     find a dentry for the inode given a file handle sub-fragment
  *
  * See Documentation/filesystems/Exporting for details on how to use
  * this interface correctly.
index 32c2ac49a07071c67264c854707aebe8ae03850f..ecd2bf63fc849e201f4825010293ba20a736d09b 100644 (file)
@@ -55,24 +55,6 @@ enum {
        UNIXWARE_PARTITION = 0x63,      /* Same as GNU_HURD and SCO Unix */
 };
 
-#ifndef __KERNEL__
-
-struct partition {
-       unsigned char boot_ind;         /* 0x80 - active */
-       unsigned char head;             /* starting head */
-       unsigned char sector;           /* starting sector */
-       unsigned char cyl;              /* starting cylinder */
-       unsigned char sys_ind;          /* What partition type */
-       unsigned char end_head;         /* end head */
-       unsigned char end_sector;       /* end sector */
-       unsigned char end_cyl;          /* end cylinder */
-       unsigned int start_sect;        /* starting sector counting from 0 */
-       unsigned int nr_sects;          /* nr of sectors in partition */
-} __attribute__((packed));
-
-#endif
-
-#ifdef __KERNEL__
 #include <linux/major.h>
 #include <linux/device.h>
 #include <linux/smp.h>
@@ -228,7 +210,7 @@ static inline void part_stat_set_all(struct hd_struct *part, int value)     {
                       sizeof(struct disk_stats));
 }
                                
-#else
+#else /* !CONFIG_SMP */
 #define __disk_stat_add(gendiskp, field, addnd) \
                                (gendiskp->dkstats.field += addnd)
 #define disk_stat_read(gendiskp, field)        (gendiskp->dkstats.field)
@@ -256,7 +238,7 @@ static inline void part_stat_set_all(struct hd_struct *part, int value)
        memset(&part->dkstats, value, sizeof(struct disk_stats));
 }
 
-#endif
+#endif /* CONFIG_SMP */
 
 #define disk_stat_add(gendiskp, field, addnd)                  \
        do {                                                    \
@@ -395,8 +377,6 @@ static inline void set_capacity(struct gendisk *disk, sector_t size)
        disk->capacity = size;
 }
 
-#endif  /*  __KERNEL__  */
-
 #ifdef CONFIG_SOLARIS_X86_PARTITION
 
 #define SOLARIS_X86_NUMSLICE   16
@@ -540,8 +520,6 @@ struct unixware_disklabel {
 #   define MINIX_NR_SUBPARTITIONS  4
 #endif /* CONFIG_MINIX_SUBPARTITION */
 
-#ifdef __KERNEL__
-
 #define ADDPART_FLAG_NONE      0
 #define ADDPART_FLAG_RAID      1
 #define ADDPART_FLAG_WHOLEDISK 2
@@ -570,8 +548,6 @@ static inline struct block_device *bdget_disk(struct gendisk *disk, int index)
        return bdget(MKDEV(disk->major, disk->first_minor) + index);
 }
 
-#endif
-
 #else /* CONFIG_BLOCK */
 
 static inline void printk_all_partitions(void) { }
@@ -584,4 +560,4 @@ static inline dev_t blk_lookup_devt(const char *name)
 
 #endif /* CONFIG_BLOCK */
 
-#endif
+#endif /* _LINUX_GENHD_H */
index 3f3ccfe42de015f23c2350322c4ff053d3a41d38..b695875d63e308bcc9086e5889c0040438f0a363 100644 (file)
@@ -235,15 +235,22 @@ static inline int get_page_unless_zero(struct page *page)
 struct page *vmalloc_to_page(const void *addr);
 unsigned long vmalloc_to_pfn(const void *addr);
 
-#ifdef CONFIG_MMU
-/* Determine if an address is within the vmalloc range */
+/*
+ * Determine if an address is within the vmalloc range
+ *
+ * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
+ * is no special casing required.
+ */
 static inline int is_vmalloc_addr(const void *x)
 {
+#ifdef CONFIG_MMU
        unsigned long addr = (unsigned long)x;
 
        return addr >= VMALLOC_START && addr < VMALLOC_END;
-}
+#else
+       return 0;
 #endif
+}
 
 static inline struct page *compound_head(struct page *page)
 {
index 02a42d875cf74810305e87b3a9e222a088308ae9..e1451760c9cd3dfc991c707d2b4d90b7062b5fb2 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef _NFNETLINK_COMPAT_H
 #define _NFNETLINK_COMPAT_H
-#ifndef __KERNEL
+#ifndef __KERNEL__
 /* Old nfnetlink macros for userspace */
 
 /* nfnetlink groups: Up to 32 maximum */
index 38eff1947750aed9e4499e85d974b31c473f5b52..b7e4b633c69b002d85bda6c7baa6da8341b48d35 100644 (file)
@@ -278,6 +278,7 @@ struct pci_bus {
        struct device           dev;
        struct bin_attribute    *legacy_io; /* legacy I/O for this bus */
        struct bin_attribute    *legacy_mem; /* legacy mem */
+       unsigned int            is_added:1;
 };
 
 #define pci_bus_b(n)   list_entry(n, struct pci_bus, node)
@@ -1044,6 +1045,8 @@ void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
 void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
 void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
 int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
+int pcim_iomap_regions_request_all(struct pci_dev *pdev, u16 mask,
+                                  const char *name);
 void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask);
 
 extern int pci_pci_problems;
index 4c5f65392d36e832be841716eee2ebd752723f59..cafe98d969480dff52bd1e32887319f771627a3b 100644 (file)
@@ -147,8 +147,15 @@ extern void pmu_wait_complete(struct adb_request *req);
 /* For use before switching interrupts off for a long time;
  * warning: not stackable
  */
+#if defined(CONFIG_ADB_PMU)
 extern void pmu_suspend(void);
 extern void pmu_resume(void);
+#else
+static inline void pmu_suspend(void)
+{}
+static inline void pmu_resume(void)
+{}
+#endif
 
 extern void pmu_enable_irled(int on);
 
@@ -192,7 +199,7 @@ extern unsigned int pmu_power_flags;
 extern void pmu_backlight_init(void);
 
 /* some code needs to know if the PMU was suspended for hibernation */
-#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
+#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
 extern int pmu_sys_suspended;
 #else
 /* if power management is not configured it can't be suspended */
index d9a9e718ad19f84395ee9736c04ddedbd7e4acb0..9b6c935f69cf6d1986677b968bb17c2ca000e4b0 100644 (file)
@@ -50,8 +50,6 @@ typedef       int (read_proc_t)(char *page, char **start, off_t off,
 typedef        int (write_proc_t)(struct file *file, const char __user *buffer,
                           unsigned long count, void *data);
 typedef int (get_info_t)(char *, char **, off_t, int);
-typedef struct proc_dir_entry *(shadow_proc_t)(struct task_struct *task,
-                                               struct proc_dir_entry *pde);
 
 struct proc_dir_entry {
        unsigned int low_ino;
@@ -82,7 +80,6 @@ struct proc_dir_entry {
        int pde_users;  /* number of callers into module in progress */
        spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
        struct completion *pde_unload_completion;
-       shadow_proc_t *shadow_proc;
 };
 
 struct kcore_list {
diff --git a/include/linux/ps2esdi.h b/include/linux/ps2esdi.h
deleted file mode 100644 (file)
index c0e050b..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef _PS2ESDI_H_
-#define _PS2ESDI_H_
-
-#define NRML_ESDI_ID 0xddff
-#define INTG_ESDI_ID 0xdf9f
-
-#define PRIMARY_IO_BASE 0x3510
-#define ALT_IO_BASE 0x3518
-
-#define ESDI_CMD_INT (io_base+0)
-#define ESDI_STT_INT (io_base+0)
-#define ESDI_CONTROL (io_base+2)
-#define ESDI_STATUS  (io_base+2)
-#define ESDI_ATTN    (io_base+3)
-#define ESDI_INTRPT  (io_base+3)
-
-#define STATUS_ENABLED    0x01
-#define STATUS_ALTERNATE  0x02
-#define STATUS_BUSY       0x10
-#define STATUS_STAT_AVAIL 0x08
-#define STATUS_INTR       0x01
-#define STATUS_RESET_FAIL 0xea
-#define STATUS_CMD_INF   0x04
-
-#define CTRL_SOFT_RESET   0xe4
-#define CTRL_HARD_RESET   0x80
-#define CTRL_EOI          0xe2
-#define CTRL_ENABLE_DMA   0x02
-#define CTRL_ENABLE_INTR  0x01
-#define CTRL_DISABLE_INTR  0x00
-
-#define ATT_EOI 0x02
-
-/* bits of word 0 of configuration status block. more info see p.38 of tech ref */
-#define CONFIG_IS 0x10 /* Invalid Secondary */
-#define CONFIG_ZD 0x08 /* Zero Defect */
-#define CONFIG_SF 0x04 /* Skewed Format */
-#define CONFIG_FR 0x02 /* Removable */
-#define CONFIG_RT 0x01 /* Retries */
-
-#define PORT_SYS_A   0x92
-#define PORT_DMA_FN  0x18
-#define PORT_DMA_EX  0x1a
-
-#define ON (unsigned char)0x40
-#define OFF (unsigned char)~ON
-#define LITE_ON outb(inb(PORT_SYS_A) | ON,PORT_SYS_A)
-#define LITE_OFF outb((inb(PORT_SYS_A) & OFF),PORT_SYS_A)
-
-#define FAIL 0
-#define SUCCES 1
-
-#define INT_CMD_COMPLETE 0x01
-#define INT_CMD_ECC      0x03
-#define INT_CMD_RETRY    0x05
-#define INT_CMD_FORMAT   0x06
-#define INT_CMD_ECC_RETRY 0x07
-#define INT_CMD_WARNING  0x08
-#define INT_CMD_ABORT    0x09
-#define INT_RESET        0x0A
-#define INT_TRANSFER_REQ 0x0B
-#define INT_CMD_FAILED   0x0C
-#define INT_DMA_ERR      0x0D
-#define INT_CMD_BLK_ERR  0x0E
-#define INT_ATTN_ERROR   0x0F
-
-#define DMA_MASK_CHAN 0x90
-#define DMA_UNMASK_CHAN 0xA0
-#define DMA_WRITE_ADDR 0x20
-#define DMA_WRITE_TC 0x40
-#define DMA_WRITE_MODE 0x70
-
-#define CMD_GET_DEV_CONFIG 0x09
-#define CMD_READ 0x4601
-#define CMD_WRITE 0x4602
-#define DMA_READ_16 0x4C
-#define DMA_WRITE_16 0x44
-
-
-#define MB 1024*1024
-#define SECT_SIZE 512   
-
-#define ERROR 1
-#define OK 0
-
-#define HDIO_GETGEO 0x0301
-
-#define FALSE 0
-#define TRUE !FALSE
-
-struct ps2esdi_geometry {
-       unsigned char heads;
-       unsigned char sectors;
-       unsigned short cylinders;
-       unsigned long start;
-};
-
-#endif /* _PS2ESDI_H_ */
index 260d1fcf29a4222c011ab39176b1e2e4d46a98a3..12c18ac1b973caf7fc33f44db0ee7fa759fc361f 100644 (file)
@@ -43,8 +43,9 @@ struct virtqueue
  *     vq: the struct virtqueue we're talking about.
  * @enable_cb: restart callbacks after disable_cb.
  *     vq: the struct virtqueue we're talking about.
- *     This returns "false" (and doesn't re-enable) if there are pending
- *     buffers in the queue, to avoid a race.
+ *     This re-enables callbacks; it returns "false" if there are pending
+ *     buffers in the queue, to detect a possible race between the driver
+ *     checking for more work, and enabling callbacks.
  *
  * Locking rules are straightforward: the driver is responsible for
  * locking.  No two operations may be invoked simultaneously.
index 771d17783c1889d7d89d7875bdfb28a350e9d4e7..750648df13f4785cee631985648966a602daf58b 100644 (file)
@@ -170,7 +170,7 @@ static inline int skb_frags_no(struct sk_buff *skb)
 int bt_err(__u16 code);
 
 extern int hci_sock_init(void);
-extern int hci_sock_cleanup(void);
+extern void hci_sock_cleanup(void);
 
 extern int bt_sysfs_init(void);
 extern void bt_sysfs_cleanup(void);
index e3ac7d0fc4e1807e62d1246b74aefa5d9ae9f23a..ae13370e8484528a8501b0dbf4a8091ff5dd7e95 100644 (file)
@@ -52,15 +52,10 @@ struct dst_entry
        unsigned short          header_len;     /* more space at head required */
        unsigned short          trailer_len;    /* space to reserve at tail */
 
-       u32                     metrics[RTAX_MAX];
-       struct dst_entry        *path;
-
-       unsigned long           rate_last;      /* rate limiting for ICMP */
        unsigned int            rate_tokens;
+       unsigned long           rate_last;      /* rate limiting for ICMP */
 
-#ifdef CONFIG_NET_CLS_ROUTE
-       __u32                   tclassid;
-#endif
+       struct dst_entry        *path;
 
        struct neighbour        *neighbour;
        struct hh_cache         *hh;
@@ -70,10 +65,20 @@ struct dst_entry
        int                     (*output)(struct sk_buff*);
 
        struct  dst_ops         *ops;
-               
-       unsigned long           lastuse;
+
+       u32                     metrics[RTAX_MAX];
+
+#ifdef CONFIG_NET_CLS_ROUTE
+       __u32                   tclassid;
+#endif
+
+       /*
+        * __refcnt wants to be on a different cache line from
+        * input/output/ops or performance tanks badly
+        */
        atomic_t                __refcnt;       /* client references    */
        int                     __use;
+       unsigned long           lastuse;
        union {
                struct dst_entry *next;
                struct rtable    *rt_next;
index 32c385dd9e06a94ab6cf77988537d02cc47835ad..0788c23d2828e222408050e7a2c84342d6a984cc 100644 (file)
@@ -169,17 +169,17 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *skb,
 void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow);
 struct tsap_cb *irttp_dup(struct tsap_cb *self, void *instance);
 
-static __inline __u32 irttp_get_saddr(struct tsap_cb *self)
+static inline __u32 irttp_get_saddr(struct tsap_cb *self)
 {
        return irlmp_get_saddr(self->lsap);
 }
 
-static __inline __u32 irttp_get_daddr(struct tsap_cb *self)
+static inline __u32 irttp_get_daddr(struct tsap_cb *self)
 {
        return irlmp_get_daddr(self->lsap);
 }
 
-static __inline __u32 irttp_get_max_seg_size(struct tsap_cb *self)
+static inline __u32 irttp_get_max_seg_size(struct tsap_cb *self)
 {
        return self->max_seg_size;
 }
index 28738b7d53eb2a0748cecad1076a9726da8d936f..923f2b8b909600b3962035f714308ddc5e8acf9d 100644 (file)
@@ -31,7 +31,6 @@ struct net {
 
        struct proc_dir_entry   *proc_net;
        struct proc_dir_entry   *proc_net_stat;
-       struct proc_dir_entry   *proc_net_root;
 
        struct list_head        sysctl_table_headers;
 
index 49aac6323fbeaf7c4dacbb16c8194d91246977bf..f736e842977f07ce8469bf832fcf2905af36ded1 100644 (file)
@@ -17,7 +17,6 @@ enum nf_ct_ext_id
 struct nf_ct_ext {
        u8 offset[NF_CT_EXT_NUM];
        u8 len;
-       u8 real_len;
        char data[0];
 };
 
index c0b1e0533d80d32080c8d44acf2ab9f9d90bcbb7..d53fee8d8604a5514889bfcd93acee4dd882fae0 100644 (file)
@@ -538,7 +538,7 @@ skip:
        initrd_end = 0;
 }
 
-int __init populate_rootfs(void)
+static int __init populate_rootfs(void)
 {
        char *err = unpack_to_rootfs(__initramfs_start,
                         __initramfs_end - __initramfs_start, 0);
@@ -577,10 +577,4 @@ int __init populate_rootfs(void)
        }
        return 0;
 }
-#ifndef CONFIG_ACPI_CUSTOM_DSDT_INITRD
-/*
- * if this option is enabled, populate_rootfs() is called _earlier_ in the
- * boot sequence. This insures that the ACPI initialisation can find the file.
- */
 rootfs_initcall(populate_rootfs);
-#endif
index fbb0167c6b8a3532baad7bfeefa5194cc0bb6e40..99ce94930b09302f7af89f75c07d7daa6a7ef668 100644 (file)
@@ -102,12 +102,6 @@ static inline void mark_rodata_ro(void) { }
 extern void tc_init(void);
 #endif
 
-#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
-extern int populate_rootfs(void);
-#else
-static inline void populate_rootfs(void) {}
-#endif
-
 enum system_states system_state;
 EXPORT_SYMBOL(system_state);
 
@@ -650,7 +644,6 @@ asmlinkage void __init start_kernel(void)
 
        check_bugs();
 
-       populate_rootfs(); /* For DSDT override from initramfs */
        acpi_early_init(); /* before LAPIC and SMP init */
 
        /* Do the rest non-__init'ed, we're now alive */
index 79833170bb9cddf4aad9b6bde7806628856ffde5..6233f3b4ae6628c0676c73f09a2937f5039fcd5c 100644 (file)
@@ -190,7 +190,7 @@ config APM_EMULATION
          notification of APM "events" (e.g. battery status change).
 
          In order to use APM, you will need supporting software. For location
-         and more information, read <file:Documentation/pm.txt> and the
+         and more information, read <file:Documentation/power/pm.txt> and the
          Battery Powered Linux mini-HOWTO, available from
          <http://www.tldp.org/docs.html#howto>.
 
index 72a020cabb4c5238f395c1aa6420a630dc8b49dc..5f91a07c4eac7e104f3fc9c333a481be11ead921 100644 (file)
@@ -447,7 +447,7 @@ static void memory_bm_free(struct memory_bitmap *bm, int clear_nosave_free)
  *     of @bm->cur_zone_bm are updated.
  */
 
-static void memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn,
+static int memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn,
                                void **addr, unsigned int *bit_nr)
 {
        struct zone_bitmap *zone_bm;
@@ -461,7 +461,8 @@ static void memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn,
                while (pfn < zone_bm->start_pfn || pfn >= zone_bm->end_pfn) {
                        zone_bm = zone_bm->next;
 
-                       BUG_ON(!zone_bm);
+                       if (!zone_bm)
+                               return -EFAULT;
                }
                bm->cur.zone_bm = zone_bm;
        }
@@ -479,23 +480,40 @@ static void memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn,
        pfn -= bb->start_pfn;
        *bit_nr = pfn % BM_BITS_PER_CHUNK;
        *addr = bb->data + pfn / BM_BITS_PER_CHUNK;
+       return 0;
 }
 
 static void memory_bm_set_bit(struct memory_bitmap *bm, unsigned long pfn)
 {
        void *addr;
        unsigned int bit;
+       int error;
 
-       memory_bm_find_bit(bm, pfn, &addr, &bit);
+       error = memory_bm_find_bit(bm, pfn, &addr, &bit);
+       BUG_ON(error);
        set_bit(bit, addr);
 }
 
+static int mem_bm_set_bit_check(struct memory_bitmap *bm, unsigned long pfn)
+{
+       void *addr;
+       unsigned int bit;
+       int error;
+
+       error = memory_bm_find_bit(bm, pfn, &addr, &bit);
+       if (!error)
+               set_bit(bit, addr);
+       return error;
+}
+
 static void memory_bm_clear_bit(struct memory_bitmap *bm, unsigned long pfn)
 {
        void *addr;
        unsigned int bit;
+       int error;
 
-       memory_bm_find_bit(bm, pfn, &addr, &bit);
+       error = memory_bm_find_bit(bm, pfn, &addr, &bit);
+       BUG_ON(error);
        clear_bit(bit, addr);
 }
 
@@ -503,8 +521,10 @@ static int memory_bm_test_bit(struct memory_bitmap *bm, unsigned long pfn)
 {
        void *addr;
        unsigned int bit;
+       int error;
 
-       memory_bm_find_bit(bm, pfn, &addr, &bit);
+       error = memory_bm_find_bit(bm, pfn, &addr, &bit);
+       BUG_ON(error);
        return test_bit(bit, addr);
 }
 
@@ -709,8 +729,15 @@ static void mark_nosave_pages(struct memory_bitmap *bm)
                                region->end_pfn << PAGE_SHIFT);
 
                for (pfn = region->start_pfn; pfn < region->end_pfn; pfn++)
-                       if (pfn_valid(pfn))
-                               memory_bm_set_bit(bm, pfn);
+                       if (pfn_valid(pfn)) {
+                               /*
+                                * It is safe to ignore the result of
+                                * mem_bm_set_bit_check() here, since we won't
+                                * touch the PFNs for which the error is
+                                * returned anyway.
+                                */
+                               mem_bm_set_bit_check(bm, pfn);
+                       }
        }
 }
 
index d080b9d161a75eee95bbf6d7aed235354bda9e9c..4c035a8a248c2bfabea85bfd616c9562fcf4f440 100644 (file)
@@ -1066,7 +1066,7 @@ static int subbuf_splice_actor(struct file *in,
                               unsigned int flags,
                               int *nonpad_ret)
 {
-       unsigned int pidx, poff, total_len, subbuf_pages, ret;
+       unsigned int pidx, poff, total_len, subbuf_pages, nr_pages, ret;
        struct rchan_buf *rbuf = in->private_data;
        unsigned int subbuf_size = rbuf->chan->subbuf_size;
        uint64_t pos = (uint64_t) *ppos;
@@ -1097,8 +1097,9 @@ static int subbuf_splice_actor(struct file *in,
        subbuf_pages = rbuf->chan->alloc_size >> PAGE_SHIFT;
        pidx = (read_start / PAGE_SIZE) % subbuf_pages;
        poff = read_start & ~PAGE_MASK;
+       nr_pages = min_t(unsigned int, subbuf_pages, PIPE_BUFFERS);
 
-       for (total_len = 0; spd.nr_pages < subbuf_pages; spd.nr_pages++) {
+       for (total_len = 0; spd.nr_pages < nr_pages; spd.nr_pages++) {
                unsigned int this_len, this_end, private;
                unsigned int cur_pos = read_start + total_len;
 
index 1cb53fb1fe3ddcc102c9de1e44350e384fe66fff..d1ad69b270ca7abc418871ce3160cc4bfbc04135 100644 (file)
@@ -301,7 +301,7 @@ struct cfs_rq {
        /* 'curr' points to currently running entity on this cfs_rq.
         * It is set to NULL otherwise (i.e when none are currently running).
         */
-       struct sched_entity *curr;
+       struct sched_entity *curr, *next;
 
        unsigned long nr_spread_over;
 
@@ -1084,7 +1084,7 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight,
        u64 tmp;
 
        if (unlikely(!lw->inv_weight))
-               lw->inv_weight = (WMULT_CONST - lw->weight/2) / lw->weight + 1;
+               lw->inv_weight = (WMULT_CONST-lw->weight/2) / (lw->weight+1);
 
        tmp = (u64)delta_exec * weight;
        /*
@@ -1108,11 +1108,13 @@ calc_delta_fair(unsigned long delta_exec, struct load_weight *lw)
 static inline void update_load_add(struct load_weight *lw, unsigned long inc)
 {
        lw->weight += inc;
+       lw->inv_weight = 0;
 }
 
 static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
 {
        lw->weight -= dec;
+       lw->inv_weight = 0;
 }
 
 /*
@@ -4268,11 +4270,10 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
        oldprio = p->prio;
        on_rq = p->se.on_rq;
        running = task_current(rq, p);
-       if (on_rq) {
+       if (on_rq)
                dequeue_task(rq, p, 0);
-               if (running)
-                       p->sched_class->put_prev_task(rq, p);
-       }
+       if (running)
+               p->sched_class->put_prev_task(rq, p);
 
        if (rt_prio(prio))
                p->sched_class = &rt_sched_class;
@@ -4281,10 +4282,9 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
 
        p->prio = prio;
 
+       if (running)
+               p->sched_class->set_curr_task(rq);
        if (on_rq) {
-               if (running)
-                       p->sched_class->set_curr_task(rq);
-
                enqueue_task(rq, p, 0);
 
                check_class_changed(rq, p, prev_class, oldprio, running);
@@ -4581,19 +4581,17 @@ recheck:
        update_rq_clock(rq);
        on_rq = p->se.on_rq;
        running = task_current(rq, p);
-       if (on_rq) {
+       if (on_rq)
                deactivate_task(rq, p, 0);
-               if (running)
-                       p->sched_class->put_prev_task(rq, p);
-       }
+       if (running)
+               p->sched_class->put_prev_task(rq, p);
 
        oldprio = p->prio;
        __setscheduler(rq, p, policy, param->sched_priority);
 
+       if (running)
+               p->sched_class->set_curr_task(rq);
        if (on_rq) {
-               if (running)
-                       p->sched_class->set_curr_task(rq);
-
                activate_task(rq, p, 0);
 
                check_class_changed(rq, p, prev_class, oldprio, running);
@@ -7618,11 +7616,10 @@ void sched_move_task(struct task_struct *tsk)
        running = task_current(rq, tsk);
        on_rq = tsk->se.on_rq;
 
-       if (on_rq) {
+       if (on_rq)
                dequeue_task(rq, tsk, 0);
-               if (unlikely(running))
-                       tsk->sched_class->put_prev_task(rq, tsk);
-       }
+       if (unlikely(running))
+               tsk->sched_class->put_prev_task(rq, tsk);
 
        set_task_rq(tsk, task_cpu(tsk));
 
@@ -7631,11 +7628,10 @@ void sched_move_task(struct task_struct *tsk)
                tsk->sched_class->moved_group(tsk);
 #endif
 
-       if (on_rq) {
-               if (unlikely(running))
-                       tsk->sched_class->set_curr_task(rq);
+       if (unlikely(running))
+               tsk->sched_class->set_curr_task(rq);
+       if (on_rq)
                enqueue_task(rq, tsk, 0);
-       }
 
        task_rq_unlock(rq, &flags);
 }
index e2a530515619ee8f3b42b1ca246cd18ae05f5544..f2cc59080efa4f9ae1e12aa30afe2e3fe08a86f9 100644 (file)
@@ -175,8 +175,15 @@ static void __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
         * Maintain a cache of leftmost tree entries (it is frequently
         * used):
         */
-       if (leftmost)
+       if (leftmost) {
                cfs_rq->rb_leftmost = &se->run_node;
+               /*
+                * maintain cfs_rq->min_vruntime to be a monotonic increasing
+                * value tracking the leftmost vruntime in the tree.
+                */
+               cfs_rq->min_vruntime =
+                       max_vruntime(cfs_rq->min_vruntime, se->vruntime);
+       }
 
        rb_link_node(&se->run_node, parent, link);
        rb_insert_color(&se->run_node, &cfs_rq->tasks_timeline);
@@ -184,8 +191,24 @@ static void __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
 
 static void __dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
 {
-       if (cfs_rq->rb_leftmost == &se->run_node)
-               cfs_rq->rb_leftmost = rb_next(&se->run_node);
+       if (cfs_rq->rb_leftmost == &se->run_node) {
+               struct rb_node *next_node;
+               struct sched_entity *next;
+
+               next_node = rb_next(&se->run_node);
+               cfs_rq->rb_leftmost = next_node;
+
+               if (next_node) {
+                       next = rb_entry(next_node,
+                                       struct sched_entity, run_node);
+                       cfs_rq->min_vruntime =
+                               max_vruntime(cfs_rq->min_vruntime,
+                                            next->vruntime);
+               }
+       }
+
+       if (cfs_rq->next == se)
+               cfs_rq->next = NULL;
 
        rb_erase(&se->run_node, &cfs_rq->tasks_timeline);
 }
@@ -260,12 +283,8 @@ static u64 __sched_period(unsigned long nr_running)
  */
 static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
 {
-       u64 slice = __sched_period(cfs_rq->nr_running);
-
-       slice *= se->load.weight;
-       do_div(slice, cfs_rq->load.weight);
-
-       return slice;
+       return calc_delta_mine(__sched_period(cfs_rq->nr_running),
+                              se->load.weight, &cfs_rq->load);
 }
 
 /*
@@ -303,7 +322,6 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr,
              unsigned long delta_exec)
 {
        unsigned long delta_exec_weighted;
-       u64 vruntime;
 
        schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max));
 
@@ -315,19 +333,6 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr,
                                                        &curr->load);
        }
        curr->vruntime += delta_exec_weighted;
-
-       /*
-        * maintain cfs_rq->min_vruntime to be a monotonic increasing
-        * value tracking the leftmost vruntime in the tree.
-        */
-       if (first_fair(cfs_rq)) {
-               vruntime = min_vruntime(curr->vruntime,
-                               __pick_next_entity(cfs_rq)->vruntime);
-       } else
-               vruntime = curr->vruntime;
-
-       cfs_rq->min_vruntime =
-               max_vruntime(cfs_rq->min_vruntime, vruntime);
 }
 
 static void update_curr(struct cfs_rq *cfs_rq)
@@ -493,7 +498,11 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
 {
        u64 vruntime;
 
-       vruntime = cfs_rq->min_vruntime;
+       if (first_fair(cfs_rq)) {
+               vruntime = min_vruntime(cfs_rq->min_vruntime,
+                               __pick_next_entity(cfs_rq)->vruntime);
+       } else
+               vruntime = cfs_rq->min_vruntime;
 
        if (sched_feat(TREE_AVG)) {
                struct sched_entity *last = __pick_last_entity(cfs_rq);
@@ -515,8 +524,10 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
 
        if (!initial) {
                /* sleeps upto a single latency don't count. */
-               if (sched_feat(NEW_FAIR_SLEEPERS))
-                       vruntime -= sysctl_sched_latency;
+               if (sched_feat(NEW_FAIR_SLEEPERS)) {
+                       vruntime -= calc_delta_fair(sysctl_sched_latency,
+                                                   &cfs_rq->load);
+               }
 
                /* ensure we never gain time by being placed backwards. */
                vruntime = max_vruntime(se->vruntime, vruntime);
@@ -616,12 +627,32 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
        se->prev_sum_exec_runtime = se->sum_exec_runtime;
 }
 
+static struct sched_entity *
+pick_next(struct cfs_rq *cfs_rq, struct sched_entity *se)
+{
+       s64 diff, gran;
+
+       if (!cfs_rq->next)
+               return se;
+
+       diff = cfs_rq->next->vruntime - se->vruntime;
+       if (diff < 0)
+               return se;
+
+       gran = calc_delta_fair(sysctl_sched_wakeup_granularity, &cfs_rq->load);
+       if (diff > gran)
+               return se;
+
+       return cfs_rq->next;
+}
+
 static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq)
 {
        struct sched_entity *se = NULL;
 
        if (first_fair(cfs_rq)) {
                se = __pick_next_entity(cfs_rq);
+               se = pick_next(cfs_rq, se);
                set_next_entity(cfs_rq, se);
        }
 
@@ -1060,6 +1091,9 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
                resched_task(curr);
                return;
        }
+
+       cfs_rq_of(pse)->next = pse;
+
        /*
         * Batch tasks do not preempt (their preemption is driven by
         * the tick):
index b1d336ce7f3d0c34f694844c8bd7dfd0f1dc687d..edc27a5d1b735aba4855d33e9756ab375d9569ce 100644 (file)
@@ -297,6 +297,31 @@ int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name)
 }
 EXPORT_SYMBOL(pcim_iomap_regions);
 
+/**
+ * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones
+ * @pdev: PCI device to map IO resources for
+ * @mask: Mask of BARs to iomap
+ * @name: Name used when requesting regions
+ *
+ * Request all PCI BARs and iomap regions specified by @mask.
+ */
+int pcim_iomap_regions_request_all(struct pci_dev *pdev, u16 mask,
+                                  const char *name)
+{
+       int request_mask = ((1 << 6) - 1) & ~mask;
+       int rc;
+
+       rc = pci_request_selected_regions(pdev, request_mask, name);
+       if (rc)
+               return rc;
+
+       rc = pcim_iomap_regions(pdev, mask, name);
+       if (rc)
+               pci_release_selected_regions(pdev, request_mask);
+       return rc;
+}
+EXPORT_SYMBOL(pcim_iomap_regions_request_all);
+
 /**
  * pcim_iounmap_regions - Unmap and release PCI BARs
  * @pdev: PCI device to map IO resources for
index 4bb5a11e18a289e6bcf3a89ca41b0a13fb0b40cc..025922807e6e648bb7dc4eda61bfd8fa609a221c 100644 (file)
@@ -310,7 +310,9 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
        start_dma_addr = virt_to_bus(io_tlb_start) & mask;
 
        offset_slots = ALIGN(start_dma_addr, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
-       max_slots = ALIGN(mask + 1, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
+       max_slots = mask + 1
+                   ? ALIGN(mask + 1, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT
+                   : 1UL << (BITS_PER_LONG - IO_TLB_SHIFT);
 
        /*
         * For mappings greater than a page, we limit the stride (and
@@ -333,16 +335,18 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
                index = ALIGN(io_tlb_index, stride);
                if (index >= io_tlb_nslabs)
                        index = 0;
-
-               while (is_span_boundary(index, nslots, offset_slots,
-                                       max_slots)) {
-                       index += stride;
-                       if (index >= io_tlb_nslabs)
-                               index = 0;
-               }
                wrap = index;
 
                do {
+                       while (is_span_boundary(index, nslots, offset_slots,
+                                               max_slots)) {
+                               index += stride;
+                               if (index >= io_tlb_nslabs)
+                                       index = 0;
+                               if (index == wrap)
+                                       goto not_found;
+                       }
+
                        /*
                         * If we find a slot that indicates we have 'nslots'
                         * number of contiguous buffers, we allocate the
@@ -367,14 +371,12 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
 
                                goto found;
                        }
-                       do {
-                               index += stride;
-                               if (index >= io_tlb_nslabs)
-                                       index = 0;
-                       } while (is_span_boundary(index, nslots, offset_slots,
-                                                 max_slots));
+                       index += stride;
+                       if (index >= io_tlb_nslabs)
+                               index = 0;
                } while (index != wrap);
 
+  not_found:
                spin_unlock_irqrestore(&io_tlb_lock, flags);
                return NULL;
        }
index a2992280c3d1ee3a5b908faf793a18b6b4f16e5c..e69244dd8de850ceb4197aa8157a91011511f332 100644 (file)
@@ -174,7 +174,7 @@ struct bnep_session {
 
 void bnep_net_setup(struct net_device *dev);
 int bnep_sock_init(void);
-int bnep_sock_cleanup(void);
+void bnep_sock_cleanup(void);
 
 static inline int bnep_mc_hash(__u8 *addr)
 {
index 81065e548a1f50d4c4a37dd9c4c54f52726d7fdd..201e5b1ce473cd2066d2607a2d5af6f8555c2d6f 100644 (file)
@@ -257,12 +257,10 @@ error:
        return err;
 }
 
-int __exit bnep_sock_cleanup(void)
+void __exit bnep_sock_cleanup(void)
 {
        if (bt_sock_unregister(BTPROTO_BNEP) < 0)
                BT_ERR("Can't unregister BNEP socket");
 
        proto_unregister(&bnep_proto);
-
-       return 0;
 }
index 930b58e7149a77b4af84e4dd4674437b0bf31378..aec6929f5c166fd362df7e38faebb19f91f8a445 100644 (file)
@@ -902,8 +902,6 @@ int hci_unregister_dev(struct hci_dev *hdev)
 
        BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type);
 
-       hci_unregister_sysfs(hdev);
-
        write_lock_bh(&hci_dev_list_lock);
        list_del(&hdev->list);
        write_unlock_bh(&hci_dev_list_lock);
@@ -915,6 +913,8 @@ int hci_unregister_dev(struct hci_dev *hdev)
 
        hci_notify(hdev, HCI_DEV_UNREG);
 
+       hci_unregister_sysfs(hdev);
+
        __hci_dev_put(hdev);
 
        return 0;
index 14991323c273a15793823107e25d79af5403f58e..b5d4019d3572c59eefe328a22085645d6132b136 100644 (file)
@@ -734,7 +734,7 @@ error:
        return err;
 }
 
-int __exit hci_sock_cleanup(void)
+void __exit hci_sock_cleanup(void)
 {
        if (bt_sock_unregister(BTPROTO_HCI) < 0)
                BT_ERR("HCI socket unregistration failed");
@@ -742,6 +742,4 @@ int __exit hci_sock_cleanup(void)
        hci_unregister_notifier(&hci_sock_nblock);
 
        proto_unregister(&hci_sk_proto);
-
-       return 0;
 }
index ed750f9ceb07caed9ed5479740e664c6a319bc8f..01578f544ad604a5ee7270c426fee64872588b22 100644 (file)
@@ -1035,6 +1035,13 @@ static void tcp_cwnd_validate(struct sock *sk)
  * introducing MSS oddities to segment boundaries. In rare cases where
  * mss_now != mss_cache, we will request caller to create a small skb
  * per input skb which could be mostly avoided here (if desired).
+ *
+ * We explicitly want to create a request for splitting write queue tail
+ * to a small skb for Nagle purposes while avoiding unnecessary modulos,
+ * thus all the complexity (cwnd_len is always MSS multiple which we
+ * return whenever allowed by the other factors). Basically we need the
+ * modulo only when the receiver window alone is the limiting factor or
+ * when we would be allowed to send the split-due-to-Nagle skb fully.
  */
 static unsigned int tcp_mss_split_point(struct sock *sk, struct sk_buff *skb,
                                        unsigned int mss_now, unsigned int cwnd)
@@ -1048,10 +1055,11 @@ static unsigned int tcp_mss_split_point(struct sock *sk, struct sk_buff *skb,
        if (likely(cwnd_len <= window && skb != tcp_write_queue_tail(sk)))
                return cwnd_len;
 
-       if (skb == tcp_write_queue_tail(sk) && cwnd_len <= skb->len)
+       needed = min(skb->len, window);
+
+       if (skb == tcp_write_queue_tail(sk) && cwnd_len <= needed)
                return cwnd_len;
 
-       needed = min(skb->len, window);
        return needed - needed % mss_now;
 }
 
index e06bf0028bb18eaea80e40fb633d4aac495a038f..684ec9c1ad38b7545502fd08213360bd2c7a9b0c 100644 (file)
@@ -381,7 +381,7 @@ int nf_ct_expect_related(struct nf_conntrack_expect *expect)
        if (nf_ct_expect_count >= nf_ct_expect_max) {
                if (net_ratelimit())
                        printk(KERN_WARNING
-                              "nf_conntrack: expectation table full");
+                              "nf_conntrack: expectation table full\n");
                ret = -EMFILE;
                goto out;
        }
index 8b9be1e978cda3dc00c01050d69e495ac8c610ad..2bd9963b5b3ea4cf26d4abde679a72e8b28421a7 100644 (file)
 static struct nf_ct_ext_type *nf_ct_ext_types[NF_CT_EXT_NUM];
 static DEFINE_MUTEX(nf_ct_ext_type_mutex);
 
-/* Horrible trick to figure out smallest amount worth kmallocing. */
-#define CACHE(x) (x) + 0 *
-enum {
-       NF_CT_EXT_MIN_SIZE =
-#include <linux/kmalloc_sizes.h>
-       1 };
-#undef CACHE
-
 void __nf_ct_ext_destroy(struct nf_conn *ct)
 {
        unsigned int i;
@@ -53,7 +45,7 @@ EXPORT_SYMBOL(__nf_ct_ext_destroy);
 static void *
 nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
 {
-       unsigned int off, len, real_len;
+       unsigned int off, len;
        struct nf_ct_ext_type *t;
 
        rcu_read_lock();
@@ -61,16 +53,14 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
        BUG_ON(t == NULL);
        off = ALIGN(sizeof(struct nf_ct_ext), t->align);
        len = off + t->len;
-       real_len = t->alloc_size;
        rcu_read_unlock();
 
-       *ext = kzalloc(real_len, gfp);
+       *ext = kzalloc(t->alloc_size, gfp);
        if (!*ext)
                return NULL;
 
        (*ext)->offset[id] = off;
        (*ext)->len = len;
-       (*ext)->real_len = real_len;
 
        return (void *)(*ext) + off;
 }
@@ -95,7 +85,7 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
        newlen = newoff + t->len;
        rcu_read_unlock();
 
-       if (newlen >= ct->ext->real_len) {
+       if (newlen >= ksize(ct->ext)) {
                new = kmalloc(newlen, gfp);
                if (!new)
                        return NULL;
@@ -114,7 +104,6 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
                        rcu_read_unlock();
                }
                kfree(ct->ext);
-               new->real_len = newlen;
                ct->ext = new;
        }
 
@@ -156,8 +145,6 @@ static void update_alloc_size(struct nf_ct_ext_type *type)
                        t1->alloc_size = ALIGN(t1->alloc_size, t2->align)
                                         + t2->len;
                }
-               if (t1->alloc_size < NF_CT_EXT_MIN_SIZE)
-                       t1->alloc_size = NF_CT_EXT_MIN_SIZE;
        }
 }
 
index bfc2928c19120f4c5994ae616066b1f030ba2a01..ddc80ea114cda13509f5828b2c8f5590a6d7f3e3 100644 (file)
@@ -51,7 +51,7 @@ int nf_unregister_queue_handler(int pf, const struct nf_queue_handler *qh)
                return -EINVAL;
 
        mutex_lock(&queue_handler_mutex);
-       if (queue_handler[pf] != qh) {
+       if (queue_handler[pf] && queue_handler[pf] != qh) {
                mutex_unlock(&queue_handler_mutex);
                return -EINVAL;
        }
index 7efa40d47393727447fd1bdbf88d579914e5cfc4..bf3f19b21fe49eb0399ac66b09940bd085fb17ca 100644 (file)
@@ -556,7 +556,7 @@ nfulnl_log_packet(unsigned int pf,
        /* FIXME: do we want to make the size calculation conditional based on
         * what is actually present?  way more branches and checks, but more
         * memory efficient... */
-       size =    NLMSG_ALIGN(sizeof(struct nfgenmsg))
+       size =    NLMSG_SPACE(sizeof(struct nfgenmsg))
                + nla_total_size(sizeof(struct nfulnl_msg_packet_hdr))
                + nla_total_size(sizeof(u_int32_t))     /* ifindex */
                + nla_total_size(sizeof(u_int32_t))     /* ifindex */
@@ -702,20 +702,30 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
        struct nfgenmsg *nfmsg = NLMSG_DATA(nlh);
        u_int16_t group_num = ntohs(nfmsg->res_id);
        struct nfulnl_instance *inst;
+       struct nfulnl_msg_config_cmd *cmd = NULL;
        int ret = 0;
 
+       if (nfula[NFULA_CFG_CMD]) {
+               u_int8_t pf = nfmsg->nfgen_family;
+               cmd = nla_data(nfula[NFULA_CFG_CMD]);
+
+               /* Commands without queue context */
+               switch (cmd->command) {
+               case NFULNL_CFG_CMD_PF_BIND:
+                       return nf_log_register(pf, &nfulnl_logger);
+               case NFULNL_CFG_CMD_PF_UNBIND:
+                       nf_log_unregister_pf(pf);
+                       return 0;
+               }
+       }
+
        inst = instance_lookup_get(group_num);
        if (inst && inst->peer_pid != NETLINK_CB(skb).pid) {
                ret = -EPERM;
                goto out_put;
        }
 
-       if (nfula[NFULA_CFG_CMD]) {
-               u_int8_t pf = nfmsg->nfgen_family;
-               struct nfulnl_msg_config_cmd *cmd;
-
-               cmd = nla_data(nfula[NFULA_CFG_CMD]);
-
+       if (cmd != NULL) {
                switch (cmd->command) {
                case NFULNL_CFG_CMD_BIND:
                        if (inst) {
@@ -738,14 +748,6 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
 
                        instance_destroy(inst);
                        goto out;
-               case NFULNL_CFG_CMD_PF_BIND:
-                       ret = nf_log_register(pf, &nfulnl_logger);
-                       break;
-               case NFULNL_CFG_CMD_PF_UNBIND:
-                       /* This is a bug and a feature.  We cannot unregister
-                        * other handlers, like nfnetlink_inst can */
-                       nf_log_unregister_pf(pf);
-                       break;
                default:
                        ret = -ENOTSUPP;
                        break;
index 0043d3a9f87eb5bbb477c96f64d99a60d6320e6a..012cb69108202c6ac1060847a7050a874e12931c 100644 (file)
@@ -224,7 +224,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
        struct net_device *indev;
        struct net_device *outdev;
 
-       size =    NLMSG_ALIGN(sizeof(struct nfgenmsg))
+       size =    NLMSG_SPACE(sizeof(struct nfgenmsg))
                + nla_total_size(sizeof(struct nfqnl_msg_packet_hdr))
                + nla_total_size(sizeof(u_int32_t))     /* ifindex */
                + nla_total_size(sizeof(u_int32_t))     /* ifindex */
@@ -703,19 +703,12 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
                /* Commands without queue context - might sleep */
                switch (cmd->command) {
                case NFQNL_CFG_CMD_PF_BIND:
-                       ret = nf_register_queue_handler(ntohs(cmd->pf),
-                                                       &nfqh);
-                       break;
+                       return nf_register_queue_handler(ntohs(cmd->pf),
+                                                        &nfqh);
                case NFQNL_CFG_CMD_PF_UNBIND:
-                       ret = nf_unregister_queue_handler(ntohs(cmd->pf),
-                                                         &nfqh);
-                       break;
-               default:
-                       break;
+                       return nf_unregister_queue_handler(ntohs(cmd->pf),
+                                                          &nfqh);
                }
-
-               if (ret < 0)
-                       return ret;
        }
 
        rcu_read_lock();
index e9a8794bc3ab6020c27cb6b73c24efd2b79201d1..9fa2e0824708f1acf62ab9c803a38eb4b4b2e408 100644 (file)
@@ -95,8 +95,11 @@ static inline void localtime_2(struct xtm *r, time_t time)
         */
        r->dse = time / 86400;
 
-       /* 1970-01-01 (w=0) was a Thursday (4). */
-       r->weekday = (4 + r->dse) % 7;
+       /*
+        * 1970-01-01 (w=0) was a Thursday (4).
+        * -1 and +1 map Sunday properly onto 7.
+        */
+       r->weekday = (4 + r->dse - 1) % 7 + 1;
 }
 
 static void localtime_3(struct xtm *r, time_t time)
index f19121d4795b25cbb687459741e318ce76091989..a39bf97f8830703cf1a6c5e23367727532e26efb 100644 (file)
@@ -143,7 +143,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,
                /* copy the peer address and timestamp */
                if (!continue_call) {
                        if (msg->msg_name && msg->msg_namelen > 0)
-                               memcpy(&msg->msg_name, &call->conn->trans->peer->srx,
+                               memcpy(msg->msg_name,
+                                      &call->conn->trans->peer->srx,
                                       sizeof(call->conn->trans->peer->srx));
                        sock_recv_timestamp(msg, &rx->sk, skb);
                }
index a27511ebc4cb6ae80749a41c6b85239021749fee..ceefda025e2d3d31fbeb64e0b31d7866222c407f 100644 (file)
@@ -209,6 +209,7 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new,
 int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr)
 {
        struct sctp_sockaddr_entry *addr, *temp;
+       int found = 0;
 
        /* We hold the socket lock when calling this function,
         * and that acts as a writer synchronizing lock.
@@ -216,13 +217,14 @@ int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr)
        list_for_each_entry_safe(addr, temp, &bp->address_list, list) {
                if (sctp_cmp_addr_exact(&addr->a, del_addr)) {
                        /* Found the exact match. */
+                       found = 1;
                        addr->valid = 0;
                        list_del_rcu(&addr->list);
                        break;
                }
        }
 
-       if (addr && !addr->valid) {
+       if (found) {
                call_rcu(&addr->rcu, sctp_local_addr_free);
                SCTP_DBG_OBJCNT_DEC(addr);
                return 0;
index 87f940587d5fe8d3cd72ff33cf0a995498e4c093..9aa0733aee87b7379a1dbcfd27105331a3ceab53 100644 (file)
@@ -89,6 +89,7 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
        struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr;
        struct sctp_sockaddr_entry *addr = NULL;
        struct sctp_sockaddr_entry *temp;
+       int found = 0;
 
        switch (ev) {
        case NETDEV_UP:
@@ -111,13 +112,14 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
                                        &sctp_local_addr_list, list) {
                        if (ipv6_addr_equal(&addr->a.v6.sin6_addr,
                                             &ifa->addr)) {
+                               found = 1;
                                addr->valid = 0;
                                list_del_rcu(&addr->list);
                                break;
                        }
                }
                spin_unlock_bh(&sctp_local_addr_lock);
-               if (addr && !addr->valid)
+               if (found)
                        call_rcu(&addr->rcu, sctp_local_addr_free);
                break;
        }
index 688546dccd828f0821736a301535049cc3d8ca04..ad0a4069b95be0b78a3c54dc1f4b205d77cde3a2 100644 (file)
@@ -628,6 +628,7 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
        struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;
        struct sctp_sockaddr_entry *addr = NULL;
        struct sctp_sockaddr_entry *temp;
+       int found = 0;
 
        switch (ev) {
        case NETDEV_UP:
@@ -647,13 +648,14 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
                list_for_each_entry_safe(addr, temp,
                                        &sctp_local_addr_list, list) {
                        if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) {
+                               found = 1;
                                addr->valid = 0;
                                list_del_rcu(&addr->list);
                                break;
                        }
                }
                spin_unlock_bh(&sctp_local_addr_lock);
-               if (addr && !addr->valid)
+               if (found)
                        call_rcu(&addr->rcu, sctp_local_addr_free);
                break;
        }
index e45be4e3f80d733c8f3eb27773651ad1a4d44add..578630e8e00d321a93565ee96c3a43b0d85acefa 100644 (file)
@@ -2375,6 +2375,14 @@ static int sctp_process_param(struct sctp_association *asoc,
                asoc->peer.ipv4_address = 0;
                asoc->peer.ipv6_address = 0;
 
+               /* Assume that peer supports the address family
+                * by which it sends a packet.
+                */
+               if (peer_addr->sa.sa_family == AF_INET6)
+                       asoc->peer.ipv6_address = 1;
+               else if (peer_addr->sa.sa_family == AF_INET)
+                       asoc->peer.ipv4_address = 1;
+
                /* Cycle through address types; avoid divide by 0. */
                sat = ntohs(param.p->length) - sizeof(sctp_paramhdr_t);
                if (sat)
index 939892691a260e46f5901581123c723c007d0f5c..d994d822900de2b9662fe70a846c35c44719ed0d 100644 (file)
@@ -2933,17 +2933,39 @@ static int sctp_setsockopt_maxburst(struct sock *sk,
                                    char __user *optval,
                                    int optlen)
 {
+       struct sctp_assoc_value params;
+       struct sctp_sock *sp;
+       struct sctp_association *asoc;
        int val;
+       int assoc_id = 0;
 
-       if (optlen != sizeof(int))
+       if (optlen < sizeof(int))
                return -EINVAL;
-       if (get_user(val, (int __user *)optval))
-               return -EFAULT;
 
-       if (val < 0)
+       if (optlen == sizeof(int)) {
+               printk(KERN_WARNING
+                  "SCTP: Use of int in max_burst socket option deprecated\n");
+               printk(KERN_WARNING
+                  "SCTP: Use struct sctp_assoc_value instead\n");
+               if (copy_from_user(&val, optval, optlen))
+                       return -EFAULT;
+       } else if (optlen == sizeof(struct sctp_assoc_value)) {
+               if (copy_from_user(&params, optval, optlen))
+                       return -EFAULT;
+               val = params.assoc_value;
+               assoc_id = params.assoc_id;
+       } else
                return -EINVAL;
 
-       sctp_sk(sk)->max_burst = val;
+       sp = sctp_sk(sk);
+
+       if (assoc_id != 0) {
+               asoc = sctp_id2assoc(sk, assoc_id);
+               if (!asoc)
+                       return -EINVAL;
+               asoc->max_burst = val;
+       } else
+               sp->max_burst = val;
 
        return 0;
 }
@@ -5005,20 +5027,45 @@ static int sctp_getsockopt_maxburst(struct sock *sk, int len,
                                    char __user *optval,
                                    int __user *optlen)
 {
-       int val;
+       struct sctp_assoc_value params;
+       struct sctp_sock *sp;
+       struct sctp_association *asoc;
 
        if (len < sizeof(int))
                return -EINVAL;
 
-       len = sizeof(int);
+       if (len == sizeof(int)) {
+               printk(KERN_WARNING
+                  "SCTP: Use of int in max_burst socket option deprecated\n");
+               printk(KERN_WARNING
+                  "SCTP: Use struct sctp_assoc_value instead\n");
+               params.assoc_id = 0;
+       } else if (len == sizeof (struct sctp_assoc_value)) {
+               if (copy_from_user(&params, optval, len))
+                       return -EFAULT;
+       } else
+               return -EINVAL;
 
-       val = sctp_sk(sk)->max_burst;
-       if (put_user(len, optlen))
-               return -EFAULT;
-       if (copy_to_user(optval, &val, len))
-               return -EFAULT;
+       sp = sctp_sk(sk);
+
+       if (params.assoc_id != 0) {
+               asoc = sctp_id2assoc(sk, params.assoc_id);
+               if (!asoc)
+                       return -EINVAL;
+               params.assoc_value = asoc->max_burst;
+       } else
+               params.assoc_value = sp->max_burst;
+
+       if (len == sizeof(int)) {
+               if (copy_to_user(optval, &params.assoc_value, len))
+                       return -EFAULT;
+       } else {
+               if (copy_to_user(optval, &params, len))
+                       return -EFAULT;
+       }
+
+       return 0;
 
-       return -ENOTSUPP;
 }
 
 static int sctp_getsockopt_hmac_ident(struct sock *sk, int len,
index 0598b229c11d326720a6c56b9bce66cfaa66e6b7..981f190c1b398278b496300a69b733fe2469c922 100644 (file)
@@ -156,7 +156,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
        struct svc_rdma_op_ctxt *ctxt;
        int ret = 0;
 
-       BUG_ON(sge_count >= 32);
+       BUG_ON(sge_count > RPCSVC_MAXPAGES);
        dprintk("svcrdma: RDMA_WRITE rmr=%x, to=%llx, xdr_off=%d, "
                "write_len=%d, xdr_sge=%p, sge_count=%d\n",
                rmr, (unsigned long long)to, xdr_off,
index f09444c451bc232540baf771fa69499531ffca35..16fd3f6718ff55746168c732ec3f367ef9b61f9a 100644 (file)
@@ -54,7 +54,6 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
                                        int flags);
 static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt);
 static void svc_rdma_release_rqst(struct svc_rqst *);
-static void rdma_destroy_xprt(struct svcxprt_rdma *xprt);
 static void dto_tasklet_func(unsigned long data);
 static void svc_rdma_detach(struct svc_xprt *xprt);
 static void svc_rdma_free(struct svc_xprt *xprt);
@@ -247,6 +246,7 @@ static void dto_tasklet_func(unsigned long data)
                        sq_cq_reap(xprt);
                }
 
+               svc_xprt_put(&xprt->sc_xprt);
                spin_lock_irqsave(&dto_lock, flags);
        }
        spin_unlock_irqrestore(&dto_lock, flags);
@@ -275,8 +275,10 @@ static void rq_comp_handler(struct ib_cq *cq, void *cq_context)
         * add it
         */
        spin_lock_irqsave(&dto_lock, flags);
-       if (list_empty(&xprt->sc_dto_q))
+       if (list_empty(&xprt->sc_dto_q)) {
+               svc_xprt_get(&xprt->sc_xprt);
                list_add_tail(&xprt->sc_dto_q, &dto_xprt_q);
+       }
        spin_unlock_irqrestore(&dto_lock, flags);
 
        /* Tasklet does all the work to avoid irqsave locks. */
@@ -386,8 +388,10 @@ static void sq_comp_handler(struct ib_cq *cq, void *cq_context)
         * add it
         */
        spin_lock_irqsave(&dto_lock, flags);
-       if (list_empty(&xprt->sc_dto_q))
+       if (list_empty(&xprt->sc_dto_q)) {
+               svc_xprt_get(&xprt->sc_xprt);
                list_add_tail(&xprt->sc_dto_q, &dto_xprt_q);
+       }
        spin_unlock_irqrestore(&dto_lock, flags);
 
        /* Tasklet does all the work to avoid irqsave locks. */
@@ -611,6 +615,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id,
        switch (event->event) {
        case RDMA_CM_EVENT_ESTABLISHED:
                /* Accept complete */
+               svc_xprt_get(xprt);
                dprintk("svcrdma: Connection completed on DTO xprt=%p, "
                        "cm_id=%p\n", xprt, cma_id);
                clear_bit(RDMAXPRT_CONN_PENDING, &rdma->sc_flags);
@@ -661,15 +666,15 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
 
        listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP);
        if (IS_ERR(listen_id)) {
-               rdma_destroy_xprt(cma_xprt);
+               svc_xprt_put(&cma_xprt->sc_xprt);
                dprintk("svcrdma: rdma_create_id failed = %ld\n",
                        PTR_ERR(listen_id));
                return (void *)listen_id;
        }
        ret = rdma_bind_addr(listen_id, sa);
        if (ret) {
-               rdma_destroy_xprt(cma_xprt);
                rdma_destroy_id(listen_id);
+               svc_xprt_put(&cma_xprt->sc_xprt);
                dprintk("svcrdma: rdma_bind_addr failed = %d\n", ret);
                return ERR_PTR(ret);
        }
@@ -678,8 +683,9 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
        ret = rdma_listen(listen_id, RPCRDMA_LISTEN_BACKLOG);
        if (ret) {
                rdma_destroy_id(listen_id);
-               rdma_destroy_xprt(cma_xprt);
+               svc_xprt_put(&cma_xprt->sc_xprt);
                dprintk("svcrdma: rdma_listen failed = %d\n", ret);
+               return ERR_PTR(ret);
        }
 
        /*
@@ -820,6 +826,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
                newxprt->sc_sq_depth = qp_attr.cap.max_send_wr;
                newxprt->sc_max_requests = qp_attr.cap.max_recv_wr;
        }
+       svc_xprt_get(&newxprt->sc_xprt);
        newxprt->sc_qp = newxprt->sc_cm_id->qp;
 
        /* Register all of physical memory */
@@ -891,8 +898,15 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
 
  errout:
        dprintk("svcrdma: failure accepting new connection rc=%d.\n", ret);
+       /* Take a reference in case the DTO handler runs */
+       svc_xprt_get(&newxprt->sc_xprt);
+       if (newxprt->sc_qp && !IS_ERR(newxprt->sc_qp)) {
+               ib_destroy_qp(newxprt->sc_qp);
+               svc_xprt_put(&newxprt->sc_xprt);
+       }
        rdma_destroy_id(newxprt->sc_cm_id);
-       rdma_destroy_xprt(newxprt);
+       /* This call to put will destroy the transport */
+       svc_xprt_put(&newxprt->sc_xprt);
        return NULL;
 }
 
@@ -919,54 +933,60 @@ static void svc_rdma_release_rqst(struct svc_rqst *rqstp)
        rqstp->rq_xprt_ctxt = NULL;
 }
 
-/* Disable data ready events for this connection */
+/*
+ * When connected, an svc_xprt has at least three references:
+ *
+ * - A reference held by the QP. We still hold that here because this
+ *   code deletes the QP and puts the reference.
+ *
+ * - A reference held by the cm_id between the ESTABLISHED and
+ *   DISCONNECTED events. If the remote peer disconnected first, this
+ *   reference could be gone.
+ *
+ * - A reference held by the svc_recv code that called this function
+ *   as part of close processing.
+ *
+ * At a minimum two references should still be held.
+ */
 static void svc_rdma_detach(struct svc_xprt *xprt)
 {
        struct svcxprt_rdma *rdma =
                container_of(xprt, struct svcxprt_rdma, sc_xprt);
-       unsigned long flags;
-
        dprintk("svc: svc_rdma_detach(%p)\n", xprt);
-       /*
-        * Shutdown the connection. This will ensure we don't get any
-        * more events from the provider.
-        */
+
+       /* Disconnect and flush posted WQE */
        rdma_disconnect(rdma->sc_cm_id);
-       rdma_destroy_id(rdma->sc_cm_id);
 
-       /* We may already be on the DTO list */
-       spin_lock_irqsave(&dto_lock, flags);
-       if (!list_empty(&rdma->sc_dto_q))
-               list_del_init(&rdma->sc_dto_q);
-       spin_unlock_irqrestore(&dto_lock, flags);
+       /* Destroy the QP if present (not a listener) */
+       if (rdma->sc_qp && !IS_ERR(rdma->sc_qp)) {
+               ib_destroy_qp(rdma->sc_qp);
+               svc_xprt_put(xprt);
+       }
+
+       /* Destroy the CM ID */
+       rdma_destroy_id(rdma->sc_cm_id);
 }
 
 static void svc_rdma_free(struct svc_xprt *xprt)
 {
        struct svcxprt_rdma *rdma = (struct svcxprt_rdma *)xprt;
        dprintk("svcrdma: svc_rdma_free(%p)\n", rdma);
-       rdma_destroy_xprt(rdma);
-       kfree(rdma);
-}
-
-static void rdma_destroy_xprt(struct svcxprt_rdma *xprt)
-{
-       if (xprt->sc_qp && !IS_ERR(xprt->sc_qp))
-               ib_destroy_qp(xprt->sc_qp);
-
-       if (xprt->sc_sq_cq && !IS_ERR(xprt->sc_sq_cq))
-               ib_destroy_cq(xprt->sc_sq_cq);
+       /* We should only be called from kref_put */
+       BUG_ON(atomic_read(&xprt->xpt_ref.refcount) != 0);
+       if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq))
+               ib_destroy_cq(rdma->sc_sq_cq);
 
-       if (xprt->sc_rq_cq && !IS_ERR(xprt->sc_rq_cq))
-               ib_destroy_cq(xprt->sc_rq_cq);
+       if (rdma->sc_rq_cq && !IS_ERR(rdma->sc_rq_cq))
+               ib_destroy_cq(rdma->sc_rq_cq);
 
-       if (xprt->sc_phys_mr && !IS_ERR(xprt->sc_phys_mr))
-               ib_dereg_mr(xprt->sc_phys_mr);
+       if (rdma->sc_phys_mr && !IS_ERR(rdma->sc_phys_mr))
+               ib_dereg_mr(rdma->sc_phys_mr);
 
-       if (xprt->sc_pd && !IS_ERR(xprt->sc_pd))
-               ib_dealloc_pd(xprt->sc_pd);
+       if (rdma->sc_pd && !IS_ERR(rdma->sc_pd))
+               ib_dealloc_pd(rdma->sc_pd);
 
-       destroy_context_cache(xprt->sc_ctxt_head);
+       destroy_context_cache(rdma->sc_ctxt_head);
+       kfree(rdma);
 }
 
 static int svc_rdma_has_wspace(struct svc_xprt *xprt)
index 74c2f9db2aac06586f25a1397c94de5325a2b509..263d04ab2d947398ee443f3b4ed1401700e0c307 100755 (executable)
@@ -247,6 +247,10 @@ my ($function, %function_table,%parametertypes,$declaration_purpose);
 my ($type,$declaration_name,$return_type);
 my ($newsection,$newcontents,$prototype,$filelist, $brcount, %source_map);
 
+if (defined($ENV{'KBUILD_VERBOSE'})) {
+       $verbose = "$ENV{'KBUILD_VERBOSE'}";
+}
+
 # Generated docbook code is inserted in a template at a point where
 # docbook v3.1 requires a non-zero sequence of RefEntry's; see:
 # http://www.oasis-open.org/docbook/documentation/reference/html/refentry.html
index 4bf4807f2d44351f9a46084a21e26567e8602448..41a049f50f58f43e131219c2318df9c265d76782 100644 (file)
@@ -800,7 +800,8 @@ static void selinux_sb_clone_mnt_opts(const struct super_block *oldsb,
        mutex_unlock(&newsbsec->lock);
 }
 
-int selinux_parse_opts_str(char *options, struct security_mnt_opts *opts)
+static int selinux_parse_opts_str(char *options,
+                                 struct security_mnt_opts *opts)
 {
        char *p;
        char *context = NULL, *defcontext = NULL;
index a21a0e907ab34092017e6a67243a1ad93b3be171..62c1e982849d9b1ab83c38c1bc6bc9df68749e77 100644 (file)
 #define SMK_MAXLEN     23
 #define SMK_LABELLEN   (SMK_MAXLEN+1)
 
-/*
- * How many kinds of access are there?
- * Here's your answer.
- */
-#define SMK_ACCESSDASH '-'
-#define SMK_ACCESSLOW  "rwxa"
-#define SMK_ACCESSKINDS        (sizeof(SMK_ACCESSLOW) - 1)
-
 struct superblock_smack {
        char            *smk_root;
        char            *smk_floor;
index 358c92c1a153df7f943d09fdc3634ffffc47a632..afe7c9b0732ac6c16ae6677bbfe1ca0ca5ecf799 100644 (file)
@@ -81,10 +81,23 @@ static struct semaphore smack_write_sem;
 /*
  * Values for parsing cipso rules
  * SMK_DIGITLEN: Length of a digit field in a rule.
- * SMK_CIPSOMEN: Minimum possible cipso rule length.
+ * SMK_CIPSOMIN: Minimum possible cipso rule length.
+ * SMK_CIPSOMAX: Maximum possible cipso rule length.
  */
 #define SMK_DIGITLEN 4
-#define SMK_CIPSOMIN (SMK_MAXLEN + 2 * SMK_DIGITLEN)
+#define SMK_CIPSOMIN (SMK_LABELLEN + 2 * SMK_DIGITLEN)
+#define SMK_CIPSOMAX (SMK_CIPSOMIN + SMACK_CIPSO_MAXCATNUM * SMK_DIGITLEN)
+
+/*
+ * Values for parsing MAC rules
+ * SMK_ACCESS: Maximum possible combination of access permissions
+ * SMK_ACCESSLEN: Maximum length for a rule access field
+ * SMK_LOADLEN: Smack rule length
+ */
+#define SMK_ACCESS    "rwxa"
+#define SMK_ACCESSLEN (sizeof(SMK_ACCESS) - 1)
+#define SMK_LOADLEN   (SMK_LABELLEN + SMK_LABELLEN + SMK_ACCESSLEN)
+
 
 /*
  * Seq_file read operations for /smack/load
@@ -229,14 +242,10 @@ static void smk_set_access(struct smack_rule *srp)
  * The format is exactly:
  *     char subject[SMK_LABELLEN]
  *     char object[SMK_LABELLEN]
- *     char access[SMK_ACCESSKINDS]
- *
- *     Anything following is commentary and ignored.
+ *     char access[SMK_ACCESSLEN]
  *
- * writes must be SMK_LABELLEN+SMK_LABELLEN+4 bytes.
+ * writes must be SMK_LABELLEN+SMK_LABELLEN+SMK_ACCESSLEN bytes.
  */
-#define MINIMUM_LOAD (SMK_LABELLEN + SMK_LABELLEN + SMK_ACCESSKINDS)
-
 static ssize_t smk_write_load(struct file *file, const char __user *buf,
                              size_t count, loff_t *ppos)
 {
@@ -253,7 +262,7 @@ static ssize_t smk_write_load(struct file *file, const char __user *buf,
                return -EPERM;
        if (*ppos != 0)
                return -EINVAL;
-       if (count < MINIMUM_LOAD)
+       if (count != SMK_LOADLEN)
                return -EINVAL;
 
        data = kzalloc(count, GFP_KERNEL);
@@ -513,7 +522,7 @@ static ssize_t smk_write_cipso(struct file *file, const char __user *buf,
                return -EPERM;
        if (*ppos != 0)
                return -EINVAL;
-       if (count <= SMK_CIPSOMIN)
+       if (count < SMK_CIPSOMIN || count > SMK_CIPSOMAX)
                return -EINVAL;
 
        data = kzalloc(count + 1, GFP_KERNEL);
@@ -547,7 +556,7 @@ static ssize_t smk_write_cipso(struct file *file, const char __user *buf,
        if (ret != 1 || catlen > SMACK_CIPSO_MAXCATNUM)
                goto out;
 
-       if (count <= (SMK_CIPSOMIN + catlen * SMK_DIGITLEN))
+       if (count != (SMK_CIPSOMIN + catlen * SMK_DIGITLEN))
                goto out;
 
        memset(mapcatset, 0, sizeof(mapcatset));