[kernel] r10828 - in dists/trunk/linux-2.6/debian/patches: bugfix/all series

Maximilian Attems maks at alioth.debian.org
Thu Mar 13 10:27:41 UTC 2008


Author: maks
Date: Thu Mar 13 10:27:40 2008
New Revision: 10828

Log:
update to 2.6.25-rc5-git3

mips, arm, net, maybe ppc build failure


Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc5-git3
Removed:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc5-git2
Modified:
   dists/trunk/linux-2.6/debian/patches/series/1~experimental.1

Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc5-git3
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-rc5-git3	Thu Mar 13 10:27:40 2008
@@ -0,0 +1,17663 @@
+diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
+index 0f23d67..bec5a32 100644
+--- a/Documentation/lguest/lguest.c
++++ b/Documentation/lguest/lguest.c
+@@ -486,9 +486,12 @@ static void concat(char *dst, char *args[])
+ 	unsigned int i, len = 0;
+ 
+ 	for (i = 0; args[i]; i++) {
++		if (i) {
++			strcat(dst+len, " ");
++			len++;
++		}
+ 		strcpy(dst+len, args[i]);
+-		strcat(dst+len, " ");
+-		len += strlen(args[i]) + 1;
++		len += strlen(args[i]);
+ 	}
+ 	/* In case it's empty. */
+ 	dst[len] = '\0';
+diff --git a/Documentation/pci.txt b/Documentation/pci.txt
+index bb7bd27..d2c2e6e 100644
+--- a/Documentation/pci.txt
++++ b/Documentation/pci.txt
+@@ -123,7 +123,7 @@ initialization with a pointer to a structure describing the driver
+ 
+ 
+ The ID table is an array of struct pci_device_id entries ending with an
+-all-zero entry; use of the macro DECLARE_PCI_DEVICE_TABLE is the preferred
++all-zero entry; use of the macro DEFINE_PCI_DEVICE_TABLE is the preferred
+ method of declaring the table.  Each entry consists of:
+ 
+ 	vendor,device	Vendor and device ID to match (or PCI_ANY_ID)
+@@ -193,7 +193,7 @@ Tips on when/where to use the above attributes:
+ 	o Do not mark the struct pci_driver.
+ 
+ 	o The ID table array should be marked __devinitconst; this is done
+-	  automatically if the table is declared with DECLARE_PCI_DEVICE_TABLE().
++	  automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE().
+ 
+ 	o The probe() and remove() functions should be marked __devinit
+ 	  and __devexit respectively.  All initialization functions
+diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt
+index 442e14d..01e6940 100644
+--- a/Documentation/scheduler/sched-stats.txt
++++ b/Documentation/scheduler/sched-stats.txt
+@@ -142,7 +142,7 @@ of idleness (idle, busy, and newly idle):
+ 
+ /proc/<pid>/schedstat
+ ----------------
+-schedstats also adds a new /proc/<pid/schedstat file to include some of
++schedstats also adds a new /proc/<pid>/schedstat file to include some of
+ the same information on a per-process level.  There are three fields in
+ this file correlating for that process to:
+      1) time spent on the cpu
+diff --git a/Documentation/usb/usb-help.txt b/Documentation/usb/usb-help.txt
+index a740859..4273ca2 100644
+--- a/Documentation/usb/usb-help.txt
++++ b/Documentation/usb/usb-help.txt
+@@ -1,5 +1,5 @@
+ usb-help.txt
+-2000-July-12
++2008-Mar-7
+ 
+ For USB help other than the readme files that are located in
+ Documentation/usb/*, see the following:
+@@ -10,9 +10,7 @@ Linux-USB project:  http://www.linux-usb.org
+ Linux USB Guide:    http://linux-usb.sourceforge.net
+ Linux-USB device overview (working devices and drivers):
+                     http://www.qbik.ch/usb/devices/
+-    
+-The Linux-USB mailing lists are:
+-  linux-usb-users at lists.sourceforge.net   for general user help
+-  linux-usb-devel at lists.sourceforge.net   for developer discussions
++
++The Linux-USB mailing list is at linux-usb at vger.kernel.org
+ 
+ ###
+diff --git a/MAINTAINERS b/MAINTAINERS
+index 558636e..0f95a4a 100644
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -2052,43 +2052,19 @@ M:	kernel at wantstofly.org
+ L:	netdev at 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 at intel.com
+ P:	Jesse Brandeburg
+ M:	jesse.brandeburg at intel.com
+ P:	Jeff Kirsher
+ M:	jeffrey.t.kirsher at intel.com
++P:	Bruce Allan
++M:	bruce.w.allan at intel.com
+ P:	John Ronciak
+ M:	john.ronciak at intel.com
+ L:	e1000-devel at 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 at intel.com
+-P:	Jesse Brandeburg
+-M:	jesse.brandeburg at intel.com
+-P:	Jeff Kirsher
+-M:	jeffrey.t.kirsher at intel.com
+-P:	John Ronciak
+-M:	john.ronciak at intel.com
+-L:	e1000-devel at lists.sourceforge.net
+-W:	http://sourceforge.net/projects/e1000/
+-S:	Supported
+-
+-INTEL PRO/10GbE SUPPORT
+-P:	Ayyappan Veeraiyan
+-M:	ayyappan.veeraiyan at intel.com
+-P:	Auke Kok
+-M:	auke-jan.h.kok at intel.com
+-P:	Jesse Brandeburg
+-M:	jesse.brandeburg at intel.com
+-P:	John Ronciak
+-M:	john.ronciak at intel.com
+-L:	e1000-devel at lists.sourceforge.net
+-W:	http://sourceforge.net/projects/e1000/
++W:	http://e1000.sourceforge.net/
+ S:	Supported
+ 
+ INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
+@@ -2156,7 +2132,7 @@ L:	netdev at vger.kernel.org
+ S:	Maintained
+ 
+ IPATH DRIVER:
+-P:	Arthur Jones
++P:	Ralph Campbell
+ M:	infinipath at qlogic.com
+ L:	general at lists.openfabrics.org
+ T:	git git://git.qlogic.com/ipath-linux-2.6
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index 7b8ff66..1a46496 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -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'
+diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
+index 97b7dc1..5382622 100644
+--- a/arch/arm/common/it8152.c
++++ b/arch/arm/common/it8152.c
+@@ -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;
+ 
+diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig
+index c2345af..323c1de 100644
+--- a/arch/arm/configs/omap_h2_1610_defconfig
++++ b/arch/arm/configs/omap_h2_1610_defconfig
+@@ -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
+ 
+ #
+diff --git a/arch/arm/configs/omap_osk_5912_defconfig b/arch/arm/configs/omap_osk_5912_defconfig
+index d592a64..d4ca5e6 100644
+--- a/arch/arm/configs/omap_osk_5912_defconfig
++++ b/arch/arm/configs/omap_osk_5912_defconfig
+@@ -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
+diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
+index 024a9cf..50f667f 100644
+--- a/arch/arm/kernel/head-common.S
++++ b/arch/arm/kernel/head-common.S
+@@ -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
+diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
+index 7898cbc..bff4c6e 100644
+--- a/arch/arm/kernel/head.S
++++ b/arch/arm/kernel/head.S
+@@ -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.
+diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
+index a22a98c..13e371a 100644
+--- a/arch/arm/kernel/kprobes.c
++++ b/arch/arm/kernel/kprobes.c
+@@ -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,
+diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
+index 38313ab..bf103b2 100644
+--- a/arch/arm/mach-at91/board-sam9263ek.c
++++ b/arch/arm/mach-at91/board-sam9263ek.c
+@@ -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 */
+diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
+index f629c2b..ee4964a 100644
+--- a/arch/arm/mach-at91/gpio.c
++++ b/arch/arm/mach-at91/gpio.c
+@@ -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.
+diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
+index 7f31816..45144ad 100644
+--- a/arch/arm/mach-h720x/common.c
++++ b/arch/arm/mach-h720x/common.c
+@@ -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
+diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c
+index bc6fb02..a59ff29 100644
+--- a/arch/arm/mach-imx/dma.c
++++ b/arch/arm/mach-imx/dma.c
+@@ -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;
+ }
+diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c
+index a7465db..e6695c4 100644
+--- a/arch/arm/mach-imx/irq.c
++++ b/arch/arm/mach-imx/irq.c
+@@ -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);
+ }
+ 
+diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
+index 268a8d8..77b24cd 100644
+--- a/arch/arm/mach-iop13xx/iq81340mc.c
++++ b/arch/arm/mach-iop13xx/iq81340mc.c
+@@ -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);
+ }
+ 
+diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
+index a51ffd2..e8522b3 100644
+--- a/arch/arm/mach-iop13xx/iq81340sc.c
++++ b/arch/arm/mach-iop13xx/iq81340sc.c
+@@ -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);
+ }
+ 
+diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
+index 99d94cb..7825c1a 100644
+--- a/arch/arm/mach-iop13xx/pci.c
++++ b/arch/arm/mach-iop13xx/pci.c
+@@ -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;
+ 			}
+diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
+index bfe0c87..246f6d4 100644
+--- a/arch/arm/mach-iop13xx/setup.c
++++ b/arch/arm/mach-iop13xx/setup.c
+@@ -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);
+diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
+index bf04121..64be341 100644
+--- a/arch/arm/mach-ixp4xx/common-pci.c
++++ b/arch/arm/mach-ixp4xx/common-pci.c
+@@ -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;
+ 	}
+ 
+diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+index 0d5a424..49dec78 100644
+--- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c
++++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+@@ -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);
+ }
+ 
+diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
+index b9ca8f9..fd7537f 100644
+--- a/arch/arm/mach-netx/generic.c
++++ b/arch/arm/mach-netx/generic.c
+@@ -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 = {
+diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c
+index b223021..5286e9f 100644
+--- a/arch/arm/mach-ns9xxx/gpio.c
++++ b/arch/arm/mach-ns9xxx/gpio.c
+@@ -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)
+ {
+diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
+index 070345e..5079877 100644
+--- a/arch/arm/mach-omap1/board-h2.c
++++ b/arch/arm/mach-omap1/board-h2.c
+@@ -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),
+diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
+index 6fc5168..c3ef1ee 100644
+--- a/arch/arm/mach-omap1/board-h3.c
++++ b/arch/arm/mach-omap1/board-h3.c
+@@ -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",
+diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
+index 8eb5dcd..e6c64e1 100644
+--- a/arch/arm/mach-omap1/pm.c
++++ b/arch/arm/mach-omap1/pm.c
+@@ -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
+diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
+index 5a4091f..69c8174 100644
+--- a/arch/arm/mach-omap2/io.c
++++ b/arch/arm/mach-omap2/io.c
+@@ -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,
+diff --git a/arch/arm/mach-orion/addr-map.c b/arch/arm/mach-orion/addr-map.c
+index 2e2fd63..58cc3c0 100644
+--- a/arch/arm/mach-orion/addr-map.c
++++ b/arch/arm/mach-orion/addr-map.c
+@@ -97,14 +97,20 @@
+ #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
+diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c
+index 5f0ee4b..bbc2b4e 100644
+--- a/arch/arm/mach-orion/common.c
++++ b/arch/arm/mach-orion/common.c
+@@ -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 at 0x%08x\n",
++			       t->u.mem.size / 1024, t->u.mem.start);
++			t->hdr.tag = 0;
++		}
++}
+diff --git a/arch/arm/mach-orion/common.h b/arch/arm/mach-orion/common.h
+index 10154ec..501497c 100644
+--- a/arch/arm/mach-orion/common.h
++++ b/arch/arm/mach-orion/common.h
+@@ -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__ */
+diff --git a/arch/arm/mach-orion/dns323-setup.c b/arch/arm/mach-orion/dns323-setup.c
+index 02b280c..076e155 100644
+--- a/arch/arm/mach-orion/dns323-setup.c
++++ b/arch/arm/mach-orion/dns323-setup.c
+@@ -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
+diff --git a/arch/arm/mach-orion/gpio.c b/arch/arm/mach-orion/gpio.c
+index d5f00c8..f713818 100644
+--- a/arch/arm/mach-orion/gpio.c
++++ b/arch/arm/mach-orion/gpio.c
+@@ -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;
+ }
+diff --git a/arch/arm/mach-orion/kurobox_pro-setup.c b/arch/arm/mach-orion/kurobox_pro-setup.c
+index 6817aca..785a07b 100644
+--- a/arch/arm/mach-orion/kurobox_pro-setup.c
++++ b/arch/arm/mach-orion/kurobox_pro-setup.c
+@@ -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
+diff --git a/arch/arm/mach-orion/ts209-setup.c b/arch/arm/mach-orion/ts209-setup.c
+index b8cfe68..45764da 100644
+--- a/arch/arm/mach-orion/ts209-setup.c
++++ b/arch/arm/mach-orion/ts209-setup.c
+@@ -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
+diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c
+index daa8d3d..8e00ed4 100644
+--- a/arch/arm/mach-pnx4008/clock.c
++++ b/arch/arm/mach-pnx4008/clock.c
+@@ -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);
+diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c
+index f7009d8..fe152e8 100644
+--- a/arch/arm/mach-pnx4008/dma.c
++++ b/arch/arm/mach-pnx4008/dma.c
+@@ -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;
+ 	}
+ 
+diff --git a/arch/arm/mach-pxa/cm-x270-pci.c b/arch/arm/mach-pxa/cm-x270-pci.c
+index 15c4e0d..fcda7d5 100644
+--- a/arch/arm/mach-pxa/cm-x270-pci.c
++++ b/arch/arm/mach-pxa/cm-x270-pci.c
+@@ -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)
+diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
+index 6012177..ecdbc96 100644
+--- a/arch/arm/mach-pxa/cm-x270.c
++++ b/arch/arm/mach-pxa/cm-x270.c
+@@ -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__);
+ 	}
+ }
+ 
+diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c
+index 93c4f31..3215316 100644
+--- a/arch/arm/mach-pxa/dma.c
++++ b/arch/arm/mach-pxa/dma.c
+@@ -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;
+ 	}
+ 
+diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
+index 3d0ad50..3bb3131 100644
+--- a/arch/arm/mach-pxa/em-x270.c
++++ b/arch/arm/mach-pxa/em-x270.c
+@@ -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;
+ 	}
+ 
+diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
+index 345c3de..72a436f 100644
+--- a/arch/arm/mach-pxa/mainstone.c
++++ b/arch/arm/mach-pxa/mainstone.c
+@@ -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;
+ 	}
+ }
+diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
+index 853fc94..f207fcd 100644
+--- a/arch/arm/mach-pxa/trizeps4.c
++++ b/arch/arm/mach-pxa/trizeps4.c
+@@ -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 */
+ 	}
+ }
+diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
+index f60b7a6..842d9e6 100644
+--- a/arch/arm/mach-sa1100/badge4.c
++++ b/arch/arm/mach-sa1100/badge4.c
+@@ -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;
+ 	}
+ 
+diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c
+index d68630b..343368a 100644
+--- a/arch/arm/mach-sa1100/cpu-sa1100.c
++++ b/arch/arm/mach-sa1100/cpu-sa1100.c
+@@ -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! */
+diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
+index 1fbe053..e508028 100644
+--- a/arch/arm/mach-sa1100/dma.c
++++ b/arch/arm/mach-sa1100/dma.c
+@@ -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;
+ 	}
+ 
+diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
+index b72fee0..8473c37 100644
+--- a/arch/arm/mach-sa1100/h3600.c
++++ b/arch/arm/mach-sa1100/h3600.c
+@@ -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);
+diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c
+index 2b5aa11..98d0151 100644
+--- a/arch/arm/plat-iop/pci.c
++++ b/arch/arm/plat-iop/pci.c
+@@ -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';
+ 			}
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+index c0d63b0..d719c15 100644
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ b/arch/arm/plat-omap/cpu-omap.c
+@@ -33,43 +33,33 @@
+ #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",
+ };
+ 
+diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
+index c5dab1d..4a53f9b 100644
+--- a/arch/arm/plat-omap/devices.c
++++ b/arch/arm/plat-omap/devices.c
+@@ -89,68 +89,6 @@ 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)
+ 
+ static void omap_init_kp(void)
+@@ -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();
+diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
+index a46676d..91004a3 100644
+--- a/arch/arm/plat-omap/dma.c
++++ b/arch/arm/plat-omap/dma.c
+@@ -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;
+ 
+diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
+index e719d0e..302ad8d 100644
+--- a/arch/arm/plat-omap/dmtimer.c
++++ b/arch/arm/plat-omap/dmtimer.c
+@@ -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;
+ 	}
+diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
+index 56f4d13..66a1455 100644
+--- a/arch/arm/plat-omap/gpio.c
++++ b/arch/arm/plat-omap/gpio.c
+@@ -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;
+diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
+index ac9ff16..60f162d 100644
+--- a/arch/arm/plat-s3c24xx/dma.c
++++ b/arch/arm/plat-s3c24xx/dma.c
+@@ -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);
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index ade230d..8724ed3 100644
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -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
+diff --git a/arch/mips/Makefile b/arch/mips/Makefile
+index 3fb7f30..72097da 100644
+--- a/arch/mips/Makefile
++++ b/arch/mips/Makefile
+@@ -12,6 +12,8 @@
+ # for "archclean" cleaning up for this architecture.
+ #
+ 
++KBUILD_DEFCONFIG := ip22_defconfig
++
+ cflags-y :=
+ 
+ #
+diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
+index 428ed27..57f17b4 100644
+--- a/arch/mips/au1000/common/dbdma.c
++++ b/arch/mips/au1000/common/dbdma.c
+@@ -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
+index 4f5e56c..0000000
+--- a/arch/mips/defconfig
++++ /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
+diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
+index ffa0836..9e78e1a 100644
+--- a/arch/mips/kernel/Makefile
++++ b/arch/mips/kernel/Makefile
+@@ -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
+diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c
+index 417bb3e..a1b48af 100644
+--- a/arch/mips/kernel/cpu-bugs64.c
++++ b/arch/mips/kernel/cpu-bugs64.c
+@@ -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)
+ {
+diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
+index 5861a43..89c3304 100644
+--- a/arch/mips/kernel/cpu-probe.c
++++ b/arch/mips/kernel/cpu-probe.c
+@@ -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;
+ 
+diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c
+index 0e2b5cd..86e026f 100644
+--- a/arch/mips/kernel/csrc-r4k.c
++++ b/arch/mips/kernel/csrc-r4k.c
+@@ -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;
+ }
+diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
+index a24fb79..3613645 100644
+--- a/arch/mips/kernel/head.S
++++ b/arch/mips/kernel/head.S
+@@ -195,7 +195,7 @@ NESTED(kernel_entry, 16, sp)			# kernel entry point
+ 	j		start_kernel
+ 	END(kernel_entry)
+ 
+-	__INIT
++	__CPUINIT
+ 
+ #ifdef CONFIG_SMP
+ /*
+diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
+index fcae667..984c0d0 100644
+--- a/arch/mips/kernel/traps.c
++++ b/arch/mips/kernel/traps.c
+@@ -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);
+diff --git a/arch/mips/lib/ucmpdi2.c b/arch/mips/lib/ucmpdi2.c
+index b33d856..bb4cb2f 100644
+--- a/arch/mips/lib/ucmpdi2.c
++++ b/arch/mips/lib/ucmpdi2.c
+@@ -17,3 +17,5 @@ word_type __ucmpdi2(unsigned long long a, unsigned long long b)
+ 		return 2;
+ 	return 1;
+ }
++
++EXPORT_SYMBOL(__ucmpdi2);
+diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c
+index 27b012d..a6d1c77 100644
+--- a/arch/mips/lib/uncached.c
++++ b/arch/mips/lib/uncached.c
+@@ -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");
+diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
+index f02ce63..b50e0fc 100644
+--- a/arch/mips/mips-boards/generic/time.c
++++ b/arch/mips/mips-boards/generic/time.c
+@@ -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) {
+diff --git a/arch/mips/mipssim/sim_time.c b/arch/mips/mipssim/sim_time.c
+index e39bbe9..881ecbc 100644
+--- a/arch/mips/mipssim/sim_time.c
++++ b/arch/mips/mipssim/sim_time.c
+@@ -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) {
+diff --git a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c
+index 562abb7..76935e3 100644
+--- a/arch/mips/mm/c-r3k.c
++++ b/arch/mips/mm/c-r3k.c
+@@ -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);
+diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
+index 2c4f7e1..6496925 100644
+--- a/arch/mips/mm/c-r4k.c
++++ b/arch/mips/mm/c-r4k.c
+@@ -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);
+diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c
+index 9ea121e..b09d569 100644
+--- a/arch/mips/mm/c-tx39.c
++++ b/arch/mips/mm/c-tx39.c
+@@ -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);
+diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
+index 6a24651..51ab1fa 100644
+--- a/arch/mips/mm/cache.c
++++ b/arch/mips/mm/cache.c
+@@ -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);
+diff --git a/arch/mips/mm/cex-sb1.S b/arch/mips/mm/cex-sb1.S
+index e54a62f..2d08268 100644
+--- a/arch/mips/mm/cex-sb1.S
++++ b/arch/mips/mm/cex-sb1.S
+@@ -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
+diff --git a/arch/mips/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c
+index 9185fbf..455dedb 100644
+--- a/arch/mips/mm/pg-r4k.c
++++ b/arch/mips/mm/pg-r4k.c
+@@ -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;
+diff --git a/arch/mips/mm/pg-sb1.c b/arch/mips/mm/pg-sb1.c
+index 89925ec..49e289d 100644
+--- a/arch/mips/mm/pg-sb1.c
++++ b/arch/mips/mm/pg-sb1.c
+@@ -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)
+ {
+ }
+diff --git a/arch/mips/mm/sc-ip22.c b/arch/mips/mm/sc-ip22.c
+index d236cf8..1f602a1 100644
+--- a/arch/mips/mm/sc-ip22.c
++++ b/arch/mips/mm/sc-ip22.c
+@@ -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();
+diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
+index c13170b..b55c2d1 100644
+--- a/arch/mips/mm/sc-mips.c
++++ b/arch/mips/mm/sc-mips.c
+@@ -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;
+ }
+-
+diff --git a/arch/mips/mm/sc-r5k.c b/arch/mips/mm/sc-r5k.c
+index d35b6c1..f330d38 100644
+--- a/arch/mips/mm/sc-r5k.c
++++ b/arch/mips/mm/sc-r5k.c
+@@ -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();
+diff --git a/arch/mips/mm/sc-rm7k.c b/arch/mips/mm/sc-rm7k.c
+index 31ec730..fc227f3 100644
+--- a/arch/mips/mm/sc-rm7k.c
++++ b/arch/mips/mm/sc-rm7k.c
+@@ -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();
+diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c
+index 7948e9a..a782549 100644
+--- a/arch/mips/mm/tlb-r3k.c
++++ b/arch/mips/mm/tlb-r3k.c
+@@ -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();
+ 
+diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
+index 74ae034..63065d6 100644
+--- a/arch/mips/mm/tlb-r4k.c
++++ b/arch/mips/mm/tlb-r4k.c
+@@ -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);
+diff --git a/arch/mips/mm/tlb-r8k.c b/arch/mips/mm/tlb-r8k.c
+index bd8409d..4f01a3b 100644
+--- a/arch/mips/mm/tlb-r8k.c
++++ b/arch/mips/mm/tlb-r8k.c
+@@ -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;
+diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
+index 218a6cc..3a93d4c 100644
+--- a/arch/mips/mm/tlbex.c
++++ b/arch/mips/mm/tlbex.c
+@@ -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));
+diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
+index e3f74ed..1a6f770 100644
+--- a/arch/mips/mm/uasm.c
++++ b/arch/mips/mm/uasm.c
+@@ -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);
+diff --git a/arch/mips/mm/uasm.h b/arch/mips/mm/uasm.h
+index a10fc11..fe0574f 100644
+--- a/arch/mips/mm/uasm.h
++++ b/arch/mips/mm/uasm.h
+@@ -11,38 +11,38 @@
+ #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);
+diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c
+index 30ed361..ab68c43 100644
+--- a/arch/mips/pci/pci-bcm1480.c
++++ b/arch/mips/pci/pci-bcm1480.c
+@@ -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);
+ 
+diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
+index a322543..bb64828 100644
+--- a/arch/mips/pci/pci-ip27.c
++++ b/arch/mips/pci/pci-ip27.c
+@@ -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;
+diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
+index f9471d7..358ad62 100644
+--- a/arch/mips/pci/pci.c
++++ b/arch/mips/pci/pci.c
+@@ -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.  */
+ 
+diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
+index 653f3ec..3a7df64 100644
+--- a/arch/mips/pmc-sierra/yosemite/smp.c
++++ b/arch/mips/pmc-sierra/yosemite/smp.c
+@@ -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))));
+diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
+index a49e7c8..7093e7c 100644
+--- a/arch/mips/sgi-ip27/ip27-init.c
++++ b/arch/mips/sgi-ip27/ip27-init.c
+@@ -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);
+diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
+index 08d4536..25d3baf 100644
+--- a/arch/mips/sgi-ip27/ip27-timer.c
++++ b/arch/mips/sgi-ip27/ip27-timer.c
+@@ -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.
+diff --git a/arch/mips/sgi-ip27/ip27-xtalk.c b/arch/mips/sgi-ip27/ip27-xtalk.c
+index fc82f34..6ae64e8 100644
+--- a/arch/mips/sgi-ip27/ip27-xtalk.c
++++ b/arch/mips/sgi-ip27/ip27-xtalk.c
+@@ -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;
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index 1c6ce35..ab5cfe8 100644
+--- a/arch/powerpc/Makefile
++++ b/arch/powerpc/Makefile
+@@ -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)
+ 
+diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
+index e3993a6..4974d9e 100644
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -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)
+diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
+index a3637ff..49c05e9 100644
+--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
++++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
+@@ -47,6 +47,72 @@
+ 		reg = <0x00000000 0x20000000>;	// 512MB at 0
+ 	};
+ 
++	localbus at 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 at 0,0 {
++			#address-cells = <1>;
++			#size-cells = <1>;
++			compatible = "cfi-flash";
++			reg = <0 0x0 0x2000000>;
++			bank-width = <2>;
++			device-width = <1>;
++
++			u-boot at 0 {
++				reg = <0x0 0x100000>;
++				read-only;
++			};
++
++			fs at 100000 {
++				reg = <0x100000 0x800000>;
++			};
++
++			kernel at 1d00000 {
++				reg = <0x1d00000 0x200000>;
++			};
++
++			dtb at 1f00000 {
++				reg = <0x1f00000 0x100000>;
++			};
++		};
++
++		bcsr at 1,0 {
++			reg = <1 0x0 0x8000>;
++			compatible = "fsl,mpc837xmds-bcsr";
++		};
++
++		nand at 3,0 {
++			#address-cells = <1>;
++			#size-cells = <1>;
++			compatible = "fsl,mpc8377-fcm-nand",
++			             "fsl,elbc-fcm-nand";
++			reg = <3 0x0 0x8000>;
++
++			u-boot at 0 {
++				reg = <0x0 0x100000>;
++				read-only;
++			};
++
++			kernel at 100000 {
++				reg = <0x100000 0x300000>;
++			};
++
++			fs at 400000 {
++				reg = <0x400000 0x1c00000>;
++			};
++		};
++	};
++
+ 	soc at e0000000 {
+ 		#address-cells = <1>;
+ 		#size-cells = <1>;
+@@ -91,7 +157,6 @@
+ 			mode = "cpu";
+ 		};
+ 
+-		/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+ 		usb at 23000 {
+ 			compatible = "fsl-usb2-dr";
+ 			reg = <0x23000 0x1000>;
+@@ -99,7 +164,8 @@
+ 			#size-cells = <0>;
+ 			interrupt-parent = <&ipic>;
+ 			interrupts = <38 0x8>;
+-			phy_type = "utmi_wide";
++			dr_mode = "host";
++			phy_type = "ulpi";
+ 		};
+ 
+ 		mdio at 24520 {
+diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
+index 533e9b0..1d6ea08 100644
+--- a/arch/powerpc/boot/dts/mpc8378_mds.dts
++++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
+@@ -47,6 +47,72 @@
+ 		reg = <0x00000000 0x20000000>;	// 512MB at 0
+ 	};
+ 
++	localbus at 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 at 0,0 {
++			#address-cells = <1>;
++			#size-cells = <1>;
++			compatible = "cfi-flash";
++			reg = <0 0x0 0x2000000>;
++			bank-width = <2>;
++			device-width = <1>;
++
++			u-boot at 0 {
++				reg = <0x0 0x100000>;
++				read-only;
++			};
++
++			fs at 100000 {
++				reg = <0x100000 0x800000>;
++			};
++
++			kernel at 1d00000 {
++				reg = <0x1d00000 0x200000>;
++			};
++
++			dtb at 1f00000 {
++				reg = <0x1f00000 0x100000>;
++			};
++		};
++
++		bcsr at 1,0 {
++			reg = <1 0x0 0x8000>;
++			compatible = "fsl,mpc837xmds-bcsr";
++		};
++
++		nand at 3,0 {
++			#address-cells = <1>;
++			#size-cells = <1>;
++			compatible = "fsl,mpc8378-fcm-nand",
++			             "fsl,elbc-fcm-nand";
++			reg = <3 0x0 0x8000>;
++
++			u-boot at 0 {
++				reg = <0x0 0x100000>;
++				read-only;
++			};
++
++			kernel at 100000 {
++				reg = <0x100000 0x300000>;
++			};
++
++			fs at 400000 {
++				reg = <0x400000 0x1c00000>;
++			};
++		};
++	};
++
+ 	soc at e0000000 {
+ 		#address-cells = <1>;
+ 		#size-cells = <1>;
+@@ -91,7 +157,6 @@
+ 			mode = "cpu";
+ 		};
+ 
+-		/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+ 		usb at 23000 {
+ 			compatible = "fsl-usb2-dr";
+ 			reg = <0x23000 0x1000>;
+@@ -99,7 +164,8 @@
+ 			#size-cells = <0>;
+ 			interrupt-parent = <&ipic>;
+ 			interrupts = <38 0x8>;
+-			phy_type = "utmi_wide";
++			dr_mode = "host";
++			phy_type = "ulpi";
+ 		};
+ 
+ 		mdio at 24520 {
+diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
+index c270685..fdb4a92 100644
+--- a/arch/powerpc/boot/dts/mpc8379_mds.dts
++++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
+@@ -47,6 +47,72 @@
+ 		reg = <0x00000000 0x20000000>;	// 512MB at 0
+ 	};
+ 
++	localbus at 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 at 0,0 {
++			#address-cells = <1>;
++			#size-cells = <1>;
++			compatible = "cfi-flash";
++			reg = <0 0x0 0x2000000>;
++			bank-width = <2>;
++			device-width = <1>;
++
++			u-boot at 0 {
++				reg = <0x0 0x100000>;
++				read-only;
++			};
++
++			fs at 100000 {
++				reg = <0x100000 0x800000>;
++			};
++
++			kernel at 1d00000 {
++				reg = <0x1d00000 0x200000>;
++			};
++
++			dtb at 1f00000 {
++				reg = <0x1f00000 0x100000>;
++			};
++		};
++
++		bcsr at 1,0 {
++			reg = <1 0x0 0x8000>;
++			compatible = "fsl,mpc837xmds-bcsr";
++		};
++
++		nand at 3,0 {
++			#address-cells = <1>;
++			#size-cells = <1>;
++			compatible = "fsl,mpc8379-fcm-nand",
++			             "fsl,elbc-fcm-nand";
++			reg = <3 0x0 0x8000>;
++
++			u-boot at 0 {
++				reg = <0x0 0x100000>;
++				read-only;
++			};
++
++			kernel at 100000 {
++				reg = <0x100000 0x300000>;
++			};
++
++			fs at 400000 {
++				reg = <0x400000 0x1c00000>;
++			};
++		};
++	};
++
+ 	soc at e0000000 {
+ 		#address-cells = <1>;
+ 		#size-cells = <1>;
+@@ -91,7 +157,6 @@
+ 			mode = "cpu";
+ 		};
+ 
+-		/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
+ 		usb at 23000 {
+ 			compatible = "fsl-usb2-dr";
+ 			reg = <0x23000 0x1000>;
+@@ -99,7 +164,8 @@
+ 			#size-cells = <0>;
+ 			interrupt-parent = <&ipic>;
+ 			interrupts = <38 0x8>;
+-			phy_type = "utmi_wide";
++			dr_mode = "host";
++			phy_type = "ulpi";
+ 		};
+ 
+ 		mdio at 24520 {
+diff --git a/arch/powerpc/boot/dts/sbc8548.dts b/arch/powerpc/boot/dts/sbc8548.dts
+index 14be38a..b86e65d 100644
+--- a/arch/powerpc/boot/dts/sbc8548.dts
++++ b/arch/powerpc/boot/dts/sbc8548.dts
+@@ -184,11 +184,17 @@
+ 		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>;
+diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
+index c317815..d50e498 100755
+--- a/arch/powerpc/boot/wrapper
++++ b/arch/powerpc/boot/wrapper
+@@ -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-redboot_defconfig b/arch/powerpc/configs/adder875-redboot_defconfig
+deleted file mode 100644
+index cab5f9b..0000000
+--- a/arch/powerpc/configs/adder875-redboot_defconfig
++++ /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:38 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-redboot.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
+diff --git a/arch/powerpc/configs/adder875-uboot_defconfig b/arch/powerpc/configs/adder875-uboot_defconfig
+deleted file mode 100644
+index 1faf7ef..0000000
+--- a/arch/powerpc/configs/adder875-uboot_defconfig
++++ /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
+diff --git a/arch/powerpc/configs/adder875_defconfig b/arch/powerpc/configs/adder875_defconfig
+new file mode 100644
+index 0000000..a3cc94a
+--- /dev/null
++++ b/arch/powerpc/configs/adder875_defconfig
+@@ -0,0 +1,813 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.25-rc2
++# Wed Feb 20 12:26:07 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_HAVE_SETUP_PER_CPU_AREA is not set
++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_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_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
++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_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
++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
++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"
++CONFIG_CLASSIC_RCU=y
++# CONFIG_PREEMPT_RCU is not set
++
++#
++# Platform support
++#
++# 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
++# 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_IPIC 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_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_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
++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_SECCOMP is not set
++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_CAN 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_HAVE_IDE=y
++# 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_REALTEK_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_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_THERMAL=y
++# 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_MEMSTICK 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_DNOTIFY is not set
++# CONFIG_INOTIFY is not set
++# CONFIG_QUOTA 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_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
++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
++
++#
++# 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
++
++#
++# 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=y
++# 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_SLUB_STATS 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_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
++
++#
++# 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
+diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
+index f745839..3c9452d 100644
+--- a/arch/powerpc/kernel/head_8xx.S
++++ b/arch/powerpc/kernel/head_8xx.S
+@@ -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 */
+ 
+diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
+index 5c2e253..9d2c566 100644
+--- a/arch/powerpc/kernel/misc_32.S
++++ b/arch/powerpc/kernel/misc_32.S
+@@ -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
+diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
+index 980fe32..89c83cc 100644
+--- a/arch/powerpc/kernel/pci-common.c
++++ b/arch/powerpc/kernel/pci-common.c
+@@ -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,
+diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
+index aa9ff35..9c98424 100644
+--- a/arch/powerpc/kernel/ppc_ksyms.c
++++ b/arch/powerpc/kernel/ppc_ksyms.c
+@@ -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);
+diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
+index 32f4161..590f1f6 100644
+--- a/arch/powerpc/mm/hash_utils_64.c
++++ b/arch/powerpc/mm/hash_utils_64.c
+@@ -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;
+ 
+diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
+index 8a9c269..64d17b0 100644
+--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
++++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
+@@ -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", },
+ 	{},
+ };
+ 
+diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
+index 0afd225..a578b96 100644
+--- a/arch/powerpc/platforms/Kconfig
++++ b/arch/powerpc/platforms/Kconfig
+@@ -22,7 +22,6 @@ config PPC_83xx
+ 	select FSL_SOC
+ 	select MPC83xx
+ 	select IPIC
+-	select FSL_EMB_PERFMON
+ 
+ config PPC_86xx
+ 	bool "Freescale 86xx"
+diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
+index 73d81ce..0c3face 100644
+--- a/arch/powerpc/platforms/Kconfig.cputype
++++ b/arch/powerpc/platforms/Kconfig.cputype
+@@ -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
+diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
+index cf6c2c8..0ad83ae 100644
+--- a/arch/powerpc/platforms/cell/spufs/context.c
++++ b/arch/powerpc/platforms/cell/spufs/context.c
+@@ -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);
+diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
+index 6221968..cac69e1 100644
+--- a/arch/powerpc/platforms/cell/spufs/run.c
++++ b/arch/powerpc/platforms/cell/spufs/run.c
+@@ -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))
+diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
+index 5d5f680..00528ef 100644
+--- a/arch/powerpc/platforms/cell/spufs/sched.c
++++ b/arch/powerpc/platforms/cell/spufs/sched.c
+@@ -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);
+diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
+index 2c2fe3c..cdc5151 100644
+--- a/arch/powerpc/platforms/cell/spufs/spufs.h
++++ b/arch/powerpc/platforms/cell/spufs/spufs.h
+@@ -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 {
+diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
+index 4073640..829b8b0 100644
+--- a/arch/powerpc/platforms/powermac/pic.c
++++ b/arch/powerpc/platforms/powermac/pic.c
+@@ -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;
+ }
+ 
+diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
+index 6efbd5e..cc81fd1 100644
+--- a/arch/powerpc/sysdev/qe_lib/qe.c
++++ b/arch/powerpc/sysdev/qe_lib/qe.c
+@@ -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;
+diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
+index eb8d26f..321bda2 100644
+--- a/arch/ppc/kernel/head_8xx.S
++++ b/arch/ppc/kernel/head_8xx.S
+@@ -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 */
+ 
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index f41c953..237fc12 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -66,9 +66,6 @@ config MMU
+ config ZONE_DMA
+ 	def_bool y
+ 
+-config QUICKLIST
+-	def_bool X86_32
+-
+ config SBUS
+ 	bool
+ 
+diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
+index 8f64abe..d5904ee 100644
+--- a/arch/x86/kernel/ptrace.c
++++ b/arch/x86/kernel/ptrace.c
+@@ -1055,10 +1055,17 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value)
+ 	R32(esi, si);
+ 	R32(ebp, bp);
+ 	R32(eax, ax);
+-	R32(orig_eax, orig_ax);
+ 	R32(eip, ip);
+ 	R32(esp, sp);
+ 
++	case offsetof(struct user32, regs.orig_eax):
++		/*
++		 * Sign-extend the value so that orig_eax = -1
++		 * causes (long)orig_ax < 0 tests to fire correctly.
++		 */
++		regs->orig_ax = (long) (s32) value;
++		break;
++
+ 	case offsetof(struct user32, regs.eflags):
+ 		return set_flags(child, value);
+ 
+diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
+index 56b72fb..1c83e51 100644
+--- a/arch/x86/kernel/signal_64.c
++++ b/arch/x86/kernel/signal_64.c
+@@ -311,6 +311,35 @@ give_sigsegv:
+ }
+ 
+ /*
++ * Return -1L or the syscall number that @regs is executing.
++ */
++static long current_syscall(struct pt_regs *regs)
++{
++	/*
++	 * We always sign-extend a -1 value being set here,
++	 * so this is always either -1L or a syscall number.
++	 */
++	return regs->orig_ax;
++}
++
++/*
++ * Return a value that is -EFOO if the system call in @regs->orig_ax
++ * returned an error.  This only works for @regs from @current.
++ */
++static long current_syscall_ret(struct pt_regs *regs)
++{
++#ifdef CONFIG_IA32_EMULATION
++	if (test_thread_flag(TIF_IA32))
++		/*
++		 * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
++		 * and will match correctly in comparisons.
++		 */
++		return (int) regs->ax;
++#endif
++	return regs->ax;
++}
++
++/*
+  * OK, we're invoking a handler
+  */	
+ 
+@@ -327,9 +356,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
+ #endif
+ 
+ 	/* Are we from a system call? */
+-	if ((long)regs->orig_ax >= 0) {
++	if (current_syscall(regs) >= 0) {
+ 		/* If so, check system call restarting.. */
+-		switch (regs->ax) {
++		switch (current_syscall_ret(regs)) {
+ 		        case -ERESTART_RESTARTBLOCK:
+ 			case -ERESTARTNOHAND:
+ 				regs->ax = -EINTR;
+@@ -426,10 +455,9 @@ static void do_signal(struct pt_regs *regs)
+ 	}
+ 
+ 	/* Did we come from a system call? */
+-	if ((long)regs->orig_ax >= 0) {
++	if (current_syscall(regs) >= 0) {
+ 		/* Restart the system call - no handlers present */
+-		long res = regs->ax;
+-		switch (res) {
++		switch (current_syscall_ret(regs)) {
+ 		case -ERESTARTNOHAND:
+ 		case -ERESTARTSYS:
+ 		case -ERESTARTNOINTR:
+diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
+index cccb38a..a104c53 100644
+--- a/arch/x86/lguest/boot.c
++++ b/arch/x86/lguest/boot.c
+@@ -84,7 +84,6 @@ struct lguest_data lguest_data = {
+ 	.blocked_interrupts = { 1 }, /* Block timer interrupts */
+ 	.syscall_vec = SYSCALL_VECTOR,
+ };
+-static cycle_t clock_base;
+ 
+ /*G:037 async_hcall() is pretty simple: I'm quite proud of it really.  We have a
+  * ring buffer of stored hypercalls which the Host will run though next time we
+@@ -327,8 +326,8 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
+ 	case 1:	/* Basic feature request. */
+ 		/* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */
+ 		*cx &= 0x00002201;
+-		/* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, FPU. */
+-		*dx &= 0x07808101;
++		/* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, TSC, FPU. */
++		*dx &= 0x07808111;
+ 		/* The Host can do a nice optimization if it knows that the
+ 		 * kernel mappings (addresses above 0xC0000000 or whatever
+ 		 * PAGE_OFFSET is set to) haven't changed.  But Linux calls
+@@ -481,7 +480,7 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
+ {
+ 	*pmdp = pmdval;
+ 	lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK,
+-		   (__pa(pmdp)&(PAGE_SIZE-1)), 0);
++		   (__pa(pmdp)&(PAGE_SIZE-1))/4, 0);
+ }
+ 
+ /* There are a couple of legacy places where the kernel sets a PTE, but we
+@@ -595,19 +594,25 @@ static unsigned long lguest_get_wallclock(void)
+ 	return lguest_data.time.tv_sec;
+ }
+ 
++/* The TSC is a Time Stamp Counter.  The Host tells us what speed it runs at,
++ * or 0 if it's unusable as a reliable clock source.  This matches what we want
++ * here: if we return 0 from this function, the x86 TSC clock will not register
++ * itself. */
++static unsigned long lguest_cpu_khz(void)
++{
++	return lguest_data.tsc_khz;
++}
++
++/* If we can't use the TSC, the kernel falls back to our "lguest_clock", where
++ * we read the time value given to us by the Host. */
+ static cycle_t lguest_clock_read(void)
+ {
+ 	unsigned long sec, nsec;
+ 
+-	/* If the Host tells the TSC speed, we can trust that. */
+-	if (lguest_data.tsc_khz)
+-		return native_read_tsc();
+-
+-	/* If we can't use the TSC, we read the time value written by the Host.
+-	 * Since it's in two parts (seconds and nanoseconds), we risk reading
+-	 * it just as it's changing from 99 & 0.999999999 to 100 and 0, and
+-	 * getting 99 and 0.  As Linux tends to come apart under the stress of
+-	 * time travel, we must be careful: */
++	/* Since the time is in two parts (seconds and nanoseconds), we risk
++	 * reading it just as it's changing from 99 & 0.999999999 to 100 and 0,
++	 * and getting 99 and 0.  As Linux tends to come apart under the stress
++	 * of time travel, we must be careful: */
+ 	do {
+ 		/* First we read the seconds part. */
+ 		sec = lguest_data.time.tv_sec;
+@@ -622,14 +627,14 @@ static cycle_t lguest_clock_read(void)
+ 		/* Now if the seconds part has changed, try again. */
+ 	} while (unlikely(lguest_data.time.tv_sec != sec));
+ 
+-	/* Our non-TSC clock is in real nanoseconds. */
++	/* Our lguest clock is in real nanoseconds. */
+ 	return sec*1000000000ULL + nsec;
+ }
+ 
+-/* This is what we tell the kernel is our clocksource.  */
++/* This is the fallback clocksource: lower priority than the TSC clocksource. */
+ static struct clocksource lguest_clock = {
+ 	.name		= "lguest",
+-	.rating		= 400,
++	.rating		= 200,
+ 	.read		= lguest_clock_read,
+ 	.mask		= CLOCKSOURCE_MASK(64),
+ 	.mult		= 1 << 22,
+@@ -637,12 +642,6 @@ static struct clocksource lguest_clock = {
+ 	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
+ };
+ 
+-/* The "scheduler clock" is just our real clock, adjusted to start at zero */
+-static unsigned long long lguest_sched_clock(void)
+-{
+-	return cyc2ns(&lguest_clock, lguest_clock_read() - clock_base);
+-}
+-
+ /* We also need a "struct clock_event_device": Linux asks us to set it to go
+  * off some time in the future.  Actually, James Morris figured all this out, I
+  * just applied the patch. */
+@@ -712,19 +711,8 @@ static void lguest_time_init(void)
+ 	/* Set up the timer interrupt (0) to go to our simple timer routine */
+ 	set_irq_handler(0, lguest_time_irq);
+ 
+-	/* Our clock structure looks like arch/x86/kernel/tsc_32.c if we can
+-	 * use the TSC, otherwise it's a dumb nanosecond-resolution clock.
+-	 * Either way, the "rating" is set so high that it's always chosen over
+-	 * any other clocksource. */
+-	if (lguest_data.tsc_khz)
+-		lguest_clock.mult = clocksource_khz2mult(lguest_data.tsc_khz,
+-							 lguest_clock.shift);
+-	clock_base = lguest_clock_read();
+ 	clocksource_register(&lguest_clock);
+ 
+-	/* Now we've set up our clock, we can use it as the scheduler clock */
+-	pv_time_ops.sched_clock = lguest_sched_clock;
+-
+ 	/* We can't set cpumask in the initializer: damn C limitations!  Set it
+ 	 * here and register our timer device. */
+ 	lguest_clockevent.cpumask = cpumask_of_cpu(0);
+@@ -995,6 +983,7 @@ __init void lguest_init(void)
+ 	/* time operations */
+ 	pv_time_ops.get_wallclock = lguest_get_wallclock;
+ 	pv_time_ops.time_init = lguest_time_init;
++	pv_time_ops.get_cpu_khz = lguest_cpu_khz;
+ 
+ 	/* Now is a good time to look at the implementations of these functions
+ 	 * before returning to the rest of lguest_init(). */
+diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
+index ac3c959..8fe576b 100644
+--- a/arch/x86/mm/ioremap.c
++++ b/arch/x86/mm/ioremap.c
+@@ -134,8 +134,6 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
+ 			return NULL;
+ 	}
+ 
+-	WARN_ON_ONCE(page_is_ram(pfn));
+-
+ 	switch (mode) {
+ 	case IOR_MODE_UNCACHED:
+ 	default:
+diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c
+index 73aba71..2f9e9af 100644
+--- a/arch/x86/mm/pgtable_32.c
++++ b/arch/x86/mm/pgtable_32.c
+@@ -342,12 +342,16 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)
+ 
+ pgd_t *pgd_alloc(struct mm_struct *mm)
+ {
+-	pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor);
++	pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
+ 
+-	mm->pgd = pgd;		/* so that alloc_pd can use it */
++	/* so that alloc_pd can use it */
++	mm->pgd = pgd;
++	if (pgd)
++		pgd_ctor(pgd);
+ 
+ 	if (pgd && !pgd_prepopulate_pmd(mm, pgd)) {
+-		quicklist_free(0, pgd_dtor, pgd);
++		pgd_dtor(pgd);
++		free_page((unsigned long)pgd);
+ 		pgd = NULL;
+ 	}
+ 
+@@ -357,12 +361,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+ void pgd_free(struct mm_struct *mm, pgd_t *pgd)
+ {
+ 	pgd_mop_up_pmds(mm, pgd);
+-	quicklist_free(0, pgd_dtor, pgd);
+-}
+-
+-void check_pgt_cache(void)
+-{
+-	quicklist_trim(0, pgd_dtor, 25, 16);
++	pgd_dtor(pgd);
++	free_page((unsigned long)pgd);
+ }
+ 
+ void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
+diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
+index 10ac8c3..2f7109a 100644
+--- a/arch/x86/pci/pcbios.c
++++ b/arch/x86/pci/pcbios.c
+@@ -198,6 +198,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
+ 			  "b" (bx),
+ 			  "D" ((long)reg),
+ 			  "S" (&pci_indirect));
++		/*
++		 * Zero-extend the result beyond 8 bits, do not trust the
++		 * BIOS having done it:
++		 */
++		*value &= 0xff;
+ 		break;
+ 	case 2:
+ 		__asm__("lcall *(%%esi); cld\n\t"
+@@ -210,6 +215,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
+ 			  "b" (bx),
+ 			  "D" ((long)reg),
+ 			  "S" (&pci_indirect));
++		/*
++		 * Zero-extend the result beyond 16 bits, do not trust the
++		 * BIOS having done it:
++		 */
++		*value &= 0xffff;
+ 		break;
+ 	case 4:
+ 		__asm__("lcall *(%%esi); cld\n\t"
+diff --git a/block/genhd.c b/block/genhd.c
+index c44527d..00da521 100644
+--- a/block/genhd.c
++++ b/block/genhd.c
+@@ -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();
+ 
+diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
+index ba8f7f4..e469647 100644
+--- a/drivers/ata/Kconfig
++++ b/drivers/ata/Kconfig
+@@ -538,6 +538,15 @@ config PATA_RADISYS
+ 
+ 	  If unsure, say N.
+ 
++config PATA_RB500
++	tristate "RouterBoard 500 PATA CompactFlash support"
++	depends on MIKROTIK_RB500
++	help
++	  This option enables support for the RouterBoard 500
++	  PATA CompactFlash controller.
++
++	  If unsure, say N.
++
+ config PATA_RZ1000
+ 	tristate "PC Tech RZ1000 PATA support"
+ 	depends on PCI
+diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
+index 701651e..0511e6f 100644
+--- a/drivers/ata/Makefile
++++ b/drivers/ata/Makefile
+@@ -55,6 +55,7 @@ obj-$(CONFIG_PATA_PDC2027X)	+= pata_pdc2027x.o
+ obj-$(CONFIG_PATA_PDC_OLD)	+= pata_pdc202xx_old.o
+ obj-$(CONFIG_PATA_QDI)		+= pata_qdi.o
+ obj-$(CONFIG_PATA_RADISYS)	+= pata_radisys.o
++obj-$(CONFIG_PATA_RB500)	+= pata_rb500_cf.o
+ obj-$(CONFIG_PATA_RZ1000)	+= pata_rz1000.o
+ obj-$(CONFIG_PATA_SC1200)	+= pata_sc1200.o
+ obj-$(CONFIG_PATA_SERVERWORKS)	+= pata_serverworks.o
+diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
+index 8a49835..6978469 100644
+--- a/drivers/ata/ahci.c
++++ b/drivers/ata/ahci.c
+@@ -567,6 +567,18 @@ static const struct pci_device_id ahci_pci_tbl[] = {
+ 	{ PCI_VDEVICE(NVIDIA, 0x0abd), board_ahci },		/* MCP79 */
+ 	{ PCI_VDEVICE(NVIDIA, 0x0abe), board_ahci },		/* MCP79 */
+ 	{ PCI_VDEVICE(NVIDIA, 0x0abf), board_ahci },		/* MCP79 */
++	{ PCI_VDEVICE(NVIDIA, 0x0bc8), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bc9), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bca), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bcb), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bcc), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bd0), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bd1), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bd2), board_ahci },		/* MCP7B */
++	{ PCI_VDEVICE(NVIDIA, 0x0bd3), board_ahci },		/* MCP7B */
+ 
+ 	/* SiS */
+ 	{ PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */
+@@ -672,7 +684,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
+ 		cap &= ~HOST_CAP_NCQ;
+ 	}
+ 
+-	if ((cap && HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
++	if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
+ 		dev_printk(KERN_INFO, &pdev->dev,
+ 			   "controller can't do PMP, turning off CAP_PMP\n");
+ 		cap &= ~HOST_CAP_PMP;
+diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
+index 9e8ec19..0770cb7 100644
+--- a/drivers/ata/libata-acpi.c
++++ b/drivers/ata/libata-acpi.c
+@@ -382,7 +382,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
+ 
+ 	if (ata_msg_probe(ap))
+ 		ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n",
+-			       __FUNCTION__, ap->port_no);
++			       __func__, ap->port_no);
+ 
+ 	/* _GTF has no input parameters */
+ 	status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output);
+@@ -402,7 +402,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
+ 		if (ata_msg_probe(ap))
+ 			ata_dev_printk(dev, KERN_DEBUG, "%s: Run _GTF: "
+ 				"length or ptr is NULL (0x%llx, 0x%p)\n",
+-				__FUNCTION__,
++				__func__,
+ 				(unsigned long long)output.length,
+ 				output.pointer);
+ 		rc = -EINVAL;
+@@ -432,7 +432,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf)
+ 		if (ata_msg_probe(ap))
+ 			ata_dev_printk(dev, KERN_DEBUG,
+ 				       "%s: returning gtf=%p, gtf_count=%d\n",
+-				       __FUNCTION__, *gtf, rc);
++				       __func__, *gtf, rc);
+ 	}
+ 	return rc;
+ 
+@@ -725,7 +725,7 @@ static int ata_acpi_push_id(struct ata_device *dev)
+ 
+ 	if (ata_msg_probe(ap))
+ 		ata_dev_printk(dev, KERN_DEBUG, "%s: ix = %d, port#: %d\n",
+-			       __FUNCTION__, dev->devno, ap->port_no);
++			       __func__, dev->devno, ap->port_no);
+ 
+ 	/* Give the drive Identify data to the drive via the _SDD method */
+ 	/* _SDD: set up input parameters */
+diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
+index 4fbcce7..4bbe31f 100644
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -106,7 +106,8 @@ static struct ata_force_ent *ata_force_tbl;
+ static int ata_force_tbl_size;
+ 
+ static char ata_force_param_buf[PAGE_SIZE] __initdata;
+-module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0444);
++/* param_buf is thrown away after initialization, disallow read */
++module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0);
+ MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)");
+ 
+ int atapi_enabled = 1;
+@@ -1719,7 +1720,7 @@ void ata_port_flush_task(struct ata_port *ap)
+ 	cancel_rearming_delayed_work(&ap->port_task);
+ 
+ 	if (ata_msg_ctl(ap))
+-		ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __FUNCTION__);
++		ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __func__);
+ }
+ 
+ static void ata_qc_complete_internal(struct ata_queued_cmd *qc)
+@@ -2056,7 +2057,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
+ 	int rc;
+ 
+ 	if (ata_msg_ctl(ap))
+-		ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__);
++		ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__);
+ 
+ 	ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */
+  retry:
+@@ -2253,12 +2254,12 @@ int ata_dev_configure(struct ata_device *dev)
+ 
+ 	if (!ata_dev_enabled(dev) && ata_msg_info(ap)) {
+ 		ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n",
+-			       __FUNCTION__);
++			       __func__);
+ 		return 0;
+ 	}
+ 
+ 	if (ata_msg_probe(ap))
+-		ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__);
++		ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__);
+ 
+ 	/* set horkage */
+ 	dev->horkage |= ata_dev_blacklisted(dev);
+@@ -2279,7 +2280,7 @@ int ata_dev_configure(struct ata_device *dev)
+ 		ata_dev_printk(dev, KERN_DEBUG,
+ 			       "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x "
+ 			       "85:%04x 86:%04x 87:%04x 88:%04x\n",
+-			       __FUNCTION__,
++			       __func__,
+ 			       id[49], id[82], id[83], id[84],
+ 			       id[85], id[86], id[87], id[88]);
+ 
+@@ -2511,13 +2512,13 @@ int ata_dev_configure(struct ata_device *dev)
+ 
+ 	if (ata_msg_probe(ap))
+ 		ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n",
+-			__FUNCTION__, ata_chk_status(ap));
++			__func__, ata_chk_status(ap));
+ 	return 0;
+ 
+ err_out_nosup:
+ 	if (ata_msg_probe(ap))
+ 		ata_dev_printk(dev, KERN_DEBUG,
+-			       "%s: EXIT, err\n", __FUNCTION__);
++			       "%s: EXIT, err\n", __func__);
+ 	return rc;
+ }
+ 
+diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
+index 698ce2c..681252f 100644
+--- a/drivers/ata/libata-eh.c
++++ b/drivers/ata/libata-eh.c
+@@ -2150,6 +2150,15 @@ int ata_eh_reset(struct ata_link *link, int classify,
+ 			ap->ops->set_piomode(ap, dev);
+ 	}
+ 
++	if (!softreset && !hardreset) {
++		if (verbose)
++			ata_link_printk(link, KERN_INFO, "no reset method "
++					"available, skipping reset\n");
++		if (!(lflags & ATA_LFLAG_ASSUME_CLASS))
++			lflags |= ATA_LFLAG_ASSUME_ATA;
++		goto done;
++	}
++
+ 	/* Determine which reset to use and record in ehc->i.action.
+ 	 * prereset() may examine and modify it.
+ 	 */
+@@ -2254,6 +2263,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
+ 		lflags |= ATA_LFLAG_ASSUME_ATA;
+ 	}
+ 
++ done:
+ 	ata_link_for_each_dev(dev, link) {
+ 		/* After the reset, the device state is PIO 0 and the
+ 		 * controller state is undefined.  Reset also wakes up
+diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
+index 60cd4b1..20dc572 100644
+--- a/drivers/ata/libata-sff.c
++++ b/drivers/ata/libata-sff.c
+@@ -56,7 +56,8 @@ u8 ata_irq_on(struct ata_port *ap)
+ 	ap->ctl &= ~ATA_NIEN;
+ 	ap->last_ctl = ap->ctl;
+ 
+-	iowrite8(ap->ctl, ioaddr->ctl_addr);
++	if (ioaddr->ctl_addr)
++		iowrite8(ap->ctl, ioaddr->ctl_addr);
+ 	tmp = ata_wait_idle(ap);
+ 
+ 	ap->ops->irq_clear(ap);
+@@ -81,12 +82,14 @@ void ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
+ 	unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
+ 
+ 	if (tf->ctl != ap->last_ctl) {
+-		iowrite8(tf->ctl, ioaddr->ctl_addr);
++		if (ioaddr->ctl_addr)
++			iowrite8(tf->ctl, ioaddr->ctl_addr);
+ 		ap->last_ctl = tf->ctl;
+ 		ata_wait_idle(ap);
+ 	}
+ 
+ 	if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
++		WARN_ON(!ioaddr->ctl_addr);
+ 		iowrite8(tf->hob_feature, ioaddr->feature_addr);
+ 		iowrite8(tf->hob_nsect, ioaddr->nsect_addr);
+ 		iowrite8(tf->hob_lbal, ioaddr->lbal_addr);
+@@ -167,14 +170,17 @@ void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
+ 	tf->device = ioread8(ioaddr->device_addr);
+ 
+ 	if (tf->flags & ATA_TFLAG_LBA48) {
+-		iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr);
+-		tf->hob_feature = ioread8(ioaddr->error_addr);
+-		tf->hob_nsect = ioread8(ioaddr->nsect_addr);
+-		tf->hob_lbal = ioread8(ioaddr->lbal_addr);
+-		tf->hob_lbam = ioread8(ioaddr->lbam_addr);
+-		tf->hob_lbah = ioread8(ioaddr->lbah_addr);
+-		iowrite8(tf->ctl, ioaddr->ctl_addr);
+-		ap->last_ctl = tf->ctl;
++		if (likely(ioaddr->ctl_addr)) {
++			iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr);
++			tf->hob_feature = ioread8(ioaddr->error_addr);
++			tf->hob_nsect = ioread8(ioaddr->nsect_addr);
++			tf->hob_lbal = ioread8(ioaddr->lbal_addr);
++			tf->hob_lbam = ioread8(ioaddr->lbam_addr);
++			tf->hob_lbah = ioread8(ioaddr->lbah_addr);
++			iowrite8(tf->ctl, ioaddr->ctl_addr);
++			ap->last_ctl = tf->ctl;
++		} else
++			WARN_ON(1);
+ 	}
+ }
+ 
+@@ -352,7 +358,8 @@ void ata_bmdma_freeze(struct ata_port *ap)
+ 	ap->ctl |= ATA_NIEN;
+ 	ap->last_ctl = ap->ctl;
+ 
+-	iowrite8(ap->ctl, ioaddr->ctl_addr);
++	if (ioaddr->ctl_addr)
++		iowrite8(ap->ctl, ioaddr->ctl_addr);
+ 
+ 	/* Under certain circumstances, some controllers raise IRQ on
+ 	 * ATA_NIEN manipulation.  Also, many controllers fail to mask
+@@ -459,13 +466,14 @@ void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
+  */
+ void ata_bmdma_error_handler(struct ata_port *ap)
+ {
+-	ata_reset_fn_t hardreset;
++	ata_reset_fn_t softreset = NULL, hardreset = NULL;
+ 
+-	hardreset = NULL;
++	if (ap->ioaddr.ctl_addr)
++		softreset = ata_std_softreset;
+ 	if (sata_scr_valid(&ap->link))
+ 		hardreset = sata_std_hardreset;
+ 
+-	ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, hardreset,
++	ata_bmdma_drive_eh(ap, ata_std_prereset, softreset, hardreset,
+ 			   ata_std_postreset);
+ }
+ 
+diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
+index 028af5d..511c89b 100644
+--- a/drivers/ata/pata_pdc2027x.c
++++ b/drivers/ata/pata_pdc2027x.c
+@@ -39,7 +39,7 @@
+ #undef PDC_DEBUG
+ 
+ #ifdef PDC_DEBUG
+-#define PDPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
++#define PDPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args)
+ #else
+ #define PDPRINTK(fmt, args...)
+ #endif
+diff --git a/drivers/ata/pata_rb500_cf.c b/drivers/ata/pata_rb500_cf.c
+new file mode 100644
+index 0000000..4ce9b03
+--- /dev/null
++++ b/drivers/ata/pata_rb500_cf.c
+@@ -0,0 +1,314 @@
++/*
++ *  A low-level PATA driver to handle a Compact Flash connected on the
++ *  Mikrotik's RouterBoard 532 board.
++ *
++ *  Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
++ *  Copyright (C) 2008 Florian Fainelli <florian at openwrt.org>
++ *
++ *  This file was based on: drivers/ata/pata_ixp4xx_cf.c
++ *	Copyright (C) 2006-07 Tower Technologies
++ *	Author: Alessandro Zummo <a.zummo at towertech.it>
++ *
++ *  Also was based on the driver for Linux 2.4.xx published by Mikrotik for
++ *  their RouterBoard 1xx and 5xx series devices. The original Mikrotik code
++ *  seems not to have a license.
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License version 2 as
++ *  published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <linux/io.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++
++#include <linux/libata.h>
++#include <scsi/scsi_host.h>
++
++#include <asm/gpio.h>
++
++#define DRV_NAME	"pata-rb500-cf"
++#define DRV_VERSION	"0.1.0"
++#define DRV_DESC	"PATA driver for RouterBOARD 532 Compact Flash"
++
++#define RB500_CF_MAXPORTS	1
++#define RB500_CF_IO_DELAY	400
++
++#define RB500_CF_REG_CMD	0x0800
++#define RB500_CF_REG_CTRL	0x080E
++#define RB500_CF_REG_DATA	0x0C00
++
++struct rb500_cf_info {
++	void __iomem	*iobase;
++	unsigned int	gpio_line;
++	int		frozen;
++	unsigned int	irq;
++};
++
++/* ------------------------------------------------------------------------ */
++
++static inline void rb500_pata_finish_io(struct ata_port *ap)
++{
++	struct ata_host *ah = ap->host;
++	struct rb500_cf_info *info = ah->private_data;
++
++	ata_altstatus(ap);
++	ndelay(RB500_CF_IO_DELAY);
++
++	set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH);
++}
++
++static void rb500_pata_exec_command(struct ata_port *ap,
++				const struct ata_taskfile *tf)
++{
++	writeb(tf->command, ap->ioaddr.command_addr);
++	rb500_pata_finish_io(ap);
++}
++
++static void rb500_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
++				unsigned int buflen, int write_data)
++{
++	struct ata_port *ap = adev->link->ap;
++	void __iomem *ioaddr = ap->ioaddr.data_addr;
++
++	if (write_data) {
++		for (; buflen > 0; buflen--, buf++)
++			writeb(*buf, ioaddr);
++	} else {
++		for (; buflen > 0; buflen--, buf++)
++			*buf = readb(ioaddr);
++	}
++
++	rb500_pata_finish_io(adev->link->ap);
++}
++
++static void rb500_pata_freeze(struct ata_port *ap)
++{
++	struct rb500_cf_info *info = ap->host->private_data;
++
++	info->frozen = 1;
++}
++
++static void rb500_pata_thaw(struct ata_port *ap)
++{
++	struct rb500_cf_info *info = ap->host->private_data;
++
++	info->frozen = 0;
++}
++
++static irqreturn_t rb500_pata_irq_handler(int irq, void *dev_instance)
++{
++	struct ata_host *ah = dev_instance;
++	struct rb500_cf_info *info = ah->private_data;
++
++	if (gpio_get_value(info->gpio_line)) {
++		set_irq_type(info->irq, IRQ_TYPE_LEVEL_LOW);
++		if (!info->frozen)
++			ata_interrupt(info->irq, dev_instance);
++	} else {
++		set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH);
++	}
++
++	return IRQ_HANDLED;
++}
++
++static void rb500_pata_irq_clear(struct ata_port *ap)
++{
++}
++
++static int rb500_pata_port_start(struct ata_port *ap)
++{
++	return 0;
++}
++
++static struct ata_port_operations rb500_pata_port_ops = {
++	.tf_load		= ata_tf_load,
++	.tf_read		= ata_tf_read,
++
++	.exec_command		= rb500_pata_exec_command,
++	.check_status 		= ata_check_status,
++	.dev_select 		= ata_std_dev_select,
++
++	.data_xfer		= rb500_pata_data_xfer,
++
++	.qc_prep 		= ata_qc_prep,
++	.qc_issue		= ata_qc_issue_prot,
++
++	.freeze			= rb500_pata_freeze,
++	.thaw			= rb500_pata_thaw,
++	.error_handler		= ata_bmdma_error_handler,
++
++	.irq_handler		= rb500_pata_irq_handler,
++	.irq_clear		= rb500_pata_irq_clear,
++	.irq_on			= ata_irq_on,
++
++	.port_start		= rb500_pata_port_start,
++};
++
++/* ------------------------------------------------------------------------ */
++
++static struct scsi_host_template rb500_pata_sht = {
++	.module			= THIS_MODULE,
++	.name			= DRV_NAME,
++	.ioctl			= ata_scsi_ioctl,
++	.queuecommand		= ata_scsi_queuecmd,
++	.slave_configure	= ata_scsi_slave_config,
++	.slave_destroy		= ata_scsi_slave_destroy,
++	.bios_param		= ata_std_bios_param,
++	.proc_name		= DRV_NAME,
++
++	.can_queue		= ATA_DEF_QUEUE,
++	.this_id		= ATA_SHT_THIS_ID,
++	.sg_tablesize		= LIBATA_MAX_PRD,
++	.dma_boundary		= ATA_DMA_BOUNDARY,
++	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
++	.emulated		= ATA_SHT_EMULATED,
++	.use_clustering		= ATA_SHT_USE_CLUSTERING,
++};
++
++/* ------------------------------------------------------------------------ */
++
++static void rb500_pata_setup_ports(struct ata_host *ah)
++{
++	struct rb500_cf_info *info = ah->private_data;
++	struct ata_port *ap;
++
++	ap = ah->ports[0];
++
++	ap->ops		= &rb500_pata_port_ops;
++	ap->pio_mask	= 0x1f; /* PIO4 */
++	ap->flags	= ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
++
++	ap->ioaddr.cmd_addr	= info->iobase + RB500_CF_REG_CMD;
++	ap->ioaddr.ctl_addr	= info->iobase + RB500_CF_REG_CTRL;
++	ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL;
++
++	ata_std_ports(&ap->ioaddr);
++
++	ap->ioaddr.data_addr	= info->iobase + RB500_CF_REG_DATA;
++}
++
++static __devinit int rb500_pata_driver_probe(struct platform_device *pdev)
++{
++	unsigned int irq;
++	int gpio;
++	struct resource *res;
++	struct ata_host *ah;
++	struct rb500_cf_info *info;
++	int ret;
++
++	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	if (!res) {
++		dev_err(&pdev->dev, "no IOMEM resource found\n");
++		return -EINVAL;
++	}
++
++	irq = platform_get_irq(pdev, 0);
++	if (irq <= 0) {
++		dev_err(&pdev->dev, "no IRQ resource found\n");
++		return -ENOENT;
++	}
++
++	gpio = irq_to_gpio(irq);
++	if (gpio < 0) {
++		dev_err(&pdev->dev, "no GPIO found for irq%d\n", irq);
++		return -ENOENT;
++	}
++
++	ret = gpio_request(gpio, DRV_NAME);
++	if (ret) {
++		dev_err(&pdev->dev, "GPIO request failed\n");
++		return ret;
++	}
++
++	/* allocate host */
++	ah = ata_host_alloc(&pdev->dev, RB500_CF_MAXPORTS);
++	if (!ah)
++		return -ENOMEM;
++
++	platform_set_drvdata(pdev, ah);
++
++	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
++	if (!info)
++		return -ENOMEM;
++
++	ah->private_data = info;
++	info->gpio_line = gpio;
++	info->irq = irq;
++
++	info->iobase = devm_ioremap_nocache(&pdev->dev, res->start,
++				res->end - res->start + 1);
++	if (!info->iobase)
++		return -ENOMEM;
++
++	ret = gpio_direction_input(gpio);
++	if (ret) {
++		dev_err(&pdev->dev, "unable to set GPIO direction, err=%d\n",
++				ret);
++		goto err_free_gpio;
++	}
++
++	rb500_pata_setup_ports(ah);
++
++	ret = ata_host_activate(ah, irq, rb500_pata_irq_handler,
++				IRQF_TRIGGER_LOW, &rb500_pata_sht);
++	if (ret)
++		goto err_free_gpio;
++
++	return 0;
++
++err_free_gpio:
++	gpio_free(gpio);
++
++	return ret;
++}
++
++static __devexit int rb500_pata_driver_remove(struct platform_device *pdev)
++{
++	struct ata_host *ah = platform_get_drvdata(pdev);
++	struct rb500_cf_info *info = ah->private_data;
++
++	ata_host_detach(ah);
++	gpio_free(info->gpio_line);
++
++	return 0;
++}
++
++static struct platform_driver rb500_pata_platform_driver = {
++	.probe		= rb500_pata_driver_probe,
++	.remove		= __devexit_p(rb500_pata_driver_remove),
++	.driver	 = {
++		.name   = DRV_NAME,
++		.owner  = THIS_MODULE,
++	},
++};
++
++/* ------------------------------------------------------------------------ */
++
++#define DRV_INFO DRV_DESC " version " DRV_VERSION
++
++static int __init rb500_pata_module_init(void)
++{
++	printk(KERN_INFO DRV_INFO "\n");
++
++	return platform_driver_register(&rb500_pata_platform_driver);
++}
++
++static void __exit rb500_pata_module_exit(void)
++{
++	platform_driver_unregister(&rb500_pata_platform_driver);
++}
++
++MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>");
++MODULE_AUTHOR("Florian Fainelli <florian at openwrt.org>");
++MODULE_DESCRIPTION(DRV_DESC);
++MODULE_VERSION(DRV_VERSION);
++MODULE_LICENSE("GPL");
++
++module_init(rb500_pata_module_init);
++module_exit(rb500_pata_module_exit);
+diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
+index c662d68..47c57a4 100644
+--- a/drivers/atm/firestream.c
++++ b/drivers/atm/firestream.c
+@@ -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;
+diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
+index f97e050..9427a61 100644
+--- a/drivers/atm/fore200e.c
++++ b/drivers/atm/fore200e.c
+@@ -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)
+diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
+index eee54c0..b967919 100644
+--- a/drivers/atm/idt77252.c
++++ b/drivers/atm/idt77252.c
+@@ -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;
+diff --git a/drivers/base/platform.c b/drivers/base/platform.c
+index efaf282..911ec60 100644
+--- a/drivers/base/platform.c
++++ b/drivers/base/platform.c
+@@ -648,7 +648,7 @@ u64 dma_get_required_mask(struct device *dev)
+ 		high_totalram += high_totalram - 1;
+ 		mask = (((u64)high_totalram) << 32) + 0xffffffff;
+ 	}
+-	return mask & *dev->dma_mask;
++	return mask;
+ }
+ EXPORT_SYMBOL_GPL(dma_get_required_mask);
+ #endif
+diff --git a/drivers/base/sys.c b/drivers/base/sys.c
+index 2f79c55..8e13fd9 100644
+--- a/drivers/base/sys.c
++++ b/drivers/base/sys.c
+@@ -133,6 +133,7 @@ int sysdev_class_register(struct sysdev_class * cls)
+ 	pr_debug("Registering sysdev class '%s'\n",
+ 		 kobject_name(&cls->kset.kobj));
+ 	INIT_LIST_HEAD(&cls->drivers);
++	memset(&cls->kset.kobj, 0x00, sizeof(struct kobject));
+ 	cls->kset.kobj.parent = &system_kset->kobj;
+ 	cls->kset.kobj.ktype = &ktype_sysdev_class;
+ 	cls->kset.kobj.kset = system_kset;
+@@ -227,6 +228,9 @@ int sysdev_register(struct sys_device * sysdev)
+ 
+ 	pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj));
+ 
++	/* initialize the kobject to 0, in case it had previously been used */
++	memset(&sysdev->kobj, 0x00, sizeof(struct kobject));
++
+ 	/* Make sure the kset is set */
+ 	sysdev->kobj.kset = &cls->kset;
+ 
+diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
+index 9e61fca..41ca721 100644
+--- a/drivers/block/viodasd.c
++++ b/drivers/block/viodasd.c
+@@ -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;
+diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
+index f16c94c..8b884f8 100644
+--- a/drivers/bluetooth/hci_usb.c
++++ b/drivers/bluetooth/hci_usb.c
+@@ -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 },
+diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
+index dfaab23..6d0dc5f 100644
+--- a/drivers/char/nozomi.c
++++ b/drivers/char/nozomi.c
+@@ -190,6 +190,14 @@ enum card_type {
+ 	F32_8 = 8192,	/* 3072 bytes downl. + 1024 bytes uplink * 2 -> 8192 */
+ };
+ 
++/* Initialization states a card can be in */
++enum card_state {
++	NOZOMI_STATE_UKNOWN	= 0,
++	NOZOMI_STATE_ENABLED	= 1,	/* pci device enabled */
++	NOZOMI_STATE_ALLOCATED	= 2,	/* config setup done */
++	NOZOMI_STATE_READY	= 3,	/* flowcontrols received */
++};
++
+ /* Two different toggle channels exist */
+ enum channel_type {
+ 	CH_A = 0,
+@@ -385,6 +393,7 @@ struct nozomi {
+ 	spinlock_t spin_mutex;	/* secures access to registers and tty */
+ 
+ 	unsigned int index_start;
++	enum card_state state;
+ 	u32 open_ttys;
+ };
+ 
+@@ -686,6 +695,7 @@ static int nozomi_read_config_table(struct nozomi *dc)
+ 		dc->last_ier = dc->last_ier | CTRL_DL;
+ 		writew(dc->last_ier, dc->reg_ier);
+ 
++		dc->state = NOZOMI_STATE_ALLOCATED;
+ 		dev_info(&dc->pdev->dev, "Initialization OK!\n");
+ 		return 1;
+ 	}
+@@ -944,6 +954,14 @@ static int receive_flow_control(struct nozomi *dc)
+ 	case CTRL_APP2:
+ 		port = PORT_APP2;
+ 		enable_ier = APP2_DL;
++		if (dc->state == NOZOMI_STATE_ALLOCATED) {
++			/*
++			 * After card initialization the flow control
++			 * received for APP2 is always the last
++			 */
++			dc->state = NOZOMI_STATE_READY;
++			dev_info(&dc->pdev->dev, "Device READY!\n");
++		}
+ 		break;
+ 	default:
+ 		dev_err(&dc->pdev->dev,
+@@ -1366,22 +1384,12 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev,
+ 
+ 	dc->pdev = pdev;
+ 
+-	/* Find out what card type it is */
+-	nozomi_get_card_type(dc);
+-
+ 	ret = pci_enable_device(dc->pdev);
+ 	if (ret) {
+ 		dev_err(&pdev->dev, "Failed to enable PCI Device\n");
+ 		goto err_free;
+ 	}
+ 
+-	start = pci_resource_start(dc->pdev, 0);
+-	if (start == 0) {
+-		dev_err(&pdev->dev, "No I/O address for card detected\n");
+-		ret = -ENODEV;
+-		goto err_disable_device;
+-	}
+-
+ 	ret = pci_request_regions(dc->pdev, NOZOMI_NAME);
+ 	if (ret) {
+ 		dev_err(&pdev->dev, "I/O address 0x%04x already in use\n",
+@@ -1389,6 +1397,16 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev,
+ 		goto err_disable_device;
+ 	}
+ 
++	start = pci_resource_start(dc->pdev, 0);
++	if (start == 0) {
++		dev_err(&pdev->dev, "No I/O address for card detected\n");
++		ret = -ENODEV;
++		goto err_rel_regs;
++	}
++
++	/* Find out what card type it is */
++	nozomi_get_card_type(dc);
++
+ 	dc->base_addr = ioremap(start, dc->card_type);
+ 	if (!dc->base_addr) {
+ 		dev_err(&pdev->dev, "Unable to map card MMIO\n");
+@@ -1425,6 +1443,14 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev,
+ 	dc->index_start = ndev_idx * MAX_PORT;
+ 	ndevs[ndev_idx] = dc;
+ 
++	pci_set_drvdata(pdev, dc);
++
++	/* Enable RESET interrupt */
++	dc->last_ier = RESET;
++	iowrite16(dc->last_ier, dc->reg_ier);
++
++	dc->state = NOZOMI_STATE_ENABLED;
++
+ 	for (i = 0; i < MAX_PORT; i++) {
+ 		mutex_init(&dc->port[i].tty_sem);
+ 		dc->port[i].tty_open_count = 0;
+@@ -1433,12 +1459,6 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev,
+ 							&pdev->dev);
+ 	}
+ 
+-	/* Enable  RESET interrupt. */
+-	dc->last_ier = RESET;
+-	writew(dc->last_ier, dc->reg_ier);
+-
+-	pci_set_drvdata(pdev, dc);
+-
+ 	return 0;
+ 
+ err_free_sbuf:
+@@ -1553,7 +1573,7 @@ static int ntty_open(struct tty_struct *tty, struct file *file)
+ 	struct nozomi *dc = get_dc_by_tty(tty);
+ 	unsigned long flags;
+ 
+-	if (!port || !dc)
++	if (!port || !dc || dc->state != NOZOMI_STATE_READY)
+ 		return -ENODEV;
+ 
+ 	if (mutex_lock_interruptible(&port->tty_sem))
+@@ -1716,6 +1736,10 @@ static int ntty_tiocmget(struct tty_struct *tty, struct file *file)
+ static int ntty_tiocmset(struct tty_struct *tty, struct file *file,
+ 	unsigned int set, unsigned int clear)
+ {
++	struct nozomi *dc = get_dc_by_tty(tty);
++	unsigned long flags;
++
++	spin_lock_irqsave(&dc->spin_mutex, flags);
+ 	if (set & TIOCM_RTS)
+ 		set_rts(tty, 1);
+ 	else if (clear & TIOCM_RTS)
+@@ -1725,6 +1749,7 @@ static int ntty_tiocmset(struct tty_struct *tty, struct file *file,
+ 		set_dtr(tty, 1);
+ 	else if (clear & TIOCM_DTR)
+ 		set_dtr(tty, 0);
++	spin_unlock_irqrestore(&dc->spin_mutex, flags);
+ 
+ 	return 0;
+ }
+@@ -1762,7 +1787,7 @@ static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp)
+ 	icount.brk = cnow.brk;
+ 	icount.buf_overrun = cnow.buf_overrun;
+ 
+-	return copy_to_user(argp, &icount, sizeof(icount));
++	return copy_to_user(argp, &icount, sizeof(icount)) ? -EFAULT : 0;
+ }
+ 
+ static int ntty_ioctl(struct tty_struct *tty, struct file *file,
+diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
+index 8fc4fe4..589ac6f 100644
+--- a/drivers/char/riscom8.c
++++ b/drivers/char/riscom8.c
+@@ -1620,14 +1620,8 @@ static int __init rc_init_drivers(void)
+ 
+ static void rc_release_drivers(void)
+ {
+-	unsigned long flags;
+-
+-	spin_lock_irqsave(&riscom_lock, flags);
+-
+ 	tty_unregister_driver(riscom_driver);
+ 	put_tty_driver(riscom_driver);
+-
+-	spin_unlock_irqrestore(&riscom_lock, flags);
+ }
+ 
+ #ifndef MODULE
+diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
+index 92583cd..6e72fd3 100644
+--- a/drivers/gpio/pca953x.c
++++ b/drivers/gpio/pca953x.c
+@@ -184,6 +184,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
+ 	gc->direction_output = pca953x_gpio_direction_output;
+ 	gc->get = pca953x_gpio_get_value;
+ 	gc->set = pca953x_gpio_set_value;
++	gc->can_sleep = 1;
+ 
+ 	gc->base = chip->gpio_start;
+ 	gc->ngpio = gpios;
+diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
+index 573abe4..2fa4318 100644
+--- a/drivers/i2c/busses/i2c-amd756.c
++++ b/drivers/i2c/busses/i2c-amd756.c
+@@ -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) {
+diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
+index 501f00c..e47aca0 100644
+--- a/drivers/i2c/chips/Makefile
++++ b/drivers/i2c/chips/Makefile
+@@ -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
+diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
+index 96da22e..fd84b2a 100644
+--- a/drivers/i2c/i2c-core.c
++++ b/drivers/i2c/i2c-core.c
+@@ -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)
+diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
+index b10ade9..4df4051 100644
+--- a/drivers/infiniband/core/cm.c
++++ b/drivers/infiniband/core/cm.c
+@@ -3759,6 +3759,7 @@ static void cm_remove_one(struct ib_device *device)
+ 		port = cm_dev->port[i-1];
+ 		ib_modify_port(device, port->port_num, 0, &port_modify);
+ 		ib_unregister_mad_agent(port->mad_agent);
++		flush_workqueue(cm.wq);
+ 		cm_remove_port_fs(port);
+ 	}
+ 	kobject_put(&cm_dev->dev_obj);
+@@ -3813,6 +3814,7 @@ static void __exit ib_cm_cleanup(void)
+ 		cancel_delayed_work(&timewait_info->work.work);
+ 	spin_unlock_irq(&cm.lock);
+ 
++	ib_unregister_client(&cm_client);
+ 	destroy_workqueue(cm.wq);
+ 
+ 	list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) {
+@@ -3820,7 +3822,6 @@ static void __exit ib_cm_cleanup(void)
+ 		kfree(timewait_info);
+ 	}
+ 
+-	ib_unregister_client(&cm_client);
+ 	class_unregister(&cm_class);
+ 	idr_destroy(&cm.local_id_table);
+ }
+diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
+index 7f00347..06d502c 100644
+--- a/drivers/infiniband/core/fmr_pool.c
++++ b/drivers/infiniband/core/fmr_pool.c
+@@ -139,7 +139,7 @@ static inline struct ib_pool_fmr *ib_fmr_cache_lookup(struct ib_fmr_pool *pool,
+ static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
+ {
+ 	int                 ret;
+-	struct ib_pool_fmr *fmr, *next;
++	struct ib_pool_fmr *fmr;
+ 	LIST_HEAD(unmap_list);
+ 	LIST_HEAD(fmr_list);
+ 
+@@ -158,20 +158,6 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
+ #endif
+ 	}
+ 
+-	/*
+-	 * The free_list may hold FMRs that have been put there
+-	 * because they haven't reached the max_remap count.
+-	 * Invalidate their mapping as well.
+-	 */
+-	list_for_each_entry_safe(fmr, next, &pool->free_list, list) {
+-		if (fmr->remap_count == 0)
+-			continue;
+-		hlist_del_init(&fmr->cache_node);
+-		fmr->remap_count = 0;
+-		list_add_tail(&fmr->fmr->list, &fmr_list);
+-		list_move(&fmr->list, &unmap_list);
+-	}
+-
+ 	list_splice(&pool->dirty_list, &unmap_list);
+ 	INIT_LIST_HEAD(&pool->dirty_list);
+ 	pool->dirty_len = 0;
+@@ -384,6 +370,11 @@ void ib_destroy_fmr_pool(struct ib_fmr_pool *pool)
+ 
+ 	i = 0;
+ 	list_for_each_entry_safe(fmr, tmp, &pool->free_list, list) {
++		if (fmr->remap_count) {
++			INIT_LIST_HEAD(&fmr_list);
++			list_add_tail(&fmr->fmr->list, &fmr_list);
++			ib_unmap_fmr(&fmr_list);
++		}
+ 		ib_dealloc_fmr(fmr->fmr);
+ 		list_del(&fmr->list);
+ 		kfree(fmr);
+@@ -407,8 +398,23 @@ EXPORT_SYMBOL(ib_destroy_fmr_pool);
+  */
+ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
+ {
+-	int serial = atomic_inc_return(&pool->req_ser);
++	int serial;
++	struct ib_pool_fmr *fmr, *next;
++
++	/*
++	 * The free_list holds FMRs that may have been used
++	 * but have not been remapped enough times to be dirty.
++	 * Put them on the dirty list now so that the cleanup
++	 * thread will reap them too.
++	 */
++	spin_lock_irq(&pool->pool_lock);
++	list_for_each_entry_safe(fmr, next, &pool->free_list, list) {
++		if (fmr->remap_count > 0)
++			list_move(&fmr->list, &pool->dirty_list);
++	}
++	spin_unlock_irq(&pool->pool_lock);
+ 
++	serial = atomic_inc_return(&pool->req_ser);
+ 	wake_up_process(pool->thread);
+ 
+ 	if (wait_event_interruptible(pool->force_wait,
+diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
+index 223b1aa..81c9195 100644
+--- a/drivers/infiniband/core/iwcm.c
++++ b/drivers/infiniband/core/iwcm.c
+@@ -839,6 +839,7 @@ static void cm_work_handler(struct work_struct *_work)
+ 	unsigned long flags;
+ 	int empty;
+ 	int ret = 0;
++	int destroy_id;
+ 
+ 	spin_lock_irqsave(&cm_id_priv->lock, flags);
+ 	empty = list_empty(&cm_id_priv->work_list);
+@@ -857,9 +858,9 @@ static void cm_work_handler(struct work_struct *_work)
+ 			destroy_cm_id(&cm_id_priv->id);
+ 		}
+ 		BUG_ON(atomic_read(&cm_id_priv->refcount)==0);
++		destroy_id = test_bit(IWCM_F_CALLBACK_DESTROY, &cm_id_priv->flags);
+ 		if (iwcm_deref_id(cm_id_priv)) {
+-			if (test_bit(IWCM_F_CALLBACK_DESTROY,
+-				     &cm_id_priv->flags)) {
++			if (destroy_id) {
+ 				BUG_ON(!list_empty(&cm_id_priv->work_list));
+ 				free_cm_id(cm_id_priv);
+ 			}
+diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
+index df1838f..b2ea921 100644
+--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
++++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
+@@ -189,7 +189,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, int entries, int ve
+ 		return ERR_PTR(-ENOMEM);
+ 	}
+ 	chp->rhp = rhp;
+-	chp->ibcq.cqe = (1 << chp->cq.size_log2) - 1;
++	chp->ibcq.cqe = 1 << chp->cq.size_log2;
+ 	spin_lock_init(&chp->lock);
+ 	atomic_set(&chp->refcnt, 1);
+ 	init_waitqueue_head(&chp->wait);
+@@ -819,8 +819,11 @@ static struct ib_qp *iwch_create_qp(struct ib_pd *pd,
+ 		kfree(qhp);
+ 		return ERR_PTR(-ENOMEM);
+ 	}
++
+ 	attrs->cap.max_recv_wr = rqsize - 1;
+ 	attrs->cap.max_send_wr = sqsize;
++	attrs->cap.max_inline_data = T3_MAX_INLINE;
++
+ 	qhp->rhp = rhp;
+ 	qhp->attr.pd = php->pdid;
+ 	qhp->attr.scq = ((struct iwch_cq *) attrs->send_cq)->cq.cqid;
+diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
+index 714b8db..993f0a8 100644
+--- a/drivers/infiniband/ulp/iser/iser_verbs.c
++++ b/drivers/infiniband/ulp/iser/iser_verbs.c
+@@ -237,36 +237,32 @@ static int iser_free_ib_conn_res(struct iser_conn *ib_conn)
+ static
+ struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id)
+ {
+-	struct list_head    *p_list;
+-	struct iser_device  *device = NULL;
++	struct iser_device *device;
+ 
+ 	mutex_lock(&ig.device_list_mutex);
+ 
+-	p_list = ig.device_list.next;
+-	while (p_list != &ig.device_list) {
+-		device = list_entry(p_list, struct iser_device, ig_list);
++	list_for_each_entry(device, &ig.device_list, ig_list)
+ 		/* find if there's a match using the node GUID */
+ 		if (device->ib_device->node_guid == cma_id->device->node_guid)
+-			break;
+-	}
++			goto inc_refcnt;
+ 
+-	if (device == NULL) {
+-		device = kzalloc(sizeof *device, GFP_KERNEL);
+-		if (device == NULL)
+-			goto out;
+-		/* assign this device to the device */
+-		device->ib_device = cma_id->device;
+-		/* init the device and link it into ig device list */
+-		if (iser_create_device_ib_res(device)) {
+-			kfree(device);
+-			device = NULL;
+-			goto out;
+-		}
+-		list_add(&device->ig_list, &ig.device_list);
++	device = kzalloc(sizeof *device, GFP_KERNEL);
++	if (device == NULL)
++		goto out;
++
++	/* assign this device to the device */
++	device->ib_device = cma_id->device;
++	/* init the device and link it into ig device list */
++	if (iser_create_device_ib_res(device)) {
++		kfree(device);
++		device = NULL;
++		goto out;
+ 	}
+-out:
+-	BUG_ON(device == NULL);
++	list_add(&device->ig_list, &ig.device_list);
++
++inc_refcnt:
+ 	device->refcount++;
++out:
+ 	mutex_unlock(&ig.device_list_mutex);
+ 	return device;
+ }
+@@ -372,6 +368,12 @@ static void iser_addr_handler(struct rdma_cm_id *cma_id)
+ 	int    ret;
+ 
+ 	device = iser_device_find_by_ib_device(cma_id);
++	if (!device) {
++		iser_err("device lookup/creation failed\n");
++		iser_connect_error(cma_id);
++		return;
++	}
++
+ 	ib_conn = (struct iser_conn *)cma_id->context;
+ 	ib_conn->device = device;
+ 
+@@ -380,7 +382,6 @@ static void iser_addr_handler(struct rdma_cm_id *cma_id)
+ 		iser_err("resolve route failed: %d\n", ret);
+ 		iser_connect_error(cma_id);
+ 	}
+-	return;
+ }
+ 
+ static void iser_route_handler(struct rdma_cm_id *cma_id)
+diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h
+index dd22d91..c972e5d 100644
+--- a/drivers/input/serio/i8042.h
++++ b/drivers/input/serio/i8042.h
+@@ -16,7 +16,7 @@
+ 
+ #if defined(CONFIG_MACH_JAZZ)
+ #include "i8042-jazzio.h"
+-#elif defined(CONFIG_SGI_IP22)
++#elif defined(CONFIG_SGI_HAS_I8042)
+ #include "i8042-ip22io.h"
+ #elif defined(CONFIG_PPC)
+ #include "i8042-ppcio.h"
+diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
+index 9cef6fc..d4ad699 100644
+--- a/drivers/isdn/i4l/isdn_common.c
++++ b/drivers/isdn/i4l/isdn_common.c
+@@ -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]);
+diff --git a/drivers/isdn/i4l/isdn_v110.c b/drivers/isdn/i4l/isdn_v110.c
+index 5484d3c..c5d02b6 100644
+--- a/drivers/isdn/i4l/isdn_v110.c
++++ b/drivers/isdn/i4l/isdn_v110.c
+@@ -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;
+diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
+index 7743d73..c632c08 100644
+--- a/drivers/lguest/core.c
++++ b/drivers/lguest/core.c
+@@ -69,11 +69,22 @@ static __init int map_switcher(void)
+ 		switcher_page[i] = virt_to_page(addr);
+ 	}
+ 
++	/* First we check that the Switcher won't overlap the fixmap area at
++	 * the top of memory.  It's currently nowhere near, but it could have
++	 * very strange effects if it ever happened. */
++	if (SWITCHER_ADDR + (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE > FIXADDR_START){
++		err = -ENOMEM;
++		printk("lguest: mapping switcher would thwack fixmap\n");
++		goto free_pages;
++	}
++
+ 	/* Now we reserve the "virtual memory area" we want: 0xFFC00000
+ 	 * (SWITCHER_ADDR).  We might not get it in theory, but in practice
+-	 * it's worked so far. */
++	 * it's worked so far.  The end address needs +1 because __get_vm_area
++	 * allocates an extra guard page, so we need space for that. */
+ 	switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
+-				       VM_ALLOC, SWITCHER_ADDR, VMALLOC_END);
++				     VM_ALLOC, SWITCHER_ADDR, SWITCHER_ADDR
++				     + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
+ 	if (!switcher_vma) {
+ 		err = -ENOMEM;
+ 		printk("lguest: could not map switcher pages high\n");
+diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
+index 85d42d3..2221485 100644
+--- a/drivers/lguest/lguest_user.c
++++ b/drivers/lguest/lguest_user.c
+@@ -241,15 +241,16 @@ static ssize_t write(struct file *file, const char __user *in,
+ 		cpu = &lg->cpus[cpu_id];
+ 		if (!cpu)
+ 			return -EINVAL;
+-	}
+ 
+-	/* Once the Guest is dead, all you can do is read() why it died. */
+-	if (lg && lg->dead)
+-		return -ENOENT;
++		/* Once the Guest is dead, you can only read() why it died. */
++		if (lg->dead)
++			return -ENOENT;
+ 
+-	/* If you're not the task which owns the Guest, you can only break */
+-	if (lg && current != cpu->tsk && req != LHREQ_BREAK)
+-		return -EPERM;
++		/* If you're not the task which owns the Guest, all you can do
++		 * is break the Launcher out of running the Guest. */
++		if (current != cpu->tsk && req != LHREQ_BREAK)
++			return -EPERM;
++	}
+ 
+ 	switch (req) {
+ 	case LHREQ_INITIALIZE:
+diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
+index 275f23c..a7f64a9 100644
+--- a/drivers/lguest/page_tables.c
++++ b/drivers/lguest/page_tables.c
+@@ -391,7 +391,7 @@ static unsigned int find_pgdir(struct lguest *lg, unsigned long pgtable)
+ {
+ 	unsigned int i;
+ 	for (i = 0; i < ARRAY_SIZE(lg->pgdirs); i++)
+-		if (lg->pgdirs[i].gpgdir == pgtable)
++		if (lg->pgdirs[i].pgdir && lg->pgdirs[i].gpgdir == pgtable)
+ 			break;
+ 	return i;
+ }
+diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c
+index 741a2e3..a348bb0 100644
+--- a/drivers/macintosh/via-pmu-backlight.c
++++ b/drivers/macintosh/via-pmu-backlight.c
+@@ -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);
+ 
+diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
+index ebec663..d6365a9 100644
+--- a/drivers/macintosh/via-pmu.c
++++ b/drivers/macintosh/via-pmu.c
+@@ -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);
+diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
+index 831aed9..c14dacd 100644
+--- a/drivers/md/bitmap.c
++++ b/drivers/md/bitmap.c
+@@ -1045,7 +1045,8 @@ void bitmap_daemon_work(struct bitmap *bitmap)
+ 	if (bitmap == NULL)
+ 		return;
+ 	if (time_before(jiffies, bitmap->daemon_lastrun + bitmap->daemon_sleep*HZ))
+-		return;
++		goto done;
++
+ 	bitmap->daemon_lastrun = jiffies;
+ 	if (bitmap->allclean) {
+ 		bitmap->mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
+@@ -1142,6 +1143,7 @@ void bitmap_daemon_work(struct bitmap *bitmap)
+ 		}
+ 	}
+ 
++ done:
+ 	if (bitmap->allclean == 0)
+ 		bitmap->mddev->thread->timeout = bitmap->daemon_sleep * HZ;
+ }
+diff --git a/drivers/md/md.c b/drivers/md/md.c
+index 827824a..ccbbf63 100644
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -5149,7 +5149,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
+ 			if (mddev->ro==1)
+ 				seq_printf(seq, " (read-only)");
+ 			if (mddev->ro==2)
+-				seq_printf(seq, "(auto-read-only)");
++				seq_printf(seq, " (auto-read-only)");
+ 			seq_printf(seq, " %s", mddev->pers->name);
+ 		}
+ 
+diff --git a/drivers/memstick/Kconfig b/drivers/memstick/Kconfig
+index 1093fdb..f0ca41c 100644
+--- a/drivers/memstick/Kconfig
++++ b/drivers/memstick/Kconfig
+@@ -8,7 +8,7 @@ menuconfig MEMSTICK
+ 	  Sony MemoryStick is a proprietary storage/extension card protocol.
+ 
+ 	  If you want MemoryStick support, you should say Y here and also
+-	  to the specific driver for your MMC interface.
++	  to the specific driver for your MemoryStick interface.
+ 
+ if MEMSTICK
+ 
+diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
+index bba467f..de80dba 100644
+--- a/drivers/memstick/core/memstick.c
++++ b/drivers/memstick/core/memstick.c
+@@ -18,7 +18,6 @@
+ #include <linux/delay.h>
+ 
+ #define DRIVER_NAME "memstick"
+-#define DRIVER_VERSION "0.2"
+ 
+ static unsigned int cmd_retries = 3;
+ module_param(cmd_retries, uint, 0644);
+@@ -236,7 +235,7 @@ int memstick_next_req(struct memstick_host *host, struct memstick_request **mrq)
+ 		rc = host->card->next_request(host->card, mrq);
+ 
+ 	if (!rc)
+-		host->retries = cmd_retries;
++		host->retries = cmd_retries > 1 ? cmd_retries - 1 : 1;
+ 	else
+ 		*mrq = NULL;
+ 
+@@ -271,7 +270,7 @@ void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc,
+ 		mrq->data_dir = READ;
+ 
+ 	mrq->sg = *sg;
+-	mrq->io_type = MEMSTICK_IO_SG;
++	mrq->long_data = 1;
+ 
+ 	if (tpc == MS_TPC_SET_CMD || tpc == MS_TPC_EX_SET_CMD)
+ 		mrq->need_card_int = 1;
+@@ -306,7 +305,7 @@ void memstick_init_req(struct memstick_request *mrq, unsigned char tpc,
+ 	if (mrq->data_dir == WRITE)
+ 		memcpy(mrq->data, buf, mrq->data_len);
+ 
+-	mrq->io_type = MEMSTICK_IO_VAL;
++	mrq->long_data = 0;
+ 
+ 	if (tpc == MS_TPC_SET_CMD || tpc == MS_TPC_EX_SET_CMD)
+ 		mrq->need_card_int = 1;
+@@ -561,6 +560,31 @@ void memstick_free_host(struct memstick_host *host)
+ }
+ EXPORT_SYMBOL(memstick_free_host);
+ 
++/**
++ * memstick_suspend_host - notify bus driver of host suspension
++ * @host - host to use
++ */
++void memstick_suspend_host(struct memstick_host *host)
++{
++	mutex_lock(&host->lock);
++	host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF);
++	mutex_unlock(&host->lock);
++}
++EXPORT_SYMBOL(memstick_suspend_host);
++
++/**
++ * memstick_resume_host - notify bus driver of host resumption
++ * @host - host to use
++ */
++void memstick_resume_host(struct memstick_host *host)
++{
++	mutex_lock(&host->lock);
++	host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON);
++	mutex_unlock(&host->lock);
++	memstick_detect_change(host);
++}
++EXPORT_SYMBOL(memstick_resume_host);
++
+ int memstick_register_driver(struct memstick_driver *drv)
+ {
+ 	drv->driver.bus = &memstick_bus_type;
+@@ -611,4 +635,3 @@ module_exit(memstick_exit);
+ MODULE_AUTHOR("Alex Dubov");
+ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("Sony MemoryStick core driver");
+-MODULE_VERSION(DRIVER_VERSION);
+diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
+index 423ad8c..1d637e4 100644
+--- a/drivers/memstick/core/mspro_block.c
++++ b/drivers/memstick/core/mspro_block.c
+@@ -16,10 +16,10 @@
+ #include <linux/idr.h>
+ #include <linux/hdreg.h>
+ #include <linux/kthread.h>
++#include <linux/delay.h>
+ #include <linux/memstick.h>
+ 
+ #define DRIVER_NAME "mspro_block"
+-#define DRIVER_VERSION "0.2"
+ 
+ static int major;
+ module_param(major, int, 0644);
+@@ -110,6 +110,17 @@ struct mspro_mbr {
+ 	unsigned int  sectors_per_partition;
+ } __attribute__((packed));
+ 
++struct mspro_specfile {
++	char           name[8];
++	char           ext[3];
++	unsigned char  attr;
++	unsigned char  reserved[10];
++	unsigned short time;
++	unsigned short date;
++	unsigned short cluster;
++	unsigned int   size;
++} __attribute__((packed));
++
+ struct mspro_devinfo {
+ 	unsigned short cylinders;
+ 	unsigned short heads;
+@@ -293,6 +304,20 @@ static ssize_t mspro_block_attr_show_sysinfo(struct device *dev,
+ 						     dev_attr);
+ 	struct mspro_sys_info *x_sys = x_attr->data;
+ 	ssize_t rc = 0;
++	int date_tz = 0, date_tz_f = 0;
++
++	if (x_sys->assembly_date[0] > 0x80U) {
++		date_tz = (~x_sys->assembly_date[0]) + 1;
++		date_tz_f = date_tz & 3;
++		date_tz >>= 2;
++		date_tz = -date_tz;
++		date_tz_f *= 15;
++	} else if (x_sys->assembly_date[0] < 0x80U) {
++		date_tz = x_sys->assembly_date[0];
++		date_tz_f = date_tz & 3;
++		date_tz >>= 2;
++		date_tz_f *= 15;
++	}
+ 
+ 	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "class: %x\n",
+ 			x_sys->class);
+@@ -305,8 +330,8 @@ static ssize_t mspro_block_attr_show_sysinfo(struct device *dev,
+ 	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "page size: %x\n",
+ 			be16_to_cpu(x_sys->page_size));
+ 	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "assembly date: "
+-			"%d %04u-%02u-%02u %02u:%02u:%02u\n",
+-			x_sys->assembly_date[0],
++			"GMT%+d:%d %04u-%02u-%02u %02u:%02u:%02u\n",
++			date_tz, date_tz_f,
+ 			be16_to_cpu(*(unsigned short *)
+ 				    &x_sys->assembly_date[1]),
+ 			x_sys->assembly_date[3], x_sys->assembly_date[4],
+@@ -398,6 +423,41 @@ static ssize_t mspro_block_attr_show_mbr(struct device *dev,
+ 	return rc;
+ }
+ 
++static ssize_t mspro_block_attr_show_specfile(struct device *dev,
++					      struct device_attribute *attr,
++					      char *buffer)
++{
++	struct mspro_sys_attr *x_attr = container_of(attr,
++						     struct mspro_sys_attr,
++						     dev_attr);
++	struct mspro_specfile *x_spfile = x_attr->data;
++	char name[9], ext[4];
++	ssize_t rc = 0;
++
++	memcpy(name, x_spfile->name, 8);
++	name[8] = 0;
++	memcpy(ext, x_spfile->ext, 3);
++	ext[3] = 0;
++
++	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "name: %s\n", name);
++	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "ext: %s\n", ext);
++	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "attribute: %x\n",
++			x_spfile->attr);
++	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "time: %d:%d:%d\n",
++			x_spfile->time >> 11,
++			(x_spfile->time >> 5) & 0x3f,
++			(x_spfile->time & 0x1f) * 2);
++	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "date: %d-%d-%d\n",
++			(x_spfile->date >> 9) + 1980,
++			(x_spfile->date >> 5) & 0xf,
++			x_spfile->date & 0x1f);
++	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start cluster: %x\n",
++			x_spfile->cluster);
++	rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "size: %x\n",
++			x_spfile->size);
++	return rc;
++}
++
+ static ssize_t mspro_block_attr_show_devinfo(struct device *dev,
+ 					     struct device_attribute *attr,
+ 					     char *buffer)
+@@ -430,6 +490,9 @@ static sysfs_show_t mspro_block_attr_show(unsigned char tag)
+ 		return mspro_block_attr_show_modelname;
+ 	case MSPRO_BLOCK_ID_MBR:
+ 		return mspro_block_attr_show_mbr;
++	case MSPRO_BLOCK_ID_SPECFILEVALUES1:
++	case MSPRO_BLOCK_ID_SPECFILEVALUES2:
++		return mspro_block_attr_show_specfile;
+ 	case MSPRO_BLOCK_ID_DEVINFO:
+ 		return mspro_block_attr_show_devinfo;
+ 	default:
+@@ -629,7 +692,7 @@ static void mspro_block_process_request(struct memstick_dev *card,
+ 			param.system = msb->system;
+ 			param.data_count = cpu_to_be16(page_count);
+ 			param.data_address = cpu_to_be32((uint32_t)t_sec);
+-			param.cmd_param = 0;
++			param.tpc_param = 0;
+ 
+ 			msb->data_dir = rq_data_dir(req);
+ 			msb->transfer_cmd = msb->data_dir == READ
+@@ -758,10 +821,10 @@ static int mspro_block_switch_to_parallel(struct memstick_dev *card)
+ 	struct memstick_host *host = card->host;
+ 	struct mspro_block_data *msb = memstick_get_drvdata(card);
+ 	struct mspro_param_register param = {
+-		.system = 0,
++		.system = MEMSTICK_SYS_PAR4,
+ 		.data_count = 0,
+ 		.data_address = 0,
+-		.cmd_param = 0
++		.tpc_param = 0
+ 	};
+ 
+ 	card->next_request = h_mspro_block_req_init;
+@@ -773,8 +836,8 @@ static int mspro_block_switch_to_parallel(struct memstick_dev *card)
+ 	if (card->current_mrq.error)
+ 		return card->current_mrq.error;
+ 
+-	msb->system = 0;
+-	host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_PARALLEL);
++	msb->system = MEMSTICK_SYS_PAR4;
++	host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_PAR4);
+ 
+ 	card->next_request = h_mspro_block_req_init;
+ 	msb->mrq_handler = h_mspro_block_default;
+@@ -783,8 +846,24 @@ static int mspro_block_switch_to_parallel(struct memstick_dev *card)
+ 	wait_for_completion(&card->mrq_complete);
+ 
+ 	if (card->current_mrq.error) {
+-		msb->system = 0x80;
++		msb->system = MEMSTICK_SYS_SERIAL;
++		host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF);
++		msleep(1000);
++		host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON);
+ 		host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_SERIAL);
++
++		if (memstick_set_rw_addr(card))
++			return card->current_mrq.error;
++
++		param.system = msb->system;
++
++		card->next_request = h_mspro_block_req_init;
++		msb->mrq_handler = h_mspro_block_default;
++		memstick_init_req(&card->current_mrq, MS_TPC_WRITE_REG, &param,
++				  sizeof(param));
++		memstick_new_req(host);
++		wait_for_completion(&card->mrq_complete);
++
+ 		return -EFAULT;
+ 	}
+ 
+@@ -802,7 +881,7 @@ static int mspro_block_read_attributes(struct memstick_dev *card)
+ 		.system = msb->system,
+ 		.data_count = cpu_to_be16(1),
+ 		.data_address = 0,
+-		.cmd_param = 0
++		.tpc_param = 0
+ 	};
+ 	struct mspro_attribute *attr = NULL;
+ 	struct mspro_sys_attr *s_attr = NULL;
+@@ -922,7 +1001,7 @@ static int mspro_block_read_attributes(struct memstick_dev *card)
+ 		param.system = msb->system;
+ 		param.data_count = cpu_to_be16((rc / msb->page_size) + 1);
+ 		param.data_address = cpu_to_be32(addr / msb->page_size);
+-		param.cmd_param = 0;
++		param.tpc_param = 0;
+ 
+ 		sg_init_one(&msb->req_sg[0], buffer,
+ 			    be16_to_cpu(param.data_count) * msb->page_size);
+@@ -964,7 +1043,7 @@ static int mspro_block_init_card(struct memstick_dev *card)
+ 	struct memstick_host *host = card->host;
+ 	int rc = 0;
+ 
+-	msb->system = 0x80;
++	msb->system = MEMSTICK_SYS_SERIAL;
+ 	card->reg_addr.r_offset = offsetof(struct mspro_register, status);
+ 	card->reg_addr.r_length = sizeof(struct ms_status_register);
+ 	card->reg_addr.w_offset = offsetof(struct mspro_register, param);
+@@ -973,7 +1052,7 @@ static int mspro_block_init_card(struct memstick_dev *card)
+ 	if (memstick_set_rw_addr(card))
+ 		return -EIO;
+ 
+-	if (host->caps & MEMSTICK_CAP_PARALLEL) {
++	if (host->caps & MEMSTICK_CAP_PAR4) {
+ 		if (mspro_block_switch_to_parallel(card))
+ 			printk(KERN_WARNING "%s: could not switch to "
+ 			       "parallel interface\n", card->dev.bus_id);
+@@ -1348,4 +1427,3 @@ MODULE_LICENSE("GPL");
+ MODULE_AUTHOR("Alex Dubov");
+ MODULE_DESCRIPTION("Sony MemoryStickPro block device driver");
+ MODULE_DEVICE_TABLE(memstick, mspro_block_id_tbl);
+-MODULE_VERSION(DRIVER_VERSION);
+diff --git a/drivers/memstick/host/Kconfig b/drivers/memstick/host/Kconfig
+index c002fcc..4ce5c8d 100644
+--- a/drivers/memstick/host/Kconfig
++++ b/drivers/memstick/host/Kconfig
+@@ -20,3 +20,13 @@ config MEMSTICK_TIFM_MS
+           To compile this driver as a module, choose M here: the
+ 	  module will be called tifm_ms.
+ 
++config MEMSTICK_JMICRON_38X
++	tristate "JMicron JMB38X MemoryStick interface support (EXPERIMENTAL)"
++	depends on EXPERIMENTAL && PCI
++
++	help
++	  Say Y here if you want to be able to access MemoryStick cards with
++	  the JMicron(R) JMB38X MemoryStick card reader.
++
++          To compile this driver as a module, choose M here: the
++	  module will be called jmb38x_ms.
+diff --git a/drivers/memstick/host/Makefile b/drivers/memstick/host/Makefile
+index ee66638..12530e4 100644
+--- a/drivers/memstick/host/Makefile
++++ b/drivers/memstick/host/Makefile
+@@ -3,8 +3,8 @@
+ #
+ 
+ ifeq ($(CONFIG_MEMSTICK_DEBUG),y)
+-	EXTRA_CFLAGS		+= -DDEBUG
++	EXTRA_CFLAGS			+= -DDEBUG
+ endif
+ 
+-obj-$(CONFIG_MEMSTICK_TIFM_MS)	+= tifm_ms.o
+-
++obj-$(CONFIG_MEMSTICK_TIFM_MS)		+= tifm_ms.o
++obj-$(CONFIG_MEMSTICK_JMICRON_38X)	+= jmb38x_ms.o
+diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
+new file mode 100644
+index 0000000..03fe878
+--- /dev/null
++++ b/drivers/memstick/host/jmb38x_ms.c
+@@ -0,0 +1,945 @@
++/*
++ *  jmb38x_ms.c - JMicron jmb38x MemoryStick card reader
++ *
++ *  Copyright (C) 2008 Alex Dubov <oakad at yahoo.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/spinlock.h>
++#include <linux/interrupt.h>
++#include <linux/pci.h>
++#include <linux/delay.h>
++#include <linux/highmem.h>
++#include <linux/memstick.h>
++
++#define DRIVER_NAME "jmb38x_ms"
++
++static int no_dma;
++module_param(no_dma, bool, 0644);
++
++enum {
++	DMA_ADDRESS       = 0x00,
++	BLOCK             = 0x04,
++	DMA_CONTROL       = 0x08,
++	TPC_P0            = 0x0c,
++	TPC_P1            = 0x10,
++	TPC               = 0x14,
++	HOST_CONTROL      = 0x18,
++	DATA              = 0x1c,
++	STATUS            = 0x20,
++	INT_STATUS        = 0x24,
++	INT_STATUS_ENABLE = 0x28,
++	INT_SIGNAL_ENABLE = 0x2c,
++	TIMER             = 0x30,
++	TIMER_CONTROL     = 0x34,
++	PAD_OUTPUT_ENABLE = 0x38,
++	PAD_PU_PD         = 0x3c,
++	CLOCK_DELAY       = 0x40,
++	ADMA_ADDRESS      = 0x44,
++	CLOCK_CONTROL     = 0x48,
++	LED_CONTROL       = 0x4c,
++	VERSION           = 0x50
++};
++
++struct jmb38x_ms_host {
++	struct jmb38x_ms        *chip;
++	void __iomem            *addr;
++	spinlock_t              lock;
++	int                     id;
++	char                    host_id[DEVICE_ID_SIZE];
++	int                     irq;
++	unsigned int            block_pos;
++	unsigned long           timeout_jiffies;
++	struct timer_list       timer;
++	struct memstick_request *req;
++	unsigned char           eject:1,
++				use_dma:1;
++	unsigned char           cmd_flags;
++	unsigned char           io_pos;
++	unsigned int            io_word[2];
++};
++
++struct jmb38x_ms {
++	struct pci_dev        *pdev;
++	int                   host_cnt;
++	struct memstick_host  *hosts[];
++};
++
++#define BLOCK_COUNT_MASK       0xffff0000
++#define BLOCK_SIZE_MASK        0x00000fff
++
++#define DMA_CONTROL_ENABLE     0x00000001
++
++#define TPC_DATA_SEL           0x00008000
++#define TPC_DIR                0x00004000
++#define TPC_WAIT_INT           0x00002000
++#define TPC_GET_INT            0x00000800
++#define TPC_CODE_SZ_MASK       0x00000700
++#define TPC_DATA_SZ_MASK       0x00000007
++
++#define HOST_CONTROL_RESET_REQ 0x00008000
++#define HOST_CONTROL_REI       0x00004000
++#define HOST_CONTROL_LED       0x00000400
++#define HOST_CONTROL_FAST_CLK  0x00000200
++#define HOST_CONTROL_RESET     0x00000100
++#define HOST_CONTROL_POWER_EN  0x00000080
++#define HOST_CONTROL_CLOCK_EN  0x00000040
++#define HOST_CONTROL_IF_SHIFT  4
++
++#define HOST_CONTROL_IF_SERIAL 0x0
++#define HOST_CONTROL_IF_PAR4   0x1
++#define HOST_CONTROL_IF_PAR8   0x3
++
++#define STATUS_HAS_MEDIA        0x00000400
++#define STATUS_FIFO_EMPTY       0x00000200
++#define STATUS_FIFO_FULL        0x00000100
++
++#define INT_STATUS_TPC_ERR      0x00080000
++#define INT_STATUS_CRC_ERR      0x00040000
++#define INT_STATUS_TIMER_TO     0x00020000
++#define INT_STATUS_HSK_TO       0x00010000
++#define INT_STATUS_ANY_ERR      0x00008000
++#define INT_STATUS_FIFO_WRDY    0x00000080
++#define INT_STATUS_FIFO_RRDY    0x00000040
++#define INT_STATUS_MEDIA_OUT    0x00000010
++#define INT_STATUS_MEDIA_IN     0x00000008
++#define INT_STATUS_DMA_BOUNDARY 0x00000004
++#define INT_STATUS_EOTRAN       0x00000002
++#define INT_STATUS_EOTPC        0x00000001
++
++#define INT_STATUS_ALL          0x000f801f
++
++#define PAD_OUTPUT_ENABLE_MS  0x0F3F
++
++#define PAD_PU_PD_OFF         0x7FFF0000
++#define PAD_PU_PD_ON_MS_SOCK0 0x5f8f0000
++#define PAD_PU_PD_ON_MS_SOCK1 0x0f0f0000
++
++enum {
++	CMD_READY    = 0x01,
++	FIFO_READY   = 0x02,
++	REG_DATA     = 0x04,
++	AUTO_GET_INT = 0x08
++};
++
++static unsigned int jmb38x_ms_read_data(struct jmb38x_ms_host *host,
++					unsigned char *buf, unsigned int length)
++{
++	unsigned int off = 0;
++
++	while (host->io_pos && length) {
++		buf[off++] = host->io_word[0] & 0xff;
++		host->io_word[0] >>= 8;
++		length--;
++		host->io_pos--;
++	}
++
++	if (!length)
++		return off;
++
++	while (!(STATUS_FIFO_EMPTY & readl(host->addr + STATUS))) {
++		if (length < 4)
++			break;
++		*(unsigned int *)(buf + off) = __raw_readl(host->addr + DATA);
++		length -= 4;
++		off += 4;
++	}
++
++	if (length
++	    && !(STATUS_FIFO_EMPTY & readl(host->addr + STATUS))) {
++		host->io_word[0] = readl(host->addr + DATA);
++		for (host->io_pos = 4; host->io_pos; --host->io_pos) {
++			buf[off++] = host->io_word[0] & 0xff;
++			host->io_word[0] >>= 8;
++			length--;
++			if (!length)
++				break;
++		}
++	}
++
++	return off;
++}
++
++static unsigned int jmb38x_ms_read_reg_data(struct jmb38x_ms_host *host,
++					    unsigned char *buf,
++					    unsigned int length)
++{
++	unsigned int off = 0;
++
++	while (host->io_pos > 4 && length) {
++		buf[off++] = host->io_word[0] & 0xff;
++		host->io_word[0] >>= 8;
++		length--;
++		host->io_pos--;
++	}
++
++	if (!length)
++		return off;
++
++	while (host->io_pos && length) {
++		buf[off++] = host->io_word[1] & 0xff;
++		host->io_word[1] >>= 8;
++		length--;
++		host->io_pos--;
++	}
++
++	return off;
++}
++
++static unsigned int jmb38x_ms_write_data(struct jmb38x_ms_host *host,
++					 unsigned char *buf,
++					 unsigned int length)
++{
++	unsigned int off = 0;
++
++	if (host->io_pos) {
++		while (host->io_pos < 4 && length) {
++			host->io_word[0] |=  buf[off++] << (host->io_pos * 8);
++			host->io_pos++;
++			length--;
++		}
++	}
++
++	if (host->io_pos == 4
++	    && !(STATUS_FIFO_FULL & readl(host->addr + STATUS))) {
++		writel(host->io_word[0], host->addr + DATA);
++		host->io_pos = 0;
++		host->io_word[0] = 0;
++	} else if (host->io_pos) {
++		return off;
++	}
++
++	if (!length)
++		return off;
++
++	while (!(STATUS_FIFO_FULL & readl(host->addr + STATUS))) {
++		if (length < 4)
++			break;
++
++		__raw_writel(*(unsigned int *)(buf + off),
++			     host->addr + DATA);
++		length -= 4;
++		off += 4;
++	}
++
++	switch (length) {
++	case 3:
++		host->io_word[0] |= buf[off + 2] << 16;
++		host->io_pos++;
++	case 2:
++		host->io_word[0] |= buf[off + 1] << 8;
++		host->io_pos++;
++	case 1:
++		host->io_word[0] |= buf[off];
++		host->io_pos++;
++	}
++
++	off += host->io_pos;
++
++	return off;
++}
++
++static unsigned int jmb38x_ms_write_reg_data(struct jmb38x_ms_host *host,
++					     unsigned char *buf,
++					     unsigned int length)
++{
++	unsigned int off = 0;
++
++	while (host->io_pos < 4 && length) {
++		host->io_word[0] &= ~(0xff << (host->io_pos * 8));
++		host->io_word[0] |=  buf[off++] << (host->io_pos * 8);
++		host->io_pos++;
++		length--;
++	}
++
++	if (!length)
++		return off;
++
++	while (host->io_pos < 8 && length) {
++		host->io_word[1] &= ~(0xff << (host->io_pos * 8));
++		host->io_word[1] |=  buf[off++] << (host->io_pos * 8);
++		host->io_pos++;
++		length--;
++	}
++
++	return off;
++}
++
++static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
++{
++	unsigned int length;
++	unsigned int off;
++	unsigned int t_size, p_off, p_cnt;
++	unsigned char *buf;
++	struct page *pg;
++	unsigned long flags = 0;
++
++	if (host->req->long_data) {
++		length = host->req->sg.length - host->block_pos;
++		off = host->req->sg.offset + host->block_pos;
++	} else {
++		length = host->req->data_len - host->block_pos;
++		off = 0;
++	}
++
++	while (length) {
++		if (host->req->long_data) {
++			pg = nth_page(sg_page(&host->req->sg),
++				      off >> PAGE_SHIFT);
++			p_off = offset_in_page(off);
++			p_cnt = PAGE_SIZE - p_off;
++			p_cnt = min(p_cnt, length);
++
++			local_irq_save(flags);
++			buf = kmap_atomic(pg, KM_BIO_SRC_IRQ) + p_off;
++		} else {
++			buf = host->req->data + host->block_pos;
++			p_cnt = host->req->data_len - host->block_pos;
++		}
++
++		if (host->req->data_dir == WRITE)
++			t_size = !(host->cmd_flags & REG_DATA)
++				 ? jmb38x_ms_write_data(host, buf, p_cnt)
++				 : jmb38x_ms_write_reg_data(host, buf, p_cnt);
++		else
++			t_size = !(host->cmd_flags & REG_DATA)
++				 ? jmb38x_ms_read_data(host, buf, p_cnt)
++				 : jmb38x_ms_read_reg_data(host, buf, p_cnt);
++
++		if (host->req->long_data) {
++			kunmap_atomic(buf - p_off, KM_BIO_SRC_IRQ);
++			local_irq_restore(flags);
++		}
++
++		if (!t_size)
++			break;
++		host->block_pos += t_size;
++		length -= t_size;
++		off += t_size;
++	}
++
++	if (!length && host->req->data_dir == WRITE) {
++		if (host->cmd_flags & REG_DATA) {
++			writel(host->io_word[0], host->addr + TPC_P0);
++			writel(host->io_word[1], host->addr + TPC_P1);
++		} else if (host->io_pos) {
++			writel(host->io_word[0], host->addr + DATA);
++		}
++	}
++
++	return length;
++}
++
++static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
++{
++	struct jmb38x_ms_host *host = memstick_priv(msh);
++	unsigned char *data;
++	unsigned int data_len, cmd, t_val;
++
++	if (!(STATUS_HAS_MEDIA & readl(host->addr + STATUS))) {
++		dev_dbg(msh->cdev.dev, "no media status\n");
++		host->req->error = -ETIME;
++		return host->req->error;
++	}
++
++	dev_dbg(msh->cdev.dev, "control %08x\n",
++		readl(host->addr + HOST_CONTROL));
++	dev_dbg(msh->cdev.dev, "status %08x\n", readl(host->addr + INT_STATUS));
++	dev_dbg(msh->cdev.dev, "hstatus %08x\n", readl(host->addr + STATUS));
++
++	host->cmd_flags = 0;
++	host->block_pos = 0;
++	host->io_pos = 0;
++	host->io_word[0] = 0;
++	host->io_word[1] = 0;
++
++	cmd = host->req->tpc << 16;
++	cmd |= TPC_DATA_SEL;
++
++	if (host->req->data_dir == READ)
++		cmd |= TPC_DIR;
++	if (host->req->need_card_int)
++		cmd |= TPC_WAIT_INT;
++	if (host->req->get_int_reg)
++		cmd |= TPC_GET_INT;
++
++	data = host->req->data;
++
++	host->use_dma = !no_dma;
++
++	if (host->req->long_data) {
++		data_len = host->req->sg.length;
++	} else {
++		data_len = host->req->data_len;
++		host->use_dma = 0;
++	}
++
++	if (data_len <= 8) {
++		cmd &= ~(TPC_DATA_SEL | 0xf);
++		host->cmd_flags |= REG_DATA;
++		cmd |= data_len & 0xf;
++		host->use_dma = 0;
++	}
++
++	if (host->use_dma) {
++		if (1 != pci_map_sg(host->chip->pdev, &host->req->sg, 1,
++				    host->req->data_dir == READ
++				    ? PCI_DMA_FROMDEVICE
++				    : PCI_DMA_TODEVICE)) {
++			host->req->error = -ENOMEM;
++			return host->req->error;
++		}
++		data_len = sg_dma_len(&host->req->sg);
++		writel(sg_dma_address(&host->req->sg),
++		       host->addr + DMA_ADDRESS);
++		writel(((1 << 16) & BLOCK_COUNT_MASK)
++		       | (data_len & BLOCK_SIZE_MASK),
++		       host->addr + BLOCK);
++		writel(DMA_CONTROL_ENABLE, host->addr + DMA_CONTROL);
++	} else if (!(host->cmd_flags & REG_DATA)) {
++		writel(((1 << 16) & BLOCK_COUNT_MASK)
++		       | (data_len & BLOCK_SIZE_MASK),
++		       host->addr + BLOCK);
++			t_val = readl(host->addr + INT_STATUS_ENABLE);
++			t_val |= host->req->data_dir == READ
++				 ? INT_STATUS_FIFO_RRDY
++				 : INT_STATUS_FIFO_WRDY;
++
++			writel(t_val, host->addr + INT_STATUS_ENABLE);
++			writel(t_val, host->addr + INT_SIGNAL_ENABLE);
++	} else {
++		cmd &= ~(TPC_DATA_SEL | 0xf);
++		host->cmd_flags |= REG_DATA;
++		cmd |= data_len & 0xf;
++
++		if (host->req->data_dir == WRITE) {
++			jmb38x_ms_transfer_data(host);
++			writel(host->io_word[0], host->addr + TPC_P0);
++			writel(host->io_word[1], host->addr + TPC_P1);
++		}
++	}
++
++	mod_timer(&host->timer, jiffies + host->timeout_jiffies);
++	writel(HOST_CONTROL_LED | readl(host->addr + HOST_CONTROL),
++	       host->addr + HOST_CONTROL);
++	host->req->error = 0;
++
++	writel(cmd, host->addr + TPC);
++	dev_dbg(msh->cdev.dev, "executing TPC %08x, len %x\n", cmd, data_len);
++
++	return 0;
++}
++
++static void jmb38x_ms_complete_cmd(struct memstick_host *msh, int last)
++{
++	struct jmb38x_ms_host *host = memstick_priv(msh);
++	unsigned int t_val = 0;
++	int rc;
++
++	del_timer(&host->timer);
++
++	dev_dbg(msh->cdev.dev, "c control %08x\n",
++		readl(host->addr + HOST_CONTROL));
++	dev_dbg(msh->cdev.dev, "c status %08x\n",
++		readl(host->addr + INT_STATUS));
++	dev_dbg(msh->cdev.dev, "c hstatus %08x\n", readl(host->addr + STATUS));
++
++	if (host->req->get_int_reg) {
++		t_val = readl(host->addr + TPC_P0);
++		host->req->int_reg = (t_val & 0xff);
++	}
++
++	if (host->use_dma) {
++		writel(0, host->addr + DMA_CONTROL);
++		pci_unmap_sg(host->chip->pdev, &host->req->sg, 1,
++			     host->req->data_dir == READ
++			     ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE);
++	} else {
++		t_val = readl(host->addr + INT_STATUS_ENABLE);
++		if (host->req->data_dir == READ)
++			t_val &= ~INT_STATUS_FIFO_RRDY;
++		else
++			t_val &= ~INT_STATUS_FIFO_WRDY;
++
++		writel(t_val, host->addr + INT_STATUS_ENABLE);
++		writel(t_val, host->addr + INT_SIGNAL_ENABLE);
++	}
++
++	writel((~HOST_CONTROL_LED) & readl(host->addr + HOST_CONTROL),
++	       host->addr + HOST_CONTROL);
++
++	if (!last) {
++		do {
++			rc = memstick_next_req(msh, &host->req);
++		} while (!rc && jmb38x_ms_issue_cmd(msh));
++	} else {
++		do {
++			rc = memstick_next_req(msh, &host->req);
++			if (!rc)
++				host->req->error = -ETIME;
++		} while (!rc);
++	}
++}
++
++static irqreturn_t jmb38x_ms_isr(int irq, void *dev_id)
++{
++	struct memstick_host *msh = dev_id;
++	struct jmb38x_ms_host *host = memstick_priv(msh);
++	unsigned int irq_status;
++
++	spin_lock(&host->lock);
++	irq_status = readl(host->addr + INT_STATUS);
++	dev_dbg(&host->chip->pdev->dev, "irq_status = %08x\n", irq_status);
++	if (irq_status == 0 || irq_status == (~0)) {
++		spin_unlock(&host->lock);
++		return IRQ_NONE;
++	}
++
++	if (host->req) {
++		if (irq_status & INT_STATUS_ANY_ERR) {
++			if (irq_status & INT_STATUS_CRC_ERR)
++				host->req->error = -EILSEQ;
++			else
++				host->req->error = -ETIME;
++		} else {
++			if (host->use_dma) {
++				if (irq_status & INT_STATUS_EOTRAN)
++					host->cmd_flags |= FIFO_READY;
++			} else {
++				if (irq_status & (INT_STATUS_FIFO_RRDY
++						  | INT_STATUS_FIFO_WRDY))
++					jmb38x_ms_transfer_data(host);
++
++				if (irq_status & INT_STATUS_EOTRAN) {
++					jmb38x_ms_transfer_data(host);
++					host->cmd_flags |= FIFO_READY;
++				}
++			}
++
++			if (irq_status & INT_STATUS_EOTPC) {
++				host->cmd_flags |= CMD_READY;
++				if (host->cmd_flags & REG_DATA) {
++					if (host->req->data_dir == READ) {
++						host->io_word[0]
++							= readl(host->addr
++								+ TPC_P0);
++						host->io_word[1]
++							= readl(host->addr
++								+ TPC_P1);
++						host->io_pos = 8;
++
++						jmb38x_ms_transfer_data(host);
++					}
++					host->cmd_flags |= FIFO_READY;
++				}
++			}
++		}
++	}
++
++	if (irq_status & (INT_STATUS_MEDIA_IN | INT_STATUS_MEDIA_OUT)) {
++		dev_dbg(&host->chip->pdev->dev, "media changed\n");
++		memstick_detect_change(msh);
++	}
++
++	writel(irq_status, host->addr + INT_STATUS);
++
++	if (host->req
++	    && (((host->cmd_flags & CMD_READY)
++		 && (host->cmd_flags & FIFO_READY))
++		|| host->req->error))
++		jmb38x_ms_complete_cmd(msh, 0);
++
++	spin_unlock(&host->lock);
++	return IRQ_HANDLED;
++}
++
++static void jmb38x_ms_abort(unsigned long data)
++{
++	struct memstick_host *msh = (struct memstick_host *)data;
++	struct jmb38x_ms_host *host = memstick_priv(msh);
++	unsigned long flags;
++
++	dev_dbg(&host->chip->pdev->dev, "abort\n");
++	spin_lock_irqsave(&host->lock, flags);
++	if (host->req) {
++		host->req->error = -ETIME;
++		jmb38x_ms_complete_cmd(msh, 0);
++	}
++	spin_unlock_irqrestore(&host->lock, flags);
++}
++
++static void jmb38x_ms_request(struct memstick_host *msh)
++{
++	struct jmb38x_ms_host *host = memstick_priv(msh);
++	unsigned long flags;
++	int rc;
++
++	spin_lock_irqsave(&host->lock, flags);
++	if (host->req) {
++		spin_unlock_irqrestore(&host->lock, flags);
++		BUG();
++		return;
++	}
++
++	do {
++		rc = memstick_next_req(msh, &host->req);
++	} while (!rc && jmb38x_ms_issue_cmd(msh));
++	spin_unlock_irqrestore(&host->lock, flags);
++}
++
++static void jmb38x_ms_reset(struct jmb38x_ms_host *host)
++{
++	unsigned int host_ctl = readl(host->addr + HOST_CONTROL);
++
++	writel(host_ctl | HOST_CONTROL_RESET_REQ | HOST_CONTROL_RESET,
++	       host->addr + HOST_CONTROL);
++
++	while (HOST_CONTROL_RESET_REQ
++	       & (host_ctl = readl(host->addr + HOST_CONTROL))) {
++		ndelay(100);
++		dev_dbg(&host->chip->pdev->dev, "reset\n");
++	}
++
++	writel(INT_STATUS_ALL, host->addr + INT_STATUS_ENABLE);
++	writel(INT_STATUS_ALL, host->addr + INT_SIGNAL_ENABLE);
++
++	dev_dbg(&host->chip->pdev->dev, "reset\n");
++}
++
++static void jmb38x_ms_set_param(struct memstick_host *msh,
++				enum memstick_param param,
++				int value)
++{
++	struct jmb38x_ms_host *host = memstick_priv(msh);
++	unsigned int host_ctl;
++	unsigned long flags;
++
++	spin_lock_irqsave(&host->lock, flags);
++
++	switch (param) {
++	case MEMSTICK_POWER:
++		if (value == MEMSTICK_POWER_ON) {
++			jmb38x_ms_reset(host);
++
++			writel(host->id ? PAD_PU_PD_ON_MS_SOCK1
++					  : PAD_PU_PD_ON_MS_SOCK0,
++			       host->addr + PAD_PU_PD);
++
++			writel(PAD_OUTPUT_ENABLE_MS,
++			       host->addr + PAD_OUTPUT_ENABLE);
++
++			host_ctl = readl(host->addr + HOST_CONTROL);
++			host_ctl |= 7;
++			writel(host_ctl | (HOST_CONTROL_POWER_EN
++					   | HOST_CONTROL_CLOCK_EN),
++			       host->addr + HOST_CONTROL);
++
++			dev_dbg(&host->chip->pdev->dev, "power on\n");
++		} else if (value == MEMSTICK_POWER_OFF) {
++			writel(readl(host->addr + HOST_CONTROL)
++			       & ~(HOST_CONTROL_POWER_EN
++				   | HOST_CONTROL_CLOCK_EN),
++			       host->addr +  HOST_CONTROL);
++			writel(0, host->addr + PAD_OUTPUT_ENABLE);
++			writel(PAD_PU_PD_OFF, host->addr + PAD_PU_PD);
++			dev_dbg(&host->chip->pdev->dev, "power off\n");
++		}
++		break;
++	case MEMSTICK_INTERFACE:
++		/* jmb38x_ms_reset(host); */
++
++		host_ctl = readl(host->addr + HOST_CONTROL);
++		host_ctl &= ~(3 << HOST_CONTROL_IF_SHIFT);
++		/* host_ctl |= 7; */
++
++		if (value == MEMSTICK_SERIAL) {
++			host_ctl &= ~HOST_CONTROL_FAST_CLK;
++			host_ctl |= HOST_CONTROL_IF_SERIAL
++				    << HOST_CONTROL_IF_SHIFT;
++			host_ctl |= HOST_CONTROL_REI;
++			writel(0, host->addr + CLOCK_DELAY);
++		} else if (value == MEMSTICK_PAR4) {
++			host_ctl |= HOST_CONTROL_FAST_CLK;
++			host_ctl |= HOST_CONTROL_IF_PAR4
++				    << HOST_CONTROL_IF_SHIFT;
++			host_ctl &= ~HOST_CONTROL_REI;
++			writel(4, host->addr + CLOCK_DELAY);
++		} else if (value == MEMSTICK_PAR8) {
++			host_ctl |= HOST_CONTROL_FAST_CLK;
++			host_ctl |= HOST_CONTROL_IF_PAR8
++				    << HOST_CONTROL_IF_SHIFT;
++			host_ctl &= ~HOST_CONTROL_REI;
++			writel(4, host->addr + CLOCK_DELAY);
++		}
++		writel(host_ctl, host->addr + HOST_CONTROL);
++		break;
++	};
++
++	spin_unlock_irqrestore(&host->lock, flags);
++}
++
++#ifdef CONFIG_PM
++
++static int jmb38x_ms_suspend(struct pci_dev *dev, pm_message_t state)
++{
++	struct jmb38x_ms *jm = pci_get_drvdata(dev);
++	int cnt;
++
++	for (cnt = 0; cnt < jm->host_cnt; ++cnt) {
++		if (!jm->hosts[cnt])
++			break;
++		memstick_suspend_host(jm->hosts[cnt]);
++	}
++
++	pci_save_state(dev);
++	pci_enable_wake(dev, pci_choose_state(dev, state), 0);
++	pci_disable_device(dev);
++	pci_set_power_state(dev, pci_choose_state(dev, state));
++	return 0;
++}
++
++static int jmb38x_ms_resume(struct pci_dev *dev)
++{
++	struct jmb38x_ms *jm = pci_get_drvdata(dev);
++	int rc;
++
++	pci_set_power_state(dev, PCI_D0);
++	pci_restore_state(dev);
++	rc = pci_enable_device(dev);
++	if (rc)
++		return rc;
++	pci_set_master(dev);
++
++	pci_read_config_dword(dev, 0xac, &rc);
++	pci_write_config_dword(dev, 0xac, rc | 0x00470000);
++
++	for (rc = 0; rc < jm->host_cnt; ++rc) {
++		if (!jm->hosts[rc])
++			break;
++		memstick_resume_host(jm->hosts[rc]);
++		memstick_detect_change(jm->hosts[rc]);
++	}
++
++	return 0;
++}
++
++#else
++
++#define jmb38x_ms_suspend NULL
++#define jmb38x_ms_resume NULL
++
++#endif /* CONFIG_PM */
++
++static int jmb38x_ms_count_slots(struct pci_dev *pdev)
++{
++	int cnt, rc = 0;
++
++	for (cnt = 0; cnt < PCI_ROM_RESOURCE; ++cnt) {
++		if (!(IORESOURCE_MEM & pci_resource_flags(pdev, cnt)))
++			break;
++
++		if (256 != pci_resource_len(pdev, cnt))
++			break;
++
++		++rc;
++	}
++	return rc;
++}
++
++static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt)
++{
++	struct memstick_host *msh;
++	struct jmb38x_ms_host *host;
++
++	msh = memstick_alloc_host(sizeof(struct jmb38x_ms_host),
++				  &jm->pdev->dev);
++	if (!msh)
++		return NULL;
++
++	host = memstick_priv(msh);
++	host->chip = jm;
++	host->addr = ioremap(pci_resource_start(jm->pdev, cnt),
++			     pci_resource_len(jm->pdev, cnt));
++	if (!host->addr)
++		goto err_out_free;
++
++	spin_lock_init(&host->lock);
++	host->id = cnt;
++	snprintf(host->host_id, DEVICE_ID_SIZE, DRIVER_NAME ":slot%d",
++		 host->id);
++	host->irq = jm->pdev->irq;
++	host->timeout_jiffies = msecs_to_jiffies(4000);
++	msh->request = jmb38x_ms_request;
++	msh->set_param = jmb38x_ms_set_param;
++	/*
++	msh->caps = MEMSTICK_CAP_AUTO_GET_INT | MEMSTICK_CAP_PAR4
++		    | MEMSTICK_CAP_PAR8;
++	*/
++	msh->caps = MEMSTICK_CAP_PAR4 | MEMSTICK_CAP_PAR8;
++
++	setup_timer(&host->timer, jmb38x_ms_abort, (unsigned long)msh);
++
++	if (!request_irq(host->irq, jmb38x_ms_isr, IRQF_SHARED, host->host_id,
++			 msh))
++		return msh;
++
++	iounmap(host->addr);
++err_out_free:
++	kfree(msh);
++	return NULL;
++}
++
++static void jmb38x_ms_free_host(struct memstick_host *msh)
++{
++	struct jmb38x_ms_host *host = memstick_priv(msh);
++
++	free_irq(host->irq, msh);
++	iounmap(host->addr);
++	memstick_free_host(msh);
++}
++
++static int jmb38x_ms_probe(struct pci_dev *pdev,
++			   const struct pci_device_id *dev_id)
++{
++	struct jmb38x_ms *jm;
++	int pci_dev_busy = 0;
++	int rc, cnt;
++
++	rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
++	if (rc)
++		return rc;
++
++	rc = pci_enable_device(pdev);
++	if (rc)
++		return rc;
++
++	pci_set_master(pdev);
++
++	rc = pci_request_regions(pdev, DRIVER_NAME);
++	if (rc) {
++		pci_dev_busy = 1;
++		goto err_out;
++	}
++
++	pci_read_config_dword(pdev, 0xac, &rc);
++	pci_write_config_dword(pdev, 0xac, rc | 0x00470000);
++
++	cnt = jmb38x_ms_count_slots(pdev);
++	if (!cnt) {
++		rc = -ENODEV;
++		pci_dev_busy = 1;
++		goto err_out;
++	}
++
++	jm = kzalloc(sizeof(struct jmb38x_ms)
++		     + cnt * sizeof(struct memstick_host *), GFP_KERNEL);
++	if (!jm) {
++		rc = -ENOMEM;
++		goto err_out_int;
++	}
++
++	jm->pdev = pdev;
++	jm->host_cnt = cnt;
++	pci_set_drvdata(pdev, jm);
++
++	for (cnt = 0; cnt < jm->host_cnt; ++cnt) {
++		jm->hosts[cnt] = jmb38x_ms_alloc_host(jm, cnt);
++		if (!jm->hosts[cnt])
++			break;
++
++		rc = memstick_add_host(jm->hosts[cnt]);
++
++		if (rc) {
++			jmb38x_ms_free_host(jm->hosts[cnt]);
++			jm->hosts[cnt] = NULL;
++			break;
++		}
++	}
++
++	if (cnt)
++		return 0;
++
++	rc = -ENODEV;
++
++	pci_set_drvdata(pdev, NULL);
++	kfree(jm);
++err_out_int:
++	pci_release_regions(pdev);
++err_out:
++	if (!pci_dev_busy)
++		pci_disable_device(pdev);
++	return rc;
++}
++
++static void jmb38x_ms_remove(struct pci_dev *dev)
++{
++	struct jmb38x_ms *jm = pci_get_drvdata(dev);
++	struct jmb38x_ms_host *host;
++	int cnt;
++	unsigned long flags;
++
++	for (cnt = 0; cnt < jm->host_cnt; ++cnt) {
++		if (!jm->hosts[cnt])
++			break;
++
++		host = memstick_priv(jm->hosts[cnt]);
++
++		writel(0, host->addr + INT_SIGNAL_ENABLE);
++		writel(0, host->addr + INT_STATUS_ENABLE);
++		mmiowb();
++		dev_dbg(&jm->pdev->dev, "interrupts off\n");
++		spin_lock_irqsave(&host->lock, flags);
++		if (host->req) {
++			host->req->error = -ETIME;
++			jmb38x_ms_complete_cmd(jm->hosts[cnt], 1);
++		}
++		spin_unlock_irqrestore(&host->lock, flags);
++
++		memstick_remove_host(jm->hosts[cnt]);
++		dev_dbg(&jm->pdev->dev, "host removed\n");
++
++		jmb38x_ms_free_host(jm->hosts[cnt]);
++	}
++
++	pci_set_drvdata(dev, NULL);
++	pci_release_regions(dev);
++	pci_disable_device(dev);
++	kfree(jm);
++}
++
++static struct pci_device_id jmb38x_ms_id_tbl [] = {
++	{ PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB38X_MS, PCI_ANY_ID,
++	  PCI_ANY_ID, 0, 0, 0 },
++	{ }
++};
++
++static struct pci_driver jmb38x_ms_driver = {
++	.name = DRIVER_NAME,
++	.id_table = jmb38x_ms_id_tbl,
++	.probe = jmb38x_ms_probe,
++	.remove = jmb38x_ms_remove,
++	.suspend = jmb38x_ms_suspend,
++	.resume = jmb38x_ms_resume
++};
++
++static int __init jmb38x_ms_init(void)
++{
++	return pci_register_driver(&jmb38x_ms_driver);
++}
++
++static void __exit jmb38x_ms_exit(void)
++{
++	pci_unregister_driver(&jmb38x_ms_driver);
++}
++
++MODULE_AUTHOR("Alex Dubov");
++MODULE_DESCRIPTION("JMicron jmb38x MemoryStick driver");
++MODULE_LICENSE("GPL");
++MODULE_DEVICE_TABLE(pci, jmb38x_ms_id_tbl);
++
++module_init(jmb38x_ms_init);
++module_exit(jmb38x_ms_exit);
+diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c
+index 4fb2421..2b5bf52 100644
+--- a/drivers/memstick/host/tifm_ms.c
++++ b/drivers/memstick/host/tifm_ms.c
+@@ -20,293 +20,315 @@
+ #include <asm/io.h>
+ 
+ #define DRIVER_NAME "tifm_ms"
+-#define DRIVER_VERSION "0.1"
+ 
+ static int no_dma;
+ module_param(no_dma, bool, 0644);
+ 
+-#define TIFM_MS_TIMEOUT      0x00100
+-#define TIFM_MS_BADCRC       0x00200
+-#define TIFM_MS_EOTPC        0x01000
+-#define TIFM_MS_INT          0x02000
+-
+-/* The meaning of the bit majority in this constant is unknown. */
+-#define TIFM_MS_SERIAL       0x04010
++/*
++ * Some control bits of TIFM appear to conform to Sony's reference design,
++ * so I'm just assuming they all are.
++ */
+ 
+-#define TIFM_MS_SYS_LATCH    0x00100
+-#define TIFM_MS_SYS_NOT_RDY  0x00800
+-#define TIFM_MS_SYS_DATA     0x10000
++#define TIFM_MS_STAT_DRQ     0x04000
++#define TIFM_MS_STAT_MSINT   0x02000
++#define TIFM_MS_STAT_RDY     0x01000
++#define TIFM_MS_STAT_CRC     0x00200
++#define TIFM_MS_STAT_TOE     0x00100
++#define TIFM_MS_STAT_EMP     0x00020
++#define TIFM_MS_STAT_FUL     0x00010
++#define TIFM_MS_STAT_CED     0x00008
++#define TIFM_MS_STAT_ERR     0x00004
++#define TIFM_MS_STAT_BRQ     0x00002
++#define TIFM_MS_STAT_CNK     0x00001
++
++#define TIFM_MS_SYS_DMA      0x10000
++#define TIFM_MS_SYS_RESET    0x08000
++#define TIFM_MS_SYS_SRAC     0x04000
++#define TIFM_MS_SYS_INTEN    0x02000
++#define TIFM_MS_SYS_NOCRC    0x01000
++#define TIFM_MS_SYS_INTCLR   0x00800
++#define TIFM_MS_SYS_MSIEN    0x00400
++#define TIFM_MS_SYS_FCLR     0x00200
++#define TIFM_MS_SYS_FDIR     0x00100
++#define TIFM_MS_SYS_DAM      0x00080
++#define TIFM_MS_SYS_DRM      0x00040
++#define TIFM_MS_SYS_DRQSL    0x00020
++#define TIFM_MS_SYS_REI      0x00010
++#define TIFM_MS_SYS_REO      0x00008
++#define TIFM_MS_SYS_BSY_MASK 0x00007
++
++#define TIFM_MS_SYS_FIFO     (TIFM_MS_SYS_INTEN | TIFM_MS_SYS_MSIEN \
++			      | TIFM_MS_SYS_FCLR | TIFM_MS_SYS_BSY_MASK)
+ 
+ /* Hardware flags */
+ enum {
+-	CMD_READY  = 0x0001,
+-	FIFO_READY = 0x0002,
+-	CARD_READY = 0x0004,
+-	DATA_CARRY = 0x0008
++	CMD_READY  = 0x01,
++	FIFO_READY = 0x02,
++	CARD_INT   = 0x04
+ };
+ 
+ struct tifm_ms {
+ 	struct tifm_dev         *dev;
+-	unsigned short          eject:1,
+-				no_dma:1;
+-	unsigned short          cmd_flags;
++	struct timer_list       timer;
++	struct memstick_request *req;
+ 	unsigned int            mode_mask;
+ 	unsigned int            block_pos;
+ 	unsigned long           timeout_jiffies;
+-
+-	struct timer_list       timer;
+-	struct memstick_request *req;
++	unsigned char           eject:1,
++				use_dma:1;
++	unsigned char           cmd_flags;
++	unsigned char           io_pos;
+ 	unsigned int            io_word;
+ };
+ 
+-static void tifm_ms_read_fifo(struct tifm_ms *host, unsigned int fifo_offset,
+-			      struct page *pg, unsigned int page_off,
+-			      unsigned int length)
++static unsigned int tifm_ms_read_data(struct tifm_ms *host,
++				      unsigned char *buf, unsigned int length)
+ {
+ 	struct tifm_dev *sock = host->dev;
+-	unsigned int cnt = 0, off = 0;
+-	unsigned char *buf = kmap_atomic(pg, KM_BIO_DST_IRQ) + page_off;
++	unsigned int off = 0;
++
++	while (host->io_pos && length) {
++		buf[off++] = host->io_word & 0xff;
++		host->io_word >>= 8;
++		length--;
++		host->io_pos--;
++	}
+ 
+-	if (host->cmd_flags & DATA_CARRY) {
+-		while ((fifo_offset & 3) && length) {
++	if (!length)
++		return off;
++
++	while (!(TIFM_MS_STAT_EMP & readl(sock->addr + SOCK_MS_STATUS))) {
++		if (length < 4)
++			break;
++		*(unsigned int *)(buf + off) = __raw_readl(sock->addr
++							   + SOCK_MS_DATA);
++		length -= 4;
++		off += 4;
++	}
++
++	if (length
++	    && !(TIFM_MS_STAT_EMP & readl(sock->addr + SOCK_MS_STATUS))) {
++		host->io_word = readl(sock->addr + SOCK_MS_DATA);
++		for (host->io_pos = 4; host->io_pos; --host->io_pos) {
+ 			buf[off++] = host->io_word & 0xff;
+ 			host->io_word >>= 8;
+ 			length--;
+-			fifo_offset++;
++			if (!length)
++				break;
+ 		}
+-		if (!(fifo_offset & 3))
+-			host->cmd_flags &= ~DATA_CARRY;
+-		if (!length)
+-			return;
+ 	}
+ 
+-	do {
+-		host->io_word = readl(sock->addr + SOCK_FIFO_ACCESS
+-				      + fifo_offset);
+-		cnt = 4;
+-		while (length && cnt) {
+-			buf[off++] = (host->io_word >> 8) & 0xff;
+-			cnt--;
+-			length--;
+-		}
+-		fifo_offset += 4 - cnt;
+-	} while (length);
+-
+-	if (cnt)
+-		host->cmd_flags |= DATA_CARRY;
+-
+-	kunmap_atomic(buf - page_off, KM_BIO_DST_IRQ);
++	return off;
+ }
+ 
+-static void tifm_ms_write_fifo(struct tifm_ms *host, unsigned int fifo_offset,
+-			       struct page *pg, unsigned int page_off,
+-			       unsigned int length)
++static unsigned int tifm_ms_write_data(struct tifm_ms *host,
++				       unsigned char *buf, unsigned int length)
+ {
+ 	struct tifm_dev *sock = host->dev;
+-	unsigned int cnt = 0, off = 0;
+-	unsigned char *buf = kmap_atomic(pg, KM_BIO_SRC_IRQ) + page_off;
++	unsigned int off = 0;
+ 
+-	if (host->cmd_flags & DATA_CARRY) {
+-		while (fifo_offset & 3) {
+-			host->io_word |= buf[off++] << (8 * (fifo_offset & 3));
++	if (host->io_pos) {
++		while (host->io_pos < 4 && length) {
++			host->io_word |=  buf[off++] << (host->io_pos * 8);
++			host->io_pos++;
+ 			length--;
+-			fifo_offset++;
+ 		}
+-		if (!(fifo_offset & 3)) {
+-			writel(host->io_word, sock->addr + SOCK_FIFO_ACCESS
+-			       + fifo_offset - 4);
+-
+-			host->cmd_flags &= ~DATA_CARRY;
+-		}
+-		if (!length)
+-			return;
+ 	}
+ 
+-	do {
+-		cnt = 4;
++	if (host->io_pos == 4
++	    && !(TIFM_MS_STAT_FUL & readl(sock->addr + SOCK_MS_STATUS))) {
++		writel(TIFM_MS_SYS_FDIR | readl(sock->addr + SOCK_MS_SYSTEM),
++		       sock->addr + SOCK_MS_SYSTEM);
++		writel(host->io_word, sock->addr + SOCK_MS_DATA);
++		host->io_pos = 0;
+ 		host->io_word = 0;
+-		while (length && cnt) {
+-			host->io_word |= buf[off++] << (4 - cnt);
+-			cnt--;
+-			length--;
+-		}
+-		fifo_offset += 4 - cnt;
+-		if (!cnt)
+-			writel(host->io_word, sock->addr + SOCK_FIFO_ACCESS
+-					      + fifo_offset - 4);
+-
+-	} while (length);
+-
+-	if (cnt)
+-		host->cmd_flags |= DATA_CARRY;
++	} else if (host->io_pos) {
++		return off;
++	}
+ 
+-	kunmap_atomic(buf - page_off, KM_BIO_SRC_IRQ);
+-}
++	if (!length)
++		return off;
+ 
+-static void tifm_ms_move_block(struct tifm_ms *host, unsigned int length)
+-{
+-	unsigned int t_size;
+-	unsigned int off = host->req->sg.offset + host->block_pos;
+-	unsigned int p_off, p_cnt;
+-	struct page *pg;
+-	unsigned long flags;
++	while (!(TIFM_MS_STAT_FUL & readl(sock->addr + SOCK_MS_STATUS))) {
++		if (length < 4)
++			break;
++		writel(TIFM_MS_SYS_FDIR | readl(sock->addr + SOCK_MS_SYSTEM),
++		       sock->addr + SOCK_MS_SYSTEM);
++		__raw_writel(*(unsigned int *)(buf + off),
++			     sock->addr + SOCK_MS_DATA);
++		length -= 4;
++		off += 4;
++	}
+ 
+-	dev_dbg(&host->dev->dev, "moving block\n");
+-	local_irq_save(flags);
+-	t_size = length;
+-	while (t_size) {
+-		pg = nth_page(sg_page(&host->req->sg), off >> PAGE_SHIFT);
+-		p_off = offset_in_page(off);
+-		p_cnt = PAGE_SIZE - p_off;
+-		p_cnt = min(p_cnt, t_size);
++	switch (length) {
++	case 3:
++		host->io_word |= buf[off + 2] << 16;
++		host->io_pos++;
++	case 2:
++		host->io_word |= buf[off + 1] << 8;
++		host->io_pos++;
++	case 1:
++		host->io_word |= buf[off];
++		host->io_pos++;
++	}
+ 
+-		if (host->req->data_dir == WRITE)
+-			tifm_ms_write_fifo(host, length - t_size,
+-					   pg, p_off, p_cnt);
+-		else
+-			tifm_ms_read_fifo(host, length - t_size,
+-					  pg, p_off, p_cnt);
++	off += host->io_pos;
+ 
+-		t_size -= p_cnt;
+-	}
+-	local_irq_restore(flags);
++	return off;
+ }
+ 
+-static int tifm_ms_transfer_data(struct tifm_ms *host, int skip)
++static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
+ {
+ 	struct tifm_dev *sock = host->dev;
+-	unsigned int length = host->req->sg.length - host->block_pos;
++	unsigned int length;
++	unsigned int off;
++	unsigned int t_size, p_off, p_cnt;
++	unsigned char *buf;
++	struct page *pg;
++	unsigned long flags = 0;
++
++	if (host->req->long_data) {
++		length = host->req->sg.length - host->block_pos;
++		off = host->req->sg.offset + host->block_pos;
++	} else {
++		length = host->req->data_len - host->block_pos;
++		off = 0;
++	}
++	dev_dbg(&sock->dev, "fifo data transfer, %d, %d\n", length,
++		host->block_pos);
++
++	while (length) {
++		if (host->req->long_data) {
++			pg = nth_page(sg_page(&host->req->sg),
++				      off >> PAGE_SHIFT);
++			p_off = offset_in_page(off);
++			p_cnt = PAGE_SIZE - p_off;
++			p_cnt = min(p_cnt, length);
++
++			local_irq_save(flags);
++			buf = kmap_atomic(pg, KM_BIO_SRC_IRQ) + p_off;
++		} else {
++			buf = host->req->data + host->block_pos;
++			p_cnt = host->req->data_len - host->block_pos;
++		}
+ 
+-	if (!length)
+-		return 1;
++		t_size = host->req->data_dir == WRITE
++			 ? tifm_ms_write_data(host, buf, p_cnt)
++			 : tifm_ms_read_data(host, buf, p_cnt);
+ 
+-	if (length > TIFM_FIFO_SIZE)
+-		length = TIFM_FIFO_SIZE;
++		if (host->req->long_data) {
++			kunmap_atomic(buf - p_off, KM_BIO_SRC_IRQ);
++			local_irq_restore(flags);
++		}
+ 
+-	if (!skip) {
+-		tifm_ms_move_block(host, length);
+-		host->block_pos += length;
++		if (!t_size)
++			break;
++		host->block_pos += t_size;
++		length -= t_size;
++		off += t_size;
+ 	}
+ 
+-	if ((host->req->data_dir == READ)
+-	    && (host->block_pos == host->req->sg.length))
+-		return 1;
+-
+-	writel(ilog2(length) - 2, sock->addr + SOCK_FIFO_PAGE_SIZE);
+-	if (host->req->data_dir == WRITE)
+-		writel((1 << 8) | TIFM_DMA_TX, sock->addr + SOCK_DMA_CONTROL);
+-	else
+-		writel((1 << 8), sock->addr + SOCK_DMA_CONTROL);
++	dev_dbg(&sock->dev, "fifo data transfer, %d remaining\n", length);
++	if (!length && (host->req->data_dir == WRITE)) {
++		if (host->io_pos) {
++			writel(TIFM_MS_SYS_FDIR
++			       | readl(sock->addr + SOCK_MS_SYSTEM),
++			       sock->addr + SOCK_MS_SYSTEM);
++			writel(host->io_word, sock->addr + SOCK_MS_DATA);
++		}
++		writel(TIFM_MS_SYS_FDIR
++		       | readl(sock->addr + SOCK_MS_SYSTEM),
++		       sock->addr + SOCK_MS_SYSTEM);
++		writel(0, sock->addr + SOCK_MS_DATA);
++	} else {
++		readl(sock->addr + SOCK_MS_DATA);
++	}
+ 
+-	return 0;
++	return length;
+ }
+ 
+ static int tifm_ms_issue_cmd(struct tifm_ms *host)
+ {
+ 	struct tifm_dev *sock = host->dev;
+ 	unsigned char *data;
+-	unsigned int data_len = 0, cmd = 0, cmd_mask = 0, cnt, tval = 0;
++	unsigned int data_len, cmd, sys_param;
+ 
+ 	host->cmd_flags = 0;
++	host->block_pos = 0;
++	host->io_pos = 0;
++	host->io_word = 0;
++	host->cmd_flags = 0;
+ 
+-	if (host->req->io_type == MEMSTICK_IO_SG) {
+-		if (!host->no_dma) {
+-			if (1 != tifm_map_sg(sock, &host->req->sg, 1,
+-					     host->req->data_dir == READ
+-					     ? PCI_DMA_FROMDEVICE
+-					     : PCI_DMA_TODEVICE)) {
+-				host->req->error = -ENOMEM;
+-				return host->req->error;
+-			}
+-			data_len = sg_dma_len(&host->req->sg);
+-		} else
+-			data_len = host->req->sg.length;
+-
+-		writel(TIFM_FIFO_INT_SETALL,
+-		       sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR);
+-		writel(TIFM_FIFO_ENABLE,
+-		       sock->addr + SOCK_FIFO_CONTROL);
+-		writel(TIFM_FIFO_INTMASK,
+-		       sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET);
++	data = host->req->data;
+ 
+-		if (!host->no_dma) {
+-			writel(ilog2(data_len) - 2,
+-			       sock->addr + SOCK_FIFO_PAGE_SIZE);
+-			writel(sg_dma_address(&host->req->sg),
+-			       sock->addr + SOCK_DMA_ADDRESS);
+-			if (host->req->data_dir == WRITE)
+-				writel((1 << 8) | TIFM_DMA_TX | TIFM_DMA_EN,
+-				       sock->addr + SOCK_DMA_CONTROL);
+-			else
+-				writel((1 << 8) | TIFM_DMA_EN,
+-				       sock->addr + SOCK_DMA_CONTROL);
+-		} else {
+-			tifm_ms_transfer_data(host,
+-					      host->req->data_dir == READ);
+-		}
++	host->use_dma = !no_dma;
+ 
+-		cmd_mask = readl(sock->addr + SOCK_MS_SYSTEM);
+-		cmd_mask |= TIFM_MS_SYS_DATA | TIFM_MS_SYS_NOT_RDY;
+-		writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM);
+-	} else if (host->req->io_type == MEMSTICK_IO_VAL) {
+-		data = host->req->data;
++	if (host->req->long_data) {
++		data_len = host->req->sg.length;
++		if (!is_power_of_2(data_len))
++			host->use_dma = 0;
++	} else {
+ 		data_len = host->req->data_len;
++		host->use_dma = 0;
++	}
+ 
+-		cmd_mask = host->mode_mask | 0x2607; /* unknown constant */
+-
+-		if (host->req->data_dir == WRITE) {
+-			cmd_mask |= TIFM_MS_SYS_LATCH;
+-			writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM);
+-			for (cnt = 0; (data_len - cnt) >= 4; cnt += 4) {
+-				writel(TIFM_MS_SYS_LATCH
+-				       | readl(sock->addr + SOCK_MS_SYSTEM),
+-				       sock->addr + SOCK_MS_SYSTEM);
+-				__raw_writel(*(unsigned int *)(data + cnt),
+-					     sock->addr + SOCK_MS_DATA);
+-				dev_dbg(&sock->dev, "writing %x\n",
+-					*(int *)(data + cnt));
+-			}
+-			switch (data_len - cnt) {
+-			case 3:
+-				tval |= data[cnt + 2] << 16;
+-			case 2:
+-				tval |= data[cnt + 1] << 8;
+-			case 1:
+-				tval |= data[cnt];
+-				writel(TIFM_MS_SYS_LATCH
+-				       | readl(sock->addr + SOCK_MS_SYSTEM),
+-				       sock->addr + SOCK_MS_SYSTEM);
+-				writel(tval, sock->addr + SOCK_MS_DATA);
+-				dev_dbg(&sock->dev, "writing %x\n", tval);
+-			}
++	writel(TIFM_FIFO_INT_SETALL,
++	       sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR);
++	writel(TIFM_FIFO_ENABLE,
++	       sock->addr + SOCK_FIFO_CONTROL);
++
++	if (host->use_dma) {
++		if (1 != tifm_map_sg(sock, &host->req->sg, 1,
++				     host->req->data_dir == READ
++				     ? PCI_DMA_FROMDEVICE
++				     : PCI_DMA_TODEVICE)) {
++			host->req->error = -ENOMEM;
++			return host->req->error;
++		}
++		data_len = sg_dma_len(&host->req->sg);
+ 
+-			writel(TIFM_MS_SYS_LATCH
+-			       | readl(sock->addr + SOCK_MS_SYSTEM),
+-			       sock->addr + SOCK_MS_SYSTEM);
+-			writel(0, sock->addr + SOCK_MS_DATA);
+-			dev_dbg(&sock->dev, "writing %x\n", 0);
++		writel(ilog2(data_len) - 2,
++		       sock->addr + SOCK_FIFO_PAGE_SIZE);
++		writel(TIFM_FIFO_INTMASK,
++		       sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET);
++		sys_param = TIFM_DMA_EN | (1 << 8);
++		if (host->req->data_dir == WRITE)
++			sys_param |= TIFM_DMA_TX;
++
++		writel(TIFM_FIFO_INTMASK,
++		       sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET);
+ 
+-		} else
+-			writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM);
++		writel(sg_dma_address(&host->req->sg),
++		       sock->addr + SOCK_DMA_ADDRESS);
++		writel(sys_param, sock->addr + SOCK_DMA_CONTROL);
++	} else {
++		writel(host->mode_mask | TIFM_MS_SYS_FIFO,
++		       sock->addr + SOCK_MS_SYSTEM);
+ 
+-		cmd_mask = readl(sock->addr + SOCK_MS_SYSTEM);
+-		cmd_mask &= ~TIFM_MS_SYS_DATA;
+-		cmd_mask |= TIFM_MS_SYS_NOT_RDY;
+-		dev_dbg(&sock->dev, "mask %x\n", cmd_mask);
+-		writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM);
+-	} else
+-		BUG();
++		writel(TIFM_FIFO_MORE,
++		       sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET);
++	}
+ 
+ 	mod_timer(&host->timer, jiffies + host->timeout_jiffies);
+ 	writel(TIFM_CTRL_LED | readl(sock->addr + SOCK_CONTROL),
+ 	       sock->addr + SOCK_CONTROL);
+ 	host->req->error = 0;
+ 
++	sys_param = readl(sock->addr + SOCK_MS_SYSTEM);
++	sys_param |= TIFM_MS_SYS_INTCLR;
++
++	if (host->use_dma)
++		sys_param |= TIFM_MS_SYS_DMA;
++	else
++		sys_param &= ~TIFM_MS_SYS_DMA;
++
++	writel(sys_param, sock->addr + SOCK_MS_SYSTEM);
++
+ 	cmd = (host->req->tpc & 0xf) << 12;
+ 	cmd |= data_len;
+ 	writel(cmd, sock->addr + SOCK_MS_COMMAND);
+ 
+-	dev_dbg(&sock->dev, "executing TPC %x, %x\n", cmd, cmd_mask);
++	dev_dbg(&sock->dev, "executing TPC %x, %x\n", cmd, sys_param);
+ 	return 0;
+ }
+ 
+@@ -314,47 +336,20 @@ static void tifm_ms_complete_cmd(struct tifm_ms *host)
+ {
+ 	struct tifm_dev *sock = host->dev;
+ 	struct memstick_host *msh = tifm_get_drvdata(sock);
+-	unsigned int tval = 0, data_len;
+-	unsigned char *data;
+ 	int rc;
+ 
+ 	del_timer(&host->timer);
+-	if (host->req->io_type == MEMSTICK_IO_SG) {
+-		if (!host->no_dma)
+-			tifm_unmap_sg(sock, &host->req->sg, 1,
+-				      host->req->data_dir == READ
+-				      ? PCI_DMA_FROMDEVICE
+-				      : PCI_DMA_TODEVICE);
+-	} else if (host->req->io_type == MEMSTICK_IO_VAL) {
+-		writel(~TIFM_MS_SYS_DATA & readl(sock->addr + SOCK_MS_SYSTEM),
+-		       sock->addr + SOCK_MS_SYSTEM);
+-
+-		data = host->req->data;
+-		data_len = host->req->data_len;
+ 
+-		if (host->req->data_dir == READ) {
+-			for (rc = 0; (data_len - rc) >= 4; rc += 4)
+-				*(int *)(data + rc)
+-					= __raw_readl(sock->addr
+-						      + SOCK_MS_DATA);
+-
+-			if (data_len - rc)
+-				tval = readl(sock->addr + SOCK_MS_DATA);
+-			switch (data_len - rc) {
+-			case 3:
+-				data[rc + 2] = (tval >> 16) & 0xff;
+-			case 2:
+-				data[rc + 1] = (tval >> 8) & 0xff;
+-			case 1:
+-				data[rc] = tval & 0xff;
+-			}
+-			readl(sock->addr + SOCK_MS_DATA);
+-		}
+-	}
++	if (host->use_dma)
++		tifm_unmap_sg(sock, &host->req->sg, 1,
++			      host->req->data_dir == READ
++			      ? PCI_DMA_FROMDEVICE
++			      : PCI_DMA_TODEVICE);
+ 
+ 	writel((~TIFM_CTRL_LED) & readl(sock->addr + SOCK_CONTROL),
+ 	       sock->addr + SOCK_CONTROL);
+ 
++	dev_dbg(&sock->dev, "TPC complete\n");
+ 	do {
+ 		rc = memstick_next_req(msh, &host->req);
+ 	} while (!rc && tifm_ms_issue_cmd(host));
+@@ -365,11 +360,10 @@ static int tifm_ms_check_status(struct tifm_ms *host)
+ 	if (!host->req->error) {
+ 		if (!(host->cmd_flags & CMD_READY))
+ 			return 1;
+-		if ((host->req->io_type == MEMSTICK_IO_SG)
+-		    && !(host->cmd_flags & FIFO_READY))
++		if (!(host->cmd_flags & FIFO_READY))
+ 			return 1;
+ 		if (host->req->need_card_int
+-		    && !(host->cmd_flags & CARD_READY))
++		    && !(host->cmd_flags & CARD_INT))
+ 			return 1;
+ 	}
+ 	return 0;
+@@ -379,18 +373,24 @@ static int tifm_ms_check_status(struct tifm_ms *host)
+ static void tifm_ms_data_event(struct tifm_dev *sock)
+ {
+ 	struct tifm_ms *host;
+-	unsigned int fifo_status = 0;
++	unsigned int fifo_status = 0, host_status = 0;
+ 	int rc = 1;
+ 
+ 	spin_lock(&sock->lock);
+ 	host = memstick_priv((struct memstick_host *)tifm_get_drvdata(sock));
+ 	fifo_status = readl(sock->addr + SOCK_DMA_FIFO_STATUS);
+-	dev_dbg(&sock->dev, "data event: fifo_status %x, flags %x\n",
+-		fifo_status, host->cmd_flags);
++	host_status = readl(sock->addr + SOCK_MS_STATUS);
++	dev_dbg(&sock->dev,
++		"data event: fifo_status %x, host_status %x, flags %x\n",
++		fifo_status, host_status, host->cmd_flags);
+ 
+ 	if (host->req) {
+-		if (fifo_status & TIFM_FIFO_READY) {
+-			if (!host->no_dma || tifm_ms_transfer_data(host, 0)) {
++		if (host->use_dma && (fifo_status & 1)) {
++			host->cmd_flags |= FIFO_READY;
++			rc = tifm_ms_check_status(host);
++		}
++		if (!host->use_dma && (fifo_status & TIFM_FIFO_MORE)) {
++			if (!tifm_ms_transfer_data(host)) {
+ 				host->cmd_flags |= FIFO_READY;
+ 				rc = tifm_ms_check_status(host);
+ 			}
+@@ -419,9 +419,9 @@ static void tifm_ms_card_event(struct tifm_dev *sock)
+ 		host_status, host->cmd_flags);
+ 
+ 	if (host->req) {
+-		if (host_status & TIFM_MS_TIMEOUT)
++		if (host_status & TIFM_MS_STAT_TOE)
+ 			host->req->error = -ETIME;
+-		else if (host_status & TIFM_MS_BADCRC)
++		else if (host_status & TIFM_MS_STAT_CRC)
+ 			host->req->error = -EILSEQ;
+ 
+ 		if (host->req->error) {
+@@ -430,18 +430,17 @@ static void tifm_ms_card_event(struct tifm_dev *sock)
+ 			writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL);
+ 		}
+ 
+-		if (host_status & TIFM_MS_EOTPC)
++		if (host_status & TIFM_MS_STAT_RDY)
+ 			host->cmd_flags |= CMD_READY;
+-		if (host_status & TIFM_MS_INT)
+-			host->cmd_flags |= CARD_READY;
++
++		if (host_status & TIFM_MS_STAT_MSINT)
++			host->cmd_flags |= CARD_INT;
+ 
+ 		rc = tifm_ms_check_status(host);
+ 
+ 	}
+ 
+-	writel(TIFM_MS_SYS_NOT_RDY | readl(sock->addr + SOCK_MS_SYSTEM),
+-	       sock->addr + SOCK_MS_SYSTEM);
+-	writel((~TIFM_MS_SYS_DATA) & readl(sock->addr + SOCK_MS_SYSTEM),
++	writel(TIFM_MS_SYS_INTCLR | readl(sock->addr + SOCK_MS_SYSTEM),
+ 	       sock->addr + SOCK_MS_SYSTEM);
+ 
+ 	if (!rc)
+@@ -497,15 +496,26 @@ static void tifm_ms_set_param(struct memstick_host *msh,
+ 
+ 	switch (param) {
+ 	case MEMSTICK_POWER:
+-		/* this is set by card detection mechanism */
++		/* also affected by media detection mechanism */
++		if (value == MEMSTICK_POWER_ON) {
++			host->mode_mask = TIFM_MS_SYS_SRAC | TIFM_MS_SYS_REI;
++			writel(TIFM_MS_SYS_RESET, sock->addr + SOCK_MS_SYSTEM);
++			writel(TIFM_MS_SYS_FCLR | TIFM_MS_SYS_INTCLR,
++			       sock->addr + SOCK_MS_SYSTEM);
++			writel(0xffffffff, sock->addr + SOCK_MS_STATUS);
++		} else if (value == MEMSTICK_POWER_OFF) {
++			writel(TIFM_MS_SYS_FCLR | TIFM_MS_SYS_INTCLR,
++			       sock->addr + SOCK_MS_SYSTEM);
++			writel(0xffffffff, sock->addr + SOCK_MS_STATUS);
++		}
+ 		break;
+ 	case MEMSTICK_INTERFACE:
+ 		if (value == MEMSTICK_SERIAL) {
+-			host->mode_mask = TIFM_MS_SERIAL;
++			host->mode_mask = TIFM_MS_SYS_SRAC | TIFM_MS_SYS_REI;
+ 			writel((~TIFM_CTRL_FAST_CLK)
+ 			       & readl(sock->addr + SOCK_CONTROL),
+ 			       sock->addr + SOCK_CONTROL);
+-		} else if (value == MEMSTICK_PARALLEL) {
++		} else if (value == MEMSTICK_PAR4) {
+ 			host->mode_mask = 0;
+ 			writel(TIFM_CTRL_FAST_CLK
+ 			       | readl(sock->addr + SOCK_CONTROL),
+@@ -532,21 +542,6 @@ static void tifm_ms_abort(unsigned long data)
+ 	tifm_eject(host->dev);
+ }
+ 
+-static int tifm_ms_initialize_host(struct tifm_ms *host)
+-{
+-	struct tifm_dev *sock = host->dev;
+-	struct memstick_host *msh = tifm_get_drvdata(sock);
+-
+-	host->mode_mask = TIFM_MS_SERIAL;
+-	writel(0x8000, sock->addr + SOCK_MS_SYSTEM);
+-	writel(0x0200 | TIFM_MS_SYS_NOT_RDY, sock->addr + SOCK_MS_SYSTEM);
+-	writel(0xffffffff, sock->addr + SOCK_MS_STATUS);
+-	if (tifm_has_ms_pif(sock))
+-		msh->caps |= MEMSTICK_CAP_PARALLEL;
+-
+-	return 0;
+-}
+-
+ static int tifm_ms_probe(struct tifm_dev *sock)
+ {
+ 	struct memstick_host *msh;
+@@ -568,7 +563,6 @@ static int tifm_ms_probe(struct tifm_dev *sock)
+ 	tifm_set_drvdata(sock, msh);
+ 	host->dev = sock;
+ 	host->timeout_jiffies = msecs_to_jiffies(1000);
+-	host->no_dma = no_dma;
+ 
+ 	setup_timer(&host->timer, tifm_ms_abort, (unsigned long)host);
+ 
+@@ -576,10 +570,10 @@ static int tifm_ms_probe(struct tifm_dev *sock)
+ 	msh->set_param = tifm_ms_set_param;
+ 	sock->card_event = tifm_ms_card_event;
+ 	sock->data_event = tifm_ms_data_event;
+-	rc = tifm_ms_initialize_host(host);
++	if (tifm_has_ms_pif(sock))
++		msh->caps |= MEMSTICK_CAP_PAR4;
+ 
+-	if (!rc)
+-		rc = memstick_add_host(msh);
++	rc = memstick_add_host(msh);
+ 	if (!rc)
+ 		return 0;
+ 
+@@ -601,7 +595,7 @@ static void tifm_ms_remove(struct tifm_dev *sock)
+ 		writel(TIFM_FIFO_INT_SETALL,
+ 		       sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR);
+ 		writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL);
+-		if ((host->req->io_type == MEMSTICK_IO_SG) && !host->no_dma)
++		if (host->use_dma)
+ 			tifm_unmap_sg(sock, &host->req->sg, 1,
+ 				      host->req->data_dir == READ
+ 				      ? PCI_DMA_TODEVICE
+@@ -617,10 +611,6 @@ static void tifm_ms_remove(struct tifm_dev *sock)
+ 	spin_unlock_irqrestore(&sock->lock, flags);
+ 
+ 	memstick_remove_host(msh);
+-
+-	writel(0x0200 | TIFM_MS_SYS_NOT_RDY, sock->addr + SOCK_MS_SYSTEM);
+-	writel(0xffffffff, sock->addr + SOCK_MS_STATUS);
+-
+ 	memstick_free_host(msh);
+ }
+ 
+@@ -628,17 +618,17 @@ static void tifm_ms_remove(struct tifm_dev *sock)
+ 
+ static int tifm_ms_suspend(struct tifm_dev *sock, pm_message_t state)
+ {
++	struct memstick_host *msh = tifm_get_drvdata(sock);
++
++	memstick_suspend_host(msh);
+ 	return 0;
+ }
+ 
+ static int tifm_ms_resume(struct tifm_dev *sock)
+ {
+ 	struct memstick_host *msh = tifm_get_drvdata(sock);
+-	struct tifm_ms *host = memstick_priv(msh);
+-
+-	tifm_ms_initialize_host(host);
+-	memstick_detect_change(msh);
+ 
++	memstick_resume_host(msh);
+ 	return 0;
+ }
+ 
+@@ -679,7 +669,6 @@ MODULE_AUTHOR("Alex Dubov");
+ MODULE_DESCRIPTION("TI FlashMedia MemoryStick driver");
+ MODULE_LICENSE("GPL");
+ MODULE_DEVICE_TABLE(tifm, tifm_ms_id_tbl);
+-MODULE_VERSION(DRIVER_VERSION);
+ 
+ module_init(tifm_ms_init);
+ module_exit(tifm_ms_exit);
+diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c
+index 63a089b..67503ea 100644
+--- a/drivers/misc/tifm_7xx1.c
++++ b/drivers/misc/tifm_7xx1.c
+@@ -368,6 +368,8 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
+ 		goto err_out_irq;
+ 
+ 	writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1),
++	       fm->addr + FM_CLEAR_INTERRUPT_ENABLE);
++	writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1),
+ 	       fm->addr + FM_SET_INTERRUPT_ENABLE);
+ 	return 0;
+ 
+diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
+index a0f0e60..fe7b5ec 100644
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
+@@ -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.
+diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c
+index 5136d94..b144863 100644
+--- a/drivers/net/ac3200.c
++++ b/drivers/net/ac3200.c
+@@ -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 */
+diff --git a/drivers/net/apne.c b/drivers/net/apne.c
+index c12cbdf..47a8275 100644
+--- a/drivers/net/apne.c
++++ b/drivers/net/apne.c
+@@ -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)
+diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c
+index 6ab2c2d..fef5560 100644
+--- a/drivers/net/appletalk/ltpc.c
++++ b/drivers/net/appletalk/ltpc.c
+@@ -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)
+diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
+index cc4610d..02cb8f1 100644
+--- a/drivers/net/arcnet/capmode.c
++++ b/drivers/net/arcnet/capmode.c
+@@ -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 */
+diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c
+index b74dbee..13c293b 100644
+--- a/drivers/net/atarilance.c
++++ b/drivers/net/atarilance.c
+@@ -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;
+diff --git a/drivers/net/e100.c b/drivers/net/e100.c
+index 36ba6dc..cdf3090 100644
+--- a/drivers/net/e100.c
++++ b/drivers/net/e100.c
+@@ -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  -------------- */
+diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
+index 0809a6a..46a90e9 100644
+--- a/drivers/net/enc28j60.c
++++ b/drivers/net/enc28j60.c
+@@ -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));
+diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
+index 23d0a4a..c2095ce 100644
+--- a/drivers/net/ixgbe/ixgbe_main.c
++++ b/drivers/net/ixgbe/ixgbe_main.c
+@@ -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"))));
+diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
+index b528ce7..771139e 100644
+--- a/drivers/net/mv643xx_eth.c
++++ b/drivers/net/mv643xx_eth.c
+@@ -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.
+diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
+index e8a63e4..ce95c5d 100644
+--- a/drivers/net/pcmcia/axnet_cs.c
++++ b/drivers/net/pcmcia/axnet_cs.c
+@@ -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) 
+diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
+index f4ca059..3ac8529 100644
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
+@@ -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.
+diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c
+index 7ed632d..d926168 100644
+--- a/drivers/net/phy/davicom.c
++++ b/drivers/net/phy/davicom.c
+@@ -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;
+ 
+diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
+index 86e5dba..3d10ca0 100644
+--- a/drivers/net/pppol2tp.c
++++ b/drivers/net/pppol2tp.c
+@@ -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;
+ }
+diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
+index 6179a0a..c72787a 100644
+--- a/drivers/net/s2io.c
++++ b/drivers/net/s2io.c
+@@ -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;
+diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
+index 77d9dd7..567c627 100644
+--- a/drivers/net/tulip/de2104x.c
++++ b/drivers/net/tulip/de2104x.c
+@@ -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);
+diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
+index 15d5c58..e59255a 100644
+--- a/drivers/net/wan/sbni.c
++++ b/drivers/net/wan/sbni.c
+@@ -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
+diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
+index bdc6a1c..f0ef708 100644
+--- a/drivers/net/wireless/libertas/cmdresp.c
++++ b/drivers/net/wireless/libertas/cmdresp.c
+@@ -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;
+diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
+index e808db9..93ea212 100644
+--- a/drivers/net/wireless/rt2x00/rt61pci.c
++++ b/drivers/net/wireless/rt2x00/rt61pci.c
+@@ -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;
+diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
+index 4fac2d4..8103d41 100644
+--- a/drivers/net/wireless/rt2x00/rt73usb.c
++++ b/drivers/net/wireless/rt2x00/rt73usb.c
+@@ -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 */
+diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
+index 600ed7b..bbccde9 100644
+--- a/drivers/pci/hotplug/ibmphp_ebda.c
++++ b/drivers/pci/hotplug/ibmphp_ebda.c
+@@ -963,6 +963,7 @@ static int __init ebda_rsrc_controller (void)
+ 
+ 			bus_info_ptr1 = ibmphp_find_same_bus_num (hpc_ptr->slots[index].slot_bus_num);
+ 			if (!bus_info_ptr1) {
++				kfree(tmp_slot);
+ 				rc = -ENODEV;
+ 				goto error;
+ 			}
+diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
+index 4065139..3799320 100644
+--- a/drivers/pnp/quirks.c
++++ b/drivers/pnp/quirks.c
+@@ -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},
+ 	{""}
+ };
+ 
+diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
+index a64d858..c0e50a4 100644
+--- a/drivers/serial/of_serial.c
++++ b/drivers/serial/of_serial.c
+@@ -138,7 +138,7 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = {
+ 	{ /* end of list */ },
+ };
+ 
+-static struct of_platform_driver __devinitdata of_platform_serial_driver = {
++static struct of_platform_driver of_platform_serial_driver = {
+ 	.owner = THIS_MODULE,
+ 	.name = "of_serial",
+ 	.probe = of_platform_serial_probe,
+diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
+index c139551..6f45dd6 100644
+--- a/drivers/usb/gadget/Kconfig
++++ b/drivers/usb/gadget/Kconfig
+@@ -131,7 +131,7 @@ config USB_ATMEL_USBA
+ 
+ config USB_GADGET_FSL_USB2
+ 	boolean "Freescale Highspeed USB DR Peripheral Controller"
+-	depends on MPC834x || PPC_MPC831x
++	depends on FSL_SOC
+ 	select USB_GADGET_DUALSPEED
+ 	help
+ 	   Some of Freescale PowerPC processors have a High Speed
+diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
+index b8ad55a..46ee7f4 100644
+--- a/drivers/usb/host/ehci-hcd.c
++++ b/drivers/usb/host/ehci-hcd.c
+@@ -281,23 +281,44 @@ static void ehci_iaa_watchdog(unsigned long param)
+ {
+ 	struct ehci_hcd		*ehci = (struct ehci_hcd *) param;
+ 	unsigned long		flags;
+-	u32			status, cmd;
+ 
+ 	spin_lock_irqsave (&ehci->lock, flags);
+-	WARN_ON(!ehci->reclaim);
+ 
+-	status = ehci_readl(ehci, &ehci->regs->status);
+-	cmd = ehci_readl(ehci, &ehci->regs->command);
+-	ehci_dbg(ehci, "IAA watchdog: status %x cmd %x\n", status, cmd);
+-
+-	/* lost IAA irqs wedge things badly; seen first with a vt8235 */
+-	if (ehci->reclaim) {
+-		if (status & STS_IAA) {
+-			ehci_vdbg (ehci, "lost IAA\n");
++	/* Lost IAA irqs wedge things badly; seen first with a vt8235.
++	 * So we need this watchdog, but must protect it against both
++	 * (a) SMP races against real IAA firing and retriggering, and
++	 * (b) clean HC shutdown, when IAA watchdog was pending.
++	 */
++	if (ehci->reclaim
++			&& !timer_pending(&ehci->iaa_watchdog)
++			&& HC_IS_RUNNING(ehci_to_hcd(ehci)->state)) {
++		u32 cmd, status;
++
++		/* If we get here, IAA is *REALLY* late.  It's barely
++		 * conceivable that the system is so busy that CMD_IAAD
++		 * is still legitimately set, so let's be sure it's
++		 * clear before we read STS_IAA.  (The HC should clear
++		 * CMD_IAAD when it sets STS_IAA.)
++		 */
++		cmd = ehci_readl(ehci, &ehci->regs->command);
++		if (cmd & CMD_IAAD)
++			ehci_writel(ehci, cmd & ~CMD_IAAD,
++					&ehci->regs->command);
++
++		/* If IAA is set here it either legitimately triggered
++		 * before we cleared IAAD above (but _way_ late, so we'll
++		 * still count it as lost) ... or a silicon erratum:
++		 * - VIA seems to set IAA without triggering the IRQ;
++		 * - IAAD potentially cleared without setting IAA.
++		 */
++		status = ehci_readl(ehci, &ehci->regs->status);
++		if ((status & STS_IAA) || !(cmd & CMD_IAAD)) {
+ 			COUNT (ehci->stats.lost_iaa);
+ 			ehci_writel(ehci, STS_IAA, &ehci->regs->status);
+ 		}
+-		ehci_writel(ehci, cmd & ~CMD_IAAD, &ehci->regs->command);
++
++		ehci_vdbg(ehci, "IAA watchdog: status %x cmd %x\n",
++				status, cmd);
+ 		end_unlink_async(ehci);
+ 	}
+ 
+@@ -631,7 +652,7 @@ static int ehci_run (struct usb_hcd *hcd)
+ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
+ {
+ 	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
+-	u32			status, pcd_status = 0;
++	u32			status, pcd_status = 0, cmd;
+ 	int			bh;
+ 
+ 	spin_lock (&ehci->lock);
+@@ -652,7 +673,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
+ 
+ 	/* clear (just) interrupts */
+ 	ehci_writel(ehci, status, &ehci->regs->status);
+-	ehci_readl(ehci, &ehci->regs->command);	/* unblock posted write */
++	cmd = ehci_readl(ehci, &ehci->regs->command);
+ 	bh = 0;
+ 
+ #ifdef	EHCI_VERBOSE_DEBUG
+@@ -673,8 +694,17 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
+ 
+ 	/* complete the unlinking of some qh [4.15.2.3] */
+ 	if (status & STS_IAA) {
+-		COUNT (ehci->stats.reclaim);
+-		end_unlink_async(ehci);
++		/* guard against (alleged) silicon errata */
++		if (cmd & CMD_IAAD) {
++			ehci_writel(ehci, cmd & ~CMD_IAAD,
++					&ehci->regs->command);
++			ehci_dbg(ehci, "IAA with IAAD still set?\n");
++		}
++		if (ehci->reclaim) {
++			COUNT(ehci->stats.reclaim);
++			end_unlink_async(ehci);
++		} else
++			ehci_dbg(ehci, "IAA with nothing to reclaim?\n");
+ 	}
+ 
+ 	/* remote wakeup [4.3.1] */
+@@ -781,7 +811,7 @@ static int ehci_urb_enqueue (
+ static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
+ {
+ 	/* failfast */
+-	if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state))
++	if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) && ehci->reclaim)
+ 		end_unlink_async(ehci);
+ 
+ 	/* if it's not linked then there's nothing to do */
+diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
+index 08c65c1..779d078 100644
+--- a/drivers/usb/serial/cypress_m8.c
++++ b/drivers/usb/serial/cypress_m8.c
+@@ -94,6 +94,7 @@ static struct usb_device_id id_table_earthmate [] = {
+ 
+ static struct usb_device_id id_table_cyphidcomrs232 [] = {
+ 	{ USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
++	{ USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
+ 	{ }						/* Terminating entry */
+ };
+ 
+@@ -106,6 +107,7 @@ static struct usb_device_id id_table_combined [] = {
+ 	{ USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) },
+ 	{ USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) },
+ 	{ USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) },
++	{ USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) },
+ 	{ USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) },
+ 	{ }						/* Terminating entry */
+ };
+diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h
+index e1c7c27..0388065 100644
+--- a/drivers/usb/serial/cypress_m8.h
++++ b/drivers/usb/serial/cypress_m8.h
+@@ -19,6 +19,10 @@
+ #define VENDOR_ID_CYPRESS		 0x04b4
+ #define PRODUCT_ID_CYPHIDCOM		 0x5500
+ 
++/* Powercom UPS, chip CY7C63723 */
++#define VENDOR_ID_POWERCOM		 0x0d9f
++#define PRODUCT_ID_UPS			 0x0002
++
+ /* Nokia CA-42 USB to serial cable */
+ #define VENDOR_ID_DAZZLE		0x07d0
+ #define PRODUCT_ID_CA42			0x4101
+diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
+index 91dc433..3abb3c8 100644
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -359,6 +359,7 @@ static struct usb_device_id id_table_combined [] = {
+ 	{ USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) },
+ 	{ USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
+ 	{ USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) },
++	{ USB_DEVICE(FTDI_VID, FTDI_PROPOX_JTAGCABLEII_PID) },
+ 	{ USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
+ 		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+ 	{ USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID),
+diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
+index e1eb742..6da539e 100644
+--- a/drivers/usb/serial/ftdi_sio.h
++++ b/drivers/usb/serial/ftdi_sio.h
+@@ -557,6 +557,9 @@
+ #define TML_VID			0x1B91	/* Vendor ID */
+ #define TML_USB_SERIAL_PID	0x0064	/* USB - Serial Converter */
+ 
++/* Propox devices */
++#define FTDI_PROPOX_JTAGCABLEII_PID	0xD738
++
+ /* Commands */
+ #define FTDI_SIO_RESET 		0 /* Reset the port */
+ #define FTDI_SIO_MODEM_CTRL 	1 /* Set the modem control register */
+diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
+index 97fa3c4..7cfce9d 100644
+--- a/drivers/usb/serial/generic.c
++++ b/drivers/usb/serial/generic.c
+@@ -323,7 +323,7 @@ static void flush_and_resubmit_read_urb (struct usb_serial_port *port)
+ 		room = tty_buffer_request_room(tty, urb->actual_length);
+ 		if (room) {
+ 			tty_insert_flip_string(tty, urb->transfer_buffer, room);
+-			tty_flip_buffer_push(tty); /* is this allowed from an URB callback ? */
++			tty_flip_buffer_push(tty);
+ 		}
+ 	}
+ 
+@@ -349,10 +349,12 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb)
+ 
+ 	/* Throttle the device if requested by tty */
+ 	spin_lock_irqsave(&port->lock, flags);
+-	if (!(port->throttled = port->throttle_req))
+-		/* Handle data and continue reading from device */
++	if (!(port->throttled = port->throttle_req)) {
++		spin_unlock_irqrestore(&port->lock, flags);
+ 		flush_and_resubmit_read_urb(port);
+-	spin_unlock_irqrestore(&port->lock, flags);
++	} else {
++		spin_unlock_irqrestore(&port->lock, flags);
++	}
+ }
+ EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback);
+ 
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
+index 828a437..a396fbb 100644
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -111,6 +111,42 @@ static int  option_send_setup(struct usb_serial_port *port);
+ #define HUAWEI_PRODUCT_E220BIS			0x1004
+ 
+ #define NOVATELWIRELESS_VENDOR_ID		0x1410
++
++/* MERLIN EVDO PRODUCTS */
++#define NOVATELWIRELESS_PRODUCT_V640		0x1100
++#define NOVATELWIRELESS_PRODUCT_V620		0x1110
++#define NOVATELWIRELESS_PRODUCT_V740		0x1120
++#define NOVATELWIRELESS_PRODUCT_V720		0x1130
++
++/* MERLIN HSDPA/HSPA PRODUCTS */
++#define NOVATELWIRELESS_PRODUCT_U730		0x1400
++#define NOVATELWIRELESS_PRODUCT_U740		0x1410
++#define NOVATELWIRELESS_PRODUCT_U870		0x1420
++#define NOVATELWIRELESS_PRODUCT_XU870		0x1430
++#define NOVATELWIRELESS_PRODUCT_X950D		0x1450
++
++/* EXPEDITE PRODUCTS */
++#define NOVATELWIRELESS_PRODUCT_EV620		0x2100
++#define NOVATELWIRELESS_PRODUCT_ES720		0x2110
++#define NOVATELWIRELESS_PRODUCT_E725		0x2120
++#define NOVATELWIRELESS_PRODUCT_EU730		0x2400
++#define NOVATELWIRELESS_PRODUCT_EU740		0x2410
++#define NOVATELWIRELESS_PRODUCT_EU870D		0x2420
++
++/* OVATION PRODUCTS */
++#define NOVATELWIRELESS_PRODUCT_MC727		0x4100
++#define NOVATELWIRELESS_PRODUCT_MC950D		0x4400
++
++/* FUTURE NOVATEL PRODUCTS */
++#define NOVATELWIRELESS_PRODUCT_EVDO_1		0x6000
++#define NOVATELWIRELESS_PRODUCT_HSPA_1		0x7000
++#define NOVATELWIRELESS_PRODUCT_EMBEDDED_1	0x8000
++#define NOVATELWIRELESS_PRODUCT_GLOBAL_1	0x9000
++#define NOVATELWIRELESS_PRODUCT_EVDO_2		0x6001
++#define NOVATELWIRELESS_PRODUCT_HSPA_2		0x7001
++#define NOVATELWIRELESS_PRODUCT_EMBEDDED_2	0x8001
++#define NOVATELWIRELESS_PRODUCT_GLOBAL_2	0x9001
++
+ #define DELL_VENDOR_ID				0x413C
+ 
+ #define KYOCERA_VENDOR_ID			0x0c88
+@@ -168,21 +204,34 @@ static struct usb_device_id option_ids[] = {
+ 	{ USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
+ 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) },
+ 	{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1130) }, /* Novatel Merlin S720 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1400) }, /* Novatel U730 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1410) }, /* Novatel U740 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1420) }, /* Novatel EU870 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2100) }, /* Novatel EV620 CDMA/EV-DO */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, /* Novatel Merlin EX720/V740/X720 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V720) }, /* Novatel Merlin V720/S720/PC720 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U730) }, /* Novatel U730/U740 (VF version) */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U740) }, /* Novatel U740 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U870) }, /* Novatel U870 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_XU870) }, /* Novatel Merlin XU870 HSDPA/3G */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_X950D) }, /* Novatel X950D */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) }, /* Novatel EV620/ES620 CDMA/EV-DO */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) }, /* Novatel ES620/ES720/U720/USB720 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) }, /* Novatel E725/E726 */
+ 	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4100) }, /* Novatel U727 */
+-	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4400) }, /* Novatel MC950 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) }, /* Novatel EU730 and Vodafone EU740 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) }, /* Novatel non-Vodafone EU740 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */
+ 	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_1) }, /* Novatel Global product */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_2) }, /* Novatel EVDO product */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_2) }, /* Novatel HSPA product */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */
++	{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */
++
+ 	{ USB_DEVICE(DELL_VENDOR_ID, 0x8114) },	/* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */
+ 	{ USB_DEVICE(DELL_VENDOR_ID, 0x8115) },	/* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
+ 	{ USB_DEVICE(DELL_VENDOR_ID, 0x8116) },	/* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */
+diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
+index d43a341..6d14327 100644
+--- a/drivers/usb/storage/sddr55.c
++++ b/drivers/usb/storage/sddr55.c
+@@ -522,8 +522,8 @@ int sddr55_reset(struct us_data *us) {
+ 
+ static unsigned long sddr55_get_capacity(struct us_data *us) {
+ 
+-	unsigned char manufacturerID;
+-	unsigned char deviceID;
++	unsigned char uninitialized_var(manufacturerID);
++	unsigned char uninitialized_var(deviceID);
+ 	int result;
+ 	struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
+ 
+diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
+index 758435f..e0b0580 100644
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -553,6 +553,19 @@ config FB_BF54X_LQ043
+ 	help
+ 	 This is the framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD
+ 
++config FB_BFIN_T350MCQB
++	tristate "Varitronix COG-T350MCQB TFT LCD display (BF527 EZKIT)"
++	depends on FB && BLACKFIN
++	select BFIN_GPTIMERS
++	select FB_CFB_FILLRECT
++	select FB_CFB_COPYAREA
++	select FB_CFB_IMAGEBLIT
++	help
++	 This is the framebuffer device driver for a Varitronix VL-PS-COG-T350MCQB-01 display TFT LCD
++	 This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI
++	 It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK.
++
++
+ config FB_STI
+ 	tristate "HP STI frame buffer device support"
+ 	depends on FB && PARISC
+diff --git a/drivers/video/Makefile b/drivers/video/Makefile
+index 83e02b3..03371c7 100644
+--- a/drivers/video/Makefile
++++ b/drivers/video/Makefile
+@@ -122,6 +122,7 @@ obj-$(CONFIG_FB_EFI)              += efifb.o
+ obj-$(CONFIG_FB_VGA16)            += vga16fb.o
+ obj-$(CONFIG_FB_OF)               += offb.o
+ obj-$(CONFIG_FB_BF54X_LQ043)	  += bf54x-lq043fb.o
++obj-$(CONFIG_FB_BFIN_T350MCQB)	  += bfin-t350mcqb-fb.o
+ 
+ # the test framebuffer is last
+ obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
+diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
+index 0ce791e..986a550 100644
+--- a/drivers/video/bf54x-lq043fb.c
++++ b/drivers/video/bf54x-lq043fb.c
+@@ -8,7 +8,7 @@
+  *
+  *
+  * Modified:
+- *               Copyright 2004-2007 Analog Devices Inc.
++ *               Copyright 2007-2008 Analog Devices Inc.
+  *
+  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
+  *
+@@ -241,7 +241,7 @@ static int request_ports(struct bfin_bf54xfb_info *fbi)
+ 	u16 eppi_req_18[] = EPPI0_18;
+ 	u16 disp = fbi->mach_info->disp;
+ 
+-	if (gpio_request(disp, NULL)) {
++	if (gpio_request(disp, DRIVER_NAME)) {
+ 		printk(KERN_ERR "Requesting GPIO %d faild\n", disp);
+ 		return -EFAULT;
+ 	}
+@@ -672,7 +672,7 @@ static int __init bfin_bf54x_probe(struct platform_device *pdev)
+ 				      &bfin_lq043fb_bl_ops);
+ 	bl_dev->props.max_brightness = 255;
+ 
+-	lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops);
++	lcd_dev = lcd_device_register(DRIVER_NAME, &pdev->dev, NULL, &bfin_lcd_ops);
+ 	lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n");
+ #endif
+ 
+diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
+new file mode 100644
+index 0000000..a2bb2de
+--- /dev/null
++++ b/drivers/video/bfin-t350mcqb-fb.c
+@@ -0,0 +1,685 @@
++/*
++ * File:         drivers/video/bfin-t350mcqb-fb.c
++ * Based on:
++ * Author:       Michael Hennerich <hennerich at blackfin.uclinux.org>
++ *
++ * Created:
++ * Description:  Blackfin LCD Framebufer driver
++ *
++ *
++ * Modified:
++ *               Copyright 2004-2007 Analog Devices Inc.
++ *
++ * Bugs:         Enter bugs at http://blackfin.uclinux.org/
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, see the file COPYING, or write
++ * to the Free Software Foundation, Inc.,
++ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ */
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/errno.h>
++#include <linux/string.h>
++#include <linux/fb.h>
++#include <linux/init.h>
++#include <linux/types.h>
++#include <linux/interrupt.h>
++#include <linux/device.h>
++#include <linux/backlight.h>
++#include <linux/lcd.h>
++#include <linux/dma-mapping.h>
++#include <linux/platform_device.h>
++
++#include <asm/blackfin.h>
++#include <asm/irq.h>
++#include <asm/dma-mapping.h>
++#include <asm/dma.h>
++#include <asm/portmux.h>
++#include <asm/gptimers.h>
++
++#define NO_BL_SUPPORT
++
++#define LCD_X_RES		320	/* Horizontal Resolution */
++#define LCD_Y_RES		240	/* Vertical Resolution */
++#define LCD_BPP			24	/* Bit Per Pixel */
++
++#define	DMA_BUS_SIZE		16
++#define	LCD_CLK         	(12*1000*1000)	/* 12MHz */
++
++#define CLOCKS_PER_PIX		3
++
++	/*
++	 * HS and VS timing parameters (all in number of PPI clk ticks)
++	 */
++
++#define U_LINE		1				/* Blanking Lines */
++
++#define H_ACTPIX	(LCD_X_RES * CLOCKS_PER_PIX)	/* active horizontal pixel */
++#define H_PERIOD	(408 * CLOCKS_PER_PIX)		/* HS period */
++#define H_PULSE		90				/* HS pulse width */
++#define H_START		204				/* first valid pixel */
++
++#define	V_LINES		(LCD_Y_RES + U_LINE)		/* total vertical lines */
++#define V_PULSE		(3 * H_PERIOD)			/* VS pulse width (1-5 H_PERIODs) */
++#define V_PERIOD	(H_PERIOD * V_LINES)		/* VS period */
++
++#define ACTIVE_VIDEO_MEM_OFFSET	(U_LINE * H_ACTPIX)
++
++#define BFIN_LCD_NBR_PALETTE_ENTRIES	256
++
++#define DRIVER_NAME "bfin-t350mcqb"
++static char driver_name[] = DRIVER_NAME;
++
++struct bfin_t350mcqbfb_info {
++	struct fb_info *fb;
++	struct device *dev;
++	unsigned char *fb_buffer;	/* RGB Buffer */
++	dma_addr_t dma_handle;
++	int lq043_mmap;
++	int lq043_open_cnt;
++	int irq;
++	spinlock_t lock;	/* lock */
++};
++
++static int nocursor;
++module_param(nocursor, int, 0644);
++MODULE_PARM_DESC(nocursor, "cursor enable/disable");
++
++#define PPI_TX_MODE		0x2
++#define PPI_XFER_TYPE_11	0xC
++#define PPI_PORT_CFG_01		0x10
++#define PPI_PACK_EN		0x80
++#define PPI_POLS_1		0x8000
++
++static void bfin_t350mcqb_config_ppi(struct bfin_t350mcqbfb_info *fbi)
++{
++	bfin_write_PPI_DELAY(H_START);
++	bfin_write_PPI_COUNT(H_ACTPIX-1);
++	bfin_write_PPI_FRAME(V_LINES);
++
++	bfin_write_PPI_CONTROL(PPI_TX_MODE |	   /* output mode , PORT_DIR */
++				PPI_XFER_TYPE_11 | /* sync mode XFR_TYPE */
++				PPI_PORT_CFG_01 |  /* two frame sync PORT_CFG */
++				PPI_PACK_EN |	   /* packing enabled PACK_EN */
++				PPI_POLS_1);	   /* faling edge syncs POLS */
++}
++
++static inline void bfin_t350mcqb_disable_ppi(void)
++{
++	bfin_write_PPI_CONTROL(bfin_read_PPI_CONTROL() & ~PORT_EN);
++}
++
++static inline void bfin_t350mcqb_enable_ppi(void)
++{
++	bfin_write_PPI_CONTROL(bfin_read_PPI_CONTROL() | PORT_EN);
++}
++
++static void bfin_t350mcqb_start_timers(void)
++{
++	unsigned long flags;
++
++	local_irq_save(flags);
++		enable_gptimers(TIMER1bit);
++		enable_gptimers(TIMER0bit);
++	local_irq_restore(flags);
++}
++
++static void bfin_t350mcqb_stop_timers(void)
++{
++	disable_gptimers(TIMER0bit | TIMER1bit);
++
++	set_gptimer_status(0, TIMER_STATUS_TRUN0 | TIMER_STATUS_TRUN1 |
++				TIMER_STATUS_TIMIL0 | TIMER_STATUS_TIMIL1 |
++				 TIMER_STATUS_TOVF0 | TIMER_STATUS_TOVF1);
++
++}
++
++static void bfin_t350mcqb_init_timers(void)
++{
++
++	bfin_t350mcqb_stop_timers();
++
++	set_gptimer_period(TIMER0_id, H_PERIOD);
++	set_gptimer_pwidth(TIMER0_id, H_PULSE);
++	set_gptimer_config(TIMER0_id, TIMER_MODE_PWM | TIMER_PERIOD_CNT |
++				      TIMER_TIN_SEL | TIMER_CLK_SEL|
++				      TIMER_EMU_RUN);
++
++	set_gptimer_period(TIMER1_id, V_PERIOD);
++	set_gptimer_pwidth(TIMER1_id, V_PULSE);
++	set_gptimer_config(TIMER1_id, TIMER_MODE_PWM | TIMER_PERIOD_CNT |
++				      TIMER_TIN_SEL | TIMER_CLK_SEL |
++				      TIMER_EMU_RUN);
++
++}
++
++static void bfin_t350mcqb_config_dma(struct bfin_t350mcqbfb_info *fbi)
++{
++
++	set_dma_config(CH_PPI,
++		       set_bfin_dma_config(DIR_READ, DMA_FLOW_AUTO,
++					   INTR_DISABLE, DIMENSION_2D,
++					   DATA_SIZE_16,
++					   DMA_NOSYNC_KEEP_DMA_BUF));
++	set_dma_x_count(CH_PPI, (LCD_X_RES * LCD_BPP) / DMA_BUS_SIZE);
++	set_dma_x_modify(CH_PPI, DMA_BUS_SIZE / 8);
++	set_dma_y_count(CH_PPI, V_LINES);
++
++	set_dma_y_modify(CH_PPI, DMA_BUS_SIZE / 8);
++	set_dma_start_addr(CH_PPI, (unsigned long)fbi->fb_buffer);
++
++}
++
++static int bfin_t350mcqb_request_ports(int action)
++{
++	u16 ppi0_req_8[] = {P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
++			    P_PPI0_D0, P_PPI0_D1, P_PPI0_D2,
++			    P_PPI0_D3, P_PPI0_D4, P_PPI0_D5,
++			    P_PPI0_D6, P_PPI0_D7, 0};
++
++	if (action) {
++		if (peripheral_request_list(ppi0_req_8, DRIVER_NAME)) {
++			printk(KERN_ERR "Requesting Peripherals faild\n");
++			return -EFAULT;
++		}
++	} else
++		peripheral_free_list(ppi0_req_8);
++
++	return 0;
++}
++
++static int bfin_t350mcqb_fb_open(struct fb_info *info, int user)
++{
++	struct bfin_t350mcqbfb_info *fbi = info->par;
++
++	spin_lock(&fbi->lock);
++	fbi->lq043_open_cnt++;
++
++	if (fbi->lq043_open_cnt <= 1) {
++
++		bfin_t350mcqb_disable_ppi();
++		SSYNC();
++
++		bfin_t350mcqb_config_dma(fbi);
++		bfin_t350mcqb_config_ppi(fbi);
++		bfin_t350mcqb_init_timers();
++
++		/* start dma */
++		enable_dma(CH_PPI);
++		bfin_t350mcqb_enable_ppi();
++		bfin_t350mcqb_start_timers();
++	}
++
++	spin_unlock(&fbi->lock);
++
++	return 0;
++}
++
++static int bfin_t350mcqb_fb_release(struct fb_info *info, int user)
++{
++	struct bfin_t350mcqbfb_info *fbi = info->par;
++
++	spin_lock(&fbi->lock);
++
++	fbi->lq043_open_cnt--;
++	fbi->lq043_mmap = 0;
++
++	if (fbi->lq043_open_cnt <= 0) {
++		bfin_t350mcqb_disable_ppi();
++		SSYNC();
++		disable_dma(CH_PPI);
++		bfin_t350mcqb_stop_timers();
++		memset(fbi->fb_buffer, 0, info->fix.smem_len);
++	}
++
++	spin_unlock(&fbi->lock);
++
++	return 0;
++}
++
++static int bfin_t350mcqb_fb_check_var(struct fb_var_screeninfo *var,
++				   struct fb_info *info)
++{
++
++	if (var->bits_per_pixel != LCD_BPP) {
++		pr_debug("%s: depth not supported: %u BPP\n", __FUNCTION__,
++			 var->bits_per_pixel);
++		return -EINVAL;
++	}
++
++	if (info->var.xres != var->xres || info->var.yres != var->yres ||
++	    info->var.xres_virtual != var->xres_virtual ||
++	    info->var.yres_virtual != var->yres_virtual) {
++		pr_debug("%s: Resolution not supported: X%u x Y%u \n",
++			 __FUNCTION__, var->xres, var->yres);
++		return -EINVAL;
++	}
++
++	/*
++	 *  Memory limit
++	 */
++
++	if ((info->fix.line_length * var->yres_virtual) > info->fix.smem_len) {
++		pr_debug("%s: Memory Limit requested yres_virtual = %u\n",
++			 __FUNCTION__, var->yres_virtual);
++		return -ENOMEM;
++	}
++
++	return 0;
++}
++
++static int bfin_t350mcqb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
++{
++	struct bfin_t350mcqbfb_info *fbi = info->par;
++
++	if (fbi->lq043_mmap)
++		return -1;
++
++	spin_lock(&fbi->lock);
++	fbi->lq043_mmap = 1;
++	spin_unlock(&fbi->lock);
++
++	vma->vm_start = (unsigned long)(fbi->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET);
++
++	vma->vm_end = vma->vm_start + info->fix.smem_len;
++	/* For those who don't understand how mmap works, go read
++	 *   Documentation/nommu-mmap.txt.
++	 * For those that do, you will know that the VM_MAYSHARE flag
++	 * must be set in the vma->vm_flags structure on noMMU
++	 *   Other flags can be set, and are documented in
++	 *   include/linux/mm.h
++	 */
++	vma->vm_flags |= VM_MAYSHARE;
++
++	return 0;
++}
++
++int bfin_t350mcqb_fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
++{
++	if (nocursor)
++		return 0;
++	else
++		return -EINVAL;	/* just to force soft_cursor() call */
++}
++
++static int bfin_t350mcqb_fb_setcolreg(u_int regno, u_int red, u_int green,
++				   u_int blue, u_int transp,
++				   struct fb_info *info)
++{
++	if (regno >= BFIN_LCD_NBR_PALETTE_ENTRIES)
++		return -EINVAL;
++
++	if (info->var.grayscale) {
++		/* grayscale = 0.30*R + 0.59*G + 0.11*B */
++		red = green = blue = (red * 77 + green * 151 + blue * 28) >> 8;
++	}
++
++	if (info->fix.visual == FB_VISUAL_TRUECOLOR) {
++
++		u32 value;
++		/* Place color in the pseudopalette */
++		if (regno > 16)
++			return -EINVAL;
++
++		red >>= (16 - info->var.red.length);
++		green >>= (16 - info->var.green.length);
++		blue >>= (16 - info->var.blue.length);
++
++		value = (red << info->var.red.offset) |
++		    (green << info->var.green.offset) |
++		    (blue << info->var.blue.offset);
++		value &= 0xFFFFFF;
++
++		((u32 *) (info->pseudo_palette))[regno] = value;
++
++	}
++
++	return 0;
++}
++
++static struct fb_ops bfin_t350mcqb_fb_ops = {
++	.owner = THIS_MODULE,
++	.fb_open = bfin_t350mcqb_fb_open,
++	.fb_release = bfin_t350mcqb_fb_release,
++	.fb_check_var = bfin_t350mcqb_fb_check_var,
++	.fb_fillrect = cfb_fillrect,
++	.fb_copyarea = cfb_copyarea,
++	.fb_imageblit = cfb_imageblit,
++	.fb_mmap = bfin_t350mcqb_fb_mmap,
++	.fb_cursor = bfin_t350mcqb_fb_cursor,
++	.fb_setcolreg = bfin_t350mcqb_fb_setcolreg,
++};
++
++#ifndef NO_BL_SUPPORT
++static int bl_get_brightness(struct backlight_device *bd)
++{
++	return 0;
++}
++
++static struct backlight_ops bfin_lq043fb_bl_ops = {
++	.get_brightness = bl_get_brightness,
++};
++
++static struct backlight_device *bl_dev;
++
++static int bfin_lcd_get_power(struct lcd_device *dev)
++{
++	return 0;
++}
++
++static int bfin_lcd_set_power(struct lcd_device *dev, int power)
++{
++	return 0;
++}
++
++static int bfin_lcd_get_contrast(struct lcd_device *dev)
++{
++	return 0;
++}
++
++static int bfin_lcd_set_contrast(struct lcd_device *dev, int contrast)
++{
++
++	return 0;
++}
++
++static int bfin_lcd_check_fb(struct fb_info *fi)
++{
++	if (!fi || (fi == &bfin_t350mcqb_fb))
++		return 1;
++	return 0;
++}
++
++static struct lcd_ops bfin_lcd_ops = {
++	.get_power = bfin_lcd_get_power,
++	.set_power = bfin_lcd_set_power,
++	.get_contrast = bfin_lcd_get_contrast,
++	.set_contrast = bfin_lcd_set_contrast,
++	.check_fb = bfin_lcd_check_fb,
++};
++
++static struct lcd_device *lcd_dev;
++#endif
++
++static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id)
++{
++	/*struct bfin_t350mcqbfb_info *info = (struct bfin_t350mcqbfb_info *)dev_id;*/
++
++	u16 status = bfin_read_PPI_STATUS();
++	bfin_write_PPI_STATUS(0xFFFF);
++
++	if (status) {
++		bfin_t350mcqb_disable_ppi();
++		disable_dma(CH_PPI);
++
++		/* start dma */
++		enable_dma(CH_PPI);
++		bfin_t350mcqb_enable_ppi();
++		bfin_write_PPI_STATUS(0xFFFF);
++	}
++
++	return IRQ_HANDLED;
++}
++
++static int __init bfin_t350mcqb_probe(struct platform_device *pdev)
++{
++	struct bfin_t350mcqbfb_info *info;
++	struct fb_info *fbinfo;
++	int ret;
++
++	printk(KERN_INFO DRIVER_NAME ": %dx%d %d-bit RGB FrameBuffer initializing...\n",
++					 LCD_X_RES, LCD_Y_RES, LCD_BPP);
++
++	if (request_dma(CH_PPI, "CH_PPI") < 0) {
++		printk(KERN_ERR DRIVER_NAME
++		       ": couldn't request CH_PPI DMA\n");
++		ret = -EFAULT;
++		goto out1;
++	}
++
++	fbinfo =
++	    framebuffer_alloc(sizeof(struct bfin_t350mcqbfb_info), &pdev->dev);
++	if (!fbinfo) {
++		ret = -ENOMEM;
++		goto out2;
++	}
++
++	info = fbinfo->par;
++	info->fb = fbinfo;
++	info->dev = &pdev->dev;
++
++	platform_set_drvdata(pdev, fbinfo);
++
++	strcpy(fbinfo->fix.id, driver_name);
++
++	fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
++	fbinfo->fix.type_aux = 0;
++	fbinfo->fix.xpanstep = 0;
++	fbinfo->fix.ypanstep = 0;
++	fbinfo->fix.ywrapstep = 0;
++	fbinfo->fix.accel = FB_ACCEL_NONE;
++	fbinfo->fix.visual = FB_VISUAL_TRUECOLOR;
++
++	fbinfo->var.nonstd = 0;
++	fbinfo->var.activate = FB_ACTIVATE_NOW;
++	fbinfo->var.height = -1;
++	fbinfo->var.width = -1;
++	fbinfo->var.accel_flags = 0;
++	fbinfo->var.vmode = FB_VMODE_NONINTERLACED;
++
++	fbinfo->var.xres = LCD_X_RES;
++	fbinfo->var.xres_virtual = LCD_X_RES;
++	fbinfo->var.yres = LCD_Y_RES;
++	fbinfo->var.yres_virtual = LCD_Y_RES;
++	fbinfo->var.bits_per_pixel = LCD_BPP;
++
++	fbinfo->var.red.offset = 0;
++	fbinfo->var.green.offset = 8;
++	fbinfo->var.blue.offset = 16;
++	fbinfo->var.transp.offset = 0;
++	fbinfo->var.red.length = 8;
++	fbinfo->var.green.length = 8;
++	fbinfo->var.blue.length = 8;
++	fbinfo->var.transp.length = 0;
++	fbinfo->fix.smem_len = LCD_X_RES * LCD_Y_RES * LCD_BPP / 8;
++
++	fbinfo->fix.line_length = fbinfo->var.xres_virtual *
++	    fbinfo->var.bits_per_pixel / 8;
++
++
++	fbinfo->fbops = &bfin_t350mcqb_fb_ops;
++	fbinfo->flags = FBINFO_FLAG_DEFAULT;
++
++	info->fb_buffer =
++	    dma_alloc_coherent(NULL, fbinfo->fix.smem_len, &info->dma_handle,
++			       GFP_KERNEL);
++
++	if (NULL == info->fb_buffer) {
++		printk(KERN_ERR DRIVER_NAME
++		       ": couldn't allocate dma buffer.\n");
++		ret = -ENOMEM;
++		goto out3;
++	}
++
++	memset(info->fb_buffer, 0, fbinfo->fix.smem_len);
++
++	fbinfo->screen_base = (void *)info->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET;
++	fbinfo->fix.smem_start = (int)info->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET;
++
++	fbinfo->fbops = &bfin_t350mcqb_fb_ops;
++
++	fbinfo->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL);
++	if (!fbinfo->pseudo_palette) {
++		printk(KERN_ERR DRIVER_NAME
++		       "Fail to allocate pseudo_palette\n");
++
++		ret = -ENOMEM;
++		goto out4;
++	}
++
++	memset(fbinfo->pseudo_palette, 0, sizeof(u32) * 16);
++
++	if (fb_alloc_cmap(&fbinfo->cmap, BFIN_LCD_NBR_PALETTE_ENTRIES, 0)
++	    < 0) {
++		printk(KERN_ERR DRIVER_NAME
++		       "Fail to allocate colormap (%d entries)\n",
++		       BFIN_LCD_NBR_PALETTE_ENTRIES);
++		ret = -EFAULT;
++		goto out5;
++	}
++
++	if (bfin_t350mcqb_request_ports(1)) {
++		printk(KERN_ERR DRIVER_NAME ": couldn't request gpio port.\n");
++		ret = -EFAULT;
++		goto out6;
++	}
++
++	info->irq = platform_get_irq(pdev, 0);
++	if (info->irq < 0) {
++		ret = -EINVAL;
++		goto out7;
++	}
++
++	if (request_irq(info->irq, (void *)bfin_t350mcqb_irq_error, IRQF_DISABLED,
++			"PPI ERROR", info) < 0) {
++		printk(KERN_ERR DRIVER_NAME
++		       ": unable to request PPI ERROR IRQ\n");
++		ret = -EFAULT;
++		goto out7;
++	}
++
++	if (register_framebuffer(fbinfo) < 0) {
++		printk(KERN_ERR DRIVER_NAME
++		       ": unable to register framebuffer.\n");
++		ret = -EINVAL;
++		goto out8;
++	}
++#ifndef NO_BL_SUPPORT
++	bl_dev =
++	    backlight_device_register("bf52x-bl", NULL, NULL,
++				      &bfin_lq043fb_bl_ops);
++	bl_dev->props.max_brightness = 255;
++
++	lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops);
++	lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n");
++#endif
++
++	return 0;
++
++out8:
++	free_irq(info->irq, info);
++out7:
++	bfin_t350mcqb_request_ports(0);
++out6:
++	fb_dealloc_cmap(&fbinfo->cmap);
++out5:
++	kfree(fbinfo->pseudo_palette);
++out4:
++	dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer,
++			  info->dma_handle);
++out3:
++	framebuffer_release(fbinfo);
++out2:
++	free_dma(CH_PPI);
++out1:
++	platform_set_drvdata(pdev, NULL);
++
++	return ret;
++}
++
++static int bfin_t350mcqb_remove(struct platform_device *pdev)
++{
++
++	struct fb_info *fbinfo = platform_get_drvdata(pdev);
++	struct bfin_t350mcqbfb_info *info = fbinfo->par;
++
++	free_dma(CH_PPI);
++	free_irq(info->irq, info);
++
++	if (info->fb_buffer != NULL)
++		dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer,
++				  info->dma_handle);
++
++	kfree(fbinfo->pseudo_palette);
++	fb_dealloc_cmap(&fbinfo->cmap);
++
++#ifndef NO_BL_SUPPORT
++	lcd_device_unregister(lcd_dev);
++	backlight_device_unregister(bl_dev);
++#endif
++
++	unregister_framebuffer(fbinfo);
++
++	bfin_t350mcqb_request_ports(0);
++
++	printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n");
++
++	return 0;
++}
++
++#ifdef CONFIG_PM
++static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state)
++{
++	struct fb_info *fbinfo = platform_get_drvdata(pdev);
++	struct bfin_t350mcqbfb_info *info = fbinfo->par;
++
++	bfin_t350mcqb_disable_ppi();
++	disable_dma(CH_PPI);
++	bfin_write_PPI_STATUS(0xFFFF);
++
++	return 0;
++}
++
++static int bfin_t350mcqb_resume(struct platform_device *pdev)
++{
++	struct fb_info *fbinfo = platform_get_drvdata(pdev);
++	struct bfin_t350mcqbfb_info *info = fbinfo->par;
++
++	enable_dma(CH_PPI);
++	bfin_t350mcqb_enable_ppi();
++
++	return 0;
++}
++#else
++#define bfin_t350mcqb_suspend	NULL
++#define bfin_t350mcqb_resume	NULL
++#endif
++
++static struct platform_driver bfin_t350mcqb_driver = {
++	.probe = bfin_t350mcqb_probe,
++	.remove = bfin_t350mcqb_remove,
++	.suspend = bfin_t350mcqb_suspend,
++	.resume = bfin_t350mcqb_resume,
++	.driver = {
++		   .name = DRIVER_NAME,
++		   .owner = THIS_MODULE,
++		   },
++};
++
++static int __devinit bfin_t350mcqb_driver_init(void)
++{
++	return platform_driver_register(&bfin_t350mcqb_driver);
++}
++
++static void __exit bfin_t350mcqb_driver_cleanup(void)
++{
++	platform_driver_unregister(&bfin_t350mcqb_driver);
++}
++
++MODULE_DESCRIPTION("Blackfin TFT LCD Driver");
++MODULE_LICENSE("GPL");
++
++module_init(bfin_t350mcqb_driver_init);
++module_exit(bfin_t350mcqb_driver_cleanup);
+diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c
+index 80cd117..01f77bc 100644
+--- a/drivers/video/mbx/mbxfb.c
++++ b/drivers/video/mbx/mbxfb.c
+@@ -889,7 +889,7 @@ static int __devinit mbxfb_probe(struct platform_device *dev)
+ 	struct mbxfb_info *mfbi;
+ 	struct mbxfb_platform_data *pdata;
+ 
+-	dev_dbg(dev, "mbxfb_probe\n");
++	dev_dbg(&dev->dev, "mbxfb_probe\n");
+ 
+ 	pdata = dev->dev.platform_data;
+ 	if (!pdata) {
+diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
+index e7c8db2..f98be30 100644
+--- a/drivers/video/stifb.c
++++ b/drivers/video/stifb.c
+@@ -505,16 +505,24 @@ ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber)
+ static void
+ rattlerSetupPlanes(struct stifb_info *fb)
+ {
++	int saved_id, y;
++
++ 	/* Write RAMDAC pixel read mask register so all overlay
++	 * planes are display-enabled.  (CRX24 uses Bt462 pixel
++	 * read mask register for overlay planes, not image planes).
++	 */
+ 	CRX24_SETUP_RAMDAC(fb);
+     
+-	/* replacement for: SETUP_FB(fb, CRX24_OVERLAY_PLANES); */
+-	WRITE_WORD(0x83000300, fb, REG_14);
+-	SETUP_HW(fb);
+-	WRITE_BYTE(1, fb, REG_16b1);
++	/* change fb->id temporarily to fool SETUP_FB() */
++	saved_id = fb->id;
++	fb->id = CRX24_OVERLAY_PLANES;
++	SETUP_FB(fb);
++	fb->id = saved_id;
++
++	for (y = 0; y < fb->info.var.yres; ++y)
++		memset(fb->info.screen_base + y * fb->info.fix.line_length,
++			0xff, fb->info.var.xres * fb->info.var.bits_per_pixel/8);
+ 
+-	fb_memset((void*)fb->info.fix.smem_start, 0xff,
+-		fb->info.var.yres*fb->info.fix.line_length);
+-    
+ 	CRX24_SET_OVLY_MASK(fb);
+ 	SETUP_FB(fb);
+ }
+diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
+index 919ce75..0a4e07d 100644
+--- a/drivers/video/tridentfb.c
++++ b/drivers/video/tridentfb.c
+@@ -566,44 +566,32 @@ static inline void write3CE(int reg, unsigned char val)
+ 
+ static void enable_mmio(void)
+ {
+-	unsigned char tmp;
+-
+ 	/* Goto New Mode */
+ 	outb(0x0B, 0x3C4);
+ 	inb(0x3C5);
+ 
+ 	/* Unprotect registers */
+ 	outb(NewMode1, 0x3C4);
+-	tmp = inb(0x3C5);
+ 	outb(0x80, 0x3C5);
+ 
+ 	/* Enable MMIO */
+ 	outb(PCIReg, 0x3D4);
+ 	outb(inb(0x3D5) | 0x01, 0x3D5);
+-
+-	t_outb(NewMode1, 0x3C4);
+-	t_outb(tmp, 0x3C5);
+ }
+ 
+ static void disable_mmio(void)
+ {
+-	unsigned char tmp;
+-
+ 	/* Goto New Mode */
+ 	t_outb(0x0B, 0x3C4);
+ 	t_inb(0x3C5);
+ 
+ 	/* Unprotect registers */
+ 	t_outb(NewMode1, 0x3C4);
+-	tmp = t_inb(0x3C5);
+ 	t_outb(0x80, 0x3C5);
+ 
+ 	/* Disable MMIO */
+ 	t_outb(PCIReg, 0x3D4);
+ 	t_outb(t_inb(0x3D5) & ~0x01, 0x3D5);
+-
+-	outb(NewMode1, 0x3C4);
+-	outb(tmp, 0x3C5);
+ }
+ 
+ #define crtc_unlock()	write3X4(CRTVSyncEnd, read3X4(CRTVSyncEnd) & 0x7F)
+@@ -757,7 +745,7 @@ static unsigned int __devinit get_memsize(void)
+ 			switch (tmp) {
+ 
+ 			case 0x01:
+-				k = 512;
++				k = 512 * Kb;
+ 				break;
+ 			case 0x02:
+ 				k = 6 * Mb;	/* XP */
+diff --git a/drivers/watchdog/cpu5wdt.c b/drivers/watchdog/cpu5wdt.c
+index 5941ca6..df72f90 100644
+--- a/drivers/watchdog/cpu5wdt.c
++++ b/drivers/watchdog/cpu5wdt.c
+@@ -59,9 +59,9 @@ static int ticks = 10000;
+ 
+ static struct {
+ 	struct completion stop;
+-	volatile int running;
++	int running;
+ 	struct timer_list timer;
+-	volatile int queue;
++	int queue;
+ 	int default_ticks;
+ 	unsigned long inuse;
+ } cpu5wdt_device;
+diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
+index a2e174b..6483d10 100644
+--- a/drivers/watchdog/hpwdt.c
++++ b/drivers/watchdog/hpwdt.c
+@@ -58,41 +58,6 @@ struct bios32_service_dir {
+ 	u8 reserved[5];
+ };
+ 
+-/*
+- * smbios_entry_point     - defines SMBIOS entry point structure
+- *
+- * anchor[4]              - anchor string (_SM_)
+- * checksum               - checksum of the entry point structure
+- * length                 - length of the entry point structure
+- * major_ver              - major version (02h for revision 2.1)
+- * minor_ver              - minor version (01h for revision 2.1)
+- * max_struct_size        - size of the largest SMBIOS structure
+- * revision               - entry point structure revision implemented
+- * formatted_area[5]      - reserved
+- * intermediate_anchor[5] - intermediate anchor string (_DMI_)
+- * intermediate_checksum  - intermediate checksum
+- * table_length           - structure table length
+- * table_address          - structure table address
+- * table_num_structs      - number of SMBIOS structures present
+- * bcd_revision           - BCD revision
+- */
+-struct smbios_entry_point {
+-	u8 anchor[4];
+-	u8 checksum;
+-	u8 length;
+-	u8 major_ver;
+-	u8 minor_ver;
+-	u16 max_struct_size;
+-	u8 revision;
+-	u8 formatted_area[5];
+-	u8 intermediate_anchor[5];
+-	u8 intermediate_checksum;
+-	u16 table_length;
+-	u64 table_address;
+-	u16 table_num_structs;
+-	u8 bcd_revision;
+-};
+-
+ /* type 212 */
+ struct smbios_cru64_info {
+ 	u8 type;
+@@ -175,31 +140,13 @@ static struct pci_device_id hpwdt_devices[] = {
+ };
+ MODULE_DEVICE_TABLE(pci, hpwdt_devices);
+ 
+-/*
+- *	bios_checksum
+- */
+-static int __devinit bios_checksum(const char __iomem *ptr, int len)
+-{
+-	char sum = 0;
+-	int i;
+-
+-	/*
+-	 * calculate checksum of size bytes. This should add up
+-	 * to zero if we have a valid header.
+-	 */
+-	for (i = 0; i < len; i++)
+-		sum += ptr[i];
+-
+-	return ((sum == 0) && (len > 0));
+-}
+-
+ #ifndef CONFIG_X86_64
+ /* --32 Bit Bios------------------------------------------------------------ */
+ 
+ #define HPWDT_ARCH	32
+ 
+-asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
+-			       unsigned long *pRomEntry)
++static void asminline_call(struct cmn_registers *pi86Regs,
++			   unsigned long *pRomEntry)
+ {
+ 	asm("pushl       %ebp               \n\t"
+ 	    "movl        %esp, %ebp         \n\t"
+@@ -303,6 +250,24 @@ static int __devinit cru_detect(unsigned long map_entry,
+ }
+ 
+ /*
++ *	bios_checksum
++ */
++static int __devinit bios_checksum(const char __iomem *ptr, int len)
++{
++	char sum = 0;
++	int i;
++
++	/*
++	 * calculate checksum of size bytes. This should add up
++	 * to zero if we have a valid header.
++	 */
++	for (i = 0; i < len; i++)
++		sum += ptr[i];
++
++	return ((sum == 0) && (len > 0));
++}
++
++/*
+  *	bios32_present
+  *
+  *	Routine Description:
+@@ -368,8 +333,8 @@ static int __devinit detect_cru_service(void)
+ 
+ #define HPWDT_ARCH	64
+ 
+-asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
+-			       unsigned long *pRomEntry)
++static void asminline_call(struct cmn_registers *pi86Regs,
++			   unsigned long *pRomEntry)
+ {
+ 	asm("pushq      %rbp            \n\t"
+ 	    "movq       %rsp, %rbp      \n\t"
+@@ -410,12 +375,8 @@ asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
+  *	dmi_find_cru
+  *
+  *	Routine Description:
+- *	This function checks wether or not a SMBIOS/DMI record is
++ *	This function checks whether or not a SMBIOS/DMI record is
+  *	the 64bit CRU info or not
+- *
+- *	Return Value:
+- *	0        :  SUCCESS - if record found
+- *	<0       :  FAILURE - if record not found
+  */
+ static void __devinit dmi_find_cru(const struct dmi_header *dm)
+ {
+@@ -434,138 +395,11 @@ static void __devinit dmi_find_cru(const struct dmi_header *dm)
+ 	}
+ }
+ 
+-/*
+- *	dmi_table
+- *
+- *	Routine Description:
+- *	Decode the SMBIOS/DMI table and check if we have a 64bit CRU record
+- *	or not.
+- *
+- *	We have to be cautious here. We have seen BIOSes with DMI pointers
+- *	pointing to completely the wrong place for example
+- */
+-static void __devinit dmi_table(u8 *buf, int len, int num,
+-		      void (*decode)(const struct dmi_header *))
+-{
+-	u8 *data = buf;
+-	int i = 0;
+-
+-	/*
+-	 *	Stop when we see all the items the table claimed to have
+-	 *	OR we run off the end of the table (also happens)
+-	 */
+-	while ((i < num) && (data - buf + sizeof(struct dmi_header)) <= len) {
+-		const struct dmi_header *dm = (const struct dmi_header *)data;
+-
+-		/*
+-		 *  We want to know the total length (formated area and strings)
+-		 *  before decoding to make sure we won't run off the table in
+-		 *  dmi_decode or dmi_string
+-		 */
+-		data += dm->length;
+-		while ((data - buf < len - 1) && (data[0] || data[1]))
+-			data++;
+-		if (data - buf < len - 1)
+-			decode(dm);
+-		data += 2;
+-		i++;
+-	}
+-}
+-
+-/*
+- *	smbios_present
+- *
+- *	Routine Description:
+- *	This function parses the SMBIOS entry point table to retrieve
+- *	the 64 bit CRU Service.
+- *
+- *	Return Value:
+- *	0        :  SUCCESS
+- *	<0       :  FAILURE
+- */
+-static int __devinit smbios_present(const char __iomem *p)
+-{
+-	struct smbios_entry_point *eps =
+-		(struct smbios_entry_point *) p;
+-	int length;
+-	u8 *buf;
+-
+-	/* check if we have indeed the SMBIOS table entry point */
+-	if ((strncmp((char *)eps->anchor, "_SM_",
+-			     sizeof(eps->anchor))) == 0) {
+-		length = eps->length;
+-
+-		/* SMBIOS v2.1 implementation might use 0x1e */
+-		if ((length == 0x1e) &&
+-		    (eps->major_ver == 2) &&
+-		    (eps->minor_ver == 1))
+-			length = 0x1f;
+-
+-		/*
+-		 * Now we will check:
+-		 * - SMBIOS checksum must be 0
+-		 * - intermediate anchor should be _DMI_
+-		 * - intermediate checksum should be 0
+-		 */
+-		if ((bios_checksum(p, length)) &&
+-		    (strncmp((char *)eps->intermediate_anchor, "_DMI_",
+-		             sizeof(eps->intermediate_anchor)) == 0) &&
+-		    (bios_checksum(p+0x10, 15))) {
+-			buf = ioremap(eps->table_address, eps->table_length);
+-			if (buf == NULL)
+-				return -ENODEV;
+-
+-
+-			/* Scan the DMI table for the 64 bit CRU service */
+-			dmi_table(buf, eps->table_length,
+-			          eps->table_num_structs, dmi_find_cru);
+-
+-			iounmap(buf);
+-			return 0;
+-		}
+-	}
+-
+-	return -ENODEV;
+-}
+-
+-static int __devinit smbios_scan_machine(void)
+-{
+-	char __iomem *p, *q;
+-	int rc;
+-
+-	if (efi_enabled) {
+-		if (efi.smbios == EFI_INVALID_TABLE_ADDR)
+-			return -ENODEV;
+-
+-		p = ioremap(efi.smbios, 32);
+-		if (p == NULL)
+-			return -ENOMEM;
+-
+-		rc = smbios_present(p);
+-		iounmap(p);
+-	} else {
+-		/*
+-		 * Search from 0x0f0000 through 0x0fffff, inclusive.
+-		 */
+-		p = ioremap(PCI_ROM_BASE1, ROM_SIZE);
+-		if (p == NULL)
+-			return -ENOMEM;
+-
+-		for (q = p; q < p + ROM_SIZE; q += 16) {
+-			rc = smbios_present(q);
+-			if (!rc) {
+-				break;
+-			}
+-		}
+-		iounmap(p);
+-	}
+-}
+-
+ static int __devinit detect_cru_service(void)
+ {
+ 	cru_rom_addr = NULL;
+ 
+-	smbios_scan_machine();	/* will become dmi_walk(dmi_find_cru); */
++	dmi_walk(dmi_find_cru);
+ 
+ 	/* if cru_rom_addr has been set then we found a CRU service */
+ 	return ((cru_rom_addr != NULL)? 0: -ENODEV);
+diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c
+index 1b6d7d1..1efcad3 100644
+--- a/drivers/watchdog/it8712f_wdt.c
++++ b/drivers/watchdog/it8712f_wdt.c
+@@ -7,7 +7,8 @@
+  *
+  *	drivers/char/watchdog/scx200_wdt.c
+  *	drivers/hwmon/it87.c
+- *	IT8712F EC-LPC I/O Preliminary Specification 0.9.2.pdf
++ *	IT8712F EC-LPC I/O Preliminary Specification 0.8.2
++ *	IT8712F EC-LPC I/O Preliminary Specification 0.9.3
+  *
+  *	This program is free software; you can redistribute it and/or
+  *	modify it under the terms of the GNU General Public License as
+@@ -40,6 +41,7 @@ MODULE_DESCRIPTION("IT8712F Watchdog Driver");
+ MODULE_LICENSE("GPL");
+ MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+ 
++static int max_units = 255;
+ static int margin = 60;		/* in seconds */
+ module_param(margin, int, 0);
+ MODULE_PARM_DESC(margin, "Watchdog margin in seconds");
+@@ -51,6 +53,7 @@ MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
+ static struct semaphore it8712f_wdt_sem;
+ static unsigned expect_close;
+ static spinlock_t io_lock;
++static unsigned char revision;
+ 
+ /* Dog Food address - We use the game port address */
+ static unsigned short address;
+@@ -108,6 +111,15 @@ superio_inw(int reg)
+ 	return val;
+ }
+ 
++static void
++superio_outw(int val, int reg)
++{
++	outb(reg++, REG);
++	outb((val >> 8) & 0xff, VAL);
++	outb(reg, REG);
++	outb(val & 0xff, VAL);
++}
++
+ static inline void
+ superio_select(int ldn)
+ {
+@@ -143,15 +155,33 @@ static void
+ it8712f_wdt_update_margin(void)
+ {
+ 	int config = WDT_OUT_KRST | WDT_OUT_PWROK;
+-
+-	printk(KERN_INFO NAME ": timer margin %d seconds\n", margin);
+-
+-	/* The timeout register only has 8bits wide */
+-	if (margin < 256)
+-		config |= WDT_UNIT_SEC;	/* else UNIT are MINUTES */
++	int units = margin;
++
++	/* Switch to minutes precision if the configured margin
++	 * value does not fit within the register width.
++	 */
++	if (units <= max_units) {
++		config |= WDT_UNIT_SEC; /* else UNIT is MINUTES */
++		printk(KERN_INFO NAME ": timer margin %d seconds\n", units);
++	} else {
++		units /= 60;
++		printk(KERN_INFO NAME ": timer margin %d minutes\n", units);
++	}
+ 	superio_outb(config, WDT_CONFIG);
+ 
+-	superio_outb((margin > 255) ? (margin / 60) : margin, WDT_TIMEOUT);
++	if (revision >= 0x08)
++		superio_outw(units, WDT_TIMEOUT);
++	else
++		superio_outb(units, WDT_TIMEOUT);
++}
++
++static int
++it8712f_wdt_get_status(void)
++{
++	if (superio_inb(WDT_CONTROL) & 0x01)
++		return WDIOF_CARDRESET;
++	else
++		return 0;
+ }
+ 
+ static void
+@@ -234,7 +264,7 @@ it8712f_wdt_ioctl(struct inode *inode, struct file *file,
+ 		.firmware_version = 1,
+ 		.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
+ 	};
+-	int new_margin;
++	int value;
+ 
+ 	switch (cmd) {
+ 	default:
+@@ -244,17 +274,27 @@ it8712f_wdt_ioctl(struct inode *inode, struct file *file,
+ 			return -EFAULT;
+ 		return 0;
+ 	case WDIOC_GETSTATUS:
++		superio_enter();
++		superio_select(LDN_GPIO);
++
++		value = it8712f_wdt_get_status();
++
++		superio_exit();
++
++		return put_user(value, p);
+ 	case WDIOC_GETBOOTSTATUS:
+ 		return put_user(0, p);
+ 	case WDIOC_KEEPALIVE:
+ 		it8712f_wdt_ping();
+ 		return 0;
+ 	case WDIOC_SETTIMEOUT:
+-		if (get_user(new_margin, p))
++		if (get_user(value, p))
+ 			return -EFAULT;
+-		if (new_margin < 1)
++		if (value < 1)
++			return -EINVAL;
++		if (value > (max_units * 60))
+ 			return -EINVAL;
+-		margin = new_margin;
++		margin = value;
+ 		superio_enter();
+ 		superio_select(LDN_GPIO);
+ 
+@@ -262,6 +302,7 @@ it8712f_wdt_ioctl(struct inode *inode, struct file *file,
+ 
+ 		superio_exit();
+ 		it8712f_wdt_ping();
++		/* Fall through */
+ 	case WDIOC_GETTIMEOUT:
+ 		if (put_user(margin, p))
+ 			return -EFAULT;
+@@ -336,9 +377,18 @@ it8712f_wdt_find(unsigned short *address)
+ 	}
+ 
+ 	err = 0;
+-	printk(KERN_DEBUG NAME ": Found IT%04xF chip revision %d - "
++	revision = superio_inb(DEVREV) & 0x0f;
++
++	/* Later revisions have 16-bit values per datasheet 0.9.1 */
++	if (revision >= 0x08)
++		max_units = 65535;
++
++	if (margin > (max_units * 60))
++		margin = (max_units * 60);
++
++	printk(KERN_INFO NAME ": Found IT%04xF chip revision %d - "
+ 		"using DogFood address 0x%x\n",
+-		chip_type, superio_inb(DEVREV) & 0x0f, *address);
++		chip_type, revision, *address);
+ 
+ exit:
+ 	superio_exit();
+diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
+index e6e07b4..6905135 100644
+--- a/drivers/watchdog/machzwd.c
++++ b/drivers/watchdog/machzwd.c
+@@ -141,7 +141,7 @@ static unsigned long next_heartbeat = 0;
+ #ifndef ZF_DEBUG
+ #	define dprintk(format, args...)
+ #else
+-#	define dprintk(format, args...) printk(KERN_DEBUG PFX ":%s:%d: " format, __FUNCTION__, __LINE__ , ## args)
++#	define dprintk(format, args...) printk(KERN_DEBUG PFX ":%s:%d: " format, __func__, __LINE__ , ## args)
+ #endif
+ 
+ 
+diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c
+index 789831b..10b89f2 100644
+--- a/drivers/watchdog/mtx-1_wdt.c
++++ b/drivers/watchdog/mtx-1_wdt.c
+@@ -59,9 +59,9 @@ static int ticks = 100 * HZ;
+ 
+ static struct {
+ 	struct completion stop;
+-	volatile int running;
++	int running;
+ 	struct timer_list timer;
+-	volatile int queue;
++	int queue;
+ 	int default_ticks;
+ 	unsigned long inuse;
+ 	unsigned gpio;
+diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
+index 0f3fd6c..bf443d0 100644
+--- a/drivers/watchdog/pcwd_usb.c
++++ b/drivers/watchdog/pcwd_usb.c
+@@ -179,11 +179,11 @@ static void usb_pcwd_intr_done(struct urb *urb)
+ 	case -ENOENT:
+ 	case -ESHUTDOWN:
+ 		/* this urb is terminated, clean up */
+-		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
++		dbg("%s - urb shutting down with status: %d", __func__, urb->status);
+ 		return;
+ 	/* -EPIPE:  should clear the halt */
+ 	default:		/* error */
+-		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
++		dbg("%s - nonzero urb status received: %d", __func__, urb->status);
+ 		goto resubmit;
+ 	}
+ 
+diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
+index 5d1c15f..7645e88 100644
+--- a/drivers/watchdog/s3c2410_wdt.c
++++ b/drivers/watchdog/s3c2410_wdt.c
+@@ -144,7 +144,7 @@ static int s3c2410wdt_start(void)
+ 	}
+ 
+ 	DBG("%s: wdt_count=0x%08x, wtcon=%08lx\n",
+-	    __FUNCTION__, wdt_count, wtcon);
++	    __func__, wdt_count, wtcon);
+ 
+ 	writel(wdt_count, wdt_base + S3C2410_WTDAT);
+ 	writel(wdt_count, wdt_base + S3C2410_WTCNT);
+@@ -167,7 +167,7 @@ static int s3c2410wdt_set_heartbeat(int timeout)
+ 	count = timeout * freq;
+ 
+ 	DBG("%s: count=%d, timeout=%d, freq=%d\n",
+-	    __FUNCTION__, count, timeout, freq);
++	    __func__, count, timeout, freq);
+ 
+ 	/* if the count is bigger than the watchdog register,
+ 	   then work out what we need to do (and if) we can
+@@ -189,7 +189,7 @@ static int s3c2410wdt_set_heartbeat(int timeout)
+ 	tmr_margin = timeout;
+ 
+ 	DBG("%s: timeout=%d, divisor=%d, count=%d (%08x)\n",
+-	    __FUNCTION__, timeout, divisor, count, count/divisor);
++	    __func__, timeout, divisor, count, count/divisor);
+ 
+ 	count /= divisor;
+ 	wdt_count = count;
+@@ -355,7 +355,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
+ 	int ret;
+ 	int size;
+ 
+-	DBG("%s: probe=%p\n", __FUNCTION__, pdev);
++	DBG("%s: probe=%p\n", __func__, pdev);
+ 
+ 	dev = &pdev->dev;
+ 	wdt_dev = &pdev->dev;
+diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
+index 61dde86..1277f7e 100644
+--- a/drivers/watchdog/shwdt.c
++++ b/drivers/watchdog/shwdt.c
+@@ -298,7 +298,7 @@ static int sh_wdt_mmap(struct file *file, struct vm_area_struct *vma)
+ 	if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT,
+ 			       PAGE_SIZE, vma->vm_page_prot)) {
+ 		printk(KERN_ERR PFX "%s: io_remap_pfn_range failed\n",
+-		       __FUNCTION__);
++		       __func__);
+ 		return -EAGAIN;
+ 	}
+ 
+diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
+index ee50c96..b8057c5 100644
+--- a/fs/ocfs2/cluster/tcp.c
++++ b/fs/ocfs2/cluster/tcp.c
+@@ -451,9 +451,9 @@ static void o2net_set_nn_state(struct o2net_node *nn,
+ 		/* delay if we're withing a RECONNECT_DELAY of the
+ 		 * last attempt */
+ 		delay = (nn->nn_last_connect_attempt +
+-			 msecs_to_jiffies(o2net_reconnect_delay(sc->sc_node)))
++			 msecs_to_jiffies(o2net_reconnect_delay(NULL)))
+ 			- jiffies;
+-		if (delay > msecs_to_jiffies(o2net_reconnect_delay(sc->sc_node)))
++		if (delay > msecs_to_jiffies(o2net_reconnect_delay(NULL)))
+ 			delay = 0;
+ 		mlog(ML_CONN, "queueing conn attempt in %lu jiffies\n", delay);
+ 		queue_delayed_work(o2net_wq, &nn->nn_connect_work, delay);
+@@ -1552,12 +1552,11 @@ static void o2net_connect_expired(struct work_struct *work)
+ 
+ 	spin_lock(&nn->nn_lock);
+ 	if (!nn->nn_sc_valid) {
+-		struct o2nm_node *node = nn->nn_sc->sc_node;
+ 		mlog(ML_ERROR, "no connection established with node %u after "
+ 		     "%u.%u seconds, giving up and returning errors.\n",
+ 		     o2net_num_from_nn(nn),
+-		     o2net_idle_timeout(node) / 1000,
+-		     o2net_idle_timeout(node) % 1000);
++		     o2net_idle_timeout(NULL) / 1000,
++		     o2net_idle_timeout(NULL) % 1000);
+ 
+ 		o2net_set_nn_state(nn, NULL, 0, -ENOTCONN);
+ 	}
+diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
+index 9843ee1..dc8ea66 100644
+--- a/fs/ocfs2/dlm/dlmcommon.h
++++ b/fs/ocfs2/dlm/dlmcommon.h
+@@ -176,6 +176,7 @@ struct dlm_mig_lockres_priv
+ {
+ 	struct dlm_lock_resource *lockres;
+ 	u8 real_master;
++	u8 extra_ref;
+ };
+ 
+ struct dlm_assert_master_priv
+@@ -602,17 +603,19 @@ enum dlm_query_join_response_code {
+ 	JOIN_PROTOCOL_MISMATCH,
+ };
+ 
++struct dlm_query_join_packet {
++	u8 code;	/* Response code.  dlm_minor and fs_minor
++			   are only valid if this is JOIN_OK */
++	u8 dlm_minor;	/* The minor version of the protocol the
++			   dlm is speaking. */
++	u8 fs_minor;	/* The minor version of the protocol the
++			   filesystem is speaking. */
++	u8 reserved;
++};
++
+ union dlm_query_join_response {
+ 	u32 intval;
+-	struct {
+-		u8 code;	/* Response code.  dlm_minor and fs_minor
+-				   are only valid if this is JOIN_OK */
+-		u8 dlm_minor;	/* The minor version of the protocol the
+-				   dlm is speaking. */
+-		u8 fs_minor;	/* The minor version of the protocol the
+-				   filesystem is speaking. */
+-		u8 reserved;
+-	} packet;
++	struct dlm_query_join_packet packet;
+ };
+ 
+ struct dlm_lock_request
+diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c
+index ecb4d99..75997b4 100644
+--- a/fs/ocfs2/dlm/dlmconvert.c
++++ b/fs/ocfs2/dlm/dlmconvert.c
+@@ -487,7 +487,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data,
+ 			       "cookie=%u:%llu\n",
+ 		     dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)),
+ 		     dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie)));
+-		__dlm_print_one_lock_resource(res);
++		dlm_print_one_lock_resource(res);
+ 		goto leave;
+ 	}
+ 
+diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
+index 638d2eb..0879d86 100644
+--- a/fs/ocfs2/dlm/dlmdomain.c
++++ b/fs/ocfs2/dlm/dlmdomain.c
+@@ -713,14 +713,46 @@ static int dlm_query_join_proto_check(char *proto_type, int node,
+ 	return rc;
+ }
+ 
++/*
++ * struct dlm_query_join_packet is made up of four one-byte fields.  They
++ * are effectively in big-endian order already.  However, little-endian
++ * machines swap them before putting the packet on the wire (because
++ * query_join's response is a status, and that status is treated as a u32
++ * on the wire).  Thus, a big-endian and little-endian machines will treat
++ * this structure differently.
++ *
++ * The solution is to have little-endian machines swap the structure when
++ * converting from the structure to the u32 representation.  This will
++ * result in the structure having the correct format on the wire no matter
++ * the host endian format.
++ */
++static void dlm_query_join_packet_to_wire(struct dlm_query_join_packet *packet,
++					  u32 *wire)
++{
++	union dlm_query_join_response response;
++
++	response.packet = *packet;
++	*wire = cpu_to_be32(response.intval);
++}
++
++static void dlm_query_join_wire_to_packet(u32 wire,
++					  struct dlm_query_join_packet *packet)
++{
++	union dlm_query_join_response response;
++
++	response.intval = cpu_to_be32(wire);
++	*packet = response.packet;
++}
++
+ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
+ 				  void **ret_data)
+ {
+ 	struct dlm_query_join_request *query;
+-	union dlm_query_join_response response = {
+-		.packet.code = JOIN_DISALLOW,
++	struct dlm_query_join_packet packet = {
++		.code = JOIN_DISALLOW,
+ 	};
+ 	struct dlm_ctxt *dlm = NULL;
++	u32 response;
+ 	u8 nodenum;
+ 
+ 	query = (struct dlm_query_join_request *) msg->buf;
+@@ -737,11 +769,11 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
+ 		mlog(0, "node %u is not in our live map yet\n",
+ 		     query->node_idx);
+ 
+-		response.packet.code = JOIN_DISALLOW;
++		packet.code = JOIN_DISALLOW;
+ 		goto respond;
+ 	}
+ 
+-	response.packet.code = JOIN_OK_NO_MAP;
++	packet.code = JOIN_OK_NO_MAP;
+ 
+ 	spin_lock(&dlm_domain_lock);
+ 	dlm = __dlm_lookup_domain_full(query->domain, query->name_len);
+@@ -760,7 +792,7 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
+ 				mlog(0, "disallow join as node %u does not "
+ 				     "have node %u in its nodemap\n",
+ 				     query->node_idx, nodenum);
+-				response.packet.code = JOIN_DISALLOW;
++				packet.code = JOIN_DISALLOW;
+ 				goto unlock_respond;
+ 			}
+ 		}
+@@ -780,23 +812,23 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
+ 			/*If this is a brand new context and we
+ 			 * haven't started our join process yet, then
+ 			 * the other node won the race. */
+-			response.packet.code = JOIN_OK_NO_MAP;
++			packet.code = JOIN_OK_NO_MAP;
+ 		} else if (dlm->joining_node != DLM_LOCK_RES_OWNER_UNKNOWN) {
+ 			/* Disallow parallel joins. */
+-			response.packet.code = JOIN_DISALLOW;
++			packet.code = JOIN_DISALLOW;
+ 		} else if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) {
+ 			mlog(0, "node %u trying to join, but recovery "
+ 			     "is ongoing.\n", bit);
+-			response.packet.code = JOIN_DISALLOW;
++			packet.code = JOIN_DISALLOW;
+ 		} else if (test_bit(bit, dlm->recovery_map)) {
+ 			mlog(0, "node %u trying to join, but it "
+ 			     "still needs recovery.\n", bit);
+-			response.packet.code = JOIN_DISALLOW;
++			packet.code = JOIN_DISALLOW;
+ 		} else if (test_bit(bit, dlm->domain_map)) {
+ 			mlog(0, "node %u trying to join, but it "
+ 			     "is still in the domain! needs recovery?\n",
+ 			     bit);
+-			response.packet.code = JOIN_DISALLOW;
++			packet.code = JOIN_DISALLOW;
+ 		} else {
+ 			/* Alright we're fully a part of this domain
+ 			 * so we keep some state as to who's joining
+@@ -807,19 +839,15 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data,
+ 			if (dlm_query_join_proto_check("DLM", bit,
+ 						       &dlm->dlm_locking_proto,
+ 						       &query->dlm_proto)) {
+-				response.packet.code =
+-					JOIN_PROTOCOL_MISMATCH;
++				packet.code = JOIN_PROTOCOL_MISMATCH;
+ 			} else if (dlm_query_join_proto_check("fs", bit,
+ 							      &dlm->fs_locking_proto,
+ 							      &query->fs_proto)) {
+-				response.packet.code =
+-					JOIN_PROTOCOL_MISMATCH;
++				packet.code = JOIN_PROTOCOL_MISMATCH;
+ 			} else {
+-				response.packet.dlm_minor =
+-					query->dlm_proto.pv_minor;
+-				response.packet.fs_minor =
+-					query->fs_proto.pv_minor;
+-				response.packet.code = JOIN_OK;
++				packet.dlm_minor = query->dlm_proto.pv_minor;
++				packet.fs_minor = query->fs_proto.pv_minor;
++				packet.code = JOIN_OK;
+ 				__dlm_set_joining_node(dlm, query->node_idx);
+ 			}
+ 		}
+@@ -830,9 +858,10 @@ unlock_respond:
+ 	spin_unlock(&dlm_domain_lock);
+ 
+ respond:
+-	mlog(0, "We respond with %u\n", response.packet.code);
++	mlog(0, "We respond with %u\n", packet.code);
+ 
+-	return response.intval;
++	dlm_query_join_packet_to_wire(&packet, &response);
++	return response;
+ }
+ 
+ static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data,
+@@ -937,7 +966,7 @@ static int dlm_send_join_cancels(struct dlm_ctxt *dlm,
+ 			 sizeof(unsigned long))) {
+ 		mlog(ML_ERROR,
+ 		     "map_size %u != BITS_TO_LONGS(O2NM_MAX_NODES) %u\n",
+-		     map_size, BITS_TO_LONGS(O2NM_MAX_NODES));
++		     map_size, (unsigned)BITS_TO_LONGS(O2NM_MAX_NODES));
+ 		return -EINVAL;
+ 	}
+ 
+@@ -968,7 +997,8 @@ static int dlm_request_join(struct dlm_ctxt *dlm,
+ {
+ 	int status;
+ 	struct dlm_query_join_request join_msg;
+-	union dlm_query_join_response join_resp;
++	struct dlm_query_join_packet packet;
++	u32 join_resp;
+ 
+ 	mlog(0, "querying node %d\n", node);
+ 
+@@ -984,11 +1014,12 @@ static int dlm_request_join(struct dlm_ctxt *dlm,
+ 
+ 	status = o2net_send_message(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, &join_msg,
+ 				    sizeof(join_msg), node,
+-				    &join_resp.intval);
++				    &join_resp);
+ 	if (status < 0 && status != -ENOPROTOOPT) {
+ 		mlog_errno(status);
+ 		goto bail;
+ 	}
++	dlm_query_join_wire_to_packet(join_resp, &packet);
+ 
+ 	/* -ENOPROTOOPT from the net code means the other side isn't
+ 	    listening for our message type -- that's fine, it means
+@@ -997,10 +1028,10 @@ static int dlm_request_join(struct dlm_ctxt *dlm,
+ 	if (status == -ENOPROTOOPT) {
+ 		status = 0;
+ 		*response = JOIN_OK_NO_MAP;
+-	} else if (join_resp.packet.code == JOIN_DISALLOW ||
+-		   join_resp.packet.code == JOIN_OK_NO_MAP) {
+-		*response = join_resp.packet.code;
+-	} else if (join_resp.packet.code == JOIN_PROTOCOL_MISMATCH) {
++	} else if (packet.code == JOIN_DISALLOW ||
++		   packet.code == JOIN_OK_NO_MAP) {
++		*response = packet.code;
++	} else if (packet.code == JOIN_PROTOCOL_MISMATCH) {
+ 		mlog(ML_NOTICE,
+ 		     "This node requested DLM locking protocol %u.%u and "
+ 		     "filesystem locking protocol %u.%u.  At least one of "
+@@ -1012,14 +1043,12 @@ static int dlm_request_join(struct dlm_ctxt *dlm,
+ 		     dlm->fs_locking_proto.pv_minor,
+ 		     node);
+ 		status = -EPROTO;
+-		*response = join_resp.packet.code;
+-	} else if (join_resp.packet.code == JOIN_OK) {
+-		*response = join_resp.packet.code;
++		*response = packet.code;
++	} else if (packet.code == JOIN_OK) {
++		*response = packet.code;
+ 		/* Use the same locking protocol as the remote node */
+-		dlm->dlm_locking_proto.pv_minor =
+-			join_resp.packet.dlm_minor;
+-		dlm->fs_locking_proto.pv_minor =
+-			join_resp.packet.fs_minor;
++		dlm->dlm_locking_proto.pv_minor = packet.dlm_minor;
++		dlm->fs_locking_proto.pv_minor = packet.fs_minor;
+ 		mlog(0,
+ 		     "Node %d responds JOIN_OK with DLM locking protocol "
+ 		     "%u.%u and fs locking protocol %u.%u\n",
+@@ -1031,11 +1060,11 @@ static int dlm_request_join(struct dlm_ctxt *dlm,
+ 	} else {
+ 		status = -EINVAL;
+ 		mlog(ML_ERROR, "invalid response %d from node %u\n",
+-		     join_resp.packet.code, node);
++		     packet.code, node);
+ 	}
+ 
+ 	mlog(0, "status %d, node %d response is %d\n", status, node,
+-		  *response);
++	     *response);
+ 
+ bail:
+ 	return status;
+diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
+index c92d1b1..ea6b895 100644
+--- a/fs/ocfs2/dlm/dlmmaster.c
++++ b/fs/ocfs2/dlm/dlmmaster.c
+@@ -1663,7 +1663,12 @@ way_up_top:
+ 		dlm_put_mle(tmpmle);
+ 	}
+ send_response:
+-
++	/*
++	 * __dlm_lookup_lockres() grabbed a reference to this lockres.
++	 * The reference is released by dlm_assert_master_worker() under
++	 * the call to dlm_dispatch_assert_master().  If
++	 * dlm_assert_master_worker() isn't called, we drop it here.
++	 */
+ 	if (dispatch_assert) {
+ 		if (response != DLM_MASTER_RESP_YES)
+ 			mlog(ML_ERROR, "invalid response %d\n", response);
+@@ -1678,7 +1683,11 @@ send_response:
+ 		if (ret < 0) {
+ 			mlog(ML_ERROR, "failed to dispatch assert master work\n");
+ 			response = DLM_MASTER_RESP_ERROR;
++			dlm_lockres_put(res);
+ 		}
++	} else {
++		if (res)
++			dlm_lockres_put(res);
+ 	}
+ 
+ 	dlm_put(dlm);
+@@ -2348,7 +2357,7 @@ int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+ 			mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref "
+ 		     	"but it is already dropped!\n", dlm->name,
+ 		     	res->lockname.len, res->lockname.name, node);
+-			__dlm_print_one_lock_resource(res);
++			dlm_print_one_lock_resource(res);
+ 		}
+ 		ret = 0;
+ 		goto done;
+@@ -2408,7 +2417,7 @@ static void dlm_deref_lockres_worker(struct dlm_work_item *item, void *data)
+ 		mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref "
+ 		     "but it is already dropped!\n", dlm->name,
+ 		     res->lockname.len, res->lockname.name, node);
+-		__dlm_print_one_lock_resource(res);
++		dlm_print_one_lock_resource(res);
+ 	}
+ 
+ 	dlm_lockres_put(res);
+@@ -2933,6 +2942,9 @@ static void dlm_remove_nonlocal_locks(struct dlm_ctxt *dlm,
+ 				dlm_lockres_clear_refmap_bit(lock->ml.node, res);
+ 				list_del_init(&lock->list);
+ 				dlm_lock_put(lock);
++				/* In a normal unlock, we would have added a
++				 * DLM_UNLOCK_FREE_LOCK action. Force it. */
++				dlm_lock_put(lock);
+ 			}
+ 		}
+ 		queue++;
+diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
+index 91f747b..bcb9260 100644
+--- a/fs/ocfs2/dlm/dlmrecovery.c
++++ b/fs/ocfs2/dlm/dlmrecovery.c
+@@ -519,9 +519,9 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm)
+ 	return 0;
+ 
+ master_here:
+-	mlog(0, "(%d) mastering recovery of %s:%u here(this=%u)!\n",
+-	     task_pid_nr(dlm->dlm_reco_thread_task),
+-	     dlm->name, dlm->reco.dead_node, dlm->node_num);
++	mlog(ML_NOTICE, "(%d) Node %u is the Recovery Master for the Dead Node "
++	     "%u for Domain %s\n", task_pid_nr(dlm->dlm_reco_thread_task),
++	     dlm->node_num, dlm->reco.dead_node, dlm->name);
+ 
+ 	status = dlm_remaster_locks(dlm, dlm->reco.dead_node);
+ 	if (status < 0) {
+@@ -1191,7 +1191,7 @@ static int dlm_add_lock_to_array(struct dlm_lock *lock,
+ 			    (ml->type == LKM_EXMODE ||
+ 			     memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) {
+ 				mlog(ML_ERROR, "mismatched lvbs!\n");
+-				__dlm_print_one_lock_resource(lock->lockres);
++				dlm_print_one_lock_resource(lock->lockres);
+ 				BUG();
+ 			}
+ 			memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN);
+@@ -1327,6 +1327,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+ 		(struct dlm_migratable_lockres *)msg->buf;
+ 	int ret = 0;
+ 	u8 real_master;
++	u8 extra_refs = 0;
+ 	char *buf = NULL;
+ 	struct dlm_work_item *item = NULL;
+ 	struct dlm_lock_resource *res = NULL;
+@@ -1404,16 +1405,28 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+ 		__dlm_insert_lockres(dlm, res);
+ 		spin_unlock(&dlm->spinlock);
+ 
++		/* Add an extra ref for this lock-less lockres lest the
++		 * dlm_thread purges it before we get the chance to add
++		 * locks to it */
++		dlm_lockres_get(res);
++
++		/* There are three refs that need to be put.
++		 * 1. Taken above.
++		 * 2. kref_init in dlm_new_lockres()->dlm_init_lockres().
++		 * 3. dlm_lookup_lockres()
++		 * The first one is handled at the end of this function. The
++		 * other two are handled in the worker thread after locks have
++		 * been attached. Yes, we don't wait for purge time to match
++		 * kref_init. The lockres will still have atleast one ref
++		 * added because it is in the hash __dlm_insert_lockres() */
++		extra_refs++;
++
+ 		/* now that the new lockres is inserted,
+ 		 * make it usable by other processes */
+ 		spin_lock(&res->spinlock);
+ 		res->state &= ~DLM_LOCK_RES_IN_PROGRESS;
+ 		spin_unlock(&res->spinlock);
+ 		wake_up(&res->wq);
+-
+-		/* add an extra ref for just-allocated lockres 
+-		 * otherwise the lockres will be purged immediately */
+-		dlm_lockres_get(res);
+ 	}
+ 
+ 	/* at this point we have allocated everything we need,
+@@ -1443,12 +1456,17 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data,
+ 	dlm_init_work_item(dlm, item, dlm_mig_lockres_worker, buf);
+ 	item->u.ml.lockres = res; /* already have a ref */
+ 	item->u.ml.real_master = real_master;
++	item->u.ml.extra_ref = extra_refs;
+ 	spin_lock(&dlm->work_lock);
+ 	list_add_tail(&item->list, &dlm->work_list);
+ 	spin_unlock(&dlm->work_lock);
+ 	queue_work(dlm->dlm_worker, &dlm->dispatched_work);
+ 
+ leave:
++	/* One extra ref taken needs to be put here */
++	if (extra_refs)
++		dlm_lockres_put(res);
++
+ 	dlm_put(dlm);
+ 	if (ret < 0) {
+ 		if (buf)
+@@ -1464,17 +1482,19 @@ leave:
+ 
+ static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data)
+ {
+-	struct dlm_ctxt *dlm = data;
++	struct dlm_ctxt *dlm;
+ 	struct dlm_migratable_lockres *mres;
+ 	int ret = 0;
+ 	struct dlm_lock_resource *res;
+ 	u8 real_master;
++	u8 extra_ref;
+ 
+ 	dlm = item->dlm;
+ 	mres = (struct dlm_migratable_lockres *)data;
+ 
+ 	res = item->u.ml.lockres;
+ 	real_master = item->u.ml.real_master;
++	extra_ref = item->u.ml.extra_ref;
+ 
+ 	if (real_master == DLM_LOCK_RES_OWNER_UNKNOWN) {
+ 		/* this case is super-rare. only occurs if
+@@ -1517,6 +1537,12 @@ again:
+ 	}
+ 
+ leave:
++	/* See comment in dlm_mig_lockres_handler() */
++	if (res) {
++		if (extra_ref)
++			dlm_lockres_put(res);
++		dlm_lockres_put(res);
++	}
+ 	kfree(data);
+ 	mlog_exit(ret);
+ }
+@@ -1644,7 +1670,8 @@ int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data,
+ 				/* retry!? */
+ 				BUG();
+ 			}
+-		}
++		} else /* put.. incase we are not the master */
++			dlm_lockres_put(res);
+ 		spin_unlock(&res->spinlock);
+ 	}
+ 	spin_unlock(&dlm->spinlock);
+@@ -1921,6 +1948,7 @@ void dlm_move_lockres_to_recovery_list(struct dlm_ctxt *dlm,
+ 		     "Recovering res %s:%.*s, is already on recovery list!\n",
+ 		     dlm->name, res->lockname.len, res->lockname.name);
+ 		list_del_init(&res->recovering);
++		dlm_lockres_put(res);
+ 	}
+ 	/* We need to hold a reference while on the recovery list */
+ 	dlm_lockres_get(res);
+@@ -2130,11 +2158,16 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
+ 	assert_spin_locked(&dlm->spinlock);
+ 	assert_spin_locked(&res->spinlock);
+ 
++	/* We do two dlm_lock_put(). One for removing from list and the other is
++	 * to force the DLM_UNLOCK_FREE_LOCK action so as to free the locks */
++
+ 	/* TODO: check pending_asts, pending_basts here */
+ 	list_for_each_entry_safe(lock, next, &res->granted, list) {
+ 		if (lock->ml.node == dead_node) {
+ 			list_del_init(&lock->list);
+ 			dlm_lock_put(lock);
++			/* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
++			dlm_lock_put(lock);
+ 			freed++;
+ 		}
+ 	}
+@@ -2142,6 +2175,8 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
+ 		if (lock->ml.node == dead_node) {
+ 			list_del_init(&lock->list);
+ 			dlm_lock_put(lock);
++			/* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
++			dlm_lock_put(lock);
+ 			freed++;
+ 		}
+ 	}
+@@ -2149,6 +2184,8 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
+ 		if (lock->ml.node == dead_node) {
+ 			list_del_init(&lock->list);
+ 			dlm_lock_put(lock);
++			/* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */
++			dlm_lock_put(lock);
+ 			freed++;
+ 		}
+ 	}
+diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c
+index cebd089..4060bb3 100644
+--- a/fs/ocfs2/dlm/dlmthread.c
++++ b/fs/ocfs2/dlm/dlmthread.c
+@@ -176,12 +176,14 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm,
+ 	     res->lockname.name, master);
+ 
+ 	if (!master) {
++		/* drop spinlock...  retake below */
++		spin_unlock(&dlm->spinlock);
++
+ 		spin_lock(&res->spinlock);
+ 		/* This ensures that clear refmap is sent after the set */
+ 		__dlm_wait_on_lockres_flags(res, DLM_LOCK_RES_SETREF_INPROG);
+ 		spin_unlock(&res->spinlock);
+-		/* drop spinlock to do messaging, retake below */
+-		spin_unlock(&dlm->spinlock);
++
+ 		/* clear our bit from the master's refmap, ignore errors */
+ 		ret = dlm_drop_lockres_ref(dlm, res);
+ 		if (ret < 0) {
+diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
+index f779430..1f1873b 100644
+--- a/fs/ocfs2/dlmglue.c
++++ b/fs/ocfs2/dlmglue.c
+@@ -2409,7 +2409,7 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v)
+ 	return 0;
+ }
+ 
+-static struct seq_operations ocfs2_dlm_seq_ops = {
++static const struct seq_operations ocfs2_dlm_seq_ops = {
+ 	.start =	ocfs2_dlm_seq_start,
+ 	.stop =		ocfs2_dlm_seq_stop,
+ 	.next =		ocfs2_dlm_seq_next,
+diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
+index 37835ff..8166968 100644
+--- a/fs/ocfs2/resize.c
++++ b/fs/ocfs2/resize.c
+@@ -597,7 +597,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
+ 		memset(cr, 0, sizeof(struct ocfs2_chain_rec));
+ 	}
+ 
+-	cr->c_blkno = le64_to_cpu(input->group);
++	cr->c_blkno = cpu_to_le64(input->group);
+ 	le32_add_cpu(&cr->c_total, input->clusters * cl_bpc);
+ 	le32_add_cpu(&cr->c_free, input->frees * cl_bpc);
+ 
+diff --git a/fs/proc/base.c b/fs/proc/base.c
+index 91a1bd6..9a4da0a 100644
+--- a/fs/proc/base.c
++++ b/fs/proc/base.c
+@@ -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),
+diff --git a/fs/proc/generic.c b/fs/proc/generic.c
+index 68971e6..a36ad3c 100644
+--- a/fs/proc/generic.c
++++ b/fs/proc/generic.c
+@@ -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
+diff --git a/fs/proc/internal.h b/fs/proc/internal.h
+index 1c81c8f..bc72f5c 100644
+--- a/fs/proc/internal.h
++++ b/fs/proc/internal.h
+@@ -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);
+diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
+index 14e9b5a..4caa5f7 100644
+--- a/fs/proc/proc_net.c
++++ b/fs/proc/proc_net.c
+@@ -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);
+ }
+diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h
+index 1c2b55c..0f64044 100644
+--- a/include/asm-arm/arch-omap/board-h3.h
++++ b/include/asm-arm/arch-omap/board-h3.h
+@@ -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 */
+diff --git a/include/asm-arm/arch-omap/common.h b/include/asm-arm/arch-omap/common.h
+index 442aecb..224e009 100644
+--- a/include/asm-arm/arch-omap/common.h
++++ b/include/asm-arm/arch-omap/common.h
+@@ -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 */
+diff --git a/include/asm-arm/arch-omap/gpioexpander.h b/include/asm-arm/arch-omap/gpioexpander.h
+index 7a43b0a..4eed1f8 100644
+--- a/include/asm-arm/arch-omap/gpioexpander.h
++++ b/include/asm-arm/arch-omap/gpioexpander.h
+@@ -18,7 +18,18 @@
+ 
+ /* 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 */
+diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h
+index 33c83dd..2e5868b 100644
+--- a/include/asm-arm/pgtable-nommu.h
++++ b/include/asm-arm/pgtable-nommu.h
+@@ -92,6 +92,8 @@ extern unsigned int kobjsize(const void *objp);
+ 
+ #define FIRST_USER_ADDRESS      (0)
+ 
++#include <asm-generic/pgtable.h>
++
+ #else 
+ 
+ /*
+diff --git a/include/asm-arm/plat-s3c/uncompress.h b/include/asm-arm/plat-s3c/uncompress.h
+index b5e6208..19b9eda 100644
+--- a/include/asm-arm/plat-s3c/uncompress.h
++++ b/include/asm-arm/plat-s3c/uncompress.h
+@@ -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
+diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
+index a4ce457..75ec760 100644
+--- a/include/asm-arm/proc-fns.h
++++ b/include/asm-arm/proc-fns.h
+@@ -214,9 +214,9 @@
+ #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>
+diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
+index 4933b49..01e7ead 100644
+--- a/include/asm-mips/cacheflush.h
++++ b/include/asm-mips/cacheflush.h
+@@ -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);
+diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h
+index 4d6bd5c..4374ab2 100644
+--- a/include/asm-mips/highmem.h
++++ b/include/asm-mips/highmem.h
+@@ -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)
+diff --git a/include/asm-mips/mach-ip27/cpu-feature-overrides.h b/include/asm-mips/mach-ip27/cpu-feature-overrides.h
+index fe07638..7d3112b 100644
+--- a/include/asm-mips/mach-ip27/cpu-feature-overrides.h
++++ b/include/asm-mips/mach-ip27/cpu-feature-overrides.h
+@@ -34,7 +34,11 @@
+ #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
+ 
+diff --git a/include/asm-mips/mach-jmr3927/ioremap.h b/include/asm-mips/mach-jmr3927/ioremap.h
+index aa131ad..29989ff 100644
+--- a/include/asm-mips/mach-jmr3927/ioremap.h
++++ b/include/asm-mips/mach-jmr3927/ioremap.h
+@@ -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;
+ }
+diff --git a/include/asm-mips/mach-lasat/irq.h b/include/asm-mips/mach-lasat/irq.h
+index da75f89..3a28241 100644
+--- a/include/asm-mips/mach-lasat/irq.h
++++ b/include/asm-mips/mach-lasat/irq.h
+@@ -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
+diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h
+index a094709..ceefe02 100644
+--- a/include/asm-mips/pgtable-32.h
++++ b/include/asm-mips/pgtable-32.h
+@@ -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
+diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
+index a8fd16e..d3bd5c5 100644
+--- a/include/asm-mips/time.h
++++ b/include/asm-mips/time.h
+@@ -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
+ 
+diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
+index d1332bb..2c79f55 100644
+--- a/include/asm-powerpc/pgtable-ppc32.h
++++ b/include/asm-powerpc/pgtable-ppc32.h
+@@ -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 */
+diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
+index 69347bd..70435d3 100644
+--- a/include/asm-ppc/pgtable.h
++++ b/include/asm-ppc/pgtable.h
+@@ -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 */
+diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h
+index a842c72..4e6a0fc 100644
+--- a/include/asm-x86/pgtable_32.h
++++ b/include/asm-x86/pgtable_32.h
+@@ -26,10 +26,9 @@ struct mm_struct;
+ struct vm_area_struct;
+ 
+ extern pgd_t swapper_pg_dir[1024];
+-extern struct kmem_cache *pmd_cache;
+-void check_pgt_cache(void);
+ 
+-static inline void pgtable_cache_init(void) {}
++static inline void pgtable_cache_init(void) { }
++static inline void check_pgt_cache(void) { }
+ void paging_init(void);
+ 
+ 
+diff --git a/include/linux/Kbuild b/include/linux/Kbuild
+index 994df37..0fac822 100644
+--- a/include/linux/Kbuild
++++ b/include/linux/Kbuild
+@@ -205,7 +205,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
+diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
+index fcbe8b6..c8d2163 100644
+--- a/include/linux/ethtool.h
++++ b/include/linux/ethtool.h
+@@ -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 {
+diff --git a/include/linux/firmware.h b/include/linux/firmware.h
+index 33d8f20..4d10c73 100644
+--- a/include/linux/firmware.h
++++ b/include/linux/firmware.h
+@@ -10,7 +10,10 @@ struct firmware {
+ 	size_t size;
+ 	u8 *data;
+ };
++
+ struct device;
++
++#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+ int request_firmware(const struct firmware **fw, const char *name,
+ 		     struct device *device);
+ int request_firmware_nowait(
+@@ -19,4 +22,24 @@ int request_firmware_nowait(
+ 	void (*cont)(const struct firmware *fw, void *context));
+ 
+ void release_firmware(const struct firmware *fw);
++#else
++static inline int request_firmware(const struct firmware **fw,
++				   const char *name,
++				   struct device *device)
++{
++	return -EINVAL;
++}
++static inline int request_firmware_nowait(
++	struct module *module, int uevent,
++	const char *name, struct device *device, void *context,
++	void (*cont)(const struct firmware *fw, void *context))
++{
++	return -EINVAL;
++}
++
++static inline void release_firmware(const struct firmware *fw)
++{
++}
++#endif
++
+ #endif
+diff --git a/include/linux/genhd.h b/include/linux/genhd.h
+index 32c2ac4..ecd2bf6 100644
+--- a/include/linux/genhd.h
++++ b/include/linux/genhd.h
+@@ -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 */
+diff --git a/include/linux/memstick.h b/include/linux/memstick.h
+index 334d059..b7ee258 100644
+--- a/include/linux/memstick.h
++++ b/include/linux/memstick.h
+@@ -22,6 +22,8 @@ struct ms_status_register {
+ 	unsigned char reserved;
+ 	unsigned char interrupt;
+ #define MEMSTICK_INT_CMDNAK             0x0001
++#define MEMSTICK_INT_IOREQ              0x0008
++#define MEMSTICK_INT_IOBREQ             0x0010
+ #define MEMSTICK_INT_BREQ               0x0020
+ #define MEMSTICK_INT_ERR                0x0040
+ #define MEMSTICK_INT_CED                0x0080
+@@ -47,13 +49,17 @@ struct ms_status_register {
+ 
+ struct ms_id_register {
+ 	unsigned char type;
+-	unsigned char reserved;
++	unsigned char if_mode;
+ 	unsigned char category;
+ 	unsigned char class;
+ } __attribute__((packed));
+ 
+ struct ms_param_register {
+ 	unsigned char system;
++#define MEMSTICK_SYS_ATEN 0xc0
++#define MEMSTICK_SYS_BAMD 0x80
++#define MEMSTICK_SYS_PAM  0x08
++
+ 	unsigned char block_address_msb;
+ 	unsigned short block_address;
+ 	unsigned char cp;
+@@ -90,16 +96,48 @@ struct ms_register {
+ 
+ struct mspro_param_register {
+ 	unsigned char  system;
++#define MEMSTICK_SYS_SERIAL 0x80
++#define MEMSTICK_SYS_PAR4   0x00
++#define MEMSTICK_SYS_PAR8   0x40
++
++	unsigned short data_count;
++	unsigned int   data_address;
++	unsigned char  tpc_param;
++} __attribute__((packed));
++
++struct mspro_io_info_register {
++	unsigned char version;
++	unsigned char io_category;
++	unsigned char current_req;
++	unsigned char card_opt_info;
++	unsigned char rdy_wait_time;
++} __attribute__((packed));
++
++struct mspro_io_func_register {
++	unsigned char func_enable;
++	unsigned char func_select;
++	unsigned char func_intmask;
++	unsigned char transfer_mode;
++} __attribute__((packed));
++
++struct mspro_io_cmd_register {
++	unsigned short tpc_param;
+ 	unsigned short data_count;
+ 	unsigned int   data_address;
+-	unsigned char  cmd_param;
+ } __attribute__((packed));
+ 
+ struct mspro_register {
+-	struct ms_status_register    status;
+-	struct ms_id_register        id;
+-	unsigned char                reserved[8];
+-	struct mspro_param_register  param;
++	struct ms_status_register     status;
++	struct ms_id_register         id;
++	unsigned char                 reserved0[8];
++	struct mspro_param_register   param;
++	unsigned char                 reserved1[8];
++	struct mspro_io_info_register io_info;
++	struct mspro_io_func_register io_func;
++	unsigned char                 reserved2[7];
++	struct mspro_io_cmd_register  io_cmd;
++	unsigned char                 io_int;
++	unsigned char                 io_int_func;
+ } __attribute__((packed));
+ 
+ struct ms_register_addr {
+@@ -110,49 +148,55 @@ struct ms_register_addr {
+ } __attribute__((packed));
+ 
+ enum {
++	MS_TPC_READ_MG_STATUS   = 0x01,
+ 	MS_TPC_READ_LONG_DATA   = 0x02,
+ 	MS_TPC_READ_SHORT_DATA  = 0x03,
++	MS_TPC_READ_MG_DATA     = 0x03,
+ 	MS_TPC_READ_REG         = 0x04,
+-	MS_TPC_READ_IO_DATA     = 0x05, /* unverified */
++	MS_TPC_READ_QUAD_DATA   = 0x05,
++	MS_TPC_READ_IO_DATA     = 0x05,
+ 	MS_TPC_GET_INT          = 0x07,
+ 	MS_TPC_SET_RW_REG_ADRS  = 0x08,
+ 	MS_TPC_EX_SET_CMD       = 0x09,
+-	MS_TPC_WRITE_IO_DATA    = 0x0a, /* unverified */
++	MS_TPC_WRITE_QUAD_DATA  = 0x0a,
++	MS_TPC_WRITE_IO_DATA    = 0x0a,
+ 	MS_TPC_WRITE_REG        = 0x0b,
+ 	MS_TPC_WRITE_SHORT_DATA = 0x0c,
++	MS_TPC_WRITE_MG_DATA    = 0x0c,
+ 	MS_TPC_WRITE_LONG_DATA  = 0x0d,
+ 	MS_TPC_SET_CMD          = 0x0e
+ };
+ 
+ enum {
+-	MS_CMD_BLOCK_END     = 0x33,
+-	MS_CMD_RESET         = 0x3c,
+-	MS_CMD_BLOCK_WRITE   = 0x55,
+-	MS_CMD_SLEEP         = 0x5a,
+-	MS_CMD_BLOCK_ERASE   = 0x99,
+-	MS_CMD_BLOCK_READ    = 0xaa,
+-	MS_CMD_CLEAR_BUF     = 0xc3,
+-	MS_CMD_FLASH_STOP    = 0xcc,
+-	MSPRO_CMD_FORMAT     = 0x10,
+-	MSPRO_CMD_SLEEP      = 0x11,
+-	MSPRO_CMD_READ_DATA  = 0x20,
+-	MSPRO_CMD_WRITE_DATA = 0x21,
+-	MSPRO_CMD_READ_ATRB  = 0x24,
+-	MSPRO_CMD_STOP       = 0x25,
+-	MSPRO_CMD_ERASE      = 0x26,
+-	MSPRO_CMD_SET_IBA    = 0x46,
+-	MSPRO_CMD_SET_IBD    = 0x47
+-/*
+-	MSPRO_CMD_RESET
+-	MSPRO_CMD_WAKEUP
+-	MSPRO_CMD_IN_IO_DATA
+-	MSPRO_CMD_OUT_IO_DATA
+-	MSPRO_CMD_READ_IO_ATRB
+-	MSPRO_CMD_IN_IO_FIFO
+-	MSPRO_CMD_OUT_IO_FIFO
+-	MSPRO_CMD_IN_IOM
+-	MSPRO_CMD_OUT_IOM
+-*/
++	MS_CMD_BLOCK_END       = 0x33,
++	MS_CMD_RESET           = 0x3c,
++	MS_CMD_BLOCK_WRITE     = 0x55,
++	MS_CMD_SLEEP           = 0x5a,
++	MS_CMD_BLOCK_ERASE     = 0x99,
++	MS_CMD_BLOCK_READ      = 0xaa,
++	MS_CMD_CLEAR_BUF       = 0xc3,
++	MS_CMD_FLASH_STOP      = 0xcc,
++	MS_CMD_LOAD_ID         = 0x60,
++	MS_CMD_CMP_ICV         = 0x7f,
++	MSPRO_CMD_FORMAT       = 0x10,
++	MSPRO_CMD_SLEEP        = 0x11,
++	MSPRO_CMD_WAKEUP       = 0x12,
++	MSPRO_CMD_READ_DATA    = 0x20,
++	MSPRO_CMD_WRITE_DATA   = 0x21,
++	MSPRO_CMD_READ_ATRB    = 0x24,
++	MSPRO_CMD_STOP         = 0x25,
++	MSPRO_CMD_ERASE        = 0x26,
++	MSPRO_CMD_READ_QUAD    = 0x27,
++	MSPRO_CMD_WRITE_QUAD   = 0x28,
++	MSPRO_CMD_SET_IBD      = 0x46,
++	MSPRO_CMD_GET_IBD      = 0x47,
++	MSPRO_CMD_IN_IO_DATA   = 0xb0,
++	MSPRO_CMD_OUT_IO_DATA  = 0xb1,
++	MSPRO_CMD_READ_IO_ATRB = 0xb2,
++	MSPRO_CMD_IN_IO_FIFO   = 0xb3,
++	MSPRO_CMD_OUT_IO_FIFO  = 0xb4,
++	MSPRO_CMD_IN_IOM       = 0xb5,
++	MSPRO_CMD_OUT_IOM      = 0xb6,
+ };
+ 
+ /*** Driver structures and functions ***/
+@@ -165,7 +209,8 @@ enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE };
+ #define MEMSTICK_POWER_ON  1
+ 
+ #define MEMSTICK_SERIAL   0
+-#define MEMSTICK_PARALLEL 1
++#define MEMSTICK_PAR4     1
++#define MEMSTICK_PAR8     2
+ 
+ struct memstick_host;
+ struct memstick_driver;
+@@ -195,11 +240,7 @@ struct memstick_request {
+ 	unsigned char data_dir:1,
+ 		      need_card_int:1,
+ 		      get_int_reg:1,
+-		      io_type:2;
+-#define               MEMSTICK_IO_NONE 0
+-#define               MEMSTICK_IO_VAL  1
+-#define               MEMSTICK_IO_SG   2
+-
++		      long_data:1;
+ 	unsigned char int_reg;
+ 	int           error;
+ 	union {
+@@ -231,8 +272,9 @@ struct memstick_host {
+ 	struct mutex        lock;
+ 	unsigned int        id;
+ 	unsigned int        caps;
+-#define MEMSTICK_CAP_PARALLEL      1
+-#define MEMSTICK_CAP_AUTO_GET_INT  2
++#define MEMSTICK_CAP_AUTO_GET_INT  1
++#define MEMSTICK_CAP_PAR4          2
++#define MEMSTICK_CAP_PAR8          4
+ 
+ 	struct work_struct  media_checker;
+ 	struct class_device cdev;
+@@ -270,6 +312,8 @@ int memstick_add_host(struct memstick_host *host);
+ void memstick_remove_host(struct memstick_host *host);
+ void memstick_free_host(struct memstick_host *host);
+ void memstick_detect_change(struct memstick_host *host);
++void memstick_suspend_host(struct memstick_host *host);
++void memstick_resume_host(struct memstick_host *host);
+ 
+ void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc,
+ 			  struct scatterlist *sg);
+diff --git a/include/linux/mm.h b/include/linux/mm.h
+index 3f3ccfe..b695875 100644
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -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)
+ {
+diff --git a/include/linux/netfilter/nfnetlink_compat.h b/include/linux/netfilter/nfnetlink_compat.h
+index 02a42d8..e145176 100644
+--- a/include/linux/netfilter/nfnetlink_compat.h
++++ b/include/linux/netfilter/nfnetlink_compat.h
+@@ -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 */
+diff --git a/include/linux/pci.h b/include/linux/pci.h
+index f3165e7..38eff19 100644
+--- a/include/linux/pci.h
++++ b/include/linux/pci.h
+@@ -389,13 +389,13 @@ struct pci_driver {
+ #define	to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
+ 
+ /**
+- * DECLARE_PCI_DEVICE_TABLE - macro used to describe a pci device table
++ * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table
+  * @_table: device table name
+  *
+  * This macro is used to create a struct pci_device_id array (a device table)
+  * in a generic manner.
+  */
+-#define DECLARE_PCI_DEVICE_TABLE(_table) \
++#define DEFINE_PCI_DEVICE_TABLE(_table) \
+ 	const struct pci_device_id _table[] __devinitconst
+ 
+ /**
+diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
+index effdb55..70eb3c8 100644
+--- a/include/linux/pci_ids.h
++++ b/include/linux/pci_ids.h
+@@ -2184,6 +2184,7 @@
+ #define PCI_DEVICE_ID_JMICRON_JMB366	0x2366
+ #define PCI_DEVICE_ID_JMICRON_JMB368	0x2368
+ #define PCI_DEVICE_ID_JMICRON_JMB38X_SD	0x2381
++#define PCI_DEVICE_ID_JMICRON_JMB38X_MS	0x2383
+ 
+ #define PCI_VENDOR_ID_KORENIX		0x1982
+ #define PCI_DEVICE_ID_KORENIX_JETCARDF0	0x1600
+diff --git a/include/linux/pmu.h b/include/linux/pmu.h
+index 4c5f653..cafe98d 100644
+--- a/include/linux/pmu.h
++++ b/include/linux/pmu.h
+@@ -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 */
+diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
+index d9a9e71..9b6c935 100644
+--- a/include/linux/proc_fs.h
++++ b/include/linux/proc_fs.h
+@@ -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/tifm.h b/include/linux/tifm.h
+index da76ed8..848c0f3 100644
+--- a/include/linux/tifm.h
++++ b/include/linux/tifm.h
+@@ -70,9 +70,9 @@ enum {
+ 
+ #define TIFM_FIFO_ENABLE          0x00000001
+ #define TIFM_FIFO_READY           0x00000001
++#define TIFM_FIFO_MORE            0x00000008
+ #define TIFM_FIFO_INT_SETALL      0x0000ffff
+ #define TIFM_FIFO_INTMASK         0x00000005
+-#define TIFM_FIFO_SIZE            0x00000200
+ 
+ #define TIFM_DMA_RESET            0x00000002
+ #define TIFM_DMA_TX               0x00008000
+diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild
+index b8cba1d..42e84fc 100644
+--- a/include/linux/usb/Kbuild
++++ b/include/linux/usb/Kbuild
+@@ -3,5 +3,5 @@ header-y += cdc.h
+ header-y += ch9.h
+ header-y += gadgetfs.h
+ header-y += midi.h
+-unifdef-y += g_printer.h
++header-y += g_printer.h
+ 
+diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
+index aa3047f..f329529 100644
+--- a/include/linux/usb/gadget.h
++++ b/include/linux/usb/gadget.h
+@@ -15,8 +15,6 @@
+ #ifndef __LINUX_USB_GADGET_H
+ #define __LINUX_USB_GADGET_H
+ 
+-#ifdef __KERNEL__
+-
+ struct usb_ep;
+ 
+ /**
+@@ -848,6 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
+ 
+ extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit;
+ 
+-#endif  /* __KERNEL__ */
+-
+ #endif	/* __LINUX_USB_GADGET_H */
+diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
+index 771d177..750648d 100644
+--- a/include/net/bluetooth/bluetooth.h
++++ b/include/net/bluetooth/bluetooth.h
+@@ -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);
+diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h
+index 32c385d..0788c23 100644
+--- a/include/net/irda/irttp.h
++++ b/include/net/irda/irttp.h
+@@ -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;
+ }
+diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
+index 28738b7..923f2b8 100644
+--- a/include/net/net_namespace.h
++++ b/include/net/net_namespace.h
+@@ -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;
+ 
+diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
+index 49aac63..f736e84 100644
+--- a/include/net/netfilter/nf_conntrack_extend.h
++++ b/include/net/netfilter/nf_conntrack_extend.h
+@@ -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];
+ };
+ 
+diff --git a/init/Kconfig b/init/Kconfig
+index 074ac97..a97924b 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -865,38 +865,10 @@ source "block/Kconfig"
+ config PREEMPT_NOTIFIERS
+ 	bool
+ 
+-choice
+-	prompt "RCU implementation type:"
+-	default CLASSIC_RCU
+-	help
+-	  This allows you to choose either the classic RCU implementation
+-	  that is designed for best read-side performance on non-realtime
+-	  systems, or the preemptible RCU implementation for best latency
+-	  on realtime systems.  Note that some kernel preemption modes
+-	  will restrict your choice.
+-
+-	  Select the default if you are unsure.
+-
+ config CLASSIC_RCU
+-	bool "Classic RCU"
++	def_bool !PREEMPT_RCU
+ 	help
+ 	  This option selects the classic RCU implementation that is
+ 	  designed for best read-side performance on non-realtime
+-	  systems.
+-
+-	  Say Y if you are unsure.
+-
+-config PREEMPT_RCU
+-	bool "Preemptible RCU"
+-	depends on PREEMPT
+-	help
+-	  This option reduces the latency of the kernel by making certain
+-	  RCU sections preemptible. Normally RCU code is non-preemptible, if
+-	  this option is selected then read-only RCU sections become
+-	  preemptible. This helps latency, but may expose bugs due to
+-	  now-naive assumptions about each RCU read-side critical section
+-	  remaining on a given CPU through its execution.
+-
+-	  Say N if you are unsure.
+-
+-endchoice
++	  systems.  Classic RCU is the default.  Note that the
++	  PREEMPT_RCU symbol is used to select/deselect this option.
+diff --git a/ipc/shm.c b/ipc/shm.c
+index c47e872..cc63fae 100644
+--- a/ipc/shm.c
++++ b/ipc/shm.c
+@@ -271,9 +271,10 @@ static struct mempolicy *shm_get_policy(struct vm_area_struct *vma,
+ 
+ 	if (sfd->vm_ops->get_policy)
+ 		pol = sfd->vm_ops->get_policy(vma, addr);
+-	else if (vma->vm_policy)
++	else if (vma->vm_policy) {
+ 		pol = vma->vm_policy;
+-	else
++		mpol_get(pol);	/* get_vma_policy() expects this */
++	} else
+ 		pol = current->mempolicy;
+ 	return pol;
+ }
+diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
+index 0669b70..9fdba03 100644
+--- a/kernel/Kconfig.preempt
++++ b/kernel/Kconfig.preempt
+@@ -52,8 +52,23 @@ config PREEMPT
+ 
+ endchoice
+ 
++config PREEMPT_RCU
++	bool "Preemptible RCU"
++	depends on PREEMPT
++	default n
++	help
++	  This option reduces the latency of the kernel by making certain
++	  RCU sections preemptible. Normally RCU code is non-preemptible, if
++	  this option is selected then read-only RCU sections become
++	  preemptible. This helps latency, but may expose bugs due to
++	  now-naive assumptions about each RCU read-side critical section
++	  remaining on a given CPU through its execution.
++
++	  Say N if you are unsure.
++
+ config RCU_TRACE
+ 	bool "Enable tracing for RCU - currently stats in debugfs"
++	depends on PREEMPT_RCU
+ 	select DEBUG_FS
+ 	default y
+ 	help
+diff --git a/kernel/module.c b/kernel/module.c
+index be4807f..5d437bf 100644
+--- a/kernel/module.c
++++ b/kernel/module.c
+@@ -2178,10 +2178,20 @@ sys_init_module(void __user *umod,
+ 		wake_up(&module_wq);
+ 		return ret;
+ 	}
++	if (ret > 0) {
++		printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d, "
++				    "it should follow 0/-E convention\n"
++		       KERN_WARNING "%s: loading module anyway...\n",
++		       __func__, mod->name, ret,
++		       __func__);
++		dump_stack();
++	}
+ 
+-	/* Now it's a first class citizen! */
+-	mutex_lock(&module_mutex);
++	/* Now it's a first class citizen!  Wake up anyone waiting for it. */
+ 	mod->state = MODULE_STATE_LIVE;
++	wake_up(&module_wq);
++
++	mutex_lock(&module_mutex);
+ 	/* Drop initial reference. */
+ 	module_put(mod);
+ 	unwind_remove_table(mod->unwind_info, 1);
+@@ -2190,7 +2200,6 @@ sys_init_module(void __user *umod,
+ 	mod->init_size = 0;
+ 	mod->init_text_size = 0;
+ 	mutex_unlock(&module_mutex);
+-	wake_up(&module_wq);
+ 
+ 	return 0;
+ }
+diff --git a/kernel/sched.c b/kernel/sched.c
+index b02e4fc..1cb53fb 100644
+--- a/kernel/sched.c
++++ b/kernel/sched.c
+@@ -5813,13 +5813,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
+ 		/* Must be high prio: stop_machine expects to yield to it. */
+ 		rq = task_rq_lock(p, &flags);
+ 		__setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1);
+-
+-		/* Update our root-domain */
+-		if (rq->rd) {
+-			BUG_ON(!cpu_isset(cpu, rq->rd->span));
+-			cpu_set(cpu, rq->rd->online);
+-		}
+-
+ 		task_rq_unlock(rq, &flags);
+ 		cpu_rq(cpu)->migration_thread = p;
+ 		break;
+@@ -5828,6 +5821,15 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
+ 	case CPU_ONLINE_FROZEN:
+ 		/* Strictly unnecessary, as first user will wake it. */
+ 		wake_up_process(cpu_rq(cpu)->migration_thread);
++
++		/* Update our root-domain */
++		rq = cpu_rq(cpu);
++		spin_lock_irqsave(&rq->lock, flags);
++		if (rq->rd) {
++			BUG_ON(!cpu_isset(cpu, rq->rd->span));
++			cpu_set(cpu, rq->rd->online);
++		}
++		spin_unlock_irqrestore(&rq->lock, flags);
+ 		break;
+ 
+ #ifdef CONFIG_HOTPLUG_CPU
+@@ -5879,7 +5881,8 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
+ 		spin_unlock_irq(&rq->lock);
+ 		break;
+ 
+-	case CPU_DOWN_PREPARE:
++	case CPU_DYING:
++	case CPU_DYING_FROZEN:
+ 		/* Update our root-domain */
+ 		rq = cpu_rq(cpu);
+ 		spin_lock_irqsave(&rq->lock, flags);
+@@ -6103,6 +6106,8 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd)
+ 	rq->rd = rd;
+ 
+ 	cpu_set(rq->cpu, rd->span);
++	if (cpu_isset(rq->cpu, cpu_online_map))
++		cpu_set(rq->cpu, rd->online);
+ 
+ 	for (class = sched_class_highest; class; class = class->next) {
+ 		if (class->join_domain)
+diff --git a/mm/filemap.c b/mm/filemap.c
+index ab98557..df343d1 100644
+--- a/mm/filemap.c
++++ b/mm/filemap.c
+@@ -1742,21 +1742,27 @@ size_t iov_iter_copy_from_user(struct page *page,
+ }
+ EXPORT_SYMBOL(iov_iter_copy_from_user);
+ 
+-static void __iov_iter_advance_iov(struct iov_iter *i, size_t bytes)
++void iov_iter_advance(struct iov_iter *i, size_t bytes)
+ {
++	BUG_ON(i->count < bytes);
++
+ 	if (likely(i->nr_segs == 1)) {
+ 		i->iov_offset += bytes;
++		i->count -= bytes;
+ 	} else {
+ 		const struct iovec *iov = i->iov;
+ 		size_t base = i->iov_offset;
+ 
+ 		/*
+ 		 * The !iov->iov_len check ensures we skip over unlikely
+-		 * zero-length segments.
++		 * zero-length segments (without overruning the iovec).
+ 		 */
+-		while (bytes || !iov->iov_len) {
+-			int copy = min(bytes, iov->iov_len - base);
++		while (bytes || unlikely(!iov->iov_len && i->count)) {
++			int copy;
+ 
++			copy = min(bytes, iov->iov_len - base);
++			BUG_ON(!i->count || i->count < copy);
++			i->count -= copy;
+ 			bytes -= copy;
+ 			base += copy;
+ 			if (iov->iov_len == base) {
+@@ -1768,14 +1774,6 @@ static void __iov_iter_advance_iov(struct iov_iter *i, size_t bytes)
+ 		i->iov_offset = base;
+ 	}
+ }
+-
+-void iov_iter_advance(struct iov_iter *i, size_t bytes)
+-{
+-	BUG_ON(i->count < bytes);
+-
+-	__iov_iter_advance_iov(i, bytes);
+-	i->count -= bytes;
+-}
+ EXPORT_SYMBOL(iov_iter_advance);
+ 
+ /*
+diff --git a/mm/hugetlb.c b/mm/hugetlb.c
+index dcacc81..74c1b6b 100644
+--- a/mm/hugetlb.c
++++ b/mm/hugetlb.c
+@@ -286,6 +286,12 @@ static struct page *alloc_buddy_huge_page(struct vm_area_struct *vma,
+ 
+ 	spin_lock(&hugetlb_lock);
+ 	if (page) {
++		/*
++		 * This page is now managed by the hugetlb allocator and has
++		 * no users -- drop the buddy allocator's reference.
++		 */
++		put_page_testzero(page);
++		VM_BUG_ON(page_count(page));
+ 		nid = page_to_nid(page);
+ 		set_compound_page_dtor(page, free_huge_page);
+ 		/*
+@@ -369,13 +375,14 @@ free:
+ 			enqueue_huge_page(page);
+ 		else {
+ 			/*
+-			 * Decrement the refcount and free the page using its
+-			 * destructor.  This must be done with hugetlb_lock
++			 * The page has a reference count of zero already, so
++			 * call free_huge_page directly instead of using
++			 * put_page.  This must be done with hugetlb_lock
+ 			 * unlocked which is safe because free_huge_page takes
+ 			 * hugetlb_lock before deciding how to free the page.
+ 			 */
+ 			spin_unlock(&hugetlb_lock);
+-			put_page(page);
++			free_huge_page(page);
+ 			spin_lock(&hugetlb_lock);
+ 		}
+ 	}
+diff --git a/mm/mempolicy.c b/mm/mempolicy.c
+index 6c7ba1a..3c36011 100644
+--- a/mm/mempolicy.c
++++ b/mm/mempolicy.c
+@@ -1296,7 +1296,9 @@ struct zonelist *huge_zonelist(struct vm_area_struct *vma, unsigned long addr,
+ 		unsigned nid;
+ 
+ 		nid = interleave_nid(pol, vma, addr, HPAGE_SHIFT);
+-		__mpol_free(pol);		/* finished with pol */
++		if (unlikely(pol != &default_policy &&
++				pol != current->mempolicy))
++			__mpol_free(pol);	/* finished with pol */
+ 		return NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_flags);
+ 	}
+ 
+@@ -1360,6 +1362,9 @@ alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
+ 		unsigned nid;
+ 
+ 		nid = interleave_nid(pol, vma, addr, PAGE_SHIFT);
++		if (unlikely(pol != &default_policy &&
++				pol != current->mempolicy))
++			__mpol_free(pol);	/* finished with pol */
+ 		return alloc_page_interleave(gfp, 0, nid);
+ 	}
+ 	zl = zonelist_policy(gfp, pol);
+diff --git a/net/bluetooth/bnep/bnep.h b/net/bluetooth/bnep/bnep.h
+index a299228..e69244d 100644
+--- a/net/bluetooth/bnep/bnep.h
++++ b/net/bluetooth/bnep/bnep.h
+@@ -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)
+ {
+diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
+index 81065e5..201e5b1 100644
+--- a/net/bluetooth/bnep/sock.c
++++ b/net/bluetooth/bnep/sock.c
+@@ -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;
+ }
+diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
+index 930b58e..aec6929 100644
+--- a/net/bluetooth/hci_core.c
++++ b/net/bluetooth/hci_core.c
+@@ -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;
+diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
+index 1499132..b5d4019 100644
+--- a/net/bluetooth/hci_sock.c
++++ b/net/bluetooth/hci_sock.c
+@@ -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;
+ }
+diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
+index ed750f9..01578f5 100644
+--- a/net/ipv4/tcp_output.c
++++ b/net/ipv4/tcp_output.c
+@@ -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;
+ }
+ 
+diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
+index e06bf00..684ec9c 100644
+--- a/net/netfilter/nf_conntrack_expect.c
++++ b/net/netfilter/nf_conntrack_expect.c
+@@ -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;
+ 	}
+diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
+index 8b9be1e..2bd9963 100644
+--- a/net/netfilter/nf_conntrack_extend.c
++++ b/net/netfilter/nf_conntrack_extend.c
+@@ -19,14 +19,6 @@
+ 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;
+ 	}
+ }
+ 
+diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
+index bfc2928..ddc80ea 100644
+--- a/net/netfilter/nf_queue.c
++++ b/net/netfilter/nf_queue.c
+@@ -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;
+ 	}
+diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
+index 7efa40d..bf3f19b 100644
+--- a/net/netfilter/nfnetlink_log.c
++++ b/net/netfilter/nfnetlink_log.c
+@@ -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;
+diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
+index 0043d3a..012cb69 100644
+--- a/net/netfilter/nfnetlink_queue.c
++++ b/net/netfilter/nfnetlink_queue.c
+@@ -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();
+diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
+index e9a8794..9fa2e08 100644
+--- a/net/netfilter/xt_time.c
++++ b/net/netfilter/xt_time.c
+@@ -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)
+diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c
+index f19121d..a39bf97 100644
+--- a/net/rxrpc/ar-recvmsg.c
++++ b/net/rxrpc/ar-recvmsg.c
+@@ -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);
+ 		}
+diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
+index a27511e..ceefda0 100644
+--- a/net/sctp/bind_addr.c
++++ b/net/sctp/bind_addr.c
+@@ -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;
+diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
+index 87f9405..9aa0733 100644
+--- a/net/sctp/ipv6.c
++++ b/net/sctp/ipv6.c
+@@ -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;
+ 	}
+diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
+index 688546d..ad0a406 100644
+--- a/net/sctp/protocol.c
++++ b/net/sctp/protocol.c
+@@ -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;
+ 	}
+diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
+index e45be4e..578630e 100644
+--- a/net/sctp/sm_make_chunk.c
++++ b/net/sctp/sm_make_chunk.c
+@@ -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)
+diff --git a/net/sctp/socket.c b/net/sctp/socket.c
+index 9398926..d994d82 100644
+--- a/net/sctp/socket.c
++++ b/net/sctp/socket.c
+@@ -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,
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+index 0598b22..981f190 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+@@ -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,
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index f09444c..16fd3f6 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -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)
+diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
+index 675672f..f48838a 100644
+--- a/sound/usb/usbaudio.c
++++ b/sound/usb/usbaudio.c
+@@ -1762,6 +1762,8 @@ static int check_hw_params_convention(struct snd_usb_substream *subs)
+ 
+ 	channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
+ 	rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
++	if (!channels || !rates)
++		goto __out;
+ 
+ 	list_for_each(p, &subs->fmt_list) {
+ 		struct audioformat *f;

Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	(original)
+++ dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	Thu Mar 13 10:27:40 2008
@@ -1,4 +1,4 @@
-+ bugfix/all/patch-2.6.25-rc5-git2
++ bugfix/all/patch-2.6.25-rc5-git3
 + debian/version.patch
 + debian/kernelvariables.patch
 + debian/doc-build-parallel.patch



More information about the Kernel-svn-changes mailing list