[kernel/f17] Linux v3.6.1

Josh Boyer jwboyer at fedoraproject.org
Tue Oct 9 12:23:55 UTC 2012


commit 43e4600ffee62dc6c1a3876918840cb31ac64b52
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Tue Oct 9 08:21:23 2012 -0400

    Linux v3.6.1
    
    - Include patches from 3.6.2 stable queue
    - Drop unhandled irq patch.  Proving to be not worthwhile

 3.6.2-stable-queue.patch                           | 3967 ++++++++++++++++++++
 ...pusets-suspend-Dont-modify-cpusets-during.patch |  146 -
 config-arm-generic                                 |  414 +--
 config-arm-highbank                                |   46 +-
 config-arm-imx                                     |   40 +-
 config-arm-kirkwood                                |   19 +-
 config-arm-omap                                    | 1020 +-----
 config-arm-tegra                                   |   48 +-
 config-debug                                       |    3 +
 config-generic                                     |  285 +-
 config-nodebug                                     |    3 +
 config-powerpc-generic                             |   14 +-
 config-powerpc32-generic                           |    4 +-
 config-powerpc64                                   |    3 +-
 config-sparc64-generic                             |    2 +
 config-x86-32-generic                              |    7 +-
 config-x86-generic                                 |   17 +-
 config-x86_64-generic                              |    3 +
 crypto-aesni-intel-fix-wrong-kfree-pointer.patch   |   45 -
 ...allow-aesni-intel-and-ghash_clmulni-intel.patch |  122 -
 kernel.spec                                        |   45 +-
 power-x86-destdir.patch                            |    7 +-
 sources                                            |    4 +-
 team-update-from-net-next.patch                    | 1839 ---------
 unhandled-irqs-switch-to-polling.patch             |  245 --
 uprobes-backport.patch                             | 1742 ---------
 26 files changed, 4586 insertions(+), 5504 deletions(-)
---
diff --git a/3.6.2-stable-queue.patch b/3.6.2-stable-queue.patch
new file mode 100644
index 0000000..71a4454
--- /dev/null
+++ b/3.6.2-stable-queue.patch
@@ -0,0 +1,3967 @@
+From 9d6bd5f3d98404a9e6509f2c32d1f047029dae8f Mon Sep 17 00:00:00 2001
+From: Antonio Quartulli <ordex at autistici.org>
+Date: Tue, 2 Oct 2012 06:14:17 +0000
+Subject: 8021q: fix mac_len recomputation in vlan_untag()
+
+
+From: Antonio Quartulli <ordex at autistici.org>
+
+[ Upstream commit 5316cf9a5197eb80b2800e1acadde287924ca975 ]
+
+skb_reset_mac_len() relies on the value of the skb->network_header pointer,
+therefore we must wait for such pointer to be recalculated before computing
+the new mac_len value.
+
+Signed-off-by: Antonio Quartulli <ordex at autistici.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ net/8021q/vlan_core.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/net/8021q/vlan_core.c
++++ b/net/8021q/vlan_core.c
+@@ -105,7 +105,6 @@ static struct sk_buff *vlan_reorder_head
+ 		return NULL;
+ 	memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN);
+ 	skb->mac_header += VLAN_HLEN;
+-	skb_reset_mac_len(skb);
+ 	return skb;
+ }
+ 
+@@ -139,6 +138,8 @@ struct sk_buff *vlan_untag(struct sk_buf
+ 
+ 	skb_reset_network_header(skb);
+ 	skb_reset_transport_header(skb);
++	skb_reset_mac_len(skb);
++
+ 	return skb;
+ 
+ err_free:
+From fc54ab72959edbf229b65ac74b2f122d799ca002 Mon Sep 17 00:00:00 2001
+From: Lin Ming <ming.m.lin at intel.com>
+Date: Mon, 16 Jul 2012 16:30:21 +0800
+Subject: ACPI: run _OSC after ACPI_FULL_INITIALIZATION
+
+From: Lin Ming <ming.m.lin at intel.com>
+
+commit fc54ab72959edbf229b65ac74b2f122d799ca002 upstream.
+
+The _OSC method may exist in module level code,
+so it must be called after ACPI_FULL_INITIALIZATION
+
+On some new platforms with Zero-Power-Optical-Disk-Drive (ZPODD)
+support, this fix is necessary to save power.
+
+Signed-off-by: Lin Ming <ming.m.lin at intel.com>
+Tested-by: Aaron Lu <aaron.lu at intel.com>
+Signed-off-by: Len Brown <len.brown at intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/acpi/bus.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/acpi/bus.c
++++ b/drivers/acpi/bus.c
+@@ -994,8 +994,6 @@ static int __init acpi_bus_init(void)
+ 	status = acpi_ec_ecdt_probe();
+ 	/* Ignore result. Not having an ECDT is not fatal. */
+ 
+-	acpi_bus_osc_support();
+-
+ 	status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
+ 	if (ACPI_FAILURE(status)) {
+ 		printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
+@@ -1003,6 +1001,12 @@ static int __init acpi_bus_init(void)
+ 	}
+ 
+ 	/*
++	 * _OSC method may exist in module level code,
++	 * so it must be run after ACPI_FULL_INITIALIZATION
++	 */
++	acpi_bus_osc_support();
++
++	/*
+ 	 * _PDC control method may load dynamic SSDT tables,
+ 	 * and we need to install the table handler before that.
+ 	 */
+From 8ef102c6b4bc996ff96ca52b34775fe931ec90c9 Mon Sep 17 00:00:00 2001
+From: Wade Farnsworth <wade_farnsworth at mentor.com>
+Date: Tue, 2 Oct 2012 17:08:30 +0100
+Subject: ARM: 7548/1: include linux/sched.h in syscall.h
+
+From: Wade Farnsworth <wade_farnsworth at mentor.com>
+
+commit 8ef102c6b4bc996ff96ca52b34775fe931ec90c9 upstream.
+
+The syscall tracing patch introduces a compile bug in lttng-modules
+when the latter calls syscall_get_nr(), similar to the following:
+
+<path-to-linux>/arch/arm/include/asm/syscall.h:21:2: error: implicit declaration of function 'task_thread_info' [-Werror=implicit-function-declaration]
+
+The issue is that we are using task_thread_info() in the
+syscall_get_nr() function in asm/syscall.h, but not explicitly
+including sched.h from this file, so we can expect this bug might
+surface any time that syscall_get_nr() is called.
+
+Explicitly including sched.h solves the problem.
+
+Signed-off-by: Wade Farnsworth <wade_farnsworth at mentor.com>
+Acked-by: Will Deacon <will.deacon at arm.com>
+Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ arch/arm/include/asm/syscall.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/include/asm/syscall.h
++++ b/arch/arm/include/asm/syscall.h
+@@ -8,6 +8,7 @@
+ #define _ASM_ARM_SYSCALL_H
+ 
+ #include <linux/err.h>
++#include <linux/sched.h>
+ 
+ extern const unsigned long sys_call_table[];
+ 
+From 0eb5a35801df3c438ce3fc91310a415ea4452c00 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam at freescale.com>
+Date: Thu, 4 Oct 2012 17:11:16 -0700
+Subject: drivers/dma/dmaengine.c: lower the priority of 'failed to get' dma channel message
+
+From: Fabio Estevam <fabio.estevam at freescale.com>
+
+commit 0eb5a35801df3c438ce3fc91310a415ea4452c00 upstream.
+
+Do the same as commit a03a202e95fd ("dmaengine: failure to get a
+specific DMA channel is not critical") to get rid of the following
+messages during kernel boot:
+
+  dmaengine_get: failed to get dma1chan0: (-22)
+  dmaengine_get: failed to get dma1chan1: (-22)
+  dmaengine_get: failed to get dma1chan2: (-22)
+  dmaengine_get: failed to get dma1chan3: (-22)
+  ..
+
+Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
+Cc: Vinod Koul <vinod.koul at intel.com>
+Cc: Dan Williams <dan.j.williams at intel.com>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/dma/dmaengine.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/dma/dmaengine.c
++++ b/drivers/dma/dmaengine.c
+@@ -582,7 +582,7 @@ void dmaengine_get(void)
+ 				list_del_rcu(&device->global_node);
+ 				break;
+ 			} else if (err)
+-				pr_err("%s: failed to get %s: (%d)\n",
++				pr_debug("%s: failed to get %s: (%d)\n",
+ 				       __func__, dma_chan_name(chan), err);
+ 		}
+ 	}
+From 0f6d93aa9d96cc9022b51bd10d462b03296be146 Mon Sep 17 00:00:00 2001
+From: Martin Michlmayr <tbm at cyrius.com>
+Date: Thu, 4 Oct 2012 17:11:25 -0700
+Subject: drivers/scsi/atp870u.c: fix bad use of udelay
+
+From: Martin Michlmayr <tbm at cyrius.com>
+
+commit 0f6d93aa9d96cc9022b51bd10d462b03296be146 upstream.
+
+The ACARD driver calls udelay() with a value > 2000, which leads to to
+the following compilation error on ARM:
+
+  ERROR: "__bad_udelay" [drivers/scsi/atp870u.ko] undefined!
+  make[1]: *** [__modpost] Error 1
+
+This is because udelay is defined on ARM, roughly speaking, as
+
+	#define udelay(n) ((n) > 2000 ? __bad_udelay() : \
+		__const_udelay((n) * ((2199023U*HZ)>>11)))
+
+The argument to __const_udelay is the number of jiffies to wait divided
+by 4, but this does not work unless the multiplication does not
+overflow, and that is what the build error is designed to prevent.  The
+intended behavior can be achieved by using mdelay to call udelay
+multiple times in a loop.
+
+[jrnieder at gmail.com: adding context]
+Signed-off-by: Martin Michlmayr <tbm at cyrius.com>
+Signed-off-by: Jonathan Nieder <jrnieder at gmail.com>
+Cc: James Bottomley <James.Bottomley at HansenPartnership.com>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/scsi/atp870u.c |   11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/drivers/scsi/atp870u.c
++++ b/drivers/scsi/atp870u.c
+@@ -1173,7 +1173,16 @@ wait_io1:
+ 	outw(val, tmport);
+ 	outb(2, 0x80);
+ TCM_SYNC:
+-	udelay(0x800);
++	/*
++	 * The funny division into multiple delays is to accomodate
++	 * arches like ARM where udelay() multiplies its argument by
++	 * a large number to initialize a loop counter.  To avoid
++	 * overflow, the maximum supported udelay is 2000 microseconds.
++	 *
++	 * XXX it would be more polite to find a way to use msleep()
++	 */
++	mdelay(2);
++	udelay(48);
+ 	if ((inb(tmport) & 0x80) == 0x00) {	/* bsy ? */
+ 		outw(0, tmport--);
+ 		outb(0, tmport);
+From df86b5765a48d5f557489577652bd6df145b0e1b Mon Sep 17 00:00:00 2001
+From: Florian Zumbiehl <florz at florz.de>
+Date: Tue, 2 Oct 2012 12:20:37 +0000
+Subject: drm/savage: re-add busmaster enable, regression fix
+
+From: Florian Zumbiehl <florz at florz.de>
+
+commit df86b5765a48d5f557489577652bd6df145b0e1b upstream.
+
+466e69b8b03b8c1987367912782bc12988ad8794 dropped busmaster enable from the
+global drm code and moved it to the individual drivers, but missed the savage
+driver. So, this re-adds busmaster enable to the savage driver, fixing the
+regression.
+
+Signed-off-by: Florian Zumbiehl <florz at florz.de>
+Reviewed-by: Alex Deucher <alexdeucher at gmail.com>
+Signed-off-by: Dave Airlie <airlied at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/gpu/drm/savage/savage_bci.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/gpu/drm/savage/savage_bci.c
++++ b/drivers/gpu/drm/savage/savage_bci.c
+@@ -547,6 +547,8 @@ int savage_driver_load(struct drm_device
+ 
+ 	dev_priv->chipset = (enum savage_family)chipset;
+ 
++	pci_set_master(dev->pdev);
++
+ 	return 0;
+ }
+ 
+From 8e30783b0b3270736b2cff6415c68b894bc411df Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab at redhat.com>
+Date: Tue, 2 Oct 2012 16:01:15 -0300
+Subject: drxk: allow loading firmware synchrousnously
+
+From: Mauro Carvalho Chehab <mchehab at redhat.com>
+
+commit 8e30783b0b3270736b2cff6415c68b894bc411df upstream.
+
+Due to udev-182, the firmware load was changed to be async, as
+otherwise udev would give up of loading a firmware.
+
+Add an option to return to the previous behaviour, async firmware
+loads cause failures with the tda18271 driver.
+
+Antti tested it with the following hardware:
+        Hauppauge WinTV HVR 930C
+        MaxMedia UB425-TC
+        PCTV QuatroStick nano (520e)
+
+Tested-by: Antti Palosaari <crope at iki.fi>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/media/dvb/frontends/drxk.h      |    2 ++
+ drivers/media/dvb/frontends/drxk_hard.c |   20 +++++++++++++++-----
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+--- a/drivers/media/dvb/frontends/drxk.h
++++ b/drivers/media/dvb/frontends/drxk.h
+@@ -28,6 +28,7 @@
+  *				A value of 0 (default) or lower indicates that
+  *				the correct number of parameters will be
+  *				automatically detected.
++ * @load_firmware_sync:		Force the firmware load to be synchronous.
+  *
+  * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
+  * UIO-3.
+@@ -39,6 +40,7 @@ struct drxk_config {
+ 	bool	parallel_ts;
+ 	bool	dynamic_clk;
+ 	bool	enable_merr_cfg;
++	bool	load_firmware_sync;
+ 
+ 	bool	antenna_dvbt;
+ 	u16	antenna_gpio;
+--- a/drivers/media/dvb/frontends/drxk_hard.c
++++ b/drivers/media/dvb/frontends/drxk_hard.c
+@@ -6609,15 +6609,25 @@ struct dvb_frontend *drxk_attach(const s
+ 
+ 	/* Load firmware and initialize DRX-K */
+ 	if (state->microcode_name) {
+-		status = request_firmware_nowait(THIS_MODULE, 1,
++		if (config->load_firmware_sync) {
++			const struct firmware *fw = NULL;
++
++			status = request_firmware(&fw, state->microcode_name,
++						  state->i2c->dev.parent);
++			if (status < 0)
++				fw = NULL;
++			load_firmware_cb(fw, state);
++		} else {
++			status = request_firmware_nowait(THIS_MODULE, 1,
+ 					      state->microcode_name,
+ 					      state->i2c->dev.parent,
+ 					      GFP_KERNEL,
+ 					      state, load_firmware_cb);
+-		if (status < 0) {
+-			printk(KERN_ERR
+-			"drxk: failed to request a firmware\n");
+-			return NULL;
++			if (status < 0) {
++				printk(KERN_ERR
++				       "drxk: failed to request a firmware\n");
++				return NULL;
++			}
+ 		}
+ 	} else if (init_drxk(state) < 0)
+ 		goto error;
+From 6ae5e060840589f567c1837613e8a9d34fc9188a Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab at redhat.com>
+Date: Tue, 2 Oct 2012 15:35:27 -0300
+Subject: em28xx: Make all em28xx extensions to be initialized asynchronously
+
+From: Mauro Carvalho Chehab <mchehab at redhat.com>
+
+commit 6ae5e060840589f567c1837613e8a9d34fc9188a upstream.
+
+em28xx-dvb, em28xx-alsa and em28xx-ir are typically initialized
+asyncrhronously. The exception for it is when those modules
+are loaded before em28xx (or before an em28xx card insertion) or
+when they're built in.
+
+Make the extentions to always load asynchronously. That allows
+having all DVB firmwares loaded synchronously with udev-182.
+
+Antti tested it with the following hardware:
+	Hauppauge WinTV HVR 930C
+	MaxMedia UB425-TC
+	PCTV QuatroStick nano (520e)
+
+Tested-by: Antti Palosaari <crope at iki.fi>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/media/video/em28xx/em28xx-cards.c |   22 ++++++++++------------
+ 1 file changed, 10 insertions(+), 12 deletions(-)
+
+--- a/drivers/media/video/em28xx/em28xx-cards.c
++++ b/drivers/media/video/em28xx/em28xx-cards.c
+@@ -2875,12 +2875,20 @@ static void em28xx_card_setup(struct em2
+ }
+ 
+ 
+-#if defined(CONFIG_MODULES) && defined(MODULE)
+ static void request_module_async(struct work_struct *work)
+ {
+ 	struct em28xx *dev = container_of(work,
+ 			     struct em28xx, request_module_wk);
+ 
++	/*
++	 * The em28xx extensions can be modules or builtin. If the
++	 * modules are already loaded or are built in, those extensions
++	 * can be initialised right now. Otherwise, the module init
++	 * code will do it.
++	 */
++	em28xx_init_extension(dev);
++
++#if defined(CONFIG_MODULES) && defined(MODULE)
+ 	if (dev->has_audio_class)
+ 		request_module("snd-usb-audio");
+ 	else if (dev->has_alsa_audio)
+@@ -2890,6 +2898,7 @@ static void request_module_async(struct
+ 		request_module("em28xx-dvb");
+ 	if (dev->board.ir_codes && !disable_ir)
+ 		request_module("em28xx-rc");
++#endif /* CONFIG_MODULES */
+ }
+ 
+ static void request_modules(struct em28xx *dev)
+@@ -2902,10 +2911,6 @@ static void flush_request_modules(struct
+ {
+ 	flush_work_sync(&dev->request_module_wk);
+ }
+-#else
+-#define request_modules(dev)
+-#define flush_request_modules(dev)
+-#endif /* CONFIG_MODULES */
+ 
+ /*
+  * em28xx_release_resources()
+@@ -3324,13 +3329,6 @@ static int em28xx_usb_probe(struct usb_i
+ 	 */
+ 	mutex_unlock(&dev->lock);
+ 
+-	/*
+-	 * These extensions can be modules. If the modules are already
+-	 * loaded then we can initialise the device now, otherwise we
+-	 * will initialise it when the modules load instead.
+-	 */
+-	em28xx_init_extension(dev);
+-
+ 	return 0;
+ 
+ unlock_and_free:
+From 6a08f447facb4f9e29fcc30fb68060bb5a0d21c2 Mon Sep 17 00:00:00 2001
+From: Bernd Schubert <bernd.schubert at itwm.fraunhofer.de>
+Date: Wed, 26 Sep 2012 21:24:57 -0400
+Subject: ext4: always set i_op in ext4_mknod()
+
+From: Bernd Schubert <bernd.schubert at itwm.fraunhofer.de>
+
+commit 6a08f447facb4f9e29fcc30fb68060bb5a0d21c2 upstream.
+
+ext4_special_inode_operations have their own ifdef CONFIG_EXT4_FS_XATTR
+to mask those methods. And ext4_iget also always sets it, so there is
+an inconsistency.
+
+Signed-off-by: Bernd Schubert <bernd.schubert at itwm.fraunhofer.de>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/namei.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/fs/ext4/namei.c
++++ b/fs/ext4/namei.c
+@@ -2149,9 +2149,7 @@ retry:
+ 	err = PTR_ERR(inode);
+ 	if (!IS_ERR(inode)) {
+ 		init_special_inode(inode, inode->i_mode, rdev);
+-#ifdef CONFIG_EXT4_FS_XATTR
+ 		inode->i_op = &ext4_special_inode_operations;
+-#endif
+ 		err = ext4_add_nondir(handle, dentry, inode);
+ 	}
+ 	ext4_journal_stop(handle);
+From 2ebd1704ded88a8ae29b5f3998b13959c715c4be Mon Sep 17 00:00:00 2001
+From: Yongqiang Yang <xiaoqiangnk at gmail.com>
+Date: Wed, 5 Sep 2012 01:27:50 -0400
+Subject: ext4: avoid duplicate writes of the backup bg descriptor blocks
+
+From: Yongqiang Yang <xiaoqiangnk at gmail.com>
+
+commit 2ebd1704ded88a8ae29b5f3998b13959c715c4be upstream.
+
+The resize code was needlessly writing the backup block group
+descriptor blocks multiple times (once per block group) during an
+online resize.
+
+Signed-off-by: Yongqiang Yang <xiaoqiangnk at gmail.com>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/resize.c |   10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/fs/ext4/resize.c
++++ b/fs/ext4/resize.c
+@@ -1358,13 +1358,15 @@ exit_journal:
+ 		err = err2;
+ 
+ 	if (!err) {
+-		int i;
++		int gdb_num = group / EXT4_DESC_PER_BLOCK(sb);
++		int gdb_num_end = ((group + flex_gd->count - 1) /
++				   EXT4_DESC_PER_BLOCK(sb));
++
+ 		update_backups(sb, sbi->s_sbh->b_blocknr, (char *)es,
+ 			       sizeof(struct ext4_super_block));
+-		for (i = 0; i < flex_gd->count; i++, group++) {
++		for (; gdb_num <= gdb_num_end; gdb_num++) {
+ 			struct buffer_head *gdb_bh;
+-			int gdb_num;
+-			gdb_num = group / EXT4_BLOCKS_PER_GROUP(sb);
++
+ 			gdb_bh = sbi->s_group_desc[gdb_num];
+ 			update_backups(sb, gdb_bh->b_blocknr, gdb_bh->b_data,
+ 				       gdb_bh->b_size);
+From 6df935ad2fced9033ab52078825fcaf6365f34b7 Mon Sep 17 00:00:00 2001
+From: Yongqiang Yang <xiaoqiangnk at gmail.com>
+Date: Wed, 5 Sep 2012 01:25:50 -0400
+Subject: ext4: don't copy non-existent gdt blocks when resizing
+
+From: Yongqiang Yang <xiaoqiangnk at gmail.com>
+
+commit 6df935ad2fced9033ab52078825fcaf6365f34b7 upstream.
+
+The resize code was copying blocks at the beginning of each block
+group in order to copy the superblock and block group descriptor table
+(gdt) blocks.  This was, unfortunately, being done even for block
+groups that did not have super blocks or gdt blocks.  This is a
+complete waste of perfectly good I/O bandwidth, to skip writing those
+blocks for sparse bg's.
+
+Signed-off-by: Yongqiang Yang <xiaoqiangnk at gmail.com>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/resize.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/fs/ext4/resize.c
++++ b/fs/ext4/resize.c
+@@ -456,6 +456,9 @@ static int setup_new_flex_group_blocks(s
+ 		gdblocks = ext4_bg_num_gdb(sb, group);
+ 		start = ext4_group_first_block_no(sb, group);
+ 
++		if (!ext4_bg_has_super(sb, group))
++			goto handle_itb;
++
+ 		/* Copy all of the GDT blocks into the backup in this group */
+ 		for (j = 0, block = start + 1; j < gdblocks; j++, block++) {
+ 			struct buffer_head *gdb;
+@@ -498,6 +501,7 @@ static int setup_new_flex_group_blocks(s
+ 				goto out;
+ 		}
+ 
++handle_itb:
+ 		/* Initialize group tables of the grop @group */
+ 		if (!(bg_flags[i] & EXT4_BG_INODE_ZEROED))
+ 			goto handle_bb;
+From 50df9fd55e4271e89a7adf3b1172083dd0ca199d Mon Sep 17 00:00:00 2001
+From: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
+Date: Sun, 23 Sep 2012 22:49:12 -0400
+Subject: ext4: fix crash when accessing /proc/mounts concurrently
+
+From: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
+
+commit 50df9fd55e4271e89a7adf3b1172083dd0ca199d upstream.
+
+The crash was caused by a variable being erronously declared static in
+token2str().
+
+In addition to /proc/mounts, the problem can also be easily replicated
+by accessing /proc/fs/ext4/<partition>/options in parallel:
+
+$ cat /proc/fs/ext4/<partition>/options > options.txt
+
+... and then running the following command in two different terminals:
+
+$ while diff /proc/fs/ext4/<partition>/options options.txt; do true; done
+
+This is also the cause of the following a crash while running xfstests
+#234, as reported in the following bug reports:
+
+	https://bugs.launchpad.net/bugs/1053019
+	https://bugzilla.kernel.org/show_bug.cgi?id=47731
+
+Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Cc: Brad Figg <brad.figg at canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/super.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -1735,7 +1735,7 @@ static inline void ext4_show_quota_optio
+ 
+ static const char *token2str(int token)
+ {
+-	static const struct match_token *t;
++	const struct match_token *t;
+ 
+ 	for (t = tokens; t->token != Opt_err; t++)
+ 		if (t->token == token && !strchr(t->pattern, '='))
+From b71fc079b5d8f42b2a52743c8d2f1d35d655b1c5 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack at suse.cz>
+Date: Wed, 26 Sep 2012 21:52:20 -0400
+Subject: ext4: fix fdatasync() for files with only i_size changes
+
+From: Jan Kara <jack at suse.cz>
+
+commit b71fc079b5d8f42b2a52743c8d2f1d35d655b1c5 upstream.
+
+Code tracking when transaction needs to be committed on fdatasync(2) forgets
+to handle a situation when only inode's i_size is changed. Thus in such
+situations fdatasync(2) doesn't force transaction with new i_size to disk
+and that can result in wrong i_size after a crash.
+
+Fix the issue by updating inode's i_datasync_tid whenever its size is
+updated.
+
+Reported-by: Kristian Nielsen <knielsen at knielsen-hq.org>
+Signed-off-by: Jan Kara <jack at suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/inode.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/fs/ext4/inode.c
++++ b/fs/ext4/inode.c
+@@ -4055,6 +4055,7 @@ static int ext4_do_update_inode(handle_t
+ 	struct ext4_inode_info *ei = EXT4_I(inode);
+ 	struct buffer_head *bh = iloc->bh;
+ 	int err = 0, rc, block;
++	int need_datasync = 0;
+ 	uid_t i_uid;
+ 	gid_t i_gid;
+ 
+@@ -4105,7 +4106,10 @@ static int ext4_do_update_inode(handle_t
+ 		raw_inode->i_file_acl_high =
+ 			cpu_to_le16(ei->i_file_acl >> 32);
+ 	raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl);
+-	ext4_isize_set(raw_inode, ei->i_disksize);
++	if (ei->i_disksize != ext4_isize(raw_inode)) {
++		ext4_isize_set(raw_inode, ei->i_disksize);
++		need_datasync = 1;
++	}
+ 	if (ei->i_disksize > 0x7fffffffULL) {
+ 		struct super_block *sb = inode->i_sb;
+ 		if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
+@@ -4158,7 +4162,7 @@ static int ext4_do_update_inode(handle_t
+ 		err = rc;
+ 	ext4_clear_inode_state(inode, EXT4_STATE_NEW);
+ 
+-	ext4_update_inode_fsync_trans(handle, inode, 0);
++	ext4_update_inode_fsync_trans(handle, inode, need_datasync);
+ out_brelse:
+ 	brelse(bh);
+ 	ext4_std_error(inode->i_sb, err);
+From 00d4e7362ed01987183e9528295de3213031309c Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso at mit.edu>
+Date: Wed, 19 Sep 2012 22:42:36 -0400
+Subject: ext4: fix potential deadlock in ext4_nonda_switch()
+
+From: Theodore Ts'o <tytso at mit.edu>
+
+commit 00d4e7362ed01987183e9528295de3213031309c upstream.
+
+In ext4_nonda_switch(), if the file system is getting full we used to
+call writeback_inodes_sb_if_idle().  The problem is that we can be
+holding i_mutex already, and this causes a potential deadlock when
+writeback_inodes_sb_if_idle() when it tries to take s_umount.  (See
+lockdep output below).
+
+As it turns out we don't need need to hold s_umount; the fact that we
+are in the middle of the write(2) system call will keep the superblock
+pinned.  Unfortunately writeback_inodes_sb() checks to make sure
+s_umount is taken, and the VFS uses a different mechanism for making
+sure the file system doesn't get unmounted out from under us.  The
+simplest way of dealing with this is to just simply grab s_umount
+using a trylock, and skip kicking the writeback flusher thread in the
+very unlikely case that we can't take a read lock on s_umount without
+blocking.
+
+Also, we now check the cirteria for kicking the writeback thread
+before we decide to whether to fall back to non-delayed writeback, so
+if there are any outstanding delayed allocation writes, we try to get
+them resolved as soon as possible.
+
+   [ INFO: possible circular locking dependency detected ]
+   3.6.0-rc1-00042-gce894ca #367 Not tainted
+   -------------------------------------------------------
+   dd/8298 is trying to acquire lock:
+    (&type->s_umount_key#18){++++..}, at: [<c02277d4>] writeback_inodes_sb_if_idle+0x28/0x46
+
+   but task is already holding lock:
+    (&sb->s_type->i_mutex_key#8){+.+...}, at: [<c01ddcce>] generic_file_aio_write+0x5f/0xd3
+
+   which lock already depends on the new lock.
+
+   2 locks held by dd/8298:
+    #0:  (sb_writers#2){.+.+.+}, at: [<c01ddcc5>] generic_file_aio_write+0x56/0xd3
+    #1:  (&sb->s_type->i_mutex_key#8){+.+...}, at: [<c01ddcce>] generic_file_aio_write+0x5f/0xd3
+
+   stack backtrace:
+   Pid: 8298, comm: dd Not tainted 3.6.0-rc1-00042-gce894ca #367
+   Call Trace:
+    [<c015b79c>] ? console_unlock+0x345/0x372
+    [<c06d62a1>] print_circular_bug+0x190/0x19d
+    [<c019906c>] __lock_acquire+0x86d/0xb6c
+    [<c01999db>] ? mark_held_locks+0x5c/0x7b
+    [<c0199724>] lock_acquire+0x66/0xb9
+    [<c02277d4>] ? writeback_inodes_sb_if_idle+0x28/0x46
+    [<c06db935>] down_read+0x28/0x58
+    [<c02277d4>] ? writeback_inodes_sb_if_idle+0x28/0x46
+    [<c02277d4>] writeback_inodes_sb_if_idle+0x28/0x46
+    [<c026f3b2>] ext4_nonda_switch+0xe1/0xf4
+    [<c0271ece>] ext4_da_write_begin+0x27/0x193
+    [<c01dcdb0>] generic_file_buffered_write+0xc8/0x1bb
+    [<c01ddc47>] __generic_file_aio_write+0x1dd/0x205
+    [<c01ddce7>] generic_file_aio_write+0x78/0xd3
+    [<c026d336>] ext4_file_write+0x480/0x4a6
+    [<c0198c1d>] ? __lock_acquire+0x41e/0xb6c
+    [<c0180944>] ? sched_clock_cpu+0x11a/0x13e
+    [<c01967e9>] ? trace_hardirqs_off+0xb/0xd
+    [<c018099f>] ? local_clock+0x37/0x4e
+    [<c0209f2c>] do_sync_write+0x67/0x9d
+    [<c0209ec5>] ? wait_on_retry_sync_kiocb+0x44/0x44
+    [<c020a7b9>] vfs_write+0x7b/0xe6
+    [<c020a9a6>] sys_write+0x3b/0x64
+    [<c06dd4bd>] syscall_call+0x7/0xb
+
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/inode.c   |   17 ++++++++++-------
+ fs/fs-writeback.c |    1 +
+ 2 files changed, 11 insertions(+), 7 deletions(-)
+
+--- a/fs/ext4/inode.c
++++ b/fs/ext4/inode.c
+@@ -2463,6 +2463,16 @@ static int ext4_nonda_switch(struct supe
+ 	free_blocks  = EXT4_C2B(sbi,
+ 		percpu_counter_read_positive(&sbi->s_freeclusters_counter));
+ 	dirty_blocks = percpu_counter_read_positive(&sbi->s_dirtyclusters_counter);
++	/*
++	 * Start pushing delalloc when 1/2 of free blocks are dirty.
++	 */
++	if (dirty_blocks && (free_blocks < 2 * dirty_blocks) &&
++	    !writeback_in_progress(sb->s_bdi) &&
++	    down_read_trylock(&sb->s_umount)) {
++		writeback_inodes_sb(sb, WB_REASON_FS_FREE_SPACE);
++		up_read(&sb->s_umount);
++	}
++
+ 	if (2 * free_blocks < 3 * dirty_blocks ||
+ 		free_blocks < (dirty_blocks + EXT4_FREECLUSTERS_WATERMARK)) {
+ 		/*
+@@ -2471,13 +2481,6 @@ static int ext4_nonda_switch(struct supe
+ 		 */
+ 		return 1;
+ 	}
+-	/*
+-	 * Even if we don't switch but are nearing capacity,
+-	 * start pushing delalloc when 1/2 of free blocks are dirty.
+-	 */
+-	if (free_blocks < 2 * dirty_blocks)
+-		writeback_inodes_sb_if_idle(sb, WB_REASON_FS_FREE_SPACE);
+-
+ 	return 0;
+ }
+ 
+--- a/fs/fs-writeback.c
++++ b/fs/fs-writeback.c
+@@ -63,6 +63,7 @@ int writeback_in_progress(struct backing
+ {
+ 	return test_bit(BDI_writeback_running, &bdi->state);
+ }
++EXPORT_SYMBOL(writeback_in_progress);
+ 
+ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
+ {
+From 03c1c29053f678234dbd51bf3d65f3b7529021de Mon Sep 17 00:00:00 2001
+From: Yongqiang Yang <xiaoqiangnk at gmail.com>
+Date: Wed, 5 Sep 2012 01:21:50 -0400
+Subject: ext4: ignore last group w/o enough space when resizing instead of BUG'ing
+
+From: Yongqiang Yang <xiaoqiangnk at gmail.com>
+
+commit 03c1c29053f678234dbd51bf3d65f3b7529021de upstream.
+
+If the last group does not have enough space for group tables, ignore
+it instead of calling BUG_ON().
+
+Reported-by: Daniel Drake <dsd at laptop.org>
+Signed-off-by: Yongqiang Yang <xiaoqiangnk at gmail.com>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/resize.c |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/fs/ext4/resize.c
++++ b/fs/ext4/resize.c
+@@ -200,8 +200,11 @@ static void free_flex_gd(struct ext4_new
+  * be a partial of a flex group.
+  *
+  * @sb: super block of fs to which the groups belongs
++ *
++ * Returns 0 on a successful allocation of the metadata blocks in the
++ * block group.
+  */
+-static void ext4_alloc_group_tables(struct super_block *sb,
++static int ext4_alloc_group_tables(struct super_block *sb,
+ 				struct ext4_new_flex_group_data *flex_gd,
+ 				int flexbg_size)
+ {
+@@ -226,6 +229,8 @@ static void ext4_alloc_group_tables(stru
+ 	       (last_group & ~(flexbg_size - 1))));
+ next_group:
+ 	group = group_data[0].group;
++	if (src_group >= group_data[0].group + flex_gd->count)
++		return -ENOSPC;
+ 	start_blk = ext4_group_first_block_no(sb, src_group);
+ 	last_blk = start_blk + group_data[src_group - group].blocks_count;
+ 
+@@ -235,7 +240,6 @@ next_group:
+ 
+ 	start_blk += overhead;
+ 
+-	BUG_ON(src_group >= group_data[0].group + flex_gd->count);
+ 	/* We collect contiguous blocks as much as possible. */
+ 	src_group++;
+ 	for (; src_group <= last_group; src_group++)
+@@ -300,6 +304,7 @@ next_group:
+ 			       group_data[i].free_blocks_count);
+ 		}
+ 	}
++	return 0;
+ }
+ 
+ static struct buffer_head *bclean(handle_t *handle, struct super_block *sb,
+@@ -1729,7 +1734,8 @@ int ext4_resize_fs(struct super_block *s
+ 	 */
+ 	while (ext4_setup_next_flex_gd(sb, flex_gd, n_blocks_count,
+ 					      flexbg_size)) {
+-		ext4_alloc_group_tables(sb, flex_gd, flexbg_size);
++		if (ext4_alloc_group_tables(sb, flex_gd, flexbg_size) != 0)
++			break;
+ 		err = ext4_flex_group_add(sb, resize_inode, flex_gd);
+ 		if (unlikely(err))
+ 			break;
+From 03bd8b9b896c8e940f282f540e6b4de90d666b7c Mon Sep 17 00:00:00 2001
+From: Dmitry Monakhov <dmonakhov at openvz.org>
+Date: Wed, 26 Sep 2012 12:32:19 -0400
+Subject: ext4: move_extent code cleanup
+
+From: Dmitry Monakhov <dmonakhov at openvz.org>
+
+commit 03bd8b9b896c8e940f282f540e6b4de90d666b7c upstream.
+
+- Remove usless checks, because it is too late to check that inode != NULL
+  at the moment it was referenced several times.
+- Double lock routines looks very ugly and locking ordering relays on
+  order of i_ino, but other kernel code rely on order of pointers.
+  Let's make them simple and clean.
+- check that inodes belongs to the same SB as soon as possible.
+
+Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/move_extent.c |  167 ++++++++++++++------------------------------------
+ 1 file changed, 47 insertions(+), 120 deletions(-)
+
+--- a/fs/ext4/move_extent.c
++++ b/fs/ext4/move_extent.c
+@@ -141,55 +141,21 @@ mext_next_extent(struct inode *inode, st
+ }
+ 
+ /**
+- * mext_check_null_inode - NULL check for two inodes
+- *
+- * If inode1 or inode2 is NULL, return -EIO. Otherwise, return 0.
+- */
+-static int
+-mext_check_null_inode(struct inode *inode1, struct inode *inode2,
+-		      const char *function, unsigned int line)
+-{
+-	int ret = 0;
+-
+-	if (inode1 == NULL) {
+-		__ext4_error(inode2->i_sb, function, line,
+-			"Both inodes should not be NULL: "
+-			"inode1 NULL inode2 %lu", inode2->i_ino);
+-		ret = -EIO;
+-	} else if (inode2 == NULL) {
+-		__ext4_error(inode1->i_sb, function, line,
+-			"Both inodes should not be NULL: "
+-			"inode1 %lu inode2 NULL", inode1->i_ino);
+-		ret = -EIO;
+-	}
+-	return ret;
+-}
+-
+-/**
+  * double_down_write_data_sem - Acquire two inodes' write lock of i_data_sem
+  *
+- * @orig_inode:		original inode structure
+- * @donor_inode:	donor inode structure
+- * Acquire write lock of i_data_sem of the two inodes (orig and donor) by
+- * i_ino order.
++ * Acquire write lock of i_data_sem of the two inodes
+  */
+ static void
+-double_down_write_data_sem(struct inode *orig_inode, struct inode *donor_inode)
++double_down_write_data_sem(struct inode *first, struct inode *second)
+ {
+-	struct inode *first = orig_inode, *second = donor_inode;
++	if (first < second) {
++		down_write(&EXT4_I(first)->i_data_sem);
++		down_write_nested(&EXT4_I(second)->i_data_sem, SINGLE_DEPTH_NESTING);
++	} else {
++		down_write(&EXT4_I(second)->i_data_sem);
++		down_write_nested(&EXT4_I(first)->i_data_sem, SINGLE_DEPTH_NESTING);
+ 
+-	/*
+-	 * Use the inode number to provide the stable locking order instead
+-	 * of its address, because the C language doesn't guarantee you can
+-	 * compare pointers that don't come from the same array.
+-	 */
+-	if (donor_inode->i_ino < orig_inode->i_ino) {
+-		first = donor_inode;
+-		second = orig_inode;
+ 	}
+-
+-	down_write(&EXT4_I(first)->i_data_sem);
+-	down_write_nested(&EXT4_I(second)->i_data_sem, SINGLE_DEPTH_NESTING);
+ }
+ 
+ /**
+@@ -969,14 +935,6 @@ mext_check_arguments(struct inode *orig_
+ 		return -EINVAL;
+ 	}
+ 
+-	/* Files should be in the same ext4 FS */
+-	if (orig_inode->i_sb != donor_inode->i_sb) {
+-		ext4_debug("ext4 move extent: The argument files "
+-			"should be in same FS [ino:orig %lu, donor %lu]\n",
+-			orig_inode->i_ino, donor_inode->i_ino);
+-		return -EINVAL;
+-	}
+-
+ 	/* Ext4 move extent supports only extent based file */
+ 	if (!(ext4_test_inode_flag(orig_inode, EXT4_INODE_EXTENTS))) {
+ 		ext4_debug("ext4 move extent: orig file is not extents "
+@@ -1072,35 +1030,19 @@ mext_check_arguments(struct inode *orig_
+  * @inode1:	the inode structure
+  * @inode2:	the inode structure
+  *
+- * Lock two inodes' i_mutex by i_ino order.
+- * If inode1 or inode2 is NULL, return -EIO. Otherwise, return 0.
++ * Lock two inodes' i_mutex
+  */
+-static int
++static void
+ mext_inode_double_lock(struct inode *inode1, struct inode *inode2)
+ {
+-	int ret = 0;
+-
+-	BUG_ON(inode1 == NULL && inode2 == NULL);
+-
+-	ret = mext_check_null_inode(inode1, inode2, __func__, __LINE__);
+-	if (ret < 0)
+-		goto out;
+-
+-	if (inode1 == inode2) {
+-		mutex_lock(&inode1->i_mutex);
+-		goto out;
+-	}
+-
+-	if (inode1->i_ino < inode2->i_ino) {
++	BUG_ON(inode1 == inode2);
++	if (inode1 < inode2) {
+ 		mutex_lock_nested(&inode1->i_mutex, I_MUTEX_PARENT);
+ 		mutex_lock_nested(&inode2->i_mutex, I_MUTEX_CHILD);
+ 	} else {
+ 		mutex_lock_nested(&inode2->i_mutex, I_MUTEX_PARENT);
+ 		mutex_lock_nested(&inode1->i_mutex, I_MUTEX_CHILD);
+ 	}
+-
+-out:
+-	return ret;
+ }
+ 
+ /**
+@@ -1109,28 +1051,13 @@ out:
+  * @inode1:     the inode that is released first
+  * @inode2:     the inode that is released second
+  *
+- * If inode1 or inode2 is NULL, return -EIO. Otherwise, return 0.
+  */
+ 
+-static int
++static void
+ mext_inode_double_unlock(struct inode *inode1, struct inode *inode2)
+ {
+-	int ret = 0;
+-
+-	BUG_ON(inode1 == NULL && inode2 == NULL);
+-
+-	ret = mext_check_null_inode(inode1, inode2, __func__, __LINE__);
+-	if (ret < 0)
+-		goto out;
+-
+-	if (inode1)
+-		mutex_unlock(&inode1->i_mutex);
+-
+-	if (inode2 && inode2 != inode1)
+-		mutex_unlock(&inode2->i_mutex);
+-
+-out:
+-	return ret;
++	mutex_unlock(&inode1->i_mutex);
++	mutex_unlock(&inode2->i_mutex);
+ }
+ 
+ /**
+@@ -1187,16 +1114,23 @@ ext4_move_extents(struct file *o_filp, s
+ 	ext4_lblk_t block_end, seq_start, add_blocks, file_end, seq_blocks = 0;
+ 	ext4_lblk_t rest_blocks;
+ 	pgoff_t orig_page_offset = 0, seq_end_page;
+-	int ret1, ret2, depth, last_extent = 0;
++	int ret, depth, last_extent = 0;
+ 	int blocks_per_page = PAGE_CACHE_SIZE >> orig_inode->i_blkbits;
+ 	int data_offset_in_page;
+ 	int block_len_in_page;
+ 	int uninit;
+ 
+-	/* orig and donor should be different file */
+-	if (orig_inode->i_ino == donor_inode->i_ino) {
++	if (orig_inode->i_sb != donor_inode->i_sb) {
++		ext4_debug("ext4 move extent: The argument files "
++			"should be in same FS [ino:orig %lu, donor %lu]\n",
++			orig_inode->i_ino, donor_inode->i_ino);
++		return -EINVAL;
++	}
++
++	/* orig and donor should be different inodes */
++	if (orig_inode == donor_inode) {
+ 		ext4_debug("ext4 move extent: The argument files should not "
+-			"be same file [ino:orig %lu, donor %lu]\n",
++			"be same inode [ino:orig %lu, donor %lu]\n",
+ 			orig_inode->i_ino, donor_inode->i_ino);
+ 		return -EINVAL;
+ 	}
+@@ -1210,16 +1144,14 @@ ext4_move_extents(struct file *o_filp, s
+ 	}
+ 
+ 	/* Protect orig and donor inodes against a truncate */
+-	ret1 = mext_inode_double_lock(orig_inode, donor_inode);
+-	if (ret1 < 0)
+-		return ret1;
++	mext_inode_double_lock(orig_inode, donor_inode);
+ 
+ 	/* Protect extent tree against block allocations via delalloc */
+ 	double_down_write_data_sem(orig_inode, donor_inode);
+ 	/* Check the filesystem environment whether move_extent can be done */
+-	ret1 = mext_check_arguments(orig_inode, donor_inode, orig_start,
++	ret = mext_check_arguments(orig_inode, donor_inode, orig_start,
+ 				    donor_start, &len);
+-	if (ret1)
++	if (ret)
+ 		goto out;
+ 
+ 	file_end = (i_size_read(orig_inode) - 1) >> orig_inode->i_blkbits;
+@@ -1227,13 +1159,13 @@ ext4_move_extents(struct file *o_filp, s
+ 	if (file_end < block_end)
+ 		len -= block_end - file_end;
+ 
+-	ret1 = get_ext_path(orig_inode, block_start, &orig_path);
+-	if (ret1)
++	ret = get_ext_path(orig_inode, block_start, &orig_path);
++	if (ret)
+ 		goto out;
+ 
+ 	/* Get path structure to check the hole */
+-	ret1 = get_ext_path(orig_inode, block_start, &holecheck_path);
+-	if (ret1)
++	ret = get_ext_path(orig_inode, block_start, &holecheck_path);
++	if (ret)
+ 		goto out;
+ 
+ 	depth = ext_depth(orig_inode);
+@@ -1252,13 +1184,13 @@ ext4_move_extents(struct file *o_filp, s
+ 		last_extent = mext_next_extent(orig_inode,
+ 					holecheck_path, &ext_cur);
+ 		if (last_extent < 0) {
+-			ret1 = last_extent;
++			ret = last_extent;
+ 			goto out;
+ 		}
+ 		last_extent = mext_next_extent(orig_inode, orig_path,
+ 							&ext_dummy);
+ 		if (last_extent < 0) {
+-			ret1 = last_extent;
++			ret = last_extent;
+ 			goto out;
+ 		}
+ 		seq_start = le32_to_cpu(ext_cur->ee_block);
+@@ -1272,7 +1204,7 @@ ext4_move_extents(struct file *o_filp, s
+ 	if (le32_to_cpu(ext_cur->ee_block) > block_end) {
+ 		ext4_debug("ext4 move extent: The specified range of file "
+ 							"may be the hole\n");
+-		ret1 = -EINVAL;
++		ret = -EINVAL;
+ 		goto out;
+ 	}
+ 
+@@ -1292,7 +1224,7 @@ ext4_move_extents(struct file *o_filp, s
+ 		last_extent = mext_next_extent(orig_inode, holecheck_path,
+ 						&ext_cur);
+ 		if (last_extent < 0) {
+-			ret1 = last_extent;
++			ret = last_extent;
+ 			break;
+ 		}
+ 		add_blocks = ext4_ext_get_actual_len(ext_cur);
+@@ -1349,18 +1281,18 @@ ext4_move_extents(struct file *o_filp, s
+ 						orig_page_offset,
+ 						data_offset_in_page,
+ 						block_len_in_page, uninit,
+-						&ret1);
++						&ret);
+ 
+ 			/* Count how many blocks we have exchanged */
+ 			*moved_len += block_len_in_page;
+-			if (ret1 < 0)
++			if (ret < 0)
+ 				break;
+ 			if (*moved_len > len) {
+ 				EXT4_ERROR_INODE(orig_inode,
+ 					"We replaced blocks too much! "
+ 					"sum of replaced: %llu requested: %llu",
+ 					*moved_len, len);
+-				ret1 = -EIO;
++				ret = -EIO;
+ 				break;
+ 			}
+ 
+@@ -1374,22 +1306,22 @@ ext4_move_extents(struct file *o_filp, s
+ 		}
+ 
+ 		double_down_write_data_sem(orig_inode, donor_inode);
+-		if (ret1 < 0)
++		if (ret < 0)
+ 			break;
+ 
+ 		/* Decrease buffer counter */
+ 		if (holecheck_path)
+ 			ext4_ext_drop_refs(holecheck_path);
+-		ret1 = get_ext_path(orig_inode, seq_start, &holecheck_path);
+-		if (ret1)
++		ret = get_ext_path(orig_inode, seq_start, &holecheck_path);
++		if (ret)
+ 			break;
+ 		depth = holecheck_path->p_depth;
+ 
+ 		/* Decrease buffer counter */
+ 		if (orig_path)
+ 			ext4_ext_drop_refs(orig_path);
+-		ret1 = get_ext_path(orig_inode, seq_start, &orig_path);
+-		if (ret1)
++		ret = get_ext_path(orig_inode, seq_start, &orig_path);
++		if (ret)
+ 			break;
+ 
+ 		ext_cur = holecheck_path[depth].p_ext;
+@@ -1412,12 +1344,7 @@ out:
+ 		kfree(holecheck_path);
+ 	}
+ 	double_up_write_data_sem(orig_inode, donor_inode);
+-	ret2 = mext_inode_double_unlock(orig_inode, donor_inode);
++	mext_inode_double_unlock(orig_inode, donor_inode);
+ 
+-	if (ret1)
+-		return ret1;
+-	else if (ret2)
+-		return ret2;
+-
+-	return 0;
++	return ret;
+ }
+From f066055a3449f0e5b0ae4f3ceab4445bead47638 Mon Sep 17 00:00:00 2001
+From: Dmitry Monakhov <dmonakhov at openvz.org>
+Date: Wed, 26 Sep 2012 12:32:54 -0400
+Subject: ext4: online defrag is not supported for journaled files
+
+From: Dmitry Monakhov <dmonakhov at openvz.org>
+
+commit f066055a3449f0e5b0ae4f3ceab4445bead47638 upstream.
+
+Proper block swap for inodes with full journaling enabled is
+truly non obvious task. In order to be on a safe side let's
+explicitly disable it for now.
+
+Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/ext4/move_extent.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/fs/ext4/move_extent.c
++++ b/fs/ext4/move_extent.c
+@@ -1142,7 +1142,12 @@ ext4_move_extents(struct file *o_filp, s
+ 			orig_inode->i_ino, donor_inode->i_ino);
+ 		return -EINVAL;
+ 	}
+-
++	/* TODO: This is non obvious task to swap blocks for inodes with full
++	   jornaling enabled */
++	if (ext4_should_journal_data(orig_inode) ||
++	    ext4_should_journal_data(donor_inode)) {
++		return -EINVAL;
++	}
+ 	/* Protect orig and donor inodes against a truncate */
+ 	mext_inode_double_lock(orig_inode, donor_inode);
+ 
+From c415b303a704e5c5f766fc0404093910c36cc4ab Mon Sep 17 00:00:00 2001
+From: Daniel J Blueman <daniel at quora.org>
+Date: Fri, 5 Oct 2012 22:23:55 +0200
+Subject: i2c-piix4: Fix build failure
+
+From: Daniel J Blueman <daniel at quora.org>
+
+commit c415b303a704e5c5f766fc0404093910c36cc4ab upstream.
+
+Fix build failure in Intel PIIX4 I2C driver.
+
+Signed-off-by: Daniel J Blueman <daniel at quora.org>
+Signed-off-by: Jean Delvare <khali at linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/i2c/busses/i2c-piix4.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/i2c/busses/i2c-piix4.c
++++ b/drivers/i2c/busses/i2c-piix4.c
+@@ -37,6 +37,7 @@
+ #include <linux/stddef.h>
+ #include <linux/ioport.h>
+ #include <linux/i2c.h>
++#include <linux/slab.h>
+ #include <linux/init.h>
+ #include <linux/dmi.h>
+ #include <linux/acpi.h>
+From 2e12bc29fc5a12242d68e11875db3dd58efad9ff Mon Sep 17 00:00:00 2001
+From: Alex Williamson <alex.williamson at redhat.com>
+Date: Fri, 11 Nov 2011 17:26:44 -0700
+Subject: intel-iommu: Default to non-coherent for domains unattached to iommus
+
+From: Alex Williamson <alex.williamson at redhat.com>
+
+commit 2e12bc29fc5a12242d68e11875db3dd58efad9ff upstream.
+
+domain_update_iommu_coherency() currently defaults to setting domains
+as coherent when the domain is not attached to any iommus.  This
+allows for a window in domain_context_mapping_one() where such a
+domain can update context entries non-coherently, and only after
+update the domain capability to clear iommu_coherency.
+
+This can be seen using KVM device assignment on VT-d systems that
+do not support coherency in the ecap register.  When a device is
+added to a guest, a domain is created (iommu_coherency = 0), the
+device is attached, and ranges are mapped.  If we then hot unplug
+the device, the coherency is updated and set to the default (1)
+since no iommus are attached to the domain.  A subsequent attach
+of a device makes use of the same dmar domain (now marked coherent)
+updates context entries with coherency enabled, and only disables
+coherency as the last step in the process.
+
+To fix this, switch domain_update_iommu_coherency() to use the
+safer, non-coherent default for domains not attached to iommus.
+
+Signed-off-by: Alex Williamson <alex.williamson at redhat.com>
+Tested-by: Donald Dutile <ddutile at redhat.com>
+Acked-by: Donald Dutile <ddutile at redhat.com>
+Acked-by: Chris Wright <chrisw at sous-sol.org>
+Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/iommu/intel-iommu.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/iommu/intel-iommu.c
++++ b/drivers/iommu/intel-iommu.c
+@@ -589,7 +589,9 @@ static void domain_update_iommu_coherenc
+ {
+ 	int i;
+ 
+-	domain->iommu_coherency = 1;
++	i = find_first_bit(domain->iommu_bmp, g_num_of_iommus);
++
++	domain->iommu_coherency = i < g_num_of_iommus ? 1 : 0;
+ 
+ 	for_each_set_bit(i, domain->iommu_bmp, g_num_of_iommus) {
+ 		if (!ecap_coherent(g_iommus[i]->ecap)) {
+From 0f805a4315b509718ad3000e6cd6012573289409 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <edumazet at google.com>
+Date: Thu, 4 Oct 2012 01:25:26 +0000
+Subject: ipv4: add a fib_type to fib_info
+
+
+From: Eric Dumazet <edumazet at google.com>
+
+[ Upstream commit f4ef85bbda96324785097356336bc79cdd37db0a ]
+
+commit d2d68ba9fe8 (ipv4: Cache input routes in fib_info nexthops.)
+introduced a regression for forwarding.
+
+This was hard to reproduce but the symptom was that packets were
+delivered to local host instead of being forwarded.
+
+David suggested to add fib_type to fib_info so that we dont
+inadvertently share same fib_info for different purposes.
+
+With help from Julian Anastasov who provided very helpful
+hints, reproduced here :
+
+<quote>
+        Can it be a problem related to fib_info reuse
+from different routes. For example, when local IP address
+is created for subnet we have:
+
+broadcast 192.168.0.255 dev DEV  proto kernel  scope link  src
+192.168.0.1
+192.168.0.0/24 dev DEV  proto kernel  scope link  src 192.168.0.1
+local 192.168.0.1 dev DEV  proto kernel  scope host  src 192.168.0.1
+
+        The "dev DEV  proto kernel  scope link  src 192.168.0.1" is
+a reused fib_info structure where we put cached routes.
+The result can be same fib_info for 192.168.0.255 and
+192.168.0.0/24. RTN_BROADCAST is cached only for input
+routes. Incoming broadcast to 192.168.0.255 can be cached
+and can cause problems for traffic forwarded to 192.168.0.0/24.
+So, this patch should solve the problem because it
+separates the broadcast from unicast traffic.
+
+        And the ip_route_input_slow caching will work for
+local and broadcast input routes (above routes 1 and 3) just
+because they differ in scope and use different fib_info.
+
+</quote>
+
+Many thanks to Chris Clayton for his patience and help.
+
+Reported-by: Chris Clayton <chris2553 at googlemail.com>
+Bisected-by: Chris Clayton <chris2553 at googlemail.com>
+Reported-by: Dave Jones <davej at redhat.com>
+Signed-off-by: Eric Dumazet <edumazet at google.com>
+Cc: Julian Anastasov <ja at ssi.bg>
+Tested-by: Chris Clayton <chris2553 at googlemail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ include/net/ip_fib.h     |    1 +
+ net/ipv4/fib_semantics.c |    2 ++
+ 2 files changed, 3 insertions(+)
+
+--- a/include/net/ip_fib.h
++++ b/include/net/ip_fib.h
+@@ -102,6 +102,7 @@ struct fib_info {
+ 	unsigned char		fib_dead;
+ 	unsigned char		fib_protocol;
+ 	unsigned char		fib_scope;
++	unsigned char		fib_type;
+ 	__be32			fib_prefsrc;
+ 	u32			fib_priority;
+ 	u32			*fib_metrics;
+--- a/net/ipv4/fib_semantics.c
++++ b/net/ipv4/fib_semantics.c
+@@ -314,6 +314,7 @@ static struct fib_info *fib_find_info(co
+ 		    nfi->fib_scope == fi->fib_scope &&
+ 		    nfi->fib_prefsrc == fi->fib_prefsrc &&
+ 		    nfi->fib_priority == fi->fib_priority &&
++		    nfi->fib_type == fi->fib_type &&
+ 		    memcmp(nfi->fib_metrics, fi->fib_metrics,
+ 			   sizeof(u32) * RTAX_MAX) == 0 &&
+ 		    ((nfi->fib_flags ^ fi->fib_flags) & ~RTNH_F_DEAD) == 0 &&
+@@ -833,6 +834,7 @@ struct fib_info *fib_create_info(struct
+ 	fi->fib_flags = cfg->fc_flags;
+ 	fi->fib_priority = cfg->fc_priority;
+ 	fi->fib_prefsrc = cfg->fc_prefsrc;
++	fi->fib_type = cfg->fc_type;
+ 
+ 	fi->fib_nhs = nhs;
+ 	change_nexthops(fi) {
+From be5bbaad23547fa5551691b6185641004d206967 Mon Sep 17 00:00:00 2001
+From: Nicolas Dichtel <nicolas.dichtel at 6wind.com>
+Date: Wed, 26 Sep 2012 00:04:55 +0000
+Subject: ipv6: del unreachable route when an addr is deleted on lo
+
+
+From: Nicolas Dichtel <nicolas.dichtel at 6wind.com>
+
+[ Upstream commit 64c6d08e6490fb18cea09bb03686c149946bd818 ]
+
+When an address is added on loopback (ip -6 a a 2002::1/128 dev lo), two routes
+are added:
+ - one in the local table:
+    local 2002::1 via :: dev lo  proto none  metric 0
+ - one the in main table (for the prefix):
+    unreachable 2002::1 dev lo  proto kernel  metric 256  error -101
+
+When the address is deleted, the route inserted in the main table remains
+because we use rt6_lookup(), which returns NULL when dst->error is set, which
+is the case here! Thus, it is better to use ip6_route_lookup() to avoid this
+kind of filter.
+
+Signed-off-by: Nicolas Dichtel <nicolas.dichtel at 6wind.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ net/ipv6/addrconf.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/net/ipv6/addrconf.c
++++ b/net/ipv6/addrconf.c
+@@ -788,10 +788,16 @@ static void ipv6_del_addr(struct inet6_i
+ 		struct in6_addr prefix;
+ 		struct rt6_info *rt;
+ 		struct net *net = dev_net(ifp->idev->dev);
++		struct flowi6 fl6 = {};
++
+ 		ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
+-		rt = rt6_lookup(net, &prefix, NULL, ifp->idev->dev->ifindex, 1);
++		fl6.flowi6_oif = ifp->idev->dev->ifindex;
++		fl6.daddr = prefix;
++		rt = (struct rt6_info *)ip6_route_lookup(net, &fl6,
++							 RT6_LOOKUP_F_IFACE);
+ 
+-		if (rt && addrconf_is_prefix_route(rt)) {
++		if (rt != net->ipv6.ip6_null_entry &&
++		    addrconf_is_prefix_route(rt)) {
+ 			if (onlink == 0) {
+ 				ip6_del_rt(rt);
+ 				rt = NULL;
+From 78fd2204e8bd37393c19b9cbe937540a6e558c09 Mon Sep 17 00:00:00 2001
+From: Gao feng <gaofeng at cn.fujitsu.com>
+Date: Wed, 19 Sep 2012 19:25:34 +0000
+Subject: ipv6: release reference of ip6_null_entry's dst entry in __ip6_del_rt
+
+
+From: Gao feng <gaofeng at cn.fujitsu.com>
+
+[ Upstream commit 6825a26c2dc21eb4f8df9c06d3786ddec97cf53b ]
+
+as we hold dst_entry before we call __ip6_del_rt,
+so we should alse call dst_release not only return
+-ENOENT when the rt6_info is ip6_null_entry.
+
+and we already hold the dst entry, so I think it's
+safe to call dst_release out of the write-read lock.
+
+Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ net/ipv6/route.c |   11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/net/ipv6/route.c
++++ b/net/ipv6/route.c
+@@ -1589,17 +1589,18 @@ static int __ip6_del_rt(struct rt6_info
+ 	struct fib6_table *table;
+ 	struct net *net = dev_net(rt->dst.dev);
+ 
+-	if (rt == net->ipv6.ip6_null_entry)
+-		return -ENOENT;
++	if (rt == net->ipv6.ip6_null_entry) {
++		err = -ENOENT;
++		goto out;
++	}
+ 
+ 	table = rt->rt6i_table;
+ 	write_lock_bh(&table->tb6_lock);
+-
+ 	err = fib6_del(rt, info);
+-	dst_release(&rt->dst);
+-
+ 	write_unlock_bh(&table->tb6_lock);
+ 
++out:
++	dst_release(&rt->dst);
+ 	return err;
+ }
+ 
+From 1cc92eb871d6cbb1da038b4bcd89eec3c73b9781 Mon Sep 17 00:00:00 2001
+From: Jacob Keller <jacob.e.keller at intel.com>
+Date: Fri, 21 Sep 2012 07:23:20 +0000
+Subject: ixgbe: fix PTP ethtool timestamping function
+
+From: Jacob Keller <jacob.e.keller at intel.com>
+
+commit 1cc92eb871d6cbb1da038b4bcd89eec3c73b9781 upstream.
+
+This patch fixes a development issue that occurred due to invalid modes reported
+in the ethtool get_ts_info function. The issue is resolved by removing
+unsupported modes from the Rx supported list.
+
+Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
+Tested-by: Phil Schmitt <phillip.j.schmitt at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |    5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+@@ -2690,10 +2690,7 @@ static int ixgbe_get_ts_info(struct net_
+ 			(1 << HWTSTAMP_FILTER_NONE) |
+ 			(1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
+ 			(1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
+-			(1 << HWTSTAMP_FILTER_PTP_V2_SYNC) |
+-			(1 << HWTSTAMP_FILTER_PTP_V2_DELAY_REQ) |
+-			(1 << HWTSTAMP_FILTER_PTP_V2_EVENT) |
+-			(1 << HWTSTAMP_FILTER_SOME);
++			(1 << HWTSTAMP_FILTER_PTP_V2_EVENT);
+ 		break;
+ #endif /* CONFIG_IXGBE_PTP */
+ 	default:
+From eeecef0af5ea4efd763c9554cf2bd80fc4a0efd3 Mon Sep 17 00:00:00 2001
+From: Eric Sandeen <sandeen at redhat.com>
+Date: Sat, 18 Aug 2012 22:29:40 -0400
+Subject: jbd2: don't write superblock when if its empty
+
+From: Eric Sandeen <sandeen at redhat.com>
+
+commit eeecef0af5ea4efd763c9554cf2bd80fc4a0efd3 upstream.
+
+This sequence:
+
+# truncate --size=1g fsfile
+# mkfs.ext4 -F fsfile
+# mount -o loop,ro fsfile /mnt
+# umount /mnt
+# dmesg | tail
+
+results in an IO error when unmounting the RO filesystem:
+
+[  318.020828] Buffer I/O error on device loop1, logical block 196608
+[  318.027024] lost page write due to I/O error on loop1
+[  318.032088] JBD2: Error -5 detected when updating journal superblock for loop1-8.
+
+This was a regression introduced by commit 24bcc89c7e7c: "jbd2: split
+updating of journal superblock and marking journal empty".
+
+Signed-off-by: Eric Sandeen <sandeen at redhat.com>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ fs/jbd2/journal.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/fs/jbd2/journal.c
++++ b/fs/jbd2/journal.c
+@@ -1354,6 +1354,11 @@ static void jbd2_mark_journal_empty(jour
+ 
+ 	BUG_ON(!mutex_is_locked(&journal->j_checkpoint_mutex));
+ 	read_lock(&journal->j_state_lock);
++	/* Is it already empty? */
++	if (sb->s_start == 0) {
++		read_unlock(&journal->j_state_lock);
++		return;
++	}
+ 	jbd_debug(1, "JBD2: Marking journal as empty (seq %d)\n",
+ 		  journal->j_tail_sequence);
+ 
+From fe04ddf7c2910362f3817c8156e41cbd6c0ee35d Mon Sep 17 00:00:00 2001
+From: Michal Marek <mmarek at suse.cz>
+Date: Tue, 25 Sep 2012 16:03:03 +0200
+Subject: kbuild: Do not package /boot and /lib in make tar-pkg
+
+From: Michal Marek <mmarek at suse.cz>
+
+commit fe04ddf7c2910362f3817c8156e41cbd6c0ee35d upstream.
+
+There were reports of users destroying their Fedora installs by a kernel
+tarball that replaces the /lib -> /usr/lib symlink. Let's remove the
+toplevel directories from the tarball to prevent this from happening.
+
+Reported-by: Andi Kleen <andi at firstfloor.org>
+Suggested-by: Ben Hutchings <ben at decadent.org.uk>
+Signed-off-by: Michal Marek <mmarek at suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ arch/x86/Makefile        |    2 +-
+ scripts/Makefile.fwinst  |    4 ++--
+ scripts/package/buildtar |    2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-a
+ KBUILD_CFLAGS += $(mflags-y)
+ KBUILD_AFLAGS += $(mflags-y)
+ 
+-archscripts: scripts_basic
++archscripts:
+ 	$(Q)$(MAKE) $(build)=arch/x86/tools relocs
+ 
+ ###
+--- a/scripts/Makefile.fwinst
++++ b/scripts/Makefile.fwinst
+@@ -27,7 +27,7 @@ endif
+ installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw))
+ 
+ installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all))
+-installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./
++installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
+ 
+ # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work.
+ PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
+@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(sr
+ $(installed-fw-dirs):
+ 	$(call cmd,mkdir)
+ 
+-$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
++$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%)
+ 	$(call cmd,install)
+ 
+ PHONY +=  __fw_install __fw_modinst FORCE
+--- a/scripts/package/buildtar
++++ b/scripts/package/buildtar
+@@ -109,7 +109,7 @@ esac
+ 	if tar --owner=root --group=root --help >/dev/null 2>&1; then
+ 		opts="--owner=root --group=root"
+ 	fi
+-	tar cf - . $opts | ${compress} > "${tarball}${file_ext}"
++	tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
+ )
+ 
+ echo "Tarball successfully created in ${tarball}${file_ext}"
+From b1e0d8b70fa31821ebca3965f2ef8619d7c5e316 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare at suse.de>
+Date: Tue, 2 Oct 2012 16:42:36 +0200
+Subject: kbuild: Fix gcc -x syntax
+
+From: Jean Delvare <jdelvare at suse.de>
+
+commit b1e0d8b70fa31821ebca3965f2ef8619d7c5e316 upstream.
+
+The correct syntax for gcc -x is "gcc -x assembler", not
+"gcc -xassembler". Even though the latter happens to work, the former
+is what is documented in the manual page and thus what gcc wrappers
+such as icecream do expect.
+
+This isn't a cosmetic change. The missing space prevents icecream from
+recognizing compilation tasks it can't handle, leading to silent kernel
+miscompilations.
+
+Besides me, credits go to Michael Matz and Dirk Mueller for
+investigating the miscompilation issue and tracking it down to this
+incorrect -x parameter syntax.
+
+Signed-off-by: Jean Delvare <jdelvare at suse.de>
+Acked-by: Ingo Molnar <mingo at kernel.org>
+Cc: Bernhard Walle <bernhard at bwalle.de>
+Cc: Michal Marek <mmarek at suse.cz>
+Cc: Ralf Baechle <ralf at linux-mips.org>
+Signed-off-by: Michal Marek <mmarek at suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ arch/mips/Makefile                         |    2 +-
+ arch/mips/kernel/Makefile                  |    2 +-
+ arch/x86/Makefile                          |    2 +-
+ scripts/Kbuild.include                     |   12 ++++++------
+ scripts/gcc-version.sh                     |    6 +++---
+ scripts/gcc-x86_32-has-stack-protector.sh  |    2 +-
+ scripts/gcc-x86_64-has-stack-protector.sh  |    2 +-
+ scripts/kconfig/check.sh                   |    2 +-
+ scripts/kconfig/lxdialog/check-lxdialog.sh |    2 +-
+ tools/perf/Makefile                        |    2 +-
+ tools/power/cpupower/Makefile              |    2 +-
+ 11 files changed, 18 insertions(+), 18 deletions(-)
+
+--- a/arch/mips/Makefile
++++ b/arch/mips/Makefile
+@@ -225,7 +225,7 @@ KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(d
+ LDFLAGS			+= -m $(ld-emul)
+ 
+ ifdef CONFIG_MIPS
+-CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -xc /dev/null | \
++CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
+ 	egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
+ 	sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/")
+ ifdef CONFIG_64BIT
+--- a/arch/mips/kernel/Makefile
++++ b/arch/mips/kernel/Makefile
+@@ -104,7 +104,7 @@ obj-$(CONFIG_MIPS_MACHINE)	+= mips_machi
+ 
+ obj-$(CONFIG_OF)		+= prom.o
+ 
+-CFLAGS_cpu-bugs64.o	= $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
++CFLAGS_cpu-bugs64.o	= $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -x c /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
+ 
+ obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT)	+= 8250-platform.o
+ 
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -92,7 +92,7 @@ endif
+ ifdef CONFIG_X86_X32
+ 	x32_ld_ok := $(call try-run,\
+ 			/bin/echo -e '1: .quad 1b' | \
+-			$(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" - && \
++			$(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" - && \
+ 			$(OBJCOPY) -O elf32-x86-64 "$$TMP" "$$TMPO" && \
+ 			$(LD) -m elf32_x86_64 "$$TMPO" -o "$$TMP",y,n)
+         ifeq ($(x32_ld_ok),y)
+--- a/scripts/Kbuild.include
++++ b/scripts/Kbuild.include
+@@ -98,24 +98,24 @@ try-run = $(shell set -e;		\
+ # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
+ 
+ as-option = $(call try-run,\
+-	$(CC) $(KBUILD_CFLAGS) $(1) -c -xassembler /dev/null -o "$$TMP",$(1),$(2))
++	$(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2))
+ 
+ # as-instr
+ # Usage: cflags-y += $(call as-instr,instr,option1,option2)
+ 
+ as-instr = $(call try-run,\
+-	printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3))
++	printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3))
+ 
+ # cc-option
+ # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
+ 
+ cc-option = $(call try-run,\
+-	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
++	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
+ 
+ # cc-option-yn
+ # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
+ cc-option-yn = $(call try-run,\
+-	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
++	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
+ 
+ # cc-option-align
+ # Prefix align with either -falign or -malign
+@@ -125,7 +125,7 @@ cc-option-align = $(subst -functions=0,,
+ # cc-disable-warning
+ # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
+ cc-disable-warning = $(call try-run,\
+-	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1)))
++	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
+ 
+ # cc-version
+ # Usage gcc-ver := $(call cc-version)
+@@ -143,7 +143,7 @@ cc-ifversion = $(shell [ $(call cc-versi
+ # cc-ldoption
+ # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
+ cc-ldoption = $(call try-run,\
+-	$(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
++	$(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
+ 
+ # ld-option
+ # Usage: LDFLAGS += $(call ld-option, -X)
+--- a/scripts/gcc-version.sh
++++ b/scripts/gcc-version.sh
+@@ -22,10 +22,10 @@ if [ ${#compiler} -eq 0 ]; then
+ 	exit 1
+ fi
+ 
+-MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
+-MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
++MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
++MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
+ if [ "x$with_patchlevel" != "x" ] ; then
+-	PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1)
++	PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
+ 	printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
+ else
+ 	printf "%02d%02d\\n" $MAJOR $MINOR
+--- a/scripts/gcc-x86_32-has-stack-protector.sh
++++ b/scripts/gcc-x86_32-has-stack-protector.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ 
+-echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
++echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
+ if [ "$?" -eq "0" ] ; then
+ 	echo y
+ else
+--- a/scripts/gcc-x86_64-has-stack-protector.sh
++++ b/scripts/gcc-x86_64-has-stack-protector.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ 
+-echo "int foo(void) { char X[200]; return 3; }" | $* -S -xc -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
++echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
+ if [ "$?" -eq "0" ] ; then
+ 	echo y
+ else
+--- a/scripts/kconfig/check.sh
++++ b/scripts/kconfig/check.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ # Needed for systems without gettext
+-$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
++$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
+ #include <libintl.h>
+ int main()
+ {
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
+@@ -38,7 +38,7 @@ trap "rm -f $tmp" 0 1 2 3 15
+ 
+ # Check if we can link to ncurses
+ check() {
+-        $cc -xc - -o $tmp 2>/dev/null <<'EOF'
++        $cc -x c - -o $tmp 2>/dev/null <<'EOF'
+ #include CURSES_LOC
+ main() {}
+ EOF
+--- a/tools/perf/Makefile
++++ b/tools/perf/Makefile
+@@ -62,7 +62,7 @@ ifeq ($(ARCH),x86_64)
+ 	ARCH := x86
+ 	IS_X86_64 := 0
+ 	ifeq (, $(findstring m32,$(EXTRA_CFLAGS)))
+-		IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -xc - | tail -n 1)
++		IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -x c - | tail -n 1)
+ 	endif
+ 	ifeq (${IS_X86_64}, 1)
+ 		RAW_ARCH := x86_64
+--- a/tools/power/cpupower/Makefile
++++ b/tools/power/cpupower/Makefile
+@@ -111,7 +111,7 @@ GMO_FILES = ${shell for HLANG in ${LANGU
+ export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS
+ 
+ # check if compiler option is supported
+-cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
++cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -x c /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
+ 
+ # use '-Os' optimization if available, else use -O2
+ OPTIMIZATION := $(call cc-supports,-Os,-O2)
+From c353acba28fb3fa1fd05fd6b85a9fc7938330f9c Mon Sep 17 00:00:00 2001
+From: Sascha Hauer <s.hauer at pengutronix.de>
+Date: Thu, 4 Oct 2012 17:11:17 -0700
+Subject: kbuild: make: fix if_changed when command contains backslashes
+
+From: Sascha Hauer <s.hauer at pengutronix.de>
+
+commit c353acba28fb3fa1fd05fd6b85a9fc7938330f9c upstream.
+
+The call if_changed mechanism does not work when the command contains
+backslashes.  This basically is an issue with lzo and bzip2 compressed
+kernels.  The compressed binaries do not contain the uncompressed image
+size, so these use size_append to append the size.  This results in
+backslashes in the executed command.  With this if_changed always
+detects a change in the command and rebuilds the compressed image even
+if nothing has changed.
+
+Fix this by escaping backslashes in make-cmd
+
+Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
+Signed-off-by: Jan Luebbe <jlu at pengutronix.de>
+Cc: Sam Ravnborg <sam at ravnborg.org>
+Cc: Bernhard Walle <bernhard at bwalle.de>
+Cc: Michal Marek <mmarek at suse.cz>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ scripts/Kbuild.include |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/Kbuild.include
++++ b/scripts/Kbuild.include
+@@ -209,7 +209,7 @@ endif
+ # >$< substitution to preserve $ when reloading .cmd file
+ # note: when using inline perl scripts [perl -e '...$$t=1;...']
+ # in $(cmd_xxx) double $$ your perl vars
+-make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))
++make-cmd = $(subst \\,\\\\,$(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))))
+ 
+ # Find any prerequisites that is newer than target or that does not exist.
+ # PHONY targets skipped in both cases.
+From f96972f2dc6365421cf2366ebd61ee4cf060c8d5 Mon Sep 17 00:00:00 2001
+From: Shawn Guo <shawn.guo at linaro.org>
+Date: Thu, 4 Oct 2012 17:12:23 -0700
+Subject: kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()
+
+From: Shawn Guo <shawn.guo at linaro.org>
+
+commit f96972f2dc6365421cf2366ebd61ee4cf060c8d5 upstream.
+
+As kernel_power_off() calls disable_nonboot_cpus(), we may also want to
+have kernel_restart() call disable_nonboot_cpus().  Doing so can help
+machines that require boot cpu be the last alive cpu during reboot to
+survive with kernel restart.
+
+This fixes one reboot issue seen on imx6q (Cortex-A9 Quad).  The machine
+requires that the restart routine be run on the primary cpu rather than
+secondary ones.  Otherwise, the secondary core running the restart
+routine will fail to come to online after reboot.
+
+Signed-off-by: Shawn Guo <shawn.guo at linaro.org>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ kernel/sys.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/sys.c
++++ b/kernel/sys.c
+@@ -368,6 +368,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier
+ void kernel_restart(char *cmd)
+ {
+ 	kernel_restart_prepare(cmd);
++	disable_nonboot_cpus();
+ 	if (!cmd)
+ 		printk(KERN_EMERG "Restarting system.\n");
+ 	else
+From ca16f580a5db7e60bfafe59a50bb133bd3347491 Mon Sep 17 00:00:00 2001
+From: Rusty Russell <rusty at rustcorp.com.au>
+Date: Thu, 4 Oct 2012 12:03:25 +0930
+Subject: lguest: fix occasional crash in example launcher.
+
+From: Rusty Russell <rusty at rustcorp.com.au>
+
+commit ca16f580a5db7e60bfafe59a50bb133bd3347491 upstream.
+
+We usually got away with ->next on the final entry being NULL, but it
+finally bit me.
+
+Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ tools/lguest/lguest.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/lguest/lguest.c
++++ b/tools/lguest/lguest.c
+@@ -1299,6 +1299,7 @@ static struct device *new_device(const c
+ 	dev->feature_len = 0;
+ 	dev->num_vq = 0;
+ 	dev->running = false;
++	dev->next = NULL;
+ 
+ 	/*
+ 	 * Append to device list.  Prepending to a single-linked list is
+From e96875677fb2b7cb739c5d7769824dff7260d31d Mon Sep 17 00:00:00 2001
+From: Davidlohr Bueso <dave at gnu.org>
+Date: Thu, 4 Oct 2012 17:13:18 -0700
+Subject: lib/gcd.c: prevent possible div by 0
+
+From: Davidlohr Bueso <dave at gnu.org>
+
+commit e96875677fb2b7cb739c5d7769824dff7260d31d upstream.
+
+Account for all properties when a and/or b are 0:
+gcd(0, 0) = 0
+gcd(a, 0) = a
+gcd(0, b) = b
+
+Fixes no known problems in current kernels.
+
+Signed-off-by: Davidlohr Bueso <dave at gnu.org>
+Cc: Eric Dumazet <eric.dumazet at gmail.com>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ lib/gcd.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/lib/gcd.c
++++ b/lib/gcd.c
+@@ -9,6 +9,9 @@ unsigned long gcd(unsigned long a, unsig
+ 
+ 	if (a < b)
+ 		swap(a, b);
++
++	if (!b)
++		return a;
+ 	while ((r = a % b) != 0) {
+ 		a = b;
+ 		b = r;
+From 4eae518d4b01b0cbf2f0d8edb5a6f3d6245ee8fb Mon Sep 17 00:00:00 2001
+From: Yuta Ando <yuta.and at gmail.com>
+Date: Mon, 1 Oct 2012 23:24:30 +0900
+Subject: localmodconfig: Fix localyesconfig to set to 'y' not 'm'
+
+From: Yuta Ando <yuta.and at gmail.com>
+
+commit 4eae518d4b01b0cbf2f0d8edb5a6f3d6245ee8fb upstream.
+
+The kbuild target 'localyesconfig' has been same as 'localmodconfig'
+since the commit 50bce3e "kconfig/streamline_config.pl: merge
+local{mod,yes}config". The commit expects this script generates
+different configure depending on target, but it was not yet implemented.
+
+So I added code that sets to 'yes' when target is 'localyesconfig'.
+
+Link: http://lkml.kernel.org/r/1349101470-12243-1-git-send-email-yuta.and@gmail.com
+
+Signed-off-by: Yuta Ando <yuta.and at gmail.com>
+Cc: linux-kbuild at vger.kernel.org
+Signed-off-by: Steven Rostedt <rostedt at rostedt.homelinux.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ scripts/kconfig/streamline_config.pl |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/scripts/kconfig/streamline_config.pl
++++ b/scripts/kconfig/streamline_config.pl
+@@ -605,6 +605,8 @@ foreach my $line (@config_file) {
+ 	if (defined($configs{$1})) {
+ 	    if ($localyesconfig) {
+ 	        $setconfigs{$1} = 'y';
++		print "$1=y\n";
++		next;
+ 	    } else {
+ 	        $setconfigs{$1} = $2;
+ 	    }
+From 97d2fbf501e3cf105ac957086c7e40e62e15cdf8 Mon Sep 17 00:00:00 2001
+From: Frank Schäfer <fschaefer.oss at googlemail.com>
+Date: Sun, 9 Sep 2012 15:02:19 -0300
+Subject: media: gspca_pac7302: add support for device 1ae7:2001 Speedlink Snappy Microphone SL-6825-SBK
+
+From: Frank Schäfer <fschaefer.oss at googlemail.com>
+
+commit 97d2fbf501e3cf105ac957086c7e40e62e15cdf8 upstream.
+
+Signed-off-by: Frank Schäfer <fschaefer.oss at googlemail.com>
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/media/video/gspca/pac7302.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/media/video/gspca/pac7302.c
++++ b/drivers/media/video/gspca/pac7302.c
+@@ -905,6 +905,7 @@ static const struct usb_device_id device
+ 	{USB_DEVICE(0x093a, 0x262a)},
+ 	{USB_DEVICE(0x093a, 0x262c)},
+ 	{USB_DEVICE(0x145f, 0x013c)},
++	{USB_DEVICE(0x1ae7, 0x2001)}, /* SpeedLink Snappy Mic SL-6825-SBK */
+ 	{}
+ };
+ MODULE_DEVICE_TABLE(usb, device_table);
+From db43b9ca2f101d0945d043fa7d5ecd8f2da17fef Mon Sep 17 00:00:00 2001
+From: Frank Schäfer <fschaefer.oss at googlemail.com>
+Date: Sun, 9 Sep 2012 15:02:20 -0300
+Subject: media: gspca_pac7302: make red balance and blue balance controls work again
+
+From: Frank Schäfer <fschaefer.oss at googlemail.com>
+
+commit db43b9ca2f101d0945d043fa7d5ecd8f2da17fef upstream.
+
+Fix a regression from kernel 3.4 which has been introduced with the conversion of the gspca driver to the v4l2 control framework.
+
+Signed-off-by: Frank Schäfer <fschaefer.oss at googlemail.com>
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/media/video/gspca/pac7302.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/video/gspca/pac7302.c
++++ b/drivers/media/video/gspca/pac7302.c
+@@ -616,7 +616,7 @@ static int sd_init_controls(struct gspca
+ 	sd->red_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
+ 					V4L2_CID_RED_BALANCE, 0, 3, 1, 1);
+ 	sd->blue_balance = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
+-					V4L2_CID_RED_BALANCE, 0, 3, 1, 1);
++					V4L2_CID_BLUE_BALANCE, 0, 3, 1, 1);
+ 
+ 	gspca_dev->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
+ 					V4L2_CID_AUTOGAIN, 0, 1, 1, 1);
+From 4b961180ef275035b1538317ffd0e21e80e63e77 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Sun, 19 Aug 2012 19:32:27 -0300
+Subject: media: rc: ite-cir: Initialise ite_dev::rdev earlier
+
+From: Ben Hutchings <ben at decadent.org.uk>
+
+commit 4b961180ef275035b1538317ffd0e21e80e63e77 upstream.
+
+ite_dev::rdev is currently initialised in ite_probe() after
+rc_register_device() returns.  If a newly registered device is opened
+quickly enough, we may enable interrupts and try to use ite_dev::rdev
+before it has been initialised.  Move it up to the earliest point we
+can, right after calling rc_allocate_device().
+
+Reported-and-tested-by: YunQiang Su <wzssyqa at gmail.com>
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/media/rc/ite-cir.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/rc/ite-cir.c
++++ b/drivers/media/rc/ite-cir.c
+@@ -1473,6 +1473,7 @@ static int ite_probe(struct pnp_dev *pde
+ 	rdev = rc_allocate_device();
+ 	if (!rdev)
+ 		goto failure;
++	itdev->rdev = rdev;
+ 
+ 	ret = -ENODEV;
+ 
+@@ -1604,7 +1605,6 @@ static int ite_probe(struct pnp_dev *pde
+ 	if (ret)
+ 		goto failure3;
+ 
+-	itdev->rdev = rdev;
+ 	ite_pr(KERN_NOTICE, "driver has been successfully loaded\n");
+ 
+ 	return 0;
+From c10c2aab634a3c61c46b98875988b2f53040bc9c Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie at opensource.wolfsonmicro.com>
+Date: Tue, 7 Aug 2012 19:42:44 +0100
+Subject: mfd: 88pm860x: Move _IO resources out of ioport_ioresource
+
+From: Mark Brown <broonie at opensource.wolfsonmicro.com>
+
+commit c10c2aab634a3c61c46b98875988b2f53040bc9c upstream.
+
+The removal of mach/io.h from most ARM platforms also set the range of
+valid IO ports to be empty for most platforms when previously any 32
+bit integer had been valid. This makes it impossible to add IO resources
+as the added range is smaller than that of the root resource for IO ports.
+
+Since we're not really using IO memory at all fix this by defining our
+own root resource outside the normal tree and make that the parent of
+all IO resources. This also ensures we won't conflict with read IO ports
+if we ever run on a platform which happens to use them.
+
+Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
+Acked-by: Arnd Bergmann <arnd at arndb.de>
+Acked-by: Haojian Zhuang <haojian.zhuang at gmail.com>
+Tested-by: Haojian Zhuang <haojian.zhuang at gmail.com>
+Signed-off-by: Samuel Ortiz <sameo at linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/mfd/88pm860x-core.c |   92 ++++++++++++++++++++++++++++++--------------
+ 1 file changed, 63 insertions(+), 29 deletions(-)
+
+--- a/drivers/mfd/88pm860x-core.c
++++ b/drivers/mfd/88pm860x-core.c
+@@ -21,40 +21,73 @@
+ 
+ #define INT_STATUS_NUM			3
+ 
++static struct resource io_parent = {
++	.start = 0,
++	.end   = 0xffffffff,
++	.flags = IORESOURCE_IO,
++};
++
+ static struct resource bk_resources[] __devinitdata = {
+-	{PM8606_BACKLIGHT1, PM8606_BACKLIGHT1, "backlight-0", IORESOURCE_IO,},
+-	{PM8606_BACKLIGHT2, PM8606_BACKLIGHT2, "backlight-1", IORESOURCE_IO,},
+-	{PM8606_BACKLIGHT3, PM8606_BACKLIGHT3, "backlight-2", IORESOURCE_IO,},
++	{PM8606_BACKLIGHT1, PM8606_BACKLIGHT1, "backlight-0", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8606_BACKLIGHT2, PM8606_BACKLIGHT2, "backlight-1", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8606_BACKLIGHT3, PM8606_BACKLIGHT3, "backlight-2", IORESOURCE_IO,
++	 &io_parent,},
+ };
+ 
+ static struct resource led_resources[] __devinitdata = {
+-	{PM8606_LED1_RED,   PM8606_LED1_RED,   "led0-red",   IORESOURCE_IO,},
+-	{PM8606_LED1_GREEN, PM8606_LED1_GREEN, "led0-green", IORESOURCE_IO,},
+-	{PM8606_LED1_BLUE,  PM8606_LED1_BLUE,  "led0-blue",  IORESOURCE_IO,},
+-	{PM8606_LED2_RED,   PM8606_LED2_RED,   "led1-red",   IORESOURCE_IO,},
+-	{PM8606_LED2_GREEN, PM8606_LED2_GREEN, "led1-green", IORESOURCE_IO,},
+-	{PM8606_LED2_BLUE,  PM8606_LED2_BLUE,  "led1-blue",  IORESOURCE_IO,},
++	{PM8606_LED1_RED,   PM8606_LED1_RED,   "led0-red",   IORESOURCE_IO,
++	 &io_parent,},
++	{PM8606_LED1_GREEN, PM8606_LED1_GREEN, "led0-green", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8606_LED1_BLUE,  PM8606_LED1_BLUE,  "led0-blue",  IORESOURCE_IO,
++	 &io_parent,},
++	{PM8606_LED2_RED,   PM8606_LED2_RED,   "led1-red",   IORESOURCE_IO,
++	 &io_parent,},
++	{PM8606_LED2_GREEN, PM8606_LED2_GREEN, "led1-green", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8606_LED2_BLUE,  PM8606_LED2_BLUE,  "led1-blue",  IORESOURCE_IO,
++	 &io_parent,},
+ };
+ 
+ static struct resource regulator_resources[] __devinitdata = {
+-	{PM8607_ID_BUCK1, PM8607_ID_BUCK1, "buck-1", IORESOURCE_IO,},
+-	{PM8607_ID_BUCK2, PM8607_ID_BUCK2, "buck-2", IORESOURCE_IO,},
+-	{PM8607_ID_BUCK3, PM8607_ID_BUCK3, "buck-3", IORESOURCE_IO,},
+-	{PM8607_ID_LDO1,  PM8607_ID_LDO1,  "ldo-01", IORESOURCE_IO,},
+-	{PM8607_ID_LDO2,  PM8607_ID_LDO2,  "ldo-02", IORESOURCE_IO,},
+-	{PM8607_ID_LDO3,  PM8607_ID_LDO3,  "ldo-03", IORESOURCE_IO,},
+-	{PM8607_ID_LDO4,  PM8607_ID_LDO4,  "ldo-04", IORESOURCE_IO,},
+-	{PM8607_ID_LDO5,  PM8607_ID_LDO5,  "ldo-05", IORESOURCE_IO,},
+-	{PM8607_ID_LDO6,  PM8607_ID_LDO6,  "ldo-06", IORESOURCE_IO,},
+-	{PM8607_ID_LDO7,  PM8607_ID_LDO7,  "ldo-07", IORESOURCE_IO,},
+-	{PM8607_ID_LDO8,  PM8607_ID_LDO8,  "ldo-08", IORESOURCE_IO,},
+-	{PM8607_ID_LDO9,  PM8607_ID_LDO9,  "ldo-09", IORESOURCE_IO,},
+-	{PM8607_ID_LDO10, PM8607_ID_LDO10, "ldo-10", IORESOURCE_IO,},
+-	{PM8607_ID_LDO11, PM8607_ID_LDO11, "ldo-11", IORESOURCE_IO,},
+-	{PM8607_ID_LDO12, PM8607_ID_LDO12, "ldo-12", IORESOURCE_IO,},
+-	{PM8607_ID_LDO13, PM8607_ID_LDO13, "ldo-13", IORESOURCE_IO,},
+-	{PM8607_ID_LDO14, PM8607_ID_LDO14, "ldo-14", IORESOURCE_IO,},
+-	{PM8607_ID_LDO15, PM8607_ID_LDO15, "ldo-15", IORESOURCE_IO,},
++	{PM8607_ID_BUCK1, PM8607_ID_BUCK1, "buck-1", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_BUCK2, PM8607_ID_BUCK2, "buck-2", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_BUCK3, PM8607_ID_BUCK3, "buck-3", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO1,  PM8607_ID_LDO1,  "ldo-01", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO2,  PM8607_ID_LDO2,  "ldo-02", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO3,  PM8607_ID_LDO3,  "ldo-03", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO4,  PM8607_ID_LDO4,  "ldo-04", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO5,  PM8607_ID_LDO5,  "ldo-05", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO6,  PM8607_ID_LDO6,  "ldo-06", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO7,  PM8607_ID_LDO7,  "ldo-07", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO8,  PM8607_ID_LDO8,  "ldo-08", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO9,  PM8607_ID_LDO9,  "ldo-09", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO10, PM8607_ID_LDO10, "ldo-10", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO11, PM8607_ID_LDO11, "ldo-11", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO12, PM8607_ID_LDO12, "ldo-12", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO13, PM8607_ID_LDO13, "ldo-13", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO14, PM8607_ID_LDO14, "ldo-14", IORESOURCE_IO,
++	 &io_parent,},
++	{PM8607_ID_LDO15, PM8607_ID_LDO15, "ldo-15", IORESOURCE_IO,
++	 &io_parent,},
+ };
+ 
+ static struct resource touch_resources[] __devinitdata = {
+@@ -91,11 +124,12 @@ static struct resource charger_resources
+ };
+ 
+ static struct resource preg_resources[] __devinitdata = {
+-	{PM8606_ID_PREG,  PM8606_ID_PREG,  "preg",   IORESOURCE_IO,},
++	{PM8606_ID_PREG,  PM8606_ID_PREG,  "preg",   IORESOURCE_IO,
++	 &io_parent,},
+ };
+ 
+ static struct resource rtc_resources[] __devinitdata = {
+-	{PM8607_IRQ_RTC, PM8607_IRQ_RTC, "rtc", IORESOURCE_IRQ,},
++	{PM8607_IRQ_RTC, PM8607_IRQ_RTC, "rtc", IORESOURCE_IRQ, &io_parent,},
+ };
+ 
+ static struct mfd_cell bk_devs[] = {
+From bee6e1fa617b1fb7f6f91033428410e05f5ab0ed Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie at opensource.wolfsonmicro.com>
+Date: Tue, 7 Aug 2012 19:42:43 +0100
+Subject: mfd: max8925: Move _IO resources out of ioport_ioresource
+
+From: Mark Brown <broonie at opensource.wolfsonmicro.com>
+
+commit bee6e1fa617b1fb7f6f91033428410e05f5ab0ed upstream.
+
+The removal of mach/io.h from most ARM platforms also set the range of
+valid IO ports to be empty for most platforms when previously any 32
+bit integer had been valid. This makes it impossible to add IO resources
+as the added range is smaller than that of the root resource for IO ports.
+
+Since we're not really using IO memory at all fix this by defining our
+own root resource outside the normal tree and make that the parent of
+all IO resources. This also ensures we won't conflict with read IO ports
+if we ever run on a platform which happens to use them.
+
+Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com
+Acked-by: Arnd Bergmann <arnd at arndb.de>
+Acked-by: Haojian Zhuang <haojian.zhuang at gmail.com>
+Tested-by: Haojian Zhuang <haojian.zhuang at gmail.com>
+Signed-off-by: Samuel Ortiz <sameo at linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/mfd/max8925-core.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/mfd/max8925-core.c
++++ b/drivers/mfd/max8925-core.c
+@@ -18,12 +18,19 @@
+ #include <linux/mfd/core.h>
+ #include <linux/mfd/max8925.h>
+ 
++static struct resource io_parent = {
++	.start = 0,
++	.end   = 0xffffffff,
++	.flags = IORESOURCE_IO,
++};
++
+ static struct resource backlight_resources[] = {
+ 	{
+ 		.name	= "max8925-backlight",
+ 		.start	= MAX8925_WLED_MODE_CNTL,
+ 		.end	= MAX8925_WLED_CNTL,
+ 		.flags	= IORESOURCE_IO,
++		.parent = &io_parent,
+ 	},
+ };
+ 
+@@ -42,6 +49,7 @@ static struct resource touch_resources[]
+ 		.start	= MAX8925_TSC_IRQ,
+ 		.end	= MAX8925_ADC_RES_END,
+ 		.flags	= IORESOURCE_IO,
++		.parent = &io_parent,
+ 	},
+ };
+ 
+@@ -60,6 +68,7 @@ static struct resource power_supply_reso
+ 		.start	= MAX8925_CHG_IRQ1,
+ 		.end	= MAX8925_CHG_IRQ1_MASK,
+ 		.flags	= IORESOURCE_IO,
++		.parent = &io_parent,
+ 	},
+ };
+ 
+@@ -118,6 +127,7 @@ static struct mfd_cell onkey_devs[] = {
+ 	.start	= MAX8925_##_start,		\
+ 	.end	= MAX8925_##_end,		\
+ 	.flags	= IORESOURCE_IO,		\
++	.parent = &io_parent,			\
+ }
+ 
+ static struct resource regulator_resources[] = {
+From 9957423f035c2071f6d1c5d2f095cdafbeb25ad7 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+Date: Thu, 4 Oct 2012 17:11:13 -0700
+Subject: mn10300: only add -mmem-funcs to KBUILD_CFLAGS if gcc supports it
+
+From: Geert Uytterhoeven <geert at linux-m68k.org>
+
+commit 9957423f035c2071f6d1c5d2f095cdafbeb25ad7 upstream.
+
+It seems the current (gcc 4.6.3) no longer provides this so make it
+conditional.
+
+As reported by Tony before, the mn10300 architecture cross-compiles with
+gcc-4.6.3 if -mmem-funcs is not added to KBUILD_CFLAGS.
+
+Reported-by: Tony Breeds <tony at bakeyournoodle.com>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+Cc: David Howells <dhowells at redhat.com>
+Cc: Koichi Yasutake <yasutake.koichi at jp.panasonic.com>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ arch/mn10300/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mn10300/Makefile
++++ b/arch/mn10300/Makefile
+@@ -26,7 +26,7 @@ CHECKFLAGS	+=
+ PROCESSOR	:= unset
+ UNIT		:= unset
+ 
+-KBUILD_CFLAGS	+= -mam33 -mmem-funcs -DCPU=AM33
++KBUILD_CFLAGS	+= -mam33 -DCPU=AM33 $(call cc-option,-mmem-funcs,)
+ KBUILD_AFLAGS	+= -mam33 -DCPU=AM33
+ 
+ ifeq ($(CONFIG_MN10300_CURRENT_IN_E2),y)
+From dccdd11a3449d39d0e3fdf376f13cf2eabab41b8 Mon Sep 17 00:00:00 2001
+From: Tao Hou <hotforest at gmail.com>
+Date: Mon, 1 Oct 2012 16:42:43 +0000
+Subject: net: ethernet: davinci_cpdma: decrease the desc count when cleaning up the remaining packets
+
+
+From: Tao Hou <hotforest at gmail.com>
+
+[ Upstream commit ffb5ba90017505a19e238e986e6d33f09e4df765 ]
+
+chan->count is used by rx channel. If the desc count is not updated by
+the clean up loop in cpdma_chan_stop, the value written to the rxfree
+register in cpdma_chan_start will be incorrect.
+
+Signed-off-by: Tao Hou <hotforest at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ drivers/net/ethernet/ti/davinci_cpdma.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/ti/davinci_cpdma.c
++++ b/drivers/net/ethernet/ti/davinci_cpdma.c
+@@ -863,6 +863,7 @@ int cpdma_chan_stop(struct cpdma_chan *c
+ 
+ 		next_dma = desc_read(desc, hw_next);
+ 		chan->head = desc_from_phys(pool, next_dma);
++		chan->count--;
+ 		chan->stats.teardown_dequeue++;
+ 
+ 		/* issue callback without locks held */
+From 1965f66e7db08d1ebccd24a59043eba826cc1ce8 Mon Sep 17 00:00:00 2001
+From: Yinghai Lu <yinghai at kernel.org>
+Date: Mon, 10 Sep 2012 17:19:33 -0700
+Subject: PCI: Check P2P bridge for invalid secondary/subordinate range
+
+From: Yinghai Lu <yinghai at kernel.org>
+
+commit 1965f66e7db08d1ebccd24a59043eba826cc1ce8 upstream.
+
+For bridges with "secondary > subordinate", i.e., invalid bus number
+apertures, we don't enumerate anything behind the bridge unless the
+user specified "pci=assign-busses".
+
+This patch makes us automatically try to reassign the downstream bus
+numbers in this case (just for that bridge, not for all bridges as
+"pci=assign-busses" does).
+
+We don't discover all the devices on the Intel DP43BF motherboard
+without this change (or "pci=assign-busses") because its BIOS configures
+a bridge as:
+
+    pci 0000:00:1e.0: PCI bridge to [bus 20-08] (subtractive decode)
+
+[bhelgaas: changelog, change message to dev_info]
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=18412
+Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=625754
+Reported-by: Brian C. Huffman <bhuffman at graze.net>
+Reported-by: VL <vl.homutov at gmail.com>
+Tested-by: VL <vl.homutov at gmail.com>
+Signed-off-by: Yinghai Lu <yinghai at kernel.org>
+Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
+
+---
+ drivers/pci/probe.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -729,8 +729,10 @@ int __devinit pci_scan_bridge(struct pci
+ 
+ 	/* Check if setup is sensible at all */
+ 	if (!pass &&
+-	    (primary != bus->number || secondary <= bus->number)) {
+-		dev_dbg(&dev->dev, "bus configuration invalid, reconfiguring\n");
++	    (primary != bus->number || secondary <= bus->number ||
++	     secondary > subordinate)) {
++		dev_info(&dev->dev, "bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n",
++			 secondary, subordinate);
+ 		broken = 1;
+ 	}
+ 
+From 997a031107ec962967ce36db9bc500f1fad491c1 Mon Sep 17 00:00:00 2001
+From: Feng Hong <hongfeng at marvell.com>
+Date: Wed, 19 Sep 2012 14:16:00 +0200
+Subject: PM / Sleep: use resume event when call dpm_resume_early
+
+From: Feng Hong <hongfeng at marvell.com>
+
+commit 997a031107ec962967ce36db9bc500f1fad491c1 upstream.
+
+When dpm_suspend_noirq fail, state is PMSG_SUSPEND,
+should change to PMSG_RESUME when dpm_resume_early is called
+
+Signed-off-by: Feng Hong <hongfeng at marvell.com>
+Signed-off-by: Raul Xiong <xjian at marvell.com>
+Signed-off-by: Neil Zhang <zhangwm at marvell.com>
+Signed-off-by: Rafael J. Wysocki <rjw at sisk.pl>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/base/power/main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/base/power/main.c
++++ b/drivers/base/power/main.c
+@@ -996,7 +996,7 @@ int dpm_suspend_end(pm_message_t state)
+ 
+ 	error = dpm_suspend_noirq(state);
+ 	if (error) {
+-		dpm_resume_early(state);
++		dpm_resume_early(resume_event(state));
+ 		return error;
+ 	}
+ 
+From 1e38b7140185e384da216aff66a711df09b5afc9 Mon Sep 17 00:00:00 2001
+From: Gavin Shan <shangw at linux.vnet.ibm.com>
+Date: Mon, 17 Sep 2012 04:34:28 +0000
+Subject: powerpc/eeh: Fix crash on converting OF node to edev
+
+From: Gavin Shan <shangw at linux.vnet.ibm.com>
+
+commit 1e38b7140185e384da216aff66a711df09b5afc9 upstream.
+
+The kernel crash was reported by Alexy. He was testing some feature
+with private kernel, in which Alexy added some code in pci_pm_reset()
+to read the CSR after writting it. The bug could be reproduced on
+Fiber Channel card (Fibre Channel: Emulex Corporation Saturn-X:
+LightPulse Fibre Channel Host Adapter (rev 03)) by the following
+commands.
+
+	# echo 1 > /sys/devices/pci0004:01/0004:01:00.0/reset
+	# rmmod lpfc
+	# modprobe lpfc
+
+The history behind the test case is that those additional config
+space reading operations in pci_pm_reset() would cause EEH error,
+but we didn't detect EEH error until "modprobe lpfc". For the case,
+all the PCI devices on PCI bus (0004:01) were removed and added after
+PE reset. Then the EEH devices would be figured out again based on
+the OF nodes. Unfortunately, there were some child OF nodes under
+PCI device (0004:01:00.0), but they didn't have attached PCI_DN since
+they're invisible from PCI domain. However, we were still trying to
+convert OF node to EEH device without checking on the attached PCI_DN.
+Eventually, it caused the kernel crash as follows:
+
+Unable to handle kernel paging request for data at address 0x00000030
+Faulting instruction address: 0xc00000000004d888
+cpu 0x0: Vector: 300 (Data Access) at [c000000fc797b950]
+    pc: c00000000004d888: .eeh_add_device_tree_early+0x78/0x140
+    lr: c00000000004d880: .eeh_add_device_tree_early+0x70/0x140
+    sp: c000000fc797bbd0
+   msr: 8000000000009032
+   dar: 30
+ dsisr: 40000000
+  current = 0xc000000fc78d9f70
+  paca    = 0xc00000000edb0000   softe: 0        irq_happened: 0x00
+    pid   = 2951, comm = eehd
+enter ? for help
+[c000000fc797bc50] c00000000004d848 .eeh_add_device_tree_early+0x38/0x140
+[c000000fc797bcd0] c00000000004d848 .eeh_add_device_tree_early+0x38/0x140
+[c000000fc797bd50] c000000000051b54 .pcibios_add_pci_devices+0x34/0x190
+[c000000fc797bde0] c00000000004fb10 .eeh_reset_device+0x100/0x160
+[c000000fc797be70] c0000000000502dc .eeh_handle_event+0x19c/0x300
+[c000000fc797bf00] c000000000050570 .eeh_event_handler+0x130/0x1a0
+[c000000fc797bf90] c000000000020138 .kernel_thread+0x54/0x70
+
+The patch changes of_node_to_eeh_dev() and just returns NULL if the
+passed OF node doesn't have attached PCI_DN.
+
+Reported-by: Alexey Kardashevskiy <aik at ozlabs.ru>
+Signed-off-by: Gavin Shan <shangw at linux.vnet.ibm.com>
+Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ arch/powerpc/include/asm/pci-bridge.h |    8 ++++++++
+ arch/powerpc/platforms/pseries/eeh.c  |    2 +-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/include/asm/pci-bridge.h
++++ b/arch/powerpc/include/asm/pci-bridge.h
+@@ -182,6 +182,14 @@ static inline int pci_device_from_OF_nod
+ #if defined(CONFIG_EEH)
+ static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
+ {
++	/*
++	 * For those OF nodes whose parent isn't PCI bridge, they
++	 * don't have PCI_DN actually. So we have to skip them for
++	 * any EEH operations.
++	 */
++	if (!dn || !PCI_DN(dn))
++		return NULL;
++
+ 	return PCI_DN(dn)->edev;
+ }
+ #endif
+--- a/arch/powerpc/platforms/pseries/eeh.c
++++ b/arch/powerpc/platforms/pseries/eeh.c
+@@ -1029,7 +1029,7 @@ static void eeh_add_device_early(struct
+ {
+ 	struct pci_controller *phb;
+ 
+-	if (!dn || !of_node_to_eeh_dev(dn))
++	if (!of_node_to_eeh_dev(dn))
+ 		return;
+ 	phb = of_node_to_eeh_dev(dn)->phb;
+ 
+From c8adfeccee01ce3de6a7d14fcd4e3be02e27f03c Mon Sep 17 00:00:00 2001
+From: Nishanth Aravamudan <nacc at linux.vnet.ibm.com>
+Date: Mon, 1 Oct 2012 14:59:13 +0000
+Subject: powerpc: Fix VMX fix for memcpy case
+
+From: Nishanth Aravamudan <nacc at linux.vnet.ibm.com>
+
+commit c8adfeccee01ce3de6a7d14fcd4e3be02e27f03c upstream.
+
+In 2fae7cdb60240e2e2d9b378afbf6d9fcce8a3890 ("powerpc: Fix VMX in
+interrupt check in POWER7 copy loops"), Anton inadvertently
+introduced a regression for memcpy on POWER7 machines. copyuser and
+memcpy diverge slightly in their use of cr1 (copyuser doesn't use it,
+but memcpy does) and you end up clobbering that register with your fix.
+That results in (taken from an FC18 kernel):
+
+[   18.824604] Unrecoverable VMX/Altivec Unavailable Exception f20 at c000000000052f40
+[   18.824618] Oops: Unrecoverable VMX/Altivec Unavailable Exception, sig: 6 [#1]
+[   18.824623] SMP NR_CPUS=1024 NUMA pSeries
+[   18.824633] Modules linked in: tg3(+) be2net(+) cxgb4(+) ipr(+) sunrpc xts lrw gf128mul dm_crypt dm_round_robin dm_multipath linear raid10 raid456 async_raid6_recov async_memcpy async_pq raid6_pq async_xor xor async_tx raid1 raid0 scsi_dh_rdac scsi_dh_hp_sw scsi_dh_emc scsi_dh_alua squashfs cramfs
+[   18.824705] NIP: c000000000052f40 LR: c00000000020b874 CTR: 0000000000000512
+[   18.824709] REGS: c000001f1fef7790 TRAP: 0f20   Not tainted  (3.6.0-0.rc6.git0.2.fc18.ppc64)
+[   18.824713] MSR: 8000000000009032 <SF,EE,ME,IR,DR,RI>  CR: 4802802e  XER: 20000010
+[   18.824726] SOFTE: 0
+[   18.824728] CFAR: 0000000000000f20
+[   18.824731] TASK = c000000fa7128400[0] 'swapper/24' THREAD: c000000fa7480000 CPU: 24
+GPR00: 00000000ffffffc0 c000001f1fef7a10 c00000000164edc0 c000000f9b9a8120
+GPR04: c000000f9b9a8124 0000000000001438 0000000000000060 03ffffff064657ee
+GPR08: 0000000080000000 0000000000000010 0000000000000020 0000000000000030
+GPR12: 0000000028028022 c00000000ff25400 0000000000000001 0000000000000000
+GPR16: 0000000000000000 7fffffffffffffff c0000000016b2180 c00000000156a500
+GPR20: c000000f968c7a90 c0000000131c31d8 c000001f1fef4000 c000000001561d00
+GPR24: 000000000000000a 0000000000000000 0000000000000001 0000000000000012
+GPR28: c000000fa5c04f80 00000000000008bc c0000000015c0a28 000000000000022e
+[   18.824792] NIP [c000000000052f40] .memcpy_power7+0x5a0/0x7c4
+[   18.824797] LR [c00000000020b874] .pcpu_free_area+0x174/0x2d0
+[   18.824800] Call Trace:
+[   18.824803] [c000001f1fef7a10] [c000000000052c14] .memcpy_power7+0x274/0x7c4 (unreliable)
+[   18.824809] [c000001f1fef7b10] [c00000000020b874] .pcpu_free_area+0x174/0x2d0
+[   18.824813] [c000001f1fef7bb0] [c00000000020ba88] .free_percpu+0xb8/0x1b0
+[   18.824819] [c000001f1fef7c50] [c00000000043d144] .throtl_pd_exit+0x94/0xd0
+[   18.824824] [c000001f1fef7cf0] [c00000000043acf8] .blkg_free+0x88/0xe0
+[   18.824829] [c000001f1fef7d90] [c00000000018c048] .rcu_process_callbacks+0x2e8/0x8a0
+[   18.824835] [c000001f1fef7e90] [c0000000000a8ce8] .__do_softirq+0x158/0x4d0
+[   18.824840] [c000001f1fef7f90] [c000000000025ecc] .call_do_softirq+0x14/0x24
+[   18.824845] [c000000fa7483650] [c000000000010e80] .do_softirq+0x160/0x1a0
+[   18.824850] [c000000fa74836f0] [c0000000000a94a4] .irq_exit+0xf4/0x120
+[   18.824854] [c000000fa7483780] [c000000000020c44] .timer_interrupt+0x154/0x4d0
+[   18.824859] [c000000fa7483830] [c000000000003be0] decrementer_common+0x160/0x180
+[   18.824866] --- Exception: 901 at .plpar_hcall_norets+0x84/0xd4
+[   18.824866]     LR = .check_and_cede_processor+0x48/0x80
+[   18.824871] [c000000fa7483b20] [c00000000007f018] .check_and_cede_processor+0x18/0x80 (unreliable)
+[   18.824877] [c000000fa7483b90] [c00000000007f104] .dedicated_cede_loop+0x84/0x150
+[   18.824883] [c000000fa7483c50] [c0000000006bc030] .cpuidle_enter+0x30/0x50
+[   18.824887] [c000000fa7483cc0] [c0000000006bc9f4] .cpuidle_idle_call+0x104/0x720
+[   18.824892] [c000000fa7483d80] [c000000000070af8] .pSeries_idle+0x18/0x40
+[   18.824897] [c000000fa7483df0] [c000000000019084] .cpu_idle+0x1a4/0x380
+[   18.824902] [c000000fa7483ec0] [c0000000008a4c18] .start_secondary+0x520/0x528
+[   18.824907] [c000000fa7483f90] [c0000000000093f0] .start_secondary_prolog+0x10/0x14
+[   18.824911] Instruction dump:
+[   18.824914] 38840008 90030000 90e30004 38630008 7ca62850 7cc300d0 78c7e102 7cf01120
+[   18.824923] 78c60660 39200010 39400020 39600030 <7e00200c> 7c0020ce 38840010 409f001c
+[   18.824935] ---[ end trace 0bb95124affaaa45 ]---
+[   18.825046] Unrecoverable VMX/Altivec Unavailable Exception f20 at c000000000052d08
+
+I believe the right fix is to make memcpy match usercopy and not use
+cr1.
+
+Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
+Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ arch/powerpc/lib/memcpy_power7.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/powerpc/lib/memcpy_power7.S
++++ b/arch/powerpc/lib/memcpy_power7.S
+@@ -239,8 +239,8 @@ _GLOBAL(memcpy_power7)
+ 	ori	r9,r9,1		/* stream=1 */
+ 
+ 	srdi	r7,r5,7		/* length in cachelines, capped at 0x3FF */
+-	cmpldi	cr1,r7,0x3FF
+-	ble	cr1,1f
++	cmpldi	r7,0x3FF
++	ble	1f
+ 	li	r7,0x3FF
+ 1:	lis	r0,0x0E00	/* depth=7 */
+ 	sldi	r7,r7,7
+From d900bd7366463fd96a907b2c212242e2b68b27d8 Mon Sep 17 00:00:00 2001
+From: Anton Blanchard <anton at samba.org>
+Date: Wed, 3 Oct 2012 18:57:10 +0000
+Subject: powerpc/iommu: Fix multiple issues with IOMMU pools code
+
+From: Anton Blanchard <anton at samba.org>
+
+commit d900bd7366463fd96a907b2c212242e2b68b27d8 upstream.
+
+There are a number of issues in the recent IOMMU pools code:
+
+- On a preempt kernel we might switch CPUs in the middle of building
+  a scatter gather list. When this happens the handle hint passed in
+  no longer falls within the local CPU's pool. Check for this and
+  fall back to the pool hint.
+
+- We were missing a spin_unlock/spin_lock in one spot where we
+  switch pools.
+
+- We need to provide locking around dart_tlb_invalidate_all and
+  dart_tlb_invalidate_one now that the global lock is gone.
+
+Reported-by: Alexander Graf <agraf at suse.de>
+Signed-off-by: Anton Blanchard <anton at samba.org>
+Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ arch/powerpc/kernel/iommu.c      |    5 ++++-
+ arch/powerpc/sysdev/dart_iommu.c |   12 ++++++++++++
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/iommu.c
++++ b/arch/powerpc/kernel/iommu.c
+@@ -215,7 +215,8 @@ static unsigned long iommu_range_alloc(s
+ 	spin_lock_irqsave(&(pool->lock), flags);
+ 
+ again:
+-	if ((pass == 0) && handle && *handle)
++	if ((pass == 0) && handle && *handle &&
++	    (*handle >= pool->start) && (*handle < pool->end))
+ 		start = *handle;
+ 	else
+ 		start = pool->hint;
+@@ -236,7 +237,9 @@ again:
+ 		 * but on second pass, start at 0 in pool 0.
+ 		 */
+ 		if ((start & mask) >= limit || pass > 0) {
++			spin_unlock(&(pool->lock));
+ 			pool = &(tbl->pools[0]);
++			spin_lock(&(pool->lock));
+ 			start = pool->start;
+ 		} else {
+ 			start &= mask;
+--- a/arch/powerpc/sysdev/dart_iommu.c
++++ b/arch/powerpc/sysdev/dart_iommu.c
+@@ -74,11 +74,16 @@ static int dart_is_u4;
+ 
+ #define DBG(...)
+ 
++static DEFINE_SPINLOCK(invalidate_lock);
++
+ static inline void dart_tlb_invalidate_all(void)
+ {
+ 	unsigned long l = 0;
+ 	unsigned int reg, inv_bit;
+ 	unsigned long limit;
++	unsigned long flags;
++
++	spin_lock_irqsave(&invalidate_lock, flags);
+ 
+ 	DBG("dart: flush\n");
+ 
+@@ -111,12 +116,17 @@ retry:
+ 			panic("DART: TLB did not flush after waiting a long "
+ 			      "time. Buggy U3 ?");
+ 	}
++
++	spin_unlock_irqrestore(&invalidate_lock, flags);
+ }
+ 
+ static inline void dart_tlb_invalidate_one(unsigned long bus_rpn)
+ {
+ 	unsigned int reg;
+ 	unsigned int l, limit;
++	unsigned long flags;
++
++	spin_lock_irqsave(&invalidate_lock, flags);
+ 
+ 	reg = DART_CNTL_U4_ENABLE | DART_CNTL_U4_IONE |
+ 		(bus_rpn & DART_CNTL_U4_IONE_MASK);
+@@ -138,6 +148,8 @@ wait_more:
+ 			panic("DART: TLB did not flush after waiting a long "
+ 			      "time. Buggy U4 ?");
+ 	}
++
++	spin_unlock_irqrestore(&invalidate_lock, flags);
+ }
+ 
+ static void dart_flush(struct iommu_table *tbl)
+From 7c4a6106d6451fc03c491e61df37c044505d843a Mon Sep 17 00:00:00 2001
+From: Alexandre Bounine <alexandre.bounine at idt.com>
+Date: Thu, 4 Oct 2012 17:15:48 -0700
+Subject: rapidio/rionet: fix multicast packet transmit logic
+
+From: Alexandre Bounine <alexandre.bounine at idt.com>
+
+commit 7c4a6106d6451fc03c491e61df37c044505d843a upstream.
+
+Fix multicast packet transmit logic to account for repetitive transmission
+of single skb:
+- correct check for available buffers (this bug may produce NULL pointer
+  crash dump in case of heavy traffic);
+- update skb user count (incorrect user counter causes a warning dump from
+  net_tx_action routine during multicast transfers in systems with three or
+  more rionet participants).
+
+Signed-off-by: Alexandre Bounine <alexandre.bounine at idt.com>
+Cc: Matt Porter <mporter at kernel.crashing.org>
+Cc: David S. Miller <davem at davemloft.net>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/net/rionet.c |   20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/rionet.c
++++ b/drivers/net/rionet.c
+@@ -79,6 +79,7 @@ static int rionet_capable = 1;
+  * on system trade-offs.
+  */
+ static struct rio_dev **rionet_active;
++static int nact;	/* total number of active rionet peers */
+ 
+ #define is_rionet_capable(src_ops, dst_ops)			\
+ 			((src_ops & RIO_SRC_OPS_DATA_MSG) &&	\
+@@ -175,6 +176,7 @@ static int rionet_start_xmit(struct sk_b
+ 	struct ethhdr *eth = (struct ethhdr *)skb->data;
+ 	u16 destid;
+ 	unsigned long flags;
++	int add_num = 1;
+ 
+ 	local_irq_save(flags);
+ 	if (!spin_trylock(&rnet->tx_lock)) {
+@@ -182,7 +184,10 @@ static int rionet_start_xmit(struct sk_b
+ 		return NETDEV_TX_LOCKED;
+ 	}
+ 
+-	if ((rnet->tx_cnt + 1) > RIONET_TX_RING_SIZE) {
++	if (is_multicast_ether_addr(eth->h_dest))
++		add_num = nact;
++
++	if ((rnet->tx_cnt + add_num) > RIONET_TX_RING_SIZE) {
+ 		netif_stop_queue(ndev);
+ 		spin_unlock_irqrestore(&rnet->tx_lock, flags);
+ 		printk(KERN_ERR "%s: BUG! Tx Ring full when queue awake!\n",
+@@ -191,11 +196,16 @@ static int rionet_start_xmit(struct sk_b
+ 	}
+ 
+ 	if (is_multicast_ether_addr(eth->h_dest)) {
++		int count = 0;
+ 		for (i = 0; i < RIO_MAX_ROUTE_ENTRIES(rnet->mport->sys_size);
+ 				i++)
+-			if (rionet_active[i])
++			if (rionet_active[i]) {
+ 				rionet_queue_tx_msg(skb, ndev,
+ 						    rionet_active[i]);
++				if (count)
++					atomic_inc(&skb->users);
++				count++;
++			}
+ 	} else if (RIONET_MAC_MATCH(eth->h_dest)) {
+ 		destid = RIONET_GET_DESTID(eth->h_dest);
+ 		if (rionet_active[destid])
+@@ -220,14 +230,17 @@ static void rionet_dbell_event(struct ri
+ 	if (info == RIONET_DOORBELL_JOIN) {
+ 		if (!rionet_active[sid]) {
+ 			list_for_each_entry(peer, &rionet_peers, node) {
+-				if (peer->rdev->destid == sid)
++				if (peer->rdev->destid == sid) {
+ 					rionet_active[sid] = peer->rdev;
++					nact++;
++				}
+ 			}
+ 			rio_mport_send_doorbell(mport, sid,
+ 						RIONET_DOORBELL_JOIN);
+ 		}
+ 	} else if (info == RIONET_DOORBELL_LEAVE) {
+ 		rionet_active[sid] = NULL;
++		nact--;
+ 	} else {
+ 		if (netif_msg_intr(rnet))
+ 			printk(KERN_WARNING "%s: unhandled doorbell\n",
+@@ -523,6 +536,7 @@ static int rionet_probe(struct rio_dev *
+ 
+ 		rc = rionet_setup_netdev(rdev->net->hport, ndev);
+ 		rionet_check = 1;
++		nact = 0;
+ 	}
+ 
+ 	/*
+From d22019778cd9ea04c1dadf7bf453920d5288f8d9 Mon Sep 17 00:00:00 2001
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+Date: Tue, 4 Sep 2012 15:23:29 +0200
+Subject: SCSI: zfcp: Adapt to new FC_PORTSPEED semantics
+
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+
+commit d22019778cd9ea04c1dadf7bf453920d5288f8d9 upstream.
+
+Commit a9277e7783651d4e0a849f7988340b1c1cf748a4
+"[SCSI] scsi_transport_fc: Getting FC Port Speed in sync with FC-GS"
+changed the semantics of FC_PORTSPEED defines to
+FDMI port attributes of FC-HBA/SM-HBA
+which is different from the previous bit reversed
+Report Port Speed Capabilities (RPSC) ELS of FC-GS/FC-LS.
+
+Zfcp showed "10 Gbit" instead of "4 Gbit" for supported_speeds.
+It now uses explicit bit conversion as the other LLDs already
+do, in order to be independent of the kernel bit semantics.
+See also http://marc.info/?l=linux-scsi&m=134452926830730&w=2
+
+Signed-off-by: Steffen Maier <maier at linux.vnet.ibm.com>
+Reviewed-by: Martin Peschke <mpeschke at linux.vnet.ibm.com>
+Signed-off-by: James Bottomley <JBottomley at Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/s390/scsi/zfcp_fsf.c |   34 ++++++++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+--- a/drivers/s390/scsi/zfcp_fsf.c
++++ b/drivers/s390/scsi/zfcp_fsf.c
+@@ -437,6 +437,34 @@ void zfcp_fsf_req_dismiss_all(struct zfc
+ 	}
+ }
+ 
++#define ZFCP_FSF_PORTSPEED_1GBIT	(1 <<  0)
++#define ZFCP_FSF_PORTSPEED_2GBIT	(1 <<  1)
++#define ZFCP_FSF_PORTSPEED_4GBIT	(1 <<  2)
++#define ZFCP_FSF_PORTSPEED_10GBIT	(1 <<  3)
++#define ZFCP_FSF_PORTSPEED_8GBIT	(1 <<  4)
++#define ZFCP_FSF_PORTSPEED_16GBIT	(1 <<  5)
++#define ZFCP_FSF_PORTSPEED_NOT_NEGOTIATED (1 << 15)
++
++static u32 zfcp_fsf_convert_portspeed(u32 fsf_speed)
++{
++	u32 fdmi_speed = 0;
++	if (fsf_speed & ZFCP_FSF_PORTSPEED_1GBIT)
++		fdmi_speed |= FC_PORTSPEED_1GBIT;
++	if (fsf_speed & ZFCP_FSF_PORTSPEED_2GBIT)
++		fdmi_speed |= FC_PORTSPEED_2GBIT;
++	if (fsf_speed & ZFCP_FSF_PORTSPEED_4GBIT)
++		fdmi_speed |= FC_PORTSPEED_4GBIT;
++	if (fsf_speed & ZFCP_FSF_PORTSPEED_10GBIT)
++		fdmi_speed |= FC_PORTSPEED_10GBIT;
++	if (fsf_speed & ZFCP_FSF_PORTSPEED_8GBIT)
++		fdmi_speed |= FC_PORTSPEED_8GBIT;
++	if (fsf_speed & ZFCP_FSF_PORTSPEED_16GBIT)
++		fdmi_speed |= FC_PORTSPEED_16GBIT;
++	if (fsf_speed & ZFCP_FSF_PORTSPEED_NOT_NEGOTIATED)
++		fdmi_speed |= FC_PORTSPEED_NOT_NEGOTIATED;
++	return fdmi_speed;
++}
++
+ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req)
+ {
+ 	struct fsf_qtcb_bottom_config *bottom = &req->qtcb->bottom.config;
+@@ -456,7 +484,8 @@ static int zfcp_fsf_exchange_config_eval
+ 	fc_host_port_name(shost) = nsp->fl_wwpn;
+ 	fc_host_node_name(shost) = nsp->fl_wwnn;
+ 	fc_host_port_id(shost) = ntoh24(bottom->s_id);
+-	fc_host_speed(shost) = bottom->fc_link_speed;
++	fc_host_speed(shost) =
++		zfcp_fsf_convert_portspeed(bottom->fc_link_speed);
+ 	fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3;
+ 
+ 	adapter->hydra_version = bottom->adapter_type;
+@@ -580,7 +609,8 @@ static void zfcp_fsf_exchange_port_evalu
+ 	} else
+ 		fc_host_permanent_port_name(shost) = fc_host_port_name(shost);
+ 	fc_host_maxframe_size(shost) = bottom->maximum_frame_size;
+-	fc_host_supported_speeds(shost) = bottom->supported_speed;
++	fc_host_supported_speeds(shost) =
++		zfcp_fsf_convert_portspeed(bottom->supported_speed);
+ 	memcpy(fc_host_supported_fc4s(shost), bottom->supported_fc4_types,
+ 	       FC_FC4_LIST_SIZE);
+ 	memcpy(fc_host_active_fc4s(shost), bottom->active_fc4_types,
+From 01e60527f0a49b3d7df603010bd6079bb4b6cf07 Mon Sep 17 00:00:00 2001
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+Date: Tue, 4 Sep 2012 15:23:31 +0200
+Subject: SCSI: zfcp: Bounds checking for deferred error trace
+
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+
+commit 01e60527f0a49b3d7df603010bd6079bb4b6cf07 upstream.
+
+The pl vector has scount elements, i.e. pl[scount-1] is the last valid
+element. For maximum sized requests, payload->counter == scount after
+the last loop iteration. Therefore, do bounds checking first (with
+boolean shortcut) to not access the invalid element pl[scount].
+
+Do not trust the maximum sbale->scount value from the HBA
+but ensure we won't access the pl vector out of our allocated bounds.
+While at it, clean up scoping and prevent unnecessary memset.
+
+Minor fix for 86a9668a8d29ea711613e1cb37efa68e7c4db564
+"[SCSI] zfcp: support for hardware data router"
+
+Signed-off-by: Steffen Maier <maier at linux.vnet.ibm.com>
+Reviewed-by: Martin Peschke <mpeschke at linux.vnet.ibm.com>
+Signed-off-by: James Bottomley <JBottomley at Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/s390/scsi/zfcp_dbf.c  |    2 +-
+ drivers/s390/scsi/zfcp_qdio.c |   16 ++++++++++------
+ 2 files changed, 11 insertions(+), 7 deletions(-)
+
+--- a/drivers/s390/scsi/zfcp_dbf.c
++++ b/drivers/s390/scsi/zfcp_dbf.c
+@@ -191,7 +191,7 @@ void zfcp_dbf_hba_def_err(struct zfcp_ad
+ 	length = min((u16)sizeof(struct qdio_buffer),
+ 		     (u16)ZFCP_DBF_PAY_MAX_REC);
+ 
+-	while ((char *)pl[payload->counter] && payload->counter < scount) {
++	while (payload->counter < scount && (char *)pl[payload->counter]) {
+ 		memcpy(payload->data, (char *)pl[payload->counter], length);
+ 		debug_event(dbf->pay, 1, payload, zfcp_dbf_plen(length));
+ 		payload->counter++;
+--- a/drivers/s390/scsi/zfcp_qdio.c
++++ b/drivers/s390/scsi/zfcp_qdio.c
+@@ -102,18 +102,22 @@ static void zfcp_qdio_int_resp(struct cc
+ {
+ 	struct zfcp_qdio *qdio = (struct zfcp_qdio *) parm;
+ 	struct zfcp_adapter *adapter = qdio->adapter;
+-	struct qdio_buffer_element *sbale;
+ 	int sbal_no, sbal_idx;
+-	void *pl[ZFCP_QDIO_MAX_SBALS_PER_REQ + 1];
+-	u64 req_id;
+-	u8 scount;
+ 
+ 	if (unlikely(qdio_err)) {
+-		memset(pl, 0, ZFCP_QDIO_MAX_SBALS_PER_REQ * sizeof(void *));
+ 		if (zfcp_adapter_multi_buffer_active(adapter)) {
++			void *pl[ZFCP_QDIO_MAX_SBALS_PER_REQ + 1];
++			struct qdio_buffer_element *sbale;
++			u64 req_id;
++			u8 scount;
++
++			memset(pl, 0,
++			       ZFCP_QDIO_MAX_SBALS_PER_REQ * sizeof(void *));
+ 			sbale = qdio->res_q[idx]->element;
+ 			req_id = (u64) sbale->addr;
+-			scount = sbale->scount + 1; /* incl. signaling SBAL */
++			scount = min(sbale->scount + 1,
++				     ZFCP_QDIO_MAX_SBALS_PER_REQ + 1);
++				     /* incl. signaling SBAL */
+ 
+ 			for (sbal_no = 0; sbal_no < scount; sbal_no++) {
+ 				sbal_idx = (idx + sbal_no) %
+From cb45214960bc989af8b911ebd77da541c797717d Mon Sep 17 00:00:00 2001
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+Date: Tue, 4 Sep 2012 15:23:32 +0200
+Subject: SCSI: zfcp: Do not wakeup while suspended
+
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+
+commit cb45214960bc989af8b911ebd77da541c797717d upstream.
+
+If the mapping of FCP device bus ID and corresponding subchannel
+is modified while the Linux image is suspended, the resume of FCP
+devices can fail. During resume, zfcp gets callbacks from cio regarding
+the modified subchannels but they can be arbitrarily mixed with the
+restore/resume callback. Since the cio callbacks would trigger
+adapter recovery, zfcp could wakeup before the resume callback.
+Therefore, ignore the cio callbacks regarding subchannels while
+being suspended. We can safely do so, since zfcp does not deal itself
+with subchannels. For problem determination purposes, we still trace the
+ignored callback events.
+
+The following kernel messages could be seen on resume:
+
+kernel: <WWPN>: parent <FCP device bus ID> should not be sleeping
+
+As part of adapter reopen recovery, zfcp performs auto port scanning
+which can erroneously try to register new remote ports with
+scsi_transport_fc and the device core code complains about the parent
+(adapter) still sleeping.
+
+kernel: zfcp.3dff9c: <FCP device bus ID>:\
+ Setting up the QDIO connection to the FCP adapter failed
+<last kernel message repeated 3 more times>
+kernel: zfcp.574d43: <FCP device bus ID>:\
+ ERP cannot recover an error on the FCP device
+
+In such cases, the adapter gave up recovery and remained blocked along
+with its child objects: remote ports and LUNs/scsi devices. Even the
+adapter shutdown as part of giving up recovery failed because the ccw
+device state remained disconnected. Later, the corresponding remote
+ports ran into dev_loss_tmo. As a result, the LUNs were erroneously
+not available again after resume.
+
+Even a manually triggered adapter recovery (e.g. sysfs attribute
+failed, or device offline/online via sysfs) could not recover the
+adapter due to the remaining disconnected state of the corresponding
+ccw device.
+
+Signed-off-by: Steffen Maier <maier at linux.vnet.ibm.com>
+Signed-off-by: James Bottomley <JBottomley at Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/s390/scsi/zfcp_ccw.c |   73 +++++++++++++++++++++++++++++++++++++------
+ drivers/s390/scsi/zfcp_dbf.c |   20 +++++++++++
+ drivers/s390/scsi/zfcp_dbf.h |    1 
+ drivers/s390/scsi/zfcp_def.h |    1 
+ drivers/s390/scsi/zfcp_ext.h |    1 
+ 5 files changed, 86 insertions(+), 10 deletions(-)
+
+--- a/drivers/s390/scsi/zfcp_ccw.c
++++ b/drivers/s390/scsi/zfcp_ccw.c
+@@ -39,17 +39,23 @@ void zfcp_ccw_adapter_put(struct zfcp_ad
+ 	spin_unlock_irqrestore(&zfcp_ccw_adapter_ref_lock, flags);
+ }
+ 
+-static int zfcp_ccw_activate(struct ccw_device *cdev)
+-
++/**
++ * zfcp_ccw_activate - activate adapter and wait for it to finish
++ * @cdev: pointer to belonging ccw device
++ * @clear: Status flags to clear.
++ * @tag: s390dbf trace record tag
++ */
++static int zfcp_ccw_activate(struct ccw_device *cdev, int clear, char *tag)
+ {
+ 	struct zfcp_adapter *adapter = zfcp_ccw_adapter_by_cdev(cdev);
+ 
+ 	if (!adapter)
+ 		return 0;
+ 
++	zfcp_erp_clear_adapter_status(adapter, clear);
+ 	zfcp_erp_set_adapter_status(adapter, ZFCP_STATUS_COMMON_RUNNING);
+ 	zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
+-				"ccresu2");
++				tag);
+ 	zfcp_erp_wait(adapter);
+ 	flush_work(&adapter->scan_work);
+ 
+@@ -164,26 +170,29 @@ static int zfcp_ccw_set_online(struct cc
+ 	BUG_ON(!zfcp_reqlist_isempty(adapter->req_list));
+ 	adapter->req_no = 0;
+ 
+-	zfcp_ccw_activate(cdev);
++	zfcp_ccw_activate(cdev, 0, "ccsonl1");
+ 	zfcp_ccw_adapter_put(adapter);
+ 	return 0;
+ }
+ 
+ /**
+- * zfcp_ccw_set_offline - set_offline function of zfcp driver
++ * zfcp_ccw_offline_sync - shut down adapter and wait for it to finish
+  * @cdev: pointer to belonging ccw device
++ * @set: Status flags to set.
++ * @tag: s390dbf trace record tag
+  *
+  * This function gets called by the common i/o layer and sets an adapter
+  * into state offline.
+  */
+-static int zfcp_ccw_set_offline(struct ccw_device *cdev)
++static int zfcp_ccw_offline_sync(struct ccw_device *cdev, int set, char *tag)
+ {
+ 	struct zfcp_adapter *adapter = zfcp_ccw_adapter_by_cdev(cdev);
+ 
+ 	if (!adapter)
+ 		return 0;
+ 
+-	zfcp_erp_adapter_shutdown(adapter, 0, "ccsoff1");
++	zfcp_erp_set_adapter_status(adapter, set);
++	zfcp_erp_adapter_shutdown(adapter, 0, tag);
+ 	zfcp_erp_wait(adapter);
+ 
+ 	zfcp_ccw_adapter_put(adapter);
+@@ -191,6 +200,18 @@ static int zfcp_ccw_set_offline(struct c
+ }
+ 
+ /**
++ * zfcp_ccw_set_offline - set_offline function of zfcp driver
++ * @cdev: pointer to belonging ccw device
++ *
++ * This function gets called by the common i/o layer and sets an adapter
++ * into state offline.
++ */
++static int zfcp_ccw_set_offline(struct ccw_device *cdev)
++{
++	return zfcp_ccw_offline_sync(cdev, 0, "ccsoff1");
++}
++
++/**
+  * zfcp_ccw_notify - ccw notify function
+  * @cdev: pointer to belonging ccw device
+  * @event: indicates if adapter was detached or attached
+@@ -207,6 +228,11 @@ static int zfcp_ccw_notify(struct ccw_de
+ 
+ 	switch (event) {
+ 	case CIO_GONE:
++		if (atomic_read(&adapter->status) &
++		    ZFCP_STATUS_ADAPTER_SUSPENDED) { /* notification ignore */
++			zfcp_dbf_hba_basic("ccnigo1", adapter);
++			break;
++		}
+ 		dev_warn(&cdev->dev, "The FCP device has been detached\n");
+ 		zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti1");
+ 		break;
+@@ -216,6 +242,11 @@ static int zfcp_ccw_notify(struct ccw_de
+ 		zfcp_erp_adapter_shutdown(adapter, 0, "ccnoti2");
+ 		break;
+ 	case CIO_OPER:
++		if (atomic_read(&adapter->status) &
++		    ZFCP_STATUS_ADAPTER_SUSPENDED) { /* notification ignore */
++			zfcp_dbf_hba_basic("ccniop1", adapter);
++			break;
++		}
+ 		dev_info(&cdev->dev, "The FCP device is operational again\n");
+ 		zfcp_erp_set_adapter_status(adapter,
+ 					    ZFCP_STATUS_COMMON_RUNNING);
+@@ -251,6 +282,28 @@ static void zfcp_ccw_shutdown(struct ccw
+ 	zfcp_ccw_adapter_put(adapter);
+ }
+ 
++static int zfcp_ccw_suspend(struct ccw_device *cdev)
++{
++	zfcp_ccw_offline_sync(cdev, ZFCP_STATUS_ADAPTER_SUSPENDED, "ccsusp1");
++	return 0;
++}
++
++static int zfcp_ccw_thaw(struct ccw_device *cdev)
++{
++	/* trace records for thaw and final shutdown during suspend
++	   can only be found in system dump until the end of suspend
++	   but not after resume because it's based on the memory image
++	   right after the very first suspend (freeze) callback */
++	zfcp_ccw_activate(cdev, 0, "ccthaw1");
++	return 0;
++}
++
++static int zfcp_ccw_resume(struct ccw_device *cdev)
++{
++	zfcp_ccw_activate(cdev, ZFCP_STATUS_ADAPTER_SUSPENDED, "ccresu1");
++	return 0;
++}
++
+ struct ccw_driver zfcp_ccw_driver = {
+ 	.driver = {
+ 		.owner	= THIS_MODULE,
+@@ -263,7 +316,7 @@ struct ccw_driver zfcp_ccw_driver = {
+ 	.set_offline = zfcp_ccw_set_offline,
+ 	.notify      = zfcp_ccw_notify,
+ 	.shutdown    = zfcp_ccw_shutdown,
+-	.freeze      = zfcp_ccw_set_offline,
+-	.thaw	     = zfcp_ccw_activate,
+-	.restore     = zfcp_ccw_activate,
++	.freeze      = zfcp_ccw_suspend,
++	.thaw	     = zfcp_ccw_thaw,
++	.restore     = zfcp_ccw_resume,
+ };
+--- a/drivers/s390/scsi/zfcp_dbf.c
++++ b/drivers/s390/scsi/zfcp_dbf.c
+@@ -200,6 +200,26 @@ void zfcp_dbf_hba_def_err(struct zfcp_ad
+ 	spin_unlock_irqrestore(&dbf->pay_lock, flags);
+ }
+ 
++/**
++ * zfcp_dbf_hba_basic - trace event for basic adapter events
++ * @adapter: pointer to struct zfcp_adapter
++ */
++void zfcp_dbf_hba_basic(char *tag, struct zfcp_adapter *adapter)
++{
++	struct zfcp_dbf *dbf = adapter->dbf;
++	struct zfcp_dbf_hba *rec = &dbf->hba_buf;
++	unsigned long flags;
++
++	spin_lock_irqsave(&dbf->hba_lock, flags);
++	memset(rec, 0, sizeof(*rec));
++
++	memcpy(rec->tag, tag, ZFCP_DBF_TAG_LEN);
++	rec->id = ZFCP_DBF_HBA_BASIC;
++
++	debug_event(dbf->hba, 1, rec, sizeof(*rec));
++	spin_unlock_irqrestore(&dbf->hba_lock, flags);
++}
++
+ static void zfcp_dbf_set_common(struct zfcp_dbf_rec *rec,
+ 				struct zfcp_adapter *adapter,
+ 				struct zfcp_port *port,
+--- a/drivers/s390/scsi/zfcp_dbf.h
++++ b/drivers/s390/scsi/zfcp_dbf.h
+@@ -154,6 +154,7 @@ enum zfcp_dbf_hba_id {
+ 	ZFCP_DBF_HBA_RES	= 1,
+ 	ZFCP_DBF_HBA_USS	= 2,
+ 	ZFCP_DBF_HBA_BIT	= 3,
++	ZFCP_DBF_HBA_BASIC	= 4,
+ };
+ 
+ /**
+--- a/drivers/s390/scsi/zfcp_def.h
++++ b/drivers/s390/scsi/zfcp_def.h
+@@ -77,6 +77,7 @@ struct zfcp_reqlist;
+ #define ZFCP_STATUS_ADAPTER_SIOSL_ISSUED	0x00000004
+ #define ZFCP_STATUS_ADAPTER_XCONFIG_OK		0x00000008
+ #define ZFCP_STATUS_ADAPTER_HOST_CON_INIT	0x00000010
++#define ZFCP_STATUS_ADAPTER_SUSPENDED		0x00000040
+ #define ZFCP_STATUS_ADAPTER_ERP_PENDING		0x00000100
+ #define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED	0x00000200
+ #define ZFCP_STATUS_ADAPTER_DATA_DIV_ENABLED	0x00000400
+--- a/drivers/s390/scsi/zfcp_ext.h
++++ b/drivers/s390/scsi/zfcp_ext.h
+@@ -54,6 +54,7 @@ extern void zfcp_dbf_hba_fsf_res(char *,
+ extern void zfcp_dbf_hba_bit_err(char *, struct zfcp_fsf_req *);
+ extern void zfcp_dbf_hba_berr(struct zfcp_dbf *, struct zfcp_fsf_req *);
+ extern void zfcp_dbf_hba_def_err(struct zfcp_adapter *, u64, u16, void **);
++extern void zfcp_dbf_hba_basic(char *, struct zfcp_adapter *);
+ extern void zfcp_dbf_san_req(char *, struct zfcp_fsf_req *, u32);
+ extern void zfcp_dbf_san_res(char *, struct zfcp_fsf_req *);
+ extern void zfcp_dbf_san_in_els(char *, struct zfcp_fsf_req *);
+From 0100998dbfe6dfcd90a6e912ca7ed6f255d48f25 Mon Sep 17 00:00:00 2001
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+Date: Tue, 4 Sep 2012 15:23:30 +0200
+Subject: SCSI: zfcp: Make trace record tags unique
+
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+
+commit 0100998dbfe6dfcd90a6e912ca7ed6f255d48f25 upstream.
+
+Duplicate fssrh_2 from a54ca0f62f953898b05549391ac2a8a4dad6482b
+"[SCSI] zfcp: Redesign of the debug tracing for HBA records."
+complicates distinction of generic status read response from
+local link up.
+Duplicate fsscth1 from 2c55b750a884b86dea8b4cc5f15e1484cc47a25c
+"[SCSI] zfcp: Redesign of the debug tracing for SAN records."
+complicates distinction of good common transport response from
+invalid port handle.
+
+Signed-off-by: Steffen Maier <maier at linux.vnet.ibm.com>
+Reviewed-by: Martin Peschke <mpeschke at linux.vnet.ibm.com>
+Signed-off-by: James Bottomley <JBottomley at Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/s390/scsi/zfcp_fsf.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/s390/scsi/zfcp_fsf.c
++++ b/drivers/s390/scsi/zfcp_fsf.c
+@@ -219,7 +219,7 @@ static void zfcp_fsf_status_read_handler
+ 		return;
+ 	}
+ 
+-	zfcp_dbf_hba_fsf_uss("fssrh_2", req);
++	zfcp_dbf_hba_fsf_uss("fssrh_4", req);
+ 
+ 	switch (sr_buf->status_type) {
+ 	case FSF_STATUS_READ_PORT_CLOSED:
+@@ -915,7 +915,7 @@ static void zfcp_fsf_send_ct_handler(str
+ 
+ 	switch (header->fsf_status) {
+         case FSF_GOOD:
+-		zfcp_dbf_san_res("fsscth1", req);
++		zfcp_dbf_san_res("fsscth2", req);
+ 		ct->status = 0;
+ 		break;
+         case FSF_SERVICE_CLASS_NOT_SUPPORTED:
+From d436de8ce25f53a8a880a931886821f632247943 Mon Sep 17 00:00:00 2001
+From: Martin Peschke <mpeschke at linux.vnet.ibm.com>
+Date: Tue, 4 Sep 2012 15:23:36 +0200
+Subject: SCSI: zfcp: only access zfcp_scsi_dev for valid scsi_device
+
+From: Martin Peschke <mpeschke at linux.vnet.ibm.com>
+
+commit d436de8ce25f53a8a880a931886821f632247943 upstream.
+
+__scsi_remove_device (e.g. due to dev_loss_tmo) calls
+zfcp_scsi_slave_destroy which in turn sends a close LUN FSF request to
+the adapter. After 30 seconds without response,
+zfcp_erp_timeout_handler kicks the ERP thread failing the close LUN
+ERP action. zfcp_erp_wait in zfcp_erp_lun_shutdown_wait and thus
+zfcp_scsi_slave_destroy returns and then scsi_device is no longer
+valid. Sometime later the response to the close LUN FSF request may
+finally come in. However, commit
+b62a8d9b45b971a67a0f8413338c230e3117dff5
+"[SCSI] zfcp: Use SCSI device data zfcp_scsi_dev instead of zfcp_unit"
+introduced a number of attempts to unconditionally access struct
+zfcp_scsi_dev through struct scsi_device causing a use-after-free.
+This leads to an Oops due to kernel page fault in one of:
+zfcp_fsf_abort_fcp_command_handler, zfcp_fsf_open_lun_handler,
+zfcp_fsf_close_lun_handler, zfcp_fsf_req_trace,
+zfcp_fsf_fcp_handler_common.
+Move dereferencing of zfcp private data zfcp_scsi_dev allocated in
+scsi_device via scsi_transport_reserve_device after the check for
+potentially aborted FSF request and thus no longer valid scsi_device.
+Only then assign sdev_to_zfcp(sdev) to the local auto variable struct
+zfcp_scsi_dev *zfcp_sdev.
+
+Signed-off-by: Martin Peschke <mpeschke at linux.vnet.ibm.com>
+Signed-off-by: Steffen Maier <maier at linux.vnet.ibm.com>
+Signed-off-by: James Bottomley <JBottomley at Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/s390/scsi/zfcp_fsf.c |   19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+--- a/drivers/s390/scsi/zfcp_fsf.c
++++ b/drivers/s390/scsi/zfcp_fsf.c
+@@ -801,12 +801,14 @@ out:
+ static void zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *req)
+ {
+ 	struct scsi_device *sdev = req->data;
+-	struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
++	struct zfcp_scsi_dev *zfcp_sdev;
+ 	union fsf_status_qual *fsq = &req->qtcb->header.fsf_status_qual;
+ 
+ 	if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
+ 		return;
+ 
++	zfcp_sdev = sdev_to_zfcp(sdev);
++
+ 	switch (req->qtcb->header.fsf_status) {
+ 	case FSF_PORT_HANDLE_NOT_VALID:
+ 		if (fsq->word[0] == fsq->word[1]) {
+@@ -1769,13 +1771,15 @@ static void zfcp_fsf_open_lun_handler(st
+ {
+ 	struct zfcp_adapter *adapter = req->adapter;
+ 	struct scsi_device *sdev = req->data;
+-	struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
++	struct zfcp_scsi_dev *zfcp_sdev;
+ 	struct fsf_qtcb_header *header = &req->qtcb->header;
+ 	struct fsf_qtcb_bottom_support *bottom = &req->qtcb->bottom.support;
+ 
+ 	if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
+ 		return;
+ 
++	zfcp_sdev = sdev_to_zfcp(sdev);
++
+ 	atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED |
+ 			  ZFCP_STATUS_COMMON_ACCESS_BOXED |
+ 			  ZFCP_STATUS_LUN_SHARED |
+@@ -1886,11 +1890,13 @@ out:
+ static void zfcp_fsf_close_lun_handler(struct zfcp_fsf_req *req)
+ {
+ 	struct scsi_device *sdev = req->data;
+-	struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
++	struct zfcp_scsi_dev *zfcp_sdev;
+ 
+ 	if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
+ 		return;
+ 
++	zfcp_sdev = sdev_to_zfcp(sdev);
++
+ 	switch (req->qtcb->header.fsf_status) {
+ 	case FSF_PORT_HANDLE_NOT_VALID:
+ 		zfcp_erp_adapter_reopen(zfcp_sdev->port->adapter, 0, "fscuh_1");
+@@ -1980,7 +1986,7 @@ static void zfcp_fsf_req_trace(struct zf
+ {
+ 	struct fsf_qual_latency_info *lat_in;
+ 	struct latency_cont *lat = NULL;
+-	struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scsi->device);
++	struct zfcp_scsi_dev *zfcp_sdev;
+ 	struct zfcp_blk_drv_data blktrc;
+ 	int ticks = req->adapter->timer_ticks;
+ 
+@@ -1995,6 +2001,7 @@ static void zfcp_fsf_req_trace(struct zf
+ 
+ 	if (req->adapter->adapter_features & FSF_FEATURE_MEASUREMENT_DATA &&
+ 	    !(req->status & ZFCP_STATUS_FSFREQ_ERROR)) {
++		zfcp_sdev = sdev_to_zfcp(scsi->device);
+ 		blktrc.flags |= ZFCP_BLK_LAT_VALID;
+ 		blktrc.channel_lat = lat_in->channel_lat * ticks;
+ 		blktrc.fabric_lat = lat_in->fabric_lat * ticks;
+@@ -2032,12 +2039,14 @@ static void zfcp_fsf_fcp_handler_common(
+ {
+ 	struct scsi_cmnd *scmnd = req->data;
+ 	struct scsi_device *sdev = scmnd->device;
+-	struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
++	struct zfcp_scsi_dev *zfcp_sdev;
+ 	struct fsf_qtcb_header *header = &req->qtcb->header;
+ 
+ 	if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ERROR))
+ 		return;
+ 
++	zfcp_sdev = sdev_to_zfcp(sdev);
++
+ 	switch (header->fsf_status) {
+ 	case FSF_HANDLE_MISMATCH:
+ 	case FSF_PORT_HANDLE_NOT_VALID:
+From ca579c9f136af4274ccfd1bcaee7f38a29a0e2e9 Mon Sep 17 00:00:00 2001
+From: Julia Lawall <Julia.Lawall at lip6.fr>
+Date: Tue, 4 Sep 2012 15:23:33 +0200
+Subject: SCSI: zfcp: remove invalid reference to list iterator variable
+
+From: Julia Lawall <Julia.Lawall at lip6.fr>
+
+commit ca579c9f136af4274ccfd1bcaee7f38a29a0e2e9 upstream.
+
+If list_for_each_entry, etc complete a traversal of the list, the iterator
+variable ends up pointing to an address at an offset from the list head,
+and not a meaningful structure.  Thus this value should not be used after
+the end of the iterator.  Replace port->adapter->scsi_host by
+adapter->scsi_host.
+
+This problem was found using Coccinelle (http://coccinelle.lip6.fr/).
+
+Oversight in upsteam commit of v2.6.37
+a1ca48319a9aa1c5b57ce142f538e76050bb8972
+"[SCSI] zfcp: Move ACL/CFDC code to zfcp_cfdc.c"
+which merged the content of zfcp_erp_port_access_changed().
+
+Signed-off-by: Julia Lawall <Julia.Lawall at lip6.fr>
+Signed-off-by: Steffen Maier <maier at linux.vnet.ibm.com>
+Reviewed-by: Martin Peschke <mpeschke at linux.vnet.ibm.com>
+Signed-off-by: James Bottomley <JBottomley at Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/s390/scsi/zfcp_cfdc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/s390/scsi/zfcp_cfdc.c
++++ b/drivers/s390/scsi/zfcp_cfdc.c
+@@ -293,7 +293,7 @@ void zfcp_cfdc_adapter_access_changed(st
+ 	}
+ 	read_unlock_irqrestore(&adapter->port_list_lock, flags);
+ 
+-	shost_for_each_device(sdev, port->adapter->scsi_host) {
++	shost_for_each_device(sdev, adapter->scsi_host) {
+ 		zfcp_sdev = sdev_to_zfcp(sdev);
+ 		status = atomic_read(&zfcp_sdev->status);
+ 		if ((status & ZFCP_STATUS_COMMON_ACCESS_DENIED) ||
+From d99b601b63386f3395dc26a699ae703a273d9982 Mon Sep 17 00:00:00 2001
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+Date: Tue, 4 Sep 2012 15:23:34 +0200
+Subject: SCSI: zfcp: restore refcount check on port_remove
+
+From: Steffen Maier <maier at linux.vnet.ibm.com>
+
+commit d99b601b63386f3395dc26a699ae703a273d9982 upstream.
+
+Upstream commit f3450c7b917201bb49d67032e9f60d5125675d6a
+"[SCSI] zfcp: Replace local reference counting with common kref"
+accidentally dropped a reference count check before tearing down
+zfcp_ports that are potentially in use by zfcp_units.
+Even remote ports in use can be removed causing
+unreachable garbage objects zfcp_ports with zfcp_units.
+Thus units won't come back even after a manual port_rescan.
+The kref of zfcp_port->dev.kobj is already used by the driver core.
+We cannot re-use it to track the number of zfcp_units.
+Re-introduce our own counter for units per port
+and check on port_remove.
+
+Signed-off-by: Steffen Maier <maier at linux.vnet.ibm.com>
+Reviewed-by: Heiko Carstens <heiko.carstens at de.ibm.com>
+Signed-off-by: James Bottomley <JBottomley at Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ drivers/s390/scsi/zfcp_aux.c   |    1 +
+ drivers/s390/scsi/zfcp_def.h   |    1 +
+ drivers/s390/scsi/zfcp_ext.h   |    1 +
+ drivers/s390/scsi/zfcp_sysfs.c |   18 ++++++++++++++++--
+ drivers/s390/scsi/zfcp_unit.c  |   36 ++++++++++++++++++++++++++----------
+ 5 files changed, 45 insertions(+), 12 deletions(-)
+
+--- a/drivers/s390/scsi/zfcp_aux.c
++++ b/drivers/s390/scsi/zfcp_aux.c
+@@ -519,6 +519,7 @@ struct zfcp_port *zfcp_port_enqueue(stru
+ 
+ 	rwlock_init(&port->unit_list_lock);
+ 	INIT_LIST_HEAD(&port->unit_list);
++	atomic_set(&port->units, 0);
+ 
+ 	INIT_WORK(&port->gid_pn_work, zfcp_fc_port_did_lookup);
+ 	INIT_WORK(&port->test_link_work, zfcp_fc_link_test_work);
+--- a/drivers/s390/scsi/zfcp_def.h
++++ b/drivers/s390/scsi/zfcp_def.h
+@@ -205,6 +205,7 @@ struct zfcp_port {
+ 	struct zfcp_adapter    *adapter;       /* adapter used to access port */
+ 	struct list_head	unit_list;	/* head of logical unit list */
+ 	rwlock_t		unit_list_lock; /* unit list lock */
++	atomic_t		units;	       /* zfcp_unit count */
+ 	atomic_t	       status;	       /* status of this remote port */
+ 	u64		       wwnn;	       /* WWNN if known */
+ 	u64		       wwpn;	       /* WWPN */
+--- a/drivers/s390/scsi/zfcp_ext.h
++++ b/drivers/s390/scsi/zfcp_ext.h
+@@ -159,6 +159,7 @@ extern void zfcp_scsi_dif_sense_error(st
+ extern struct attribute_group zfcp_sysfs_unit_attrs;
+ extern struct attribute_group zfcp_sysfs_adapter_attrs;
+ extern struct attribute_group zfcp_sysfs_port_attrs;
++extern struct mutex zfcp_sysfs_port_units_mutex;
+ extern struct device_attribute *zfcp_sysfs_sdev_attrs[];
+ extern struct device_attribute *zfcp_sysfs_shost_attrs[];
+ 
+--- a/drivers/s390/scsi/zfcp_sysfs.c
++++ b/drivers/s390/scsi/zfcp_sysfs.c
+@@ -227,6 +227,8 @@ static ssize_t zfcp_sysfs_port_rescan_st
+ static ZFCP_DEV_ATTR(adapter, port_rescan, S_IWUSR, NULL,
+ 		     zfcp_sysfs_port_rescan_store);
+ 
++DEFINE_MUTEX(zfcp_sysfs_port_units_mutex);
++
+ static ssize_t zfcp_sysfs_port_remove_store(struct device *dev,
+ 					    struct device_attribute *attr,
+ 					    const char *buf, size_t count)
+@@ -249,6 +251,16 @@ static ssize_t zfcp_sysfs_port_remove_st
+ 	else
+ 		retval = 0;
+ 
++	mutex_lock(&zfcp_sysfs_port_units_mutex);
++	if (atomic_read(&port->units) > 0) {
++		retval = -EBUSY;
++		mutex_unlock(&zfcp_sysfs_port_units_mutex);
++		goto out;
++	}
++	/* port is about to be removed, so no more unit_add */
++	atomic_set(&port->units, -1);
++	mutex_unlock(&zfcp_sysfs_port_units_mutex);
++
+ 	write_lock_irq(&adapter->port_list_lock);
+ 	list_del(&port->list);
+ 	write_unlock_irq(&adapter->port_list_lock);
+@@ -289,12 +301,14 @@ static ssize_t zfcp_sysfs_unit_add_store
+ {
+ 	struct zfcp_port *port = container_of(dev, struct zfcp_port, dev);
+ 	u64 fcp_lun;
++	int retval;
+ 
+ 	if (strict_strtoull(buf, 0, (unsigned long long *) &fcp_lun))
+ 		return -EINVAL;
+ 
+-	if (zfcp_unit_add(port, fcp_lun))
+-		return -EINVAL;
++	retval = zfcp_unit_add(port, fcp_lun);
++	if (retval)
++		return retval;
+ 
+ 	return count;
+ }
+--- a/drivers/s390/scsi/zfcp_unit.c
++++ b/drivers/s390/scsi/zfcp_unit.c
+@@ -104,7 +104,7 @@ static void zfcp_unit_release(struct dev
+ {
+ 	struct zfcp_unit *unit = container_of(dev, struct zfcp_unit, dev);
+ 
+-	put_device(&unit->port->dev);
++	atomic_dec(&unit->port->units);
+ 	kfree(unit);
+ }
+ 
+@@ -119,16 +119,27 @@ static void zfcp_unit_release(struct dev
+ int zfcp_unit_add(struct zfcp_port *port, u64 fcp_lun)
+ {
+ 	struct zfcp_unit *unit;
++	int retval = 0;
++
++	mutex_lock(&zfcp_sysfs_port_units_mutex);
++	if (atomic_read(&port->units) == -1) {
++		/* port is already gone */
++		retval = -ENODEV;
++		goto out;
++	}
+ 
+ 	unit = zfcp_unit_find(port, fcp_lun);
+ 	if (unit) {
+ 		put_device(&unit->dev);
+-		return -EEXIST;
++		retval = -EEXIST;
++		goto out;
+ 	}
+ 
+ 	unit = kzalloc(sizeof(struct zfcp_unit), GFP_KERNEL);
+-	if (!unit)
+-		return -ENOMEM;
++	if (!unit) {
++		retval = -ENOMEM;
++		goto out;
++	}
+ 
+ 	unit->port = port;
+ 	unit->fcp_lun = fcp_lun;
+@@ -139,28 +150,33 @@ int zfcp_unit_add(struct zfcp_port *port
+ 	if (dev_set_name(&unit->dev, "0x%016llx",
+ 			 (unsigned long long) fcp_lun)) {
+ 		kfree(unit);
+-		return -ENOMEM;
++		retval = -ENOMEM;
++		goto out;
+ 	}
+ 
+-	get_device(&port->dev);
+-
+ 	if (device_register(&unit->dev)) {
+ 		put_device(&unit->dev);
+-		return -ENOMEM;
++		retval = -ENOMEM;
++		goto out;
+ 	}
+ 
+ 	if (sysfs_create_group(&unit->dev.kobj, &zfcp_sysfs_unit_attrs)) {
+ 		device_unregister(&unit->dev);
+-		return -EINVAL;
++		retval = -EINVAL;
++		goto out;
+ 	}
+ 
++	atomic_inc(&port->units); /* under zfcp_sysfs_port_units_mutex ! */
++
+ 	write_lock_irq(&port->unit_list_lock);
+ 	list_add_tail(&unit->list, &port->unit_list);
+ 	write_unlock_irq(&port->unit_list_lock);
+ 
+ 	zfcp_unit_scsi_scan(unit);
+ 
+-	return 0;
++out:
++	mutex_unlock(&zfcp_sysfs_port_units_mutex);
++	return retval;
+ }
+ 
+ /**
+From 947ca1856a7e60aa6d20536785e6a42dff25aa6e Mon Sep 17 00:00:00 2001
+From: Michael Wang <wangyun at linux.vnet.ibm.com>
+Date: Wed, 5 Sep 2012 10:33:18 +0800
+Subject: slab: fix the DEADLOCK issue on l3 alien lock
+
+From: Michael Wang <wangyun at linux.vnet.ibm.com>
+
+commit 947ca1856a7e60aa6d20536785e6a42dff25aa6e upstream.
+
+DEADLOCK will be report while running a kernel with NUMA and LOCKDEP enabled,
+the process of this fake report is:
+
+	   kmem_cache_free()	//free obj in cachep
+	-> cache_free_alien()	//acquire cachep's l3 alien lock
+	-> __drain_alien_cache()
+	-> free_block()
+	-> slab_destroy()
+	-> kmem_cache_free()	//free slab in cachep->slabp_cache
+	-> cache_free_alien()	//acquire cachep->slabp_cache's l3 alien lock
+
+Since the cachep and cachep->slabp_cache's l3 alien are in the same lock class,
+fake report generated.
+
+This should not happen since we already have init_lock_keys() which will
+reassign the lock class for both l3 list and l3 alien.
+
+However, init_lock_keys() was invoked at a wrong position which is before we
+invoke enable_cpucache() on each cache.
+
+Since until set slab_state to be FULL, we won't invoke enable_cpucache()
+on caches to build their l3 alien while creating them, so although we invoked
+init_lock_keys(), the l3 alien lock class won't change since we don't have
+them until invoked enable_cpucache() later.
+
+This patch will invoke init_lock_keys() after we done enable_cpucache()
+instead of before to avoid the fake DEADLOCK report.
+
+Michael traced the problem back to a commit in release 3.0.0:
+
+commit 30765b92ada267c5395fc788623cb15233276f5c
+Author: Peter Zijlstra <peterz at infradead.org>
+Date:   Thu Jul 28 23:22:56 2011 +0200
+
+    slab, lockdep: Annotate the locks before using them
+
+    Fernando found we hit the regular OFF_SLAB 'recursion' before we
+    annotate the locks, cure this.
+
+    The relevant portion of the stack-trace:
+
+    > [    0.000000]  [<c085e24f>] rt_spin_lock+0x50/0x56
+    > [    0.000000]  [<c04fb406>] __cache_free+0x43/0xc3
+    > [    0.000000]  [<c04fb23f>] kmem_cache_free+0x6c/0xdc
+    > [    0.000000]  [<c04fb2fe>] slab_destroy+0x4f/0x53
+    > [    0.000000]  [<c04fb396>] free_block+0x94/0xc1
+    > [    0.000000]  [<c04fc551>] do_tune_cpucache+0x10b/0x2bb
+    > [    0.000000]  [<c04fc8dc>] enable_cpucache+0x7b/0xa7
+    > [    0.000000]  [<c0bd9d3c>] kmem_cache_init_late+0x1f/0x61
+    > [    0.000000]  [<c0bba687>] start_kernel+0x24c/0x363
+    > [    0.000000]  [<c0bba0ba>] i386_start_kernel+0xa9/0xaf
+
+    Reported-by: Fernando Lopez-Lezcano <nando at ccrma.Stanford.EDU>
+    Acked-by: Pekka Enberg <penberg at kernel.org>
+    Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
+    Link: http://lkml.kernel.org/r/1311888176.2617.379.camel@laptop
+    Signed-off-by: Ingo Molnar <mingo at elte.hu>
+
+The commit moved init_lock_keys() before we build up the alien, so we
+failed to reclass it.
+
+Acked-by: Christoph Lameter <cl at linux.com>
+Tested-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
+Signed-off-by: Michael Wang <wangyun at linux.vnet.ibm.com>
+Signed-off-by: Pekka Enberg <penberg at kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ mm/slab.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -1781,9 +1781,6 @@ void __init kmem_cache_init_late(void)
+ 
+ 	slab_state = UP;
+ 
+-	/* Annotate slab for lockdep -- annotate the malloc caches */
+-	init_lock_keys();
+-
+ 	/* 6) resize the head arrays to their final sizes */
+ 	mutex_lock(&slab_mutex);
+ 	list_for_each_entry(cachep, &slab_caches, list)
+@@ -1791,6 +1788,9 @@ void __init kmem_cache_init_late(void)
+ 			BUG();
+ 	mutex_unlock(&slab_mutex);
+ 
++	/* Annotate slab for lockdep -- annotate the malloc caches */
++	init_lock_keys();
++
+ 	/* Done! */
+ 	slab_state = FULL;
+ 
+From 959d1af8cffc8fd38ed53e8be1cf4ab8782f9c00 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj at kernel.org>
+Date: Fri, 3 Aug 2012 10:30:45 -0700
+Subject: workqueue: add missing smp_wmb() in process_one_work()
+
+From: Tejun Heo <tj at kernel.org>
+
+commit 959d1af8cffc8fd38ed53e8be1cf4ab8782f9c00 upstream.
+
+WORK_STRUCT_PENDING is used to claim ownership of a work item and
+process_one_work() releases it before starting execution.  When
+someone else grabs PENDING, all pre-release updates to the work item
+should be visible and all updates made by the new owner should happen
+afterwards.
+
+Grabbing PENDING uses test_and_set_bit() and thus has a full barrier;
+however, clearing doesn't have a matching wmb.  Given the preceding
+spin_unlock and use of clear_bit, I don't believe this can be a
+problem on an actual machine and there hasn't been any related report
+but it still is theretically possible for clear_pending to permeate
+upwards and happen before work->entry update.
+
+Add an explicit smp_wmb() before work_clear_pending().
+
+Signed-off-by: Tejun Heo <tj at kernel.org>
+Cc: Oleg Nesterov <oleg at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ kernel/workqueue.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/kernel/workqueue.c
++++ b/kernel/workqueue.c
+@@ -2073,7 +2073,9 @@ __acquires(&gcwq->lock)
+ 
+ 	spin_unlock_irq(&gcwq->lock);
+ 
++	smp_wmb();	/* paired with test_and_set_bit(PENDING) */
+ 	work_clear_pending(work);
++
+ 	lock_map_acquire_read(&cwq->wq->lockdep_map);
+ 	lock_map_acquire(&lockdep_map);
+ 	trace_workqueue_execute_start(work);
+From 3aa62497594430ea522050b75c033f71f2c60ee6 Mon Sep 17 00:00:00 2001
+From: Lai Jiangshan <laijs at cn.fujitsu.com>
+Date: Tue, 18 Sep 2012 10:40:00 -0700
+Subject: workqueue: fix possible stall on try_to_grab_pending() of a delayed work item
+
+From: Lai Jiangshan <laijs at cn.fujitsu.com>
+
+commit 3aa62497594430ea522050b75c033f71f2c60ee6 upstream.
+
+Currently, when try_to_grab_pending() grabs a delayed work item, it
+leaves its linked work items alone on the delayed_works.  The linked
+work items are always NO_COLOR and will cause future
+cwq_activate_first_delayed() increase cwq->nr_active incorrectly, and
+may cause the whole cwq to stall.  For example,
+
+state: cwq->max_active = 1, cwq->nr_active = 1
+       one work in cwq->pool, many in cwq->delayed_works.
+
+step1: try_to_grab_pending() removes a work item from delayed_works
+       but leaves its NO_COLOR linked work items on it.
+
+step2: Later on, cwq_activate_first_delayed() activates the linked
+       work item increasing ->nr_active.
+
+step3: cwq->nr_active = 1, but all activated work items of the cwq are
+       NO_COLOR.  When they finish, cwq->nr_active will not be
+       decreased due to NO_COLOR, and no further work items will be
+       activated from cwq->delayed_works. the cwq stalls.
+
+Fix it by ensuring the target work item is activated before stealing
+PENDING in try_to_grab_pending().  This ensures that all the linked
+work items are activated without incorrectly bumping cwq->nr_active.
+
+tj: Updated comment and description.
+
+Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
+Signed-off-by: Tejun Heo <tj at kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+
+---
+ kernel/workqueue.c |   25 ++++++++++++++++++++++---
+ 1 file changed, 22 insertions(+), 3 deletions(-)
+
+--- a/kernel/workqueue.c
++++ b/kernel/workqueue.c
+@@ -1927,10 +1927,9 @@ static void move_linked_works(struct wor
+ 		*nextp = n;
+ }
+ 
+-static void cwq_activate_first_delayed(struct cpu_workqueue_struct *cwq)
++static void cwq_activate_delayed_work(struct work_struct *work)
+ {
+-	struct work_struct *work = list_first_entry(&cwq->delayed_works,
+-						    struct work_struct, entry);
++	struct cpu_workqueue_struct *cwq = get_work_cwq(work);
+ 
+ 	trace_workqueue_activate_work(work);
+ 	move_linked_works(work, &cwq->pool->worklist, NULL);
+@@ -1938,6 +1937,14 @@ static void cwq_activate_first_delayed(s
+ 	cwq->nr_active++;
+ }
+ 
++static void cwq_activate_first_delayed(struct cpu_workqueue_struct *cwq)
++{
++	struct work_struct *work = list_first_entry(&cwq->delayed_works,
++						    struct work_struct, entry);
++
++	cwq_activate_delayed_work(work);
++}
++
+ /**
+  * cwq_dec_nr_in_flight - decrement cwq's nr_in_flight
+  * @cwq: cwq of interest
+@@ -2846,6 +2853,18 @@ static int try_to_grab_pending(struct wo
+ 		smp_rmb();
+ 		if (gcwq == get_work_gcwq(work)) {
+ 			debug_work_deactivate(work);
++
++			/*
++			 * A delayed work item cannot be grabbed directly
++			 * because it might have linked NO_COLOR work items
++			 * which, if left on the delayed_list, will confuse
++			 * cwq->nr_active management later on and cause
++			 * stall.  Make sure the work item is activated
++			 * before grabbing.
++			 */
++			if (*work_data_bits(work) & WORK_STRUCT_DELAYED)
++				cwq_activate_delayed_work(work);
++
+ 			list_del_init(&work->entry);
+ 			cwq_dec_nr_in_flight(get_work_cwq(work),
+ 				get_work_color(work),
diff --git a/config-arm-generic b/config-arm-generic
index 98a11c1..47995d5 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -1,294 +1,131 @@
+# Generic ARM config. This is common config options that should be
+# enabled on all ARM kernels and hence should be added here
+#
+# FIXME - we need to add debug/nodebug generic build options
+# CONFIG_DEBUG_PER_CPU_MAPS is not set
+
+# Generic ARM processor options
 CONFIG_ARM=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+
+CONFIG_ARM_THUMB=y
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+CONFIG_VFP=y
+CONFIG_ARM_UNWIND=y
+
 CONFIG_SMP=y
-CONFIG_SMP_ON_UP=y
-CONFIG_ARM_CPU_TOPOLOGY=y
 CONFIG_NR_CPUS=4
-CONFIG_HOTPLUG_CPU=y
-
-# CONFIG_CMDLINE_FORCE is not set
+CONFIG_SMP_ON_UP=y
 
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_ARM_ARCH_TIMER=y
 
-CONFIG_ARCH_VEXPRESS=y
-CONFIG_ARCH_VEXPRESS_CA9X4=y
-CONFIG_ARCH_VEXPRESS_DT=y
-CONFIG_PLAT_VERSATILE_CLCD=y
-CONFIG_PLAT_VERSATILE_SCHED_CLOCK=y
-CONFIG_PLAT_VERSATILE=y
-CONFIG_ARM_TIMER_SP804=y
-
-CONFIG_CPU_V7=y
-CONFIG_CPU_32v6K=y
-CONFIG_CPU_32v7=y
-CONFIG_CPU_ABRT_EV7=y
-CONFIG_CPU_PABRT_V7=y
-CONFIG_CPU_CACHE_V7=y
-CONFIG_CPU_CACHE_VIPT=y
-CONFIG_CPU_COPY_V6=y
-CONFIG_CPU_TLB_V7=y
-CONFIG_CPU_HAS_ASID=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
+CONFIG_CMDLINE=""
 
-CONFIG_HIGHMEM=y
-# CONFIG_HIGHPTE is not set
+# CONFIG_FPE_NWFPE is not set
+CONFIG_FPE_FASTFPE=y
 
-# CONFIG_CPU_ICACHE_DISABLE is not set
-# CONFIG_CPU_DCACHE_DISABLE is not set
-# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# Generic ARM Errata
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_751472=y
 
+# Generic ARM config options
 CONFIG_ZBOOT_ROM_TEXT=0
 CONFIG_ZBOOT_ROM_BSS=0
 
-# CONFIG_XIP_KERNEL is not set
-
 CONFIG_ATAGS_PROC=y
 
+#CONFIG_XIP_KERNEL is not set
+
+# DeviceTree
+CONFIG_USE_OF=y
+# CONFIG_OF_SELFTEST is not set
+CONFIG_PROC_DEVICETREE=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_I2C_MUX_PINCTRL=m
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+
+# Generic options we want for ARM that aren't defualt
+CONFIG_HIGHMEM=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+
+CONFIG_RCU_FANOUT=32
+CONFIG_RCU_FANOUT_LEAF=16
+
 CONFIG_CPU_IDLE=y
 # CONFIG_CPU_IDLE_GOV_LADDER is not set
-ONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_IDLE_GOV_MENU=y
 
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 
-# CONFIG_FPE_NWFPE is not set
-CONFIG_FPE_FASTFPE=y
-CONFIG_VFP=y
-CONFIG_VFPv3=y
-CONFIG_NEON=y
-
 CONFIG_PM=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_TRACE is not set
+CONFIG_PM_STD_PARTITION=""
 CONFIG_SUSPEND=y
-# CONFIG_PM_TEST_SUSPEND is not set
-CONFIG_APM_EMULATION=y
-
-CONFIG_ARM_THUMB=y
-
-CONFIG_AEABI=y
-CONFIG_OABI_COMPAT=y
-
-CONFIG_HW_PERF_EVENTS=y
-
-# CONFIG_UACCESS_WITH_MEMCPY is not set
-
-CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/sda1 rootdelay=20"
-
-CONFIG_LEDS=y
-CONFIG_LEDS_CPU=y
-
-CONFIG_MTD_AFS_PARTS=y
-CONFIG_MTD_ARM_INTEGRATOR=y
-CONFIG_MTD_IMPA7=y
-
-CONFIG_AX88796=m
-CONFIG_AX88796_93CX6=y
-CONFIG_SMC91X=m
-CONFIG_DM9000=m
-CONFIG_DM9000_DEBUGLEVEL=4
-# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
-CONFIG_SMC911X=m
-CONFIG_SMSC911X=m
-
-CONFIG_SERIO_AMBAKMI=m
-
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-
-CONFIG_I2C_VERSATILE=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_CPU_TOPOLOGY=y
 
 CONFIG_THERMAL=y
 
-# CONFIG_MFD_T7L66XB is not set
-# CONFIG_MFD_TC6387XB is not set
-
-CONFIG_FB_ARMCLCD=m
-
-CONFIG_SND_ARM=y
-CONFIG_SND_ARMAACI=m
-CONFIG_SND_SOC=m
-# CONFIG_SND_SOC_CACHE_LZO is not set
-# CONFIG_SND_SOC_ALL_CODECS is not set
-
-CONFIG_USB_MUSB_HDRC=y
-CONFIG_MUSB_PIO_ONLY=y
-CONFIG_USB_TUSB6010=y
-# CONFIG_USB_MUSB_DEBUG is not set
-
-CONFIG_MMC_ARMMMCI=m
-CONFIG_MMC_DW=m
-CONFIG_MMC_DW_PLTFM=y
-# CONFIG_MMC_DW_PCI is not set
-# CONFIG_MMC_DW_IDMAC is not set
-
-CONFIG_RTC_DRV_PL030=y
-CONFIG_RTC_DRV_PL031=y
-
-# CONFIG_SGI_IOC4 is not set
-
-# CONFIG_DEBUG_USER is not set
-# CONFIG_DEBUG_ERRORS is not set
-# CONFIG_DEBUG_LL is not set
-# CONFIG_DEBUG_PER_CPU_MAPS is not set
-# CONFIG_IRQ_DOMAIN_DEBUG is not set
-
-CONFIG_ARM_UNWIND=y
-
-CONFIG_RCU_FANOUT=32
-CONFIG_RCU_FANOUT_LEAF=8
-
-# CONFIG_ARM_ARCH_TIMER is not set
-# CONFIG_HW_RANDOM_ATMEL is not set
-# CONFIG_SERIAL_8250_EM is not set
-# CONFIG_SND_SIMPLE_CARD is not set
-
-# CONFIG_USB_ULPI is not set
-# CONFIG_OC_ETM is not set
-
-# CONFIG_MTD_PISMO is not set
-
 CONFIG_PERF_EVENTS=y
 CONFIG_PERF_COUNTERS=y
 
-# CONFIG_MG_DISK is not set
-# CONFIG_GPIO_PL061 is not set
-
 CONFIG_CC_STACKPROTECTOR=y
 
 CONFIG_AUTO_ZRELADDR=y
 
-# CONFIG_ARM_CHARLCD is not set
-# CONFIG_DEPRECATED_PARAM_STRUCT is not set
-
-# CONFIG_ARM_SP805_WATCHDOG is not set
-
-CONFIG_PM_OPP=y
-
 CONFIG_SECCOMP=y
 CONFIG_STRICT_DEVMEM=y
 
-# CONFIG_AMBA_PL08X is not set
-
-# CONFIG_HVC_DCC is not set
-
 CONFIG_SPARSE_IRQ=y
+# CONFIG_IRQ_DOMAIN_DEBUG is not set
 
-# CONFIG_ARM_PATCH_PHYS_VIRT is not set
-
-CONFIG_HWSPINLOCK_OMAP=m
-
-CONFIG_USE_OF=y
-CONFIG_PROC_DEVICETREE=y
-CONFIG_MTD_PHYSMAP_OF=m
-CONFIG_SERIAL_OF_PLATFORM=m
-CONFIG_MMC_SDHCI_OF=m
-CONFIG_MMC_SDHCI_PXAV3=m
-CONFIG_MMC_SDHCI_PXAV2=m
-
-CONFIG_ARM_APPENDED_DTB=y
-CONFIG_MTD_OF_PARTS=y
-CONFIG_PL330_DMA=y
-# CONFIG_ARM_KPROBES_TEST is not set
-# CONFIG_ARM_ATAG_DTB_COMPAT is not set
-
-# CONFIG_FTGMAC100 is not set
-# CONFIG_FTMAC100 is not set
-#
 CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
 CONFIG_LSM_MMAP_MIN_ADDR=32768
 
-# CONFIG_ARM_LPAE is not set
-# CONFIG_ARM_THUMBEE is not set
-CONFIG_SWP_EMULATE=y
-# CONFIG_CPU_BPREDICT_DISABLE is not set
-CONFIG_CACHE_L2X0=y
-# CONFIG_ARM_ERRATA_430973 is not set
-# CONFIG_ARM_ERRATA_458693 is not set
-# CONFIG_ARM_ERRATA_460075 is not set
-# CONFIG_ARM_ERRATA_742230 is not set
-# CONFIG_ARM_ERRATA_742231 is not set
-# CONFIG_PL310_ERRATA_588369 is not set
-# CONFIG_PL310_ERRATA_727915 is not set
-# CONFIG_ARM_ERRATA_743622 is not set
-# CONFIG_ARM_ERRATA_754322 is not set
-# CONFIG_ARM_ERRATA_754327 is not set
-# CONFIG_ARM_ERRATA_764369 is not set
-# CONFIG_PL310_ERRATA_769419 is not set
-CONFIG_SCHED_MC=y
-# CONFIG_SCHED_SMT is not set
-CONFIG_LOCAL_TIMERS=y
-# CONFIG_THUMB2_KERNEL is not set
-# CONFIG_PATA_PLATFORM is not set
-CONFIG_ETHERNET=y
-CONFIG_NET_VENDOR_BROADCOM=y
-# CONFIG_SERIAL_AMBA_PL010 is not set
-# CONFIG_MPCORE_WATCHDOG is not set
-
-CONFIG_DVB_PLL=m
-CONFIG_DVB_TDA1004X=m
-
-# disable TPM on arm at least on the trimslices it causes havoc
-# CONFIG_TCG_TPM is not set
-# CONFIG_IMA is not set
-
-# ERROR: "__bswapsi2" [drivers/staging/crystalhd/crystalhd.ko] undefined!
-# CONFIG_CRYSTALHD is not set
+# Generic HW for all ARM platforms
+CONFIG_LEDS=y
+CONFIG_LEDS_CPU=y
+CONFIG_LEDS_GPIO=m
 
-# these modules all fail with missing __bad_udelay
-# http://www.spinics.net/lists/arm/msg15615.html provides some background
-# CONFIG_SUNGEM is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_DRM_RADEON is not set
-# CONFIG_ATM_HE is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SFC is not set
+CONFIG_LBDAF=y
 
-# these all currently fail due to missing symbols __bad_udelay or
-# error: implicit declaration of function ‘iowrite32be’
-# CONFIG_SND_ALI5451 is not set
-# CONFIG_DRM_NOUVEAU is not set 
-# CONFIG_MLX4_EN is not set
+CONFIG_RFKILL_GPIO=m
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+CONFIG_GPIO_GENERIC_PLATFORM=m
 
-# drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
-# CONFIG_TOUCHSCREEN_EETI is not set
-# CONFIG_TOUCHSCREEN_EGALAX is not set 
-# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
-#
-# FIXME: Guesses, need checking
-# CONFIG_MACH_EUKREA_CPUIMX35SD is not set
-CONFIG_ARM_ERRATA_720789=y
-CONFIG_ARM_ERRATA_751472=y
-CONFIG_ARM_ERRATA_326103=y
-# CONFIG_OMAP4_ERRATA_I688 is not set
-# CONFIG_FB_MX3 is not set
-# CONFIG_MX3_IPU is not set
-# CONFIG_MX3_IPU_IRQS is not set
+CONFIG_USB_ULPI=y
 
-# CONFIG_NET_VENDOR_CIRRUS is not set
-# CONFIG_CS89x0 is not set
+CONFIG_SND_ARM=y
+CONFIG_SND_ARMAACI=m
+CONFIG_SND_SOC=m
+# CONFIG_SND_SOC_CACHE_LZO is not set
+CONFIG_SND_SOC_ALL_CODECS=m
 
-# CONFIG_OF_SELFTEST is not set
-# CONFIG_MACH_IMX51_DT is not set
-# CONFIG_MACH_IMX53_DT is not set
-# CONFIG_MACH_MX53_EVK is not set
-# CONFIG_MACH_MX53_SMD is not set
-# CONFIG_MACH_MX53_LOCO is not set
-# CONFIG_MACH_MX53_ARD is not set
-# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set
+CONFIG_AX88796=m
+CONFIG_AX88796_93CX6=y
+CONFIG_SMC91X=m
+CONFIG_DM9000=m
+CONFIG_DM9000_DEBUGLEVEL=4
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
+CONFIG_SMC911X=m
+CONFIG_SMSC911X=m
 
-CONFIG_OF_GPIO=y
-CONFIG_INPUT_GP2A=m
-CONFIG_INPUT_GPIO_TILT_POLLED=m
+CONFIG_MMC_SDHCI_PLTFM=m
+CONFIG_MMC_SDHCI_OF=m
+CONFIG_MMC_SPI=m
 
-CONFIG_BPF_JIT=y
+# Generic GPIO options
+CONFIG_GENERIC_GPIO=y
 
 CONFIG_MTD=m
+CONFIG_MTD_TESTS=m
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_AFS_PARTS=y
+CONFIG_MTD_OF_PARTS=y
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_AFS_PARTS is not set
 CONFIG_MTD_CHAR=m
 CONFIG_MTD_BLKDEVS=m
 CONFIG_MTD_BLOCK=m
@@ -369,3 +206,96 @@ CONFIG_UBIFS_FS_ADVANCED_COMPR=y
 CONFIG_UBIFS_FS_LZO=y
 CONFIG_UBIFS_FS_ZLIB=y
 # CONFIG_UBIFS_FS_DEBUG is not set
+
+# Device tree
+CONFIG_OF=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_PCI=y
+CONFIG_OF_PCI_IRQ=y
+
+CONFIG_ETHERNET=y
+# CONFIG_NET_VENDOR_BROADCOM is not set
+# HW Disabled because it causes issues on ARM platforms
+
+# disable TPM on arm at least on the trimslices it causes havoc
+# CONFIG_TCG_TPM is not set
+# CONFIG_IMA is not set
+
+# ERROR: "__bswapsi2" [drivers/staging/crystalhd/crystalhd.ko] undefined!
+# CONFIG_CRYSTALHD is not set
+
+# these modules all fail with missing __bad_udelay
+# http://www.spinics.net/lists/arm/msg15615.html provides some background
+# CONFIG_SUNGEM is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_DRM_RADEON is not set
+# CONFIG_ATM_HE is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SFC is not set
+
+# these all currently fail due to missing symbols __bad_udelay or
+# error: implicit declaration of function ‘iowrite32be’
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_DRM_NOUVEAU is not set 
+# CONFIG_MLX4_EN is not set
+
+# drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
+# CONFIG_TOUCHSCREEN_EETI is not set
+# CONFIG_TOUCHSCREEN_EGALAX is not set 
+# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
+#
+# CONFIG_FB_MX3 is not set
+# CONFIG_MX3_IPU is not set
+# CONFIG_MX3_IPU_IRQS is not set
+
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_CS89x0 is not set
+#
+# CONFIG_ARCH_VERSATILE_PB is not set
+# CONFIG_MACH_VERSATILE_AB is not set
+# CONFIG_MACH_VERSATILE_DT is not set
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_HIGHPTE is not set
+# CONFIG_UACCESS_WITH_MEMCPY is not set
+# CONFIG_DEPRECATED_PARAM_STRUCT is not set
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_APM_EMULATION is not set
+# CONFIG_BPF_JIT is not set
+# CONFIG_MTD_IMPA7 is not set
+# CONFIG_MTD_PISMO is not set
+# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_ARM_CHARLCD is not set
+# CONFIG_SERIO_AMBAKMI is not set
+# CONFIG_SERIAL_8250_EM is not set
+# CONFIG_SERIAL_AMBA_PL011 is not set
+# CONFIG_HVC_DCC is not set
+# CONFIG_HW_RANDOM_ATMEL is not set
+# CONFIG_HW_RANDOM_EXYNOS is not set
+# CONFIG_I2C_NOMADIK is not set
+# CONFIG_I2C_VERSATILE is not set
+# CONFIG_ARM_SP805_WATCHDOG is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_DRM_VMWGFX_FBCON is not set
+# CONFIG_FB_ARMCLCD is not set
+# CONFIG_SND_DESIGNWARE_I2S is not set
+# CONFIG_SND_SIMPLE_CARD is not set
+# CONFIG_MMC_ARMMMCI is not set
+# CONFIG_MMC_SDHCI_PXAV3 is not set
+# CONFIG_MMC_SDHCI_PXAV2 is not set
+# CONFIG_MMC_DW is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_DRV_PL030 is not set
+# CONFIG_RTC_DRV_PL031 is not set
+# CONFIG_AMBA_PL08X is not set
+# CONFIG_PL330_DMA is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_LL is not set
+# CONFIG_OC_ETM is not set
+# CONFIG_ARM_KPROBES_TEST is not set
diff --git a/config-arm-highbank b/config-arm-highbank
index 60178dd..f00e96c 100644
--- a/config-arm-highbank
+++ b/config-arm-highbank
@@ -12,20 +12,62 @@ CONFIG_SWP_EMULATE=y
 # CONFIG_PL310_ERRATA_753970 is not set
 # CONFIG_ARM_ERRATA_754322 is not set
 # CONFIG_PL310_ERRATA_769419 is not set
+# CONFIG_ARM_ERRATA_742230 is not set
+# CONFIG_ARM_ERRATA_742231 is not set
+# CONFIG_ARM_ERRATA_754327 is not set
+# CONFIG_ARM_ERRATA_764369 is not set
+# 
+
+CONFIG_RCU_FANOUT_LEAF=16
+
+# CONFIG_LOCAL_TIMERS is not set
+# CONFIG_HW_PERF_EVENTS is not set
+# CONFIG_MPCORE_WATCHDOG is not set
+# CONFIG_COMMON_CLK_DEBUG is not set
+# CONFIG_PID_IN_CONTEXTIDR is not set
+# 
 
 # CONFIG_THUMB2_KERNEL is not set
 
 CONFIG_ARM_TIMER_SP804=y
 
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_NEON=y
+
 CONFIG_SATA_AHCI_PLATFORM=y
 CONFIG_ATA_SFF=y
 
-CONFIG_ETHERNET=y
-CONFIG_NET_VENDOR_BROADCOM=y
 CONFIG_NET_CALXEDA_XGMAC=y
 
 CONFIG_GPIO_PL061=y
 
 CONFIG_SERIAL_AMBA_PL010=y
 CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+
+CONFIG_RTC_DRV_PL030=y
+CONFIG_RTC_DRV_PL031=y
+
+CONFIG_SATA_HIGHBANK=m
+
+# CONFIG_DVB_TDA1004X is not set
+# CONFIG_DVB_PLL is not set
 
+# these were all requested to be disabled on highbank kernels by calxeda
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_CAIF is not set
+# CONFIG_NFC is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+# CONFIG_ATM_DRIVERS is not set
+# CONFIG_WAN is not set
+# CONFIG_ISDN is not set
+# CONFIG_MEDIA_SUPPORT is not set
+# CONFIG_DRM is not set
+# CONFIG_SND is not set
+# end of list of requested disabled options
diff --git a/config-arm-imx b/config-arm-imx
index d6bea10..5e95270 100644
--- a/config-arm-imx
+++ b/config-arm-imx
@@ -3,6 +3,8 @@ CONFIG_ARCH_MX51=y
 CONFIG_MACH_MX51_BABBAGE=y
 CONFIG_MACH_MX51_3DS=y
 CONFIG_MACH_EUKREA_CPUIMX51=y
+CONFIG_VFP=y
+CONFIG_NEON=y
 
 CONFIG_MACH_EUKREA_CPUIMX51SD=y
 CONFIG_MACH_MX51_EFIKAMX=y
@@ -11,7 +13,7 @@ CONFIG_MACH_MX51_EFIKASB=y
 # CONFIG_THUMB2_KERNEL is not set
 CONFIG_CPU_FREQ_IMX=y
 CONFIG_W1_MASTER_MXC=m
-CONFIG_IMX_DMA=m
+CONFIG_IMX_DMA=y
 CONFIG_IMX_SDMA=y
 CONFIG_MACH_MX31ADS=y
 CONFIG_MACH_MX31LILLY=y
@@ -27,6 +29,15 @@ CONFIG_MACH_PCM043=y
 CONFIG_MACH_MX35_3DS=y
 CONFIG_MACH_EUKREA_CPUIMX35=y
 CONFIG_MACH_VPR200=y
+# CONFIG_MACH_IMX31_DT is not set
+# CONFIG_MACH_EUKREA_CPUIMX35SD is not set
+# CONFIG_MACH_IMX51_DT is not set
+# CONFIG_MACH_IMX53_DT is not set
+# CONFIG_MACH_MX53_EVK is not set
+# CONFIG_MACH_MX53_SMD is not set
+# CONFIG_MACH_MX53_LOCO is not set
+# CONFIG_MACH_MX53_ARD is not set
+
 CONFIG_SOC_IMX6Q=y
 CONFIG_MXC_IRQ_PRIOR=y
 CONFIG_MXC_PWM=m
@@ -38,10 +49,8 @@ CONFIG_ARM_ERRATA_411920=y
 CONFIG_PL310_ERRATA_588369=y
 CONFIG_PL310_ERRATA_727915=y
 CONFIG_ARM_ERRATA_364296=y
-CONFIG_RFKILL_GPIO=m
+
 CONFIG_PATA_IMX=m
-CONFIG_ETHERNET=y
-CONFIG_NET_VENDOR_BROADCOM=y
 CONFIG_NET_VENDOR_FREESCALE=y
 CONFIG_FEC=y
 CONFIG_KEYBOARD_IMX=m
@@ -51,6 +60,8 @@ CONFIG_I2C_IMX=m
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_MCP23S08=m
 # CONFIG_GPIO_MC9S08DZ60 is not set
+CONFIG_DVB_TDA1004X=m
+CONFIG_DVB_PLL=m
 CONFIG_SND_IMX_SOC=m
 CONFIG_USB_EHCI_MXC=y
 # CONFIG_USB_IMX21_HCD is not set
@@ -64,6 +75,7 @@ CONFIG_LEDS_PWM=m
 CONFIG_MACH_PCM037_EET=y
 # CONFIG_MACH_MX31_3DS_MXC_NAND_USE_BBT is not set
 CONFIG_MXC_USE_EPIT=y
+CONFIG_HAVE_EPIT=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_ARM_ERRATA_430973=y
 CONFIG_ARM_ERRATA_458693=y
@@ -84,16 +96,26 @@ CONFIG_LEDS_RENESAS_TPU=y
 # CONFIG_ARM_LPAE is not set
 # CONFIG_INPUT_GP2A is not set
 # CONFIG_INPUT_GPIO_TILT_POLLED is not set
-
-CONFIG_MFD_ANATOP=y
-
-# CONFIG_MTD_NAND_GPMI_NAND is not set
+# CONFIG_DMA_CACHE_RWFO is not set
+# CONFIG_ARM_ERRATA_326103 is not set
+# CONFIG_ARM_ERRATA_742230 is not set
+# CONFIG_ARM_ERRATA_742231 is not set
+# CONFIG_ARM_ERRATA_754327 is not set
+# CONFIG_ARM_ERRATA_764369 is not set
+# CONFIG_LOCAL_TIMERS is not set
+# CONFIG_HW_PERF_EVENTS is not set
+# CONFIG_MG_DISK is not set
 # CONFIG_MDIO_BUS_MUX_GPIO is not set
 # CONFIG_DEBUG_PINCTRL is not set
 # CONFIG_PINCTRL_IMX51 is not set
+# CONFIG_PINCTRL_SINGLE is not set
 # CONFIG_GPIO_EM is not set
+# CONFIG_MPCORE_WATCHDOG is not set
 # CONFIG_FB_IMX is not set
 # CONFIG_SND_SOC_IMX_SGTL5000 is not set
-# CONFIG_RTC_DRV_MXC is not set
+# CONFIG_USB_MXS_PHY is not set
+# CONFIG_MXS_DMA is not set
 # CONFIG_COMMON_CLK_DEBUG is not set
+# CONFIG_PID_IN_CONTEXTIDR is not set
+# CONFIG_RTC_DRV_MXC is not set
 
diff --git a/config-arm-kirkwood b/config-arm-kirkwood
index c3d1891..f2c9d3f 100644
--- a/config-arm-kirkwood
+++ b/config-arm-kirkwood
@@ -2,15 +2,19 @@ CONFIG_ARCH_KIRKWOOD=y
 CONFIG_ARCH_KIRKWOOD_DT=y
 # CONFIG_SMP is not set
 # CONFIG_VFP is not set
+
 CONFIG_MACH_DB88F6281_BP=y
 CONFIG_MACH_RD88F6192_NAS=y
 CONFIG_MACH_RD88F6281=y
 CONFIG_MACH_MV88F6281GTW_GE=y
 CONFIG_MACH_SHEEVAPLUG=y
 CONFIG_MACH_ESATA_SHEEVAPLUG=y
+CONFIG_MACH_DLINK_KIRKWOOD_DT=y
 CONFIG_MACH_GURUPLUG=y
 CONFIG_MACH_DREAMPLUG_DT=y
 CONFIG_MACH_DOCKSTAR=y
+CONFIG_MACH_ICONNECT_DT=y
+CONFIG_MACH_IB62X0_DT=y
 CONFIG_MACH_TS219=y
 CONFIG_MACH_TS41X=y
 CONFIG_MACH_OPENRD_BASE=y
@@ -23,6 +27,10 @@ CONFIG_MACH_D2NET_V2=y
 CONFIG_MACH_NET2BIG_V2=y
 CONFIG_MACH_NET5BIG_V2=y
 CONFIG_MACH_T5325=y
+# CONFIG_MACH_TS219_DT is not set
+# CONFIG_MACH_GOFLEXNET_DT is not set
+# CONFIG_MACH_LSXL_DT is not set
+
 # CONFIG_CPU_FEROCEON_OLD_ID is not set
 
 
@@ -47,17 +55,10 @@ CONFIG_CRYPTO_DEV_MV_CESA=m
 # CONFIG_INPUT_GP2A is not set
 # CONFIG_INPUT_GPIO_TILT_POLLED is not set
 
+CONFIG_FB_XGI=m
 
-# CONFIG_VFP is not set
-# CONFIG_VFPv3 is not set
-# CONFIG_NEON is not set
-# CONFIG_SMP is not set
+# CONFIG_MG_DISK is not set
 # CONFIG_MDIO_BUS_MUX_GPIO is not set
-# CONFIG_MACH_ICONNECT_DT is not set
-# CONFIG_MACH_DLINK_KIRKWOOD_DT is not set
-# CONFIG_MACH_IB62X0_DT is not set
-# CONFIG_RFKILL_GPIO is not set
-# CONFIG_TCM_QLA2XXX is not set
 # CONFIG_GPIO_EM is not set
 # CONFIG_LEDS_RENESAS_TPU is not set
 # CONFIG_COMMON_CLK_DEBUG is not set
diff --git a/config-arm-omap b/config-arm-omap
index ae46b5a..c49c14c 100644
--- a/config-arm-omap
+++ b/config-arm-omap
@@ -1,31 +1,3 @@
-# CONFIG_OMAP4_ERRATA_I688 is not set
-
-CONFIG_GENERIC_GPIO=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_LOCKBREAK=y
-CONFIG_ARCH_HAS_CPUFREQ=y
-# CONFIG_SPARSE_IRQ is not set
-CONFIG_TREE_PREEMPT_RCU=y
-CONFIG_PREEMPT_RCU=y
-CONFIG_RCU_FANOUT=32
-# CONFIG_RCU_FANOUT_EXACT is not set
-# CONFIG_RCU_BOOST is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_SCHED_AUTOGROUP is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_USE_GENERIC_SMP_HELPERS=y
-CONFIG_HAVE_HW_BREAKPOINT=y
-CONFIG_STOP_MACHINE=y
-# CONFIG_INLINE_SPIN_UNLOCK is not set
-# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
-# CONFIG_INLINE_READ_UNLOCK is not set
-# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
-# CONFIG_INLINE_WRITE_UNLOCK is not set
-# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-# CONFIG_ARCH_VERSATILE is not set
 CONFIG_ARCH_OMAP=y
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_KEYBOARD_GPIO_POLLED is not set
@@ -52,6 +24,13 @@ CONFIG_OMAP_32K_TIMER_HZ=128
 CONFIG_OMAP_DM_TIMER=y
 # CONFIG_OMAP_PM_NONE is not set
 CONFIG_OMAP_PM_NOOP=y
+CONFIG_OMAP_IOMMU=y
+CONFIG_OMAP3_EMU=y
+CONFIG_HWSPINLOCK_OMAP=m
+CONFIG_DMA_OMAP=y
+# CONFIG_DMADEVICES_VDEBUG is not set
+
+CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
 
 #
 # TI OMAP2/3/4 Specific Features
@@ -61,17 +40,18 @@ CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
 CONFIG_ARCH_OMAP3=y
 CONFIG_ARCH_OMAP4=y
 CONFIG_SOC_OMAP3430=y
-CONFIG_SOC_OMAPTI81XX=y
-CONFIG_SOC_OMAPAM33XX=y
-# CONFIG_SOC_OMAPTI816X is not set
+CONFIG_SOC_TI81XX=y
+CONFIG_SOC_AM33XX=y
+CONFIG_SOC_OMAPTI816X=y
 CONFIG_OMAP_PACKAGE_CBB=y
 CONFIG_OMAP_PACKAGE_CBL=y
 CONFIG_OMAP_PACKAGE_CBS=y
-CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
+# CONFIG_OMAP4_ERRATA_I688 is not set
 
 #
 # OMAP Board Type
 #
+CONFIG_MACH_OMAP_GENERIC=y
 CONFIG_MACH_OMAP3_BEAGLE=y
 CONFIG_MACH_DEVKIT8000=y
 CONFIG_MACH_OMAP_LDP=y
@@ -84,8 +64,6 @@ CONFIG_MACH_CRANEBOARD=y
 CONFIG_MACH_OMAP3_PANDORA=y
 CONFIG_MACH_OMAP3_TOUCHBOOK=y
 CONFIG_MACH_OMAP_3430SDP=y
-CONFIG_MACH_NOKIA_RM680=y
-CONFIG_MACH_NOKIA_RX51=y
 CONFIG_MACH_OMAP_ZOOM2=y
 CONFIG_MACH_OMAP_ZOOM3=y
 CONFIG_MACH_CM_T35=y
@@ -96,11 +74,16 @@ CONFIG_MACH_SBC3530=y
 CONFIG_MACH_OMAP_3630SDP=y
 CONFIG_MACH_OMAP_4430SDP=y
 CONFIG_MACH_OMAP4_PANDA=y
-CONFIG_MACH_TI8148EVM=y
 CONFIG_MACH_TI8168EVM=y
+# CONFIG_MACH_NOKIA_RM680 is not set
+# CONFIG_MACH_NOKIA_RX51 is not set
+# CONFIG_MACH_TI8148EVM is not set
+CONFIG_MACH_OMAP3_WESTBRIDGE_AST_PNAND_HAL=y
+
 
-CONFIG_OMAP3_EMU=y
 # CONFIG_OMAP3_SDRC_AC_TIMING is not set
+
+
 # System MMU
 CONFIG_CPU_32v6K=y
 CONFIG_CPU_V7=y
@@ -136,23 +119,15 @@ CONFIG_ARM_ERRATA_720789=y
 # CONFIG_ARM_ERRATA_754327 is not set
 # CONFIG_ARM_ERRATA_764369 is not set
 CONFIG_ARM_GIC=y
-# CONFIG_PCI_SYSCALL is not set
-# CONFIG_PCCARD is not set
-CONFIG_SMP=y
-CONFIG_SMP_ON_UP=y
 CONFIG_HAVE_ARM_SCU=y
 CONFIG_HAVE_ARM_TWD=y
-CONFIG_NR_CPUS=2
 CONFIG_HOTPLUG_CPU=y
 CONFIG_LOCAL_TIMERS=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-CONFIG_PREEMPT=y
 CONFIG_HZ=128
 # CONFIG_THUMB2_KERNEL is not set
 CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_KSM is not set
-# CONFIG_CC_STACKPROTECTOR is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE=""
@@ -166,528 +141,51 @@ CONFIG_PM_DEBUG=y
 # CONFIG_PM_VERBOSE is not set
 CONFIG_CAN_PM_TRACE=y
 CONFIG_PM_SLEEP_SMP=y
-# CONFIG_APM_EMULATION is not set
 CONFIG_ARCH_HAS_OPP=y
 CONFIG_PM_OPP=y
-# CONFIG_NET_IPGRE_DEMUX is not set
-# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
-# CONFIG_ARPD is not set
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-CONFIG_IPV6=y
-# CONFIG_IPV6_ROUTER_PREF is not set
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-# CONFIG_IPV6_MIP6 is not set
-# CONFIG_IPV6_SUBTREES is not set
-# CONFIG_IPV6_MROUTE is not set
-CONFIG_NF_DEFRAG_IPV4=m
-# CONFIG_NET_DCCPPROBE is not set
-# CONFIG_L2TP_V3 is not set
-# CONFIG_DECNET_ROUTER is not set
-# CONFIG_NET_SCH_INGRESS is not set
-# CONFIG_NET_CLS_U32 is not set
-# CONFIG_NET_CLS_FLOW is not set
-# CONFIG_NET_ACT_CSUM is not set
-# CONFIG_NET_CLS_IND is not set
-CONFIG_RPS=y
-CONFIG_XPS=y
-# CONFIG_CAN_SLCAN is not set
-# CONFIG_CAN_DEV is not set
-CONFIG_RXKAD=m
-CONFIG_FIRMWARE_IN_KERNEL=y
-# CONFIG_DEBUG_DEVRES is not set
-CONFIG_MTD=y
-CONFIG_MTD_TESTS=m
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_AFS_PARTS is not set
-# CONFIG_MTD_AR7_PARTS is not set
-CONFIG_MTD_CHAR=y
-CONFIG_MTD_BLKDEVS=y
-CONFIG_MTD_BLOCK=y
-CONFIG_SM_FTL=m
-CONFIG_MTD_PHYSMAP=m
-# CONFIG_MTD_PHYSMAP_COMPAT is not set
-# CONFIG_MTD_ARM_INTEGRATOR is not set
-# CONFIG_MTD_IMPA7 is not set
-# CONFIG_MTD_GPIO_ADDR is not set
-CONFIG_MTD_PLATRAM=m
-# CONFIG_MTD_DATAFLASH is not set
-CONFIG_MTD_M25P80=m
-CONFIG_M25PXX_USE_FAST_READ=y
-# CONFIG_MTD_SST25L is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_PHRAM=m
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCECC=m
-# CONFIG_MTD_DOCPROBE_ADVANCED is not set
-CONFIG_MTD_DOCPROBE_ADDRESS=0
-CONFIG_MTD_NAND_ECC=y
-# CONFIG_MTD_NAND_ECC_SMC is not set
-CONFIG_MTD_NAND=y
-# CONFIG_MTD_SM_COMMON is not set
-# CONFIG_MTD_NAND_GPIO is not set
-# CONFIG_MTD_NAND_DOCG4 is not set
+
+#
+# OMAP Hardware
+#
+CONFIG_WL_TI=y
+CONFIG_WLCORE_SDIO=m
+CONFIG_TI_ST=m
+CONFIG_GPIOLIB=y
 CONFIG_MTD_NAND_OMAP2=y
 CONFIG_MTD_NAND_OMAP_PREFETCH=y
 CONFIG_MTD_NAND_OMAP_PREFETCH_DMA=y
-CONFIG_MTD_NAND_IDS=y
-# CONFIG_MTD_NAND_NANDSIM is not set
-CONFIG_MTD_NAND_PLATFORM=y
-# CONFIG_MTD_ALAUDA is not set
-CONFIG_MTD_ONENAND=y
-# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
-# CONFIG_MTD_ONENAND_GENERIC is not set
-CONFIG_MTD_ONENAND_OMAP2=y
-# CONFIG_MTD_ONENAND_OTP is not set
-CONFIG_MTD_ONENAND_2X_PROGRAM=y
-CONFIG_MTD_ONENAND_SIM=m
-CONFIG_MTD_UBI_GLUEBI=m
-# CONFIG_PARPORT is not set
-CONFIG_BLK_DEV_RAM_SIZE=65536
-CONFIG_MG_DISK=m
-CONFIG_MG_DISK_RES=0
-# CONFIG_BLK_DEV_RBD is not set
-# CONFIG_APDS9802ALS is not set
-# CONFIG_ISL29020 is not set
-# CONFIG_SENSORS_BH1770 is not set
-# CONFIG_SENSORS_APDS990X is not set
-CONFIG_HMC6352=m
-CONFIG_DS1682=m
-CONFIG_TI_DAC7512=m
-CONFIG_BMP085=m
-CONFIG_C2PORT=m
-CONFIG_EEPROM_AT25=m
-CONFIG_EEPROM_93XX46=m
-# CONFIG_IWMC3200TOP_DEBUGFS is not set
-# CONFIG_SCSI_PROC_FS is not set
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-# CONFIG_SCSI_SPI_ATTRS is not set
-# CONFIG_ISCSI_BOOT_SYSFS is not set
-# CONFIG_SCSI_OSD_INITIATOR is not set
-# CONFIG_SATA_AHCI_PLATFORM is not set
-# CONFIG_DM_DEBUG is not set
-# CONFIG_DM_RAID is not set
-# CONFIG_DM_LOG_USERSPACE is not set
-CONFIG_DM_MULTIPATH=y
-# CONFIG_TARGET_CORE is not set
-# CONFIG_MACVTAP is not set
-CONFIG_MII=y
-# CONFIG_MARVELL_PHY is not set
-# CONFIG_DAVICOM_PHY is not set
-# 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_BCM63XX_PHY is not set
-# CONFIG_ICPLUS_PHY is not set
-# CONFIG_REALTEK_PHY is not set
-# CONFIG_NATIONAL_PHY is not set
-# CONFIG_STE10XP is not set
-# CONFIG_LSI_ET1011C_PHY is not set
-# CONFIG_MICREL_PHY is not set
-# CONFIG_FIXED_PHY is not set
-# CONFIG_MDIO_BITBANG is not set
-# CONFIG_AX88796 is not set
-# CONFIG_SMC91X is not set
-# CONFIG_TI_DAVINCI_EMAC is not set
-# CONFIG_TI_DAVINCI_MDIO is not set
-# CONFIG_TI_DAVINCI_CPDMA is not set
-CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL=y
-CONFIG_ENC28J60=m
-# CONFIG_ENC28J60_WRITEVERIFY is not set
-# CONFIG_ETHOC is not set
-CONFIG_SMC911X=y
-CONFIG_SMSC911X=y
-# CONFIG_DNET is not set
-# CONFIG_B44 is not set
-CONFIG_KS8851=m
-# CONFIG_NETDEV_1000 is not set
-# CONFIG_NETDEV_10000 is not set
-# CONFIG_ATH9K_HTC is not set
-# CONFIG_AR9170_USB is not set
-# CONFIG_B43_SDIO is not set
-# CONFIG_B43_PHY_N is not set
-# CONFIG_HOSTAP is not set
-# CONFIG_IWM is not set
-CONFIG_LIBERTAS_SPI=m
-# CONFIG_LIBERTAS_MESH is not set
-CONFIG_P54_SPI=m
-# CONFIG_P54_SPI_DEFAULT_EEPROM is not set
-# CONFIG_RT2800USB_RT33XX is not set
-# CONFIG_RTL8192CE is not set
 CONFIG_WL1251_SPI=m
 CONFIG_WL12XX_SPI=m
 CONFIG_WL12XX_SDIO_TEST=m
-# CONFIG_WIMAX_IWMC3200_SDIO is not set
-CONFIG_USB_USBNET=y
-CONFIG_USB_NET_CDCETHER=y
-CONFIG_USB_NET_CDC_NCM=y
-CONFIG_USB_NET_RNDIS_HOST=y
-# CONFIG_ATM_TCP is not set
-# CONFIG_IEEE802154_FAKEHARD is not set
-# CONFIG_CAIF_TTY is not set
-# CONFIG_CAIF_SPI_SLAVE is not set
-CONFIG_PPP_BSDCOMP=m
-# CONFIG_PPPOL2TP is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_ISDN is not set
-CONFIG_INPUT_POLLDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_EVBUG=m
-# CONFIG_KEYBOARD_QT2160 is not set
-CONFIG_KEYBOARD_LKKBD=m
-CONFIG_KEYBOARD_GPIO=m
-CONFIG_KEYBOARD_TCA6416=m
-CONFIG_KEYBOARD_MATRIX=m
-CONFIG_KEYBOARD_LM8323=m
-CONFIG_KEYBOARD_MCS=m
-CONFIG_KEYBOARD_NEWTON=m
-CONFIG_KEYBOARD_STOWAWAY=m
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_OMAP4 is not set
+CONFIG_INPUT_TWL4030_PWRBUTTON=m
+CONFIG_INPUT_TWL4030_VIBRA=m
+CONFIG_INPUT_TWL6040_VIBRA=m
+CONFIG_KEYBOARD_OMAP4=m
 CONFIG_KEYBOARD_TWL4030=m
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_MOUSE_PS2=m
-CONFIG_MOUSE_GPIO=m
-CONFIG_JOYSTICK_AS5011=m
-# CONFIG_TABLET_USB_HANWANG is not set
-CONFIG_TOUCHSCREEN_ADS7846=m
-CONFIG_TOUCHSCREEN_AD7877=m
-CONFIG_TOUCHSCREEN_AD7879=m
-CONFIG_TOUCHSCREEN_AD7879_I2C=m
-# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
-CONFIG_TOUCHSCREEN_CY8CTMG110=m
-CONFIG_TOUCHSCREEN_HAMPSHIRE=m
-CONFIG_TOUCHSCREEN_QT602240=m
 CONFIG_TOUCHSCREEN_TI_TSCADC=m
-CONFIG_TOUCHSCREEN_TPS6507X=m
-# CONFIG_TOUCHSCREEN_TSC2005 is not set
-CONFIG_INPUT_AD714X=m
-CONFIG_INPUT_AD714X_I2C=m
-CONFIG_INPUT_AD714X_SPI=m
-# CONFIG_INPUT_APPLEIR is not set
-CONFIG_INPUT_TWL4030_PWRBUTTON=y
-CONFIG_INPUT_TWL4030_VIBRA=y
-CONFIG_INPUT_TWL6040_VIBRA=y
-CONFIG_KEYBOARD_OMAP4=m
-CONFIG_INPUT_UINPUT=y
-# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
-CONFIG_INPUT_ADXL34X=m
-CONFIG_INPUT_ADXL34X_I2C=m
-CONFIG_INPUT_ADXL34X_SPI=m
-# CONFIG_INPUT_CMA3000_I2C is not set
-# CONFIG_SERIO_AMBAKMI is not set
-# CONFIG_SERIO_RAW is not set
-# CONFIG_SERIO_ALTERA_PS2 is not set
-# CONFIG_GAMEPORT_NS558 is not set
-# CONFIG_GAMEPORT_L4 is not set
-# CONFIG_SERIAL_NONSTANDARD is not set
-# CONFIG_N_GSM is not set
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-# CONFIG_SERIAL_AMBA_PL010 is not set
-# CONFIG_SERIAL_AMBA_PL011 is not set
-# CONFIG_SERIAL_MAX3100 is not set
-# CONFIG_SERIAL_MAX3107 is not set
 CONFIG_SERIAL_OMAP=y
 CONFIG_SERIAL_OMAP_CONSOLE=y
-# CONFIG_SERIAL_IFX6X60 is not set
-# CONFIG_IPMI_HANDLER is not set
-# CONFIG_HW_RANDOM_TIMERIOMEM is not set
-# CONFIG_R3964 is not set
-# CONFIG_RAW_DRIVER is not set
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=y
-# CONFIG_I2C_GPIO is not set
-CONFIG_I2C_OMAP=y
-# CONFIG_I2C_SIMTEC is not set
-CONFIG_I2C_TAOS_EVM=m
-CONFIG_SPI=y
-# CONFIG_SPI_DEBUG is not set
-CONFIG_SPI_MASTER=y
-# SPI Master Controller Drivers
-# CONFIG_SPI_ALTERA is not set
-# CONFIG_SPI_BITBANG is not set
-# CONFIG_SPI_GPIO is not set
-# CONFIG_SPI_OC_TINY is not set
-CONFIG_SPI_OMAP24XX=y
-# CONFIG_SPI_PL022 is not set
-# CONFIG_SPI_PXA2XX_PCI is not set
-# CONFIG_SPI_XILINX is not set
-# CONFIG_SPI_DESIGNWARE is not set
-# SPI Protocol Masters
-CONFIG_SPI_SPIDEV=y
-# CONFIG_SPI_TLE62X0 is not set
-
-#
-# PPS support
-#
-# CONFIG_PPS is not set
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-CONFIG_GPIOLIB=y
-# CONFIG_DEBUG_GPIO is not set
-CONFIG_GPIO_SYSFS=y
-
-#
-# Memory mapped GPIO expanders:
-#
-# CONFIG_GPIO_BASIC_MMIO is not set
-# CONFIG_GPIO_IT8761E is not set
-# CONFIG_GPIO_PL061 is not set
-
-#
-# I2C GPIO expanders:
-#
-# CONFIG_GPIO_MAX7300 is not set
-# CONFIG_GPIO_MAX732X is not set
-# CONFIG_GPIO_PCF857X is not set
-# CONFIG_GPIO_SX150X is not set
-CONFIG_GPIO_TWL4030=y
-# CONFIG_GPIO_ADP5588 is not set
-
-#
-# PCI GPIO expanders:
-#
-
-#
-# SPI GPIO expanders:
-#
-# CONFIG_GPIO_MAX7301 is not set
-# CONFIG_GPIO_MCP23S08 is not set
-# CONFIG_GPIO_MC33880 is not set
-# CONFIG_GPIO_74X164 is not set
-
-#
-# AC97 GPIO expanders:
-#
-
-#
-# MODULbus GPIO expanders:
-#
-# CONFIG_W1 is not set
-# CONFIG_CHARGER_TWL4030 is not set
-# CONFIG_CHARGER_GPIO is not set
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_AD7414 is not set
-# CONFIG_SENSORS_AD7418 is not set
-# CONFIG_SENSORS_ADCXX is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1029 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ADT7411 is not set
-# CONFIG_SENSORS_ADT7462 is not set
-# CONFIG_SENSORS_ADT7470 is not set
-# CONFIG_SENSORS_ADT7475 is not set
-# CONFIG_SENSORS_ASC7621 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS620 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_F71882FG is not set
-# CONFIG_SENSORS_F75375S is not set
-# CONFIG_SENSORS_G760A is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_GPIO_FAN is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM70 is not set
-# CONFIG_SENSORS_LM73 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_LM93 is not set
-# CONFIG_SENSORS_LTC4215 is not set
-# CONFIG_SENSORS_LTC4245 is not set
-# CONFIG_SENSORS_LTC4261 is not set
-# CONFIG_SENSORS_LM95241 is not set
-# CONFIG_SENSORS_MAX1111 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_MAX6650 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_PC87427 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_SHT15 is not set
-# CONFIG_SENSORS_SHT21 is not set
-# CONFIG_SENSORS_DME1737 is not set
-# CONFIG_SENSORS_EMC1403 is not set
-# 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_ADS7871 is not set
-# CONFIG_SENSORS_AMC6821 is not set
-# CONFIG_SENSORS_THMC50 is not set
-# CONFIG_SENSORS_TMP102 is not set
-# CONFIG_SENSORS_TMP401 is not set
-# CONFIG_SENSORS_TMP421 is not set
-# CONFIG_SENSORS_VT1211 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83791D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83793 is not set
-# CONFIG_SENSORS_W83795 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_SENSORS_LIS3_SPI is not set
-# CONFIG_SENSORS_LIS3_I2C is not set
-CONFIG_WATCHDOG_NOWAYOUT=y
-# CONFIG_SOFT_WATCHDOG is not set
-# CONFIG_MPCORE_WATCHDOG is not set
 CONFIG_OMAP_WATCHDOG=y
-# CONFIG_TWL4030_WATCHDOG is not set
-CONFIG_SSB=y
-# CONFIG_SSB_SDIOHOST is not set
-CONFIG_MFD_CORE=y
-# CONFIG_MFD_AAT2870_CORE is not set
-# CONFIG_MFD_88PM860X is not set
-# CONFIG_MFD_SM501 is not set
-# CONFIG_MFD_ASIC3 is not set
-# CONFIG_HTC_EGPIO is not set
-# CONFIG_HTC_I2CPLD is not set
-# CONFIG_TPS65010 is not set
 CONFIG_TWL4030_CORE=y
-# CONFIG_TWL4030_MADC is not set
+CONFIG_TWL4030_MADC=m
 CONFIG_TWL4030_POWER=y
 CONFIG_TWL4030_CODEC=y
-# CONFIG_TWL6030_PWM is not set
-# CONFIG_TWL6040_CORE is not set
-# CONFIG_MFD_STMPE is not set
-# CONFIG_MFD_TC3589X is not set
-# CONFIG_MFD_TC6393XB is not set
-# CONFIG_MFD_TPS65090 is not set/
-# CONFIG_PMIC_DA903X is not set
-# CONFIG_PMIC_ADP5520 is not set
-# CONFIG_MFD_MAX8925 is not set
-# CONFIG_MFD_MAX8997 is not set
-# CONFIG_MFD_MAX8998 is not set
-# CONFIG_MFD_RC5T583 is not set
-# CONFIG_MFD_WM8400 is not set
-# CONFIG_MFD_WM831X_I2C is not set
-# CONFIG_MFD_WM831X_SPI is not set
-# CONFIG_MFD_WM8350_I2C is not set
-# CONFIG_MFD_WM8994 is not set
-# CONFIG_MFD_MC13XXX is not set
-# CONFIG_EZX_PCAP is not set
+CONFIG_GPIO_TWL4030=m
+CONFIG_CHARGER_TWL4030=m
+CONFIG_TWL6030_PWM=m
+
+CONFIG_MTD_ONENAND_OMAP2=y
+CONFIG_I2C_OMAP=y
+CONFIG_SPI_OMAP24XX=y
 CONFIG_MFD_OMAP_USB_HOST=y
-# CONFIG_MFD_TPS6586X is not set
-# CONFIG_MFD_TPS65910 is not set
-# CONFIG_MFD_TPS65912_I2C is not set
-# CONFIG_MFD_TPS65912_SPI is not set
-# CONFIG_MFD_WL1273_CORE is not set
-CONFIG_REGULATOR=y
-# CONFIG_REGULATOR_DEBUG is not set
-# CONFIG_REGULATOR_DUMMY is not set
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
-# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
-# CONFIG_REGULATOR_BQ24022 is not set
-# CONFIG_REGULATOR_MAX1586 is not set
-# CONFIG_REGULATOR_MAX8649 is not set
-# CONFIG_REGULATOR_MAX8660 is not set
-# CONFIG_REGULATOR_MAX8952 is not set
+CONFIG_MFD_WL1273_CORE=m
 CONFIG_REGULATOR_TWL4030=y
-# CONFIG_REGULATOR_LP3971 is not set
-# CONFIG_REGULATOR_LP3972 is not set
-# CONFIG_REGULATOR_TPS62360 is not set
-# CONFIG_REGULATOR_TPS65023 is not set
-# CONFIG_REGULATOR_TPS6507X is not set
-# CONFIG_REGULATOR_ISL6271A is not set
-# CONFIG_REGULATOR_AD5398 is not set
-# CONFIG_REGULATOR_TPS6524X is not set
-CONFIG_VIDEOBUF_DMA_CONTIG=m
-CONFIG_V4L2_MEM2MEM_DEV=m
-# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
-# Encoders/decoders and other helper chips
-#
-
-#
-CONFIG_VIDEO_IR_I2C=m
-CONFIG_VIDEO_CS5345=m
-CONFIG_VIDEO_M52790=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_VP27SMPX=m
-CONFIG_VIDEO_OV7670=m
-CONFIG_VIDEO_SAA717X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-CONFIG_VIDEO_ADP1653=m
-#
-# CONFIG_VIDEO_TVAUDIO is not set
-# CONFIG_VIDEO_TDA7432 is not set
-# CONFIG_VIDEO_TDA9840 is not set
-# CONFIG_VIDEO_TEA6415C is not set
-# CONFIG_VIDEO_TEA6420 is not set
-# CONFIG_VIDEO_TLV320AIC23B is not set
-# CONFIG_VIDEO_SAA6588 is not set
-# CONFIG_VIDEO_ADV7180 is not set
-# CONFIG_VIDEO_BT819 is not set
-# CONFIG_VIDEO_BT856 is not set
-# CONFIG_VIDEO_BT866 is not set
-# CONFIG_VIDEO_KS0127 is not set
-# CONFIG_VIDEO_MT9V011 is not set
-# CONFIG_VIDEO_MT9V032 is not set
-# CONFIG_VIDEO_TCM825X is not set
-# CONFIG_VIDEO_SAA7110 is not set
-# CONFIG_VIDEO_SAA7191 is not set
-# CONFIG_VIDEO_TVP514X is not set
-# CONFIG_VIDEO_TVP5150 is not set
-CONFIG_VIDEO_TVP7002=m
-# CONFIG_VIDEO_VPX3220 is not set
-# CONFIG_VIDEO_SAA7185 is not set
-# CONFIG_VIDEO_ADV7170 is not set
-# CONFIG_VIDEO_ADV7175 is not set
-# CONFIG_VIDEO_THS7303 is not set
-# CONFIG_VIDEO_ADV7343 is not set
-CONFIG_VIDEO_AK881X=m
-# CONFIG_VIDEO_VPFE_CAPTURE is not set
 CONFIG_VIDEO_OMAP2_VOUT=m
-# CONFIG_VIDEO_CPIA2 is not set
-# CONFIG_VIDEO_AU0828 is not set
-# CONFIG_VIDEO_SR030PC30 is not set
 # CONFIG_VIDEO_OMAP3 is not set
-# CONFIG_SOC_CAMERA is not set
-CONFIG_USB_ET61X251=m
-CONFIG_USB_SN9C102=m
-CONFIG_VIDEO_MEM2MEM_TESTDEV=m
-CONFIG_RADIO_TEA5764=m
-CONFIG_RADIO_SAA7706H=m
-CONFIG_RADIO_TEF6862=m
-# CONFIG_TTPCI_EEPROM is not set
-# CONFIG_SMS_SDIO_DRV is not set
-# CONFIG_DVB_DUMMY_FE is not set
+
 CONFIG_DRM=m
 CONFIG_DRM_OMAP=m
-CONFIG_DRM_OMAP_NUM_CRTCS=2
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB_DDC is not set
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_SVGALIB is not set
-# CONFIG_FB_BACKLIGHT is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_ARMCLCD is not set
-# CONFIG_FB_VIRTUAL is not set
-# CONFIG_FB_METRONOME is not set
+CONFIG_DRM_OMAP_NUM_CRTCS=1
 # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
 # CONFIG_FB_OMAP_LCD_VGA is not set
 CONFIG_OMAP2_VRAM=y
@@ -698,7 +196,7 @@ CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
 # CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
 CONFIG_OMAP2_DSS_DPI=y
 # CONFIG_OMAP2_DSS_RFBI is not set
-CONFIG_OMAP2_DSS_VENC=y
+ONFIG_OMAP2_DSS_VENC=y
 CONFIG_OMAP4_DSS_HDMI=y
 # CONFIG_OMAP2_DSS_SDI is not set
 # CONFIG_OMAP2_DSS_DSI is not set
@@ -715,60 +213,10 @@ CONFIG_PANEL_GENERIC_DPI=y
 CONFIG_PANEL_SHARP_LS037V7DW01=y
 CONFIG_PANEL_NEC_NL8048HL11_01B=y
 CONFIG_PANEL_TPO_TD043MTEA1=y
-# CONFIG_LCD_L4F00242T03 is not set
-# CONFIG_LCD_LMS283GF05 is not set
-# CONFIG_LCD_LTV350QV is not set
-# CONFIG_LCD_TDO24M is not set
-# CONFIG_LCD_VGG2432A4 is not set
-# CONFIG_LCD_PLATFORM is not set
-# CONFIG_LCD_S6E63M0 is not set
-# CONFIG_LCD_AMS369FG06 is not set
-CONFIG_BACKLIGHT_GENERIC=m
-# CONFIG_BACKLIGHT_PANDORA is not set
-CONFIG_DISPLAY_SUPPORT=y
-# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
-CONFIG_LOGO_LINUX_MONO=y
-CONFIG_LOGO_LINUX_VGA16=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_TIMER=y
-CONFIG_SND_PCM=y
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_JACK=y
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_HRTIMER=m
-CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-CONFIG_SND_SUPPORT_OLD_API=y
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-CONFIG_SND_RAWMIDI_SEQ=m
-# CONFIG_SND_OPL3_LIB_SEQ is not set
-# CONFIG_SND_OPL4_LIB_SEQ is not set
-# CONFIG_SND_SBAWE_SEQ is not set
-# CONFIG_SND_EMU10K1_SEQ is not set
-# CONFIG_SND_DRIVERS is not set
-# CONFIG_SND_ARM is not set
-# CONFIG_SND_SPI is not set
-CONFIG_SND_USB=y
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_UA101=m
-CONFIG_SND_USB_CAIAQ=m
-CONFIG_SND_USB_CAIAQ_INPUT=y
-CONFIG_SND_SOC=y
-# CONFIG_SND_SOC_CACHE_LZO is not set
+
 CONFIG_SND_OMAP_SOC=y
 CONFIG_SND_OMAP_SOC_MCBSP=y
 CONFIG_SND_OMAP_SOC_MCPDM=y
-CONFIG_SND_OMAP_SOC_RX51=y
 CONFIG_SND_OMAP_SOC_OVERO=y
 CONFIG_SND_OMAP_SOC_OMAP3EVM=y
 CONFIG_SND_OMAP_SOC_AM3517EVM=y
@@ -778,155 +226,43 @@ CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=y
 CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y
 CONFIG_SND_OMAP_SOC_ZOOM2=y
 CONFIG_SND_OMAP_SOC_IGEP0020=y
-CONFIG_SND_OMAP_SOC_OMAP4_HDMI=y
+# Because alsa is modular http://www.spinics.net/lists/linux-omap/msg67307.html
+# CONFIG_SND_OMAP_SOC_OMAP4_HDMI is not set
+CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
 CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_OMAP_SOC_RX51 is not set
 # CONFIG_SND_SOC_ALL_CODECS is not set
 CONFIG_SND_SOC_TLV320AIC23=y
 CONFIG_SND_SOC_TLV320AIC3X=y
 CONFIG_SND_SOC_TWL4030=y
 CONFIG_SND_SOC_TWL6040=y
-# CONFIG_SOUND_PRIME is not set
-# CONFIG_HID_TIVO_SLIDE is not set
-# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
-# CONFIG_USB_DEVICEFS is not set
+CONFIG_RADIO_WL128X
+
 CONFIG_USB_OTG=y
-# CONFIG_USB_OTG_WHITELIST is not set
-# CONFIG_USB_OTG_BLACKLIST_HUB is not set
-# CONFIG_USB_WUSB is not set
-# CONFIG_USB_WUSB_CBAF is not set
-# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 CONFIG_USB_EHCI_HCD_OMAP=y
-# CONFIG_USB_ISP1362_HCD is not set
-# CONFIG_USB_OHCI_HCD is not set
-# CONFIG_USB_U132_HCD is not set
-# CONFIG_USB_SL811_HCD is not set
-# CONFIG_USB_HWA_HCD is not set
-# CONFIG_USB_MUSB_TUSB6010 is not set
 CONFIG_USB_MUSB_OMAP2PLUS=y
-# CONFIG_USB_MUSB_AM35X is not set
-# CONFIG_USB_MUSB_HOST is not set
-# CONFIG_USB_MUSB_PERIPHERAL is not set
-CONFIG_USB_MUSB_OTG=y
-CONFIG_USB_GADGET_MUSB_HDRC=y
-CONFIG_USB_INVENTRA_DMA=y
-CONFIG_USB_STORAGE=y
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=m
-CONFIG_USB_STORAGE_FREECOM=m
-CONFIG_USB_STORAGE_ISD200=m
-CONFIG_USB_STORAGE_USBAT=m
-CONFIG_USB_STORAGE_SDDR09=m
-CONFIG_USB_STORAGE_SDDR55=m
-CONFIG_USB_STORAGE_JUMPSHOT=m
-CONFIG_USB_STORAGE_ALAUDA=m
-CONFIG_USB_STORAGE_ONETOUCH=m
-CONFIG_USB_STORAGE_KARMA=m
-CONFIG_USB_STORAGE_CYPRESS_ATACB=m
-# CONFIG_USB_UAS is not set
-# CONFIG_USB_LIBUSUAL is not set
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-# CONFIG_USB_SERIAL_SAFE_PADDED is not set
-# CONFIG_USB_SERIAL_SAMBA is not set
-CONFIG_USB_SERIAL_ZIO=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_CYPRESS_CY7C63=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_TEST=m
-CONFIG_USB_GADGET=y
-# CONFIG_USB_GADGET_DEBUG is not set
-# CONFIG_USB_GADGET_DEBUG_FILES is not set
-CONFIG_USB_GADGET_DEBUG_FS=y
-CONFIG_USB_GADGET_VBUS_DRAW=2
-CONFIG_USB_GADGET_SELECTED=y
+CONFIG_USB_MUSB_HDRC=y
+# CONFIG_MUSB_PIO_ONLY is not set
+# CONFIG_USB_MUSB_DEBUG is not set
+#
+
 # CONFIG_USB_GADGET_OMAP is not set
-# CONFIG_USB_GADGET_R8A66597 is not set
-# CONFIG_USB_GADGET_PXA_U2O is not set
-# CONFIG_USB_GADGET_M66592 is not set
-# CONFIG_USB_GADGET_DUMMY_HCD is not set
-CONFIG_USB_GADGET_DUALSPEED=y
-# CONFIG_USB_ZERO is not set
-# CONFIG_USB_AUDIO is not set
-CONFIG_USB_ETH=y
-CONFIG_USB_ETH_RNDIS=y
-CONFIG_USB_ETH_EEM=y
-# CONFIG_USB_G_NCM is not set
-# CONFIG_USB_GADGETFS is not set
-# CONFIG_USB_FUNCTIONFS is not set
-# CONFIG_USB_FILE_STORAGE is not set
-# CONFIG_USB_MASS_STORAGE is not set
-# CONFIG_USB_G_SERIAL is not set
-# CONFIG_USB_MIDI_GADGET is not set
-# CONFIG_USB_G_PRINTER is not set
-# CONFIG_USB_CDC_COMPOSITE is not set
-# CONFIG_USB_G_NOKIA is not set
-# CONFIG_USB_G_MULTI is not set
-# CONFIG_USB_G_HID is not set
-# CONFIG_USB_G_DBGP is not set
-# CONFIG_USB_G_WEBCAM is not set
-CONFIG_USB_GPIO_VBUS=y
 # CONFIG_ISP1301_OMAP is not set
-CONFIG_TWL4030_USB=y
-CONFIG_TWL6030_USB=y
-CONFIG_NOP_USB_XCEIV=y
+
+# This block is temporary until we work out why the MMC modules don't work as modules
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_SDHCI=y
-CONFIG_MMC_OMAP=m
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF=y
+CONFIG_MMC_SPI=y
+
+CONFIG_MMC_OMAP=y
 CONFIG_MMC_OMAP_HS=y
-CONFIG_MMC_SPI=m
-# CONFIG_MMC_DW is not set
-# CONFIG_MMC_USHC is not set
-# CONFIG_MEMSTICK is not set
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_GPIO_PLATFORM=y
-CONFIG_LEDS_GPIO_OF=y
-# CONFIG_LEDS_LP3944 is not set
-# CONFIG_LEDS_LP5521 is not set
-# CONFIG_LEDS_LP5523 is not set
-# CONFIG_LEDS_DAC124S085 is not set
-# CONFIG_LEDS_REGULATOR is not set
-# CONFIG_LEDS_LT3593 is not set
-CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-# CONFIG_LEDS_TRIGGER_GPIO is not set
-# CONFIG_NFC_DEVICES is not set
-# CONFIG_ACCESSIBILITY is not set
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_TWL4030=m
-CONFIG_RTC_DRV_S35390A=m
-CONFIG_RTC_DRV_M41T94=m
-CONFIG_RTC_DRV_DS1305=m
-CONFIG_RTC_DRV_DS1390=m
-CONFIG_RTC_DRV_MAX6902=m
-CONFIG_RTC_DRV_R9701=m
-CONFIG_RTC_DRV_RS5C348=m
-CONFIG_RTC_DRV_DS3234=m
-CONFIG_RTC_DRV_PCF2123=m
-CONFIG_RTC_DRV_CMOS=m
-CONFIG_RTC_DRV_M48T86=m
-# CONFIG_RTC_DRV_PL030 is not set
-# CONFIG_RTC_DRV_PL031 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_VICAM is not set
-CONFIG_PRISM2_USB=m
-CONFIG_BRCM80211=y
-CONFIG_BRCMFMAC=y
-CONFIG_RT2870=m
-CONFIG_R8712U=m
-CONFIG_R8712_AP=y
-CONFIG_ZRAM=m
-# CONFIG_ZRAM_DEBUG is not set
-# CONFIG_LIRC_STAGING is not set
+CONFIG_TWL4030_USB=y
+CONFIG_TWL6030_USB=y
+CONFIG_RTC_DRV_TWL4030=y
+
 CONFIG_TIDSPBRIDGE=m
 CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE=0x600000
 # CONFIG_TIDSPBRIDGE_DEBUG is not set
@@ -936,173 +272,81 @@ CONFIG_TIDSPBRIDGE_WDT3=y
 CONFIG_TIDSPBRIDGE_WDT_TIMEOUT=5
 # CONFIG_TIDSPBRIDGE_NTFY_PWRERR is not set
 # CONFIG_TIDSPBRIDGE_BACKTRACE is not set
-# CONFIG_WESTBRIDGE is not set
-CONFIG_WESTBRIDGE_HAL_SELECTED=y
-CONFIG_MACH_OMAP3_WESTBRIDGE_AST_PNAND_HAL=y
-# CONFIG_MACH_NO_WESTBRIDGE is not set
-# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_XFS_RT=y
-CONFIG_OCFS2_FS_STATS=y
-CONFIG_OCFS2_DEBUG_MASKLOG=y
-# CONFIG_BTRFS_FS is not set
-CONFIG_PRINT_QUOTA_WARNING=y
-CONFIG_QUOTA_TREE=m
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-# CONFIG_JFFS2_SUMMARY is not set
-# CONFIG_JFFS2_FS_XATTR is not set
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_LZO=y
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-# CONFIG_JFFS2_CMODE_NONE is not set
-# CONFIG_JFFS2_CMODE_PRIORITY is not set
-# CONFIG_JFFS2_CMODE_SIZE is not set
-CONFIG_JFFS2_CMODE_FAVOURLZO=y
-# CONFIG_LOGFS is not set
-CONFIG_NFS_FS=m
-# CONFIG_NFS_V4_1 is not set
-CONFIG_ROOT_NFS=y
-CONFIG_NFSD_DEPRECATED=y
-CONFIG_LOCKD=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_CIFS_STATS is not set
-# CONFIG_CIFS_FSCACHE is not set
-# CONFIG_CIFS_ACL is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_9P_FSCACHE is not set
-# CONFIG_9P_FS_POSIX_ACL is not set
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_DLM_DEBUG is not set
-CONFIG_ENABLE_WARN_DEPRECATED=y
-# CONFIG_STRIP_ASM_SYMS is not set
-# CONFIG_HEADERS_CHECK is not set
-# CONFIG_DEBUG_SHIRQ is not set
-# CONFIG_LOCKUP_DETECTOR is not set
-CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
-# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
-CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
-CONFIG_DEBUG_PREEMPT=y
-# CONFIG_BKL is not set
-# CONFIG_SPARSE_RCU_POINTER is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_BOOT_PRINTK_DELAY is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
-CONFIG_RCU_CPU_STALL_TIMEOUT=60
-CONFIG_RCU_CPU_STALL_VERBOSE=y
-# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
-CONFIG_SYSCTL_SYSCALL_CHECK=y
-# CONFIG_FUNCTION_TRACER is not set
-# CONFIG_PREEMPT_TRACER is not set
-# CONFIG_STACK_TRACER is not set
-# CONFIG_RING_BUFFER_BENCHMARK is not set
-# CONFIG_DYNAMIC_DEBUG is not set
-# CONFIG_ATOMIC64_SELFTEST is not set
-# CONFIG_KGDB_TESTS is not set
-# CONFIG_TEST_KSTRTOX is not set
-# CONFIG_STRICT_DEVMEM is not set
-CONFIG_DEBUG_USER=y
-CONFIG_DEBUG_ERRORS=y
-CONFIG_DEBUG_LL=y
-CONFIG_EARLY_PRINTK=y
-# CONFIG_DEBUG_ICEDCC is not set
-CONFIG_OC_ETM=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_IMA is not set
-CONFIG_CRYPTO_AEAD=m
-CONFIG_CRYPTO_RNG=m
-# CONFIG_CRYPTO_PCRYPT is not set
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_SEQIV=m
-CONFIG_CRYPTO_CTR=m
-# CONFIG_CRYPTO_VMAC is not set
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_AES=m
-# CONFIG_CRYPTO_CAST6 is not set
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_USER_API=m
-CONFIG_CRYPTO_USER_API_HASH=m
-CONFIG_CRYPTO_USER_API_SKCIPHER=m
+
 CONFIG_CRYPTO_DEV_OMAP_SHAM=m
 CONFIG_CRYPTO_DEV_OMAP_AES=m
-CONFIG_LIBCRC32C=y
-# CONFIG_RFKILL_REGULATOR is not set
-# CONFIG_RFKILL_GPIO is not set
-# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set
-# CONFIG_LCD_LD9040 is not set
-# CONFIG_RTC_DRV_M41T93 is not set
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_OPROFILE is not set
-# CONFIG_OPROFILE is not set
-# CONFIG_PATA_ARASAN_CF is not set
-# CONFIG_BT_ATH3K is not set
-# CONFIG_BT_WILINK is not set
-# CONFIG_USB_HSO is not set
-
-CONFIG_GPIO_GENERIC_PLATFORM=y
-
-CONFIG_MACH_OMAP_GENERIC=y
-CONFIG_PL310_ERRATA_753970=y
-CONFIG_ARM_CPU_TOPOLOGY=y
-CONFIG_SCHED_MC=y
-CONFIG_SCHED_SMT=y
-CONFIG_ETHERNET=y
-CONFIG_NET_VENDOR_BROADCOM=y
-CONFIG_NET_VENDOR_MICROCHIP=y
-CONFIG_SENSORS_AD7314=m
-CONFIG_REGULATOR_GPIO=y
-CONFIG_VIDEO_MT9P031=m
-CONFIG_VIDEO_MT9T001=m
-CONFIG_VIDEO_S5K6AA=m
-CONFIG_PANEL_DVI=m
-CONFIG_PANEL_PICODLP=m
-CONFIG_USB_RENESAS_USBHS=m
-CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
-CONFIG_LEDS_RENESAS_TPU=y
-# CONFIG_OMAP_IOMMU is not set
-CONFIG_USB_RENESAS_USBHS_HCD=m
 
+# CONFIG_SOC_OMAP5 is not set
+# CONFIG_MACH_TOUCHBOOK is not set
 # CONFIG_ARM_LPAE is not set
+# CONFIG_PL310_ERRATA_753970 is not set
+# CONFIG_HW_PERF_EVENTS is not set
+# CONFIG_RFKILL_REGULATOR is not set
+# CONFIG_NFC_WILINK is not set
+# CONFIG_MTD_NAND_OMAP_BCH is not set
+# CONFIG_MG_DISK is not set
+# CONFIG_TI_DAVINCI_EMAC is not set
+# CONFIG_TI_DAVINCI_MDIO is not set
+# CONFIG_TI_DAVINCI_CPDMA is not set
+# CONFIG_TI_CPSW is not set
+# CONFIG_MDIO_BUS_MUX_GPIO is not set
+# CONFIG_WL18XX is not set
 # CONFIG_INPUT_GP2A is not set
 # CONFIG_INPUT_GPIO_TILT_POLLED is not set
-# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set
-# CONFIG_MICREL_KS8995MA is not set
+# CONFIG_INPUT_PWM_BEEPER is not set
+# CONFIG_SERIAL_AMBA_PL010 is not set
+# CONFIG_GPIO_EM is not set
+# CONFIG_GPIO_PL061 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_HDQ_MASTER_OMAP is not set
 # CONFIG_CHARGER_MANAGER is not set
-# CONFIG_MFD_DA9052_SPI is not set
+# CONFIG_SENSORS_TWL4030_MADC is not set
+# CONFIG_MPCORE_WATCHDOG is not set
+# CONFIG_TWL4030_WATCHDOG is not set
+# CONFIG_MFD_88PM800 is not set
+# CONFIG_MFD_88PM805 is not set
+# CONFIG_MFD_TPS65910 is not set
+# CONFIG_MFD_TPS65912_I2C is not set
+# CONFIG_TWL6040_CORE is not set
+# CONFIG_PMIC_DA903X is not set
 # CONFIG_MFD_DA9052_I2C is not set
-# CONFIG_MFD_S5M_CORE is not set
-# CONFIG_VIDEO_AS3645A is not set
-#
-# CONFIG_TI_CPSW is not set
-# CONFIG_SOC_TI81XX is not set
-# CONFIG_SOC_AM33XX is not set
-# CONFIG_MTD_NAND_OMAP_BCH is not set
-# CONFIG_BMP085_SPI is not set
-# CONFIG_MDIO_BUS_MUX_GPIO is not set
-# CONFIG_GPIO_EM is not set
+# CONFIG_PMIC_ADP5520 is not set 
+# CONFIG_MFD_MAX77686 is not set 
 # CONFIG_MFD_MAX77693 is not set
-# CONFIG_MFD_MC13XXX_SPI is not set
+# CONFIG_MFD_MAX8997 is not set
+# CONFIG_MFD_SEC_CORE is not set
+# CONFIG_MFD_TPS65090 is not set
+# CONFIG_MFD_AAT2870_CORE is not set
+# CONFIG_MFD_RC5T583 is not set
 # CONFIG_MFD_PALMAS is not set
-# CONFIG_VIDEO_SMIAPP is not set
+# CONFIG_REGULATOR_DUMMY is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_GPIO is not set
+# CONFIG_REGULATOR_AD5398 is not set
+# CONFIG_REGULATOR_ISL6271A is not set
+# CONFIG_REGULATOR_MAX1586 is not set
+# CONFIG_REGULATOR_MAX8649 is not set
+# CONFIG_REGULATOR_MAX8660 is not set
+# CONFIG_REGULATOR_MAX8952 is not set
+# CONFIG_REGULATOR_LP3971 is not set
+# CONFIG_REGULATOR_LP3972 is not set
+# CONFIG_REGULATOR_LP872X is not set
+# CONFIG_REGULATOR_TPS62360 is not set
+# CONFIG_REGULATOR_TPS65023 is not set
+# CONFIG_REGULATOR_TPS6507X is not set
+# CONFIG_OMAP2_DSS_VENC is not set
 # CONFIG_PANEL_TFP410 is not set
+# CONFIG_PANEL_PICODLP is not set
+# CONFIG_BACKLIGHT_PANDORA is not set
 # CONFIG_SND_OMAP_SOC_OMAP_HDMI is not set
-# CONFIG_USB_FUSB300 is not set
-# CONFIG_USB_OMAP is not set
-# CONFIG_USB_R8A66597 is not set
-# CONFIG_USB_RENESAS_USBHS_UDC is not set
-# CONFIG_USB_MV_UDC is not set
-# CONFIG_USB_M66592 is not set
-# CONFIG_USB_NET2272 is not set
-# CONFIG_USB_DUMMY_HCD is not set
-#
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_OHCI_HCD_OMAP3 is not set
+# CONFIG_LEDS_PWM is not set
+# CONFIG_LEDS_RENESAS_TPU is not set
+# CONFIG_OMAP_BANDGAP is not set
+# CONFIG_OMAP_IOVMM is not set
+# CONFIG_OMAP_REMOTEPROC is not set
+# CONFIG_PID_IN_CONTEXTIDR is not set
+
diff --git a/config-arm-tegra b/config-arm-tegra
index 818008f..5efa63f 100644
--- a/config-arm-tegra
+++ b/config-arm-tegra
@@ -5,7 +5,10 @@ CONFIG_ARCH_TEGRA_2x_SOC=y
 # CONFIG_ARM_LPAE is not set
 CONFIG_TEGRA_PCI=y
 
-CONFIG_MACH_HARMONY=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+
+# CONFIG_MACH_HARMONY is not set
 CONFIG_MACH_KAEN=y
 CONFIG_MACH_PAZ00=y
 CONFIG_MACH_SEABOARD=y
@@ -16,21 +19,29 @@ CONFIG_MACH_TEGRA_DT=y
 CONFIG_MACH_VENTANA=y
 
 CONFIG_TEGRA_DEBUG_UARTD=y
-CONFIG_NO_HZ=y
-CONFIG_PREEMPT=y
-CONFIG_AEABI=y
+CONFIG_NR_CPUS=4
+CONFIG_ARM_CPU_TOPOLOGY=y
+
+CONFIG_TEGRA_IOMMU_GART=y
+CONFIG_TEGRA_IOMMU_SMMU=y
 
 CONFIG_I2C_TEGRA=y
 
+# This block is temporary until we work out why the MMC modules don't work as modules
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF=y
+CONFIG_MMC_SPI=y
+
 CONFIG_MMC_SDHCI_TEGRA=y
 
 # CONFIG_RCU_BOOST is not set
 CONFIG_TEGRA_SYSTEM_DMA=y
 CONFIG_TEGRA_EMC_SCALING_ENABLE=y
+CONFIG_TEGRA_AHB=y
+CONFIG_TEGRA20_APB_DMA=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_SWP_EMULATE=y
 # CONFIG_CPU_BPREDICT_DISABLE is not set
@@ -50,11 +61,9 @@ CONFIG_ARM_ERRATA_720789=y
 # CONFIG_ARM_ERRATA_754322 is not set
 # CONFIG_ARM_ERRATA_754327 is not set
 # CONFIG_ARM_ERRATA_764369 is not set
-CONFIG_SMP_ON_UP=y
 CONFIG_LOCAL_TIMERS=y
 # CONFIG_THUMB2_KERNEL is not set
 # CONFIG_NEON is not set
-# CONFIG_RFKILL_GPIO is not set
 CONFIG_GPIO_GENERIC_PLATFORM=y
 # CONFIG_GPIO_MCP23S08 is not set
 # CONFIG_KEYBOARD_TEGRA is not set
@@ -64,14 +73,13 @@ CONFIG_RTC_DRV_TEGRA=y
 
 CONFIG_SND_SOC_TEGRA=m
 CONFIG_SND_SOC_TEGRA_ALC5632=m
+CONFIG_SND_SOC_TEGRA_WM8753=m
 CONFIG_SND_SOC_TEGRA_WM8903=m
 CONFIG_SND_SOC_TEGRA_TRIMSLICE=m
+# CONFIG_SND_SOC_TEGRA30_AHUB is not set
+# CONFIG_SND_SOC_TEGRA30_I2S is not set
 
 CONFIG_MFD_NVEC=y
-# CONFIG_DEBUG_PREEMPT is not set
-# CONFIG_RCU_CPU_STALL_VERBOSE is not set
-# CONFIG_PREEMPT_TRACER is not set
-# CONFIG_DEBUG_PINCTRL is not set
 CONFIG_KEYBOARD_NVEC=y
 CONFIG_SERIO_NVEC_PS2=y
 CONFIG_NVEC_POWER=y
@@ -79,28 +87,26 @@ CONFIG_POWER_SUPPLY=y
 CONFIG_NVEC_LEDS=y
 
 CONFIG_CPU_PM=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM_CPU_SUSPEND=y
 
 CONFIG_CRYPTO_DEV_TEGRA_AES=m
 
 CONFIG_PL310_ERRATA_753970=y
-CONFIG_SCHED_MC=y
-CONFIG_SCHED_SMT=y
 CONFIG_LEDS_RENESAS_TPU=y
 
+CONFIG_OF=y
+CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_OF_GPIO=y
 CONFIG_OF_PCI=y
 CONFIG_OF_PCI_IRQ=y
-CONFIG_OF=y
-CONFIG_SERIAL_OF_PLATFORM=y
 
-CONFIG_TEGRA_IOMMU_GART=y
-CONFIG_TEGRA_IOMMU_SMMU=y
-
-# CONFIG_TEGRA_AHB is not set
-# CONFIG_TCM_QLA2XXX is not set
+# CONFIG_HW_PERF_EVENTS is not set
+# CONFIG_MG_DISK is not set
 # CONFIG_MDIO_BUS_MUX_GPIO is not set
+# CONFIG_INPUT_GP2A is not set
+# CONFIG_INPUT_GPIO_TILT_POLLED is not set
+# CONFIG_DEBUG_PINCTRL is not set
+# CONFIG_PINCTRL_SINGLE is not set
 # CONFIG_GPIO_EM is not set
-# CONFIG_SND_SOC_TEGRA_WM8753 is not set
+# CONFIG_PID_IN_CONTEXTIDR is not set
 
diff --git a/config-debug b/config-debug
index 03964c6..db0aa6d 100644
--- a/config-debug
+++ b/config-debug
@@ -72,6 +72,8 @@ CONFIG_DEBUG_PERF_USE_VMALLOC=y
 
 CONFIG_JBD2_DEBUG=y
 
+CONFIG_NFSD_FAULT_INJECTION=y
+
 CONFIG_DEBUG_BLK_CGROUP=y
 
 CONFIG_DRBD_FAULT_INJECTION=y
@@ -109,3 +111,4 @@ CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024
 # CONFIG_DEBUG_KMEMLEAK_TEST is not set
 CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
 
+CONFIG_MAC80211_MESSAGE_TRACING=y
diff --git a/config-generic b/config-generic
index 36c8169..34cbf5e 100644
--- a/config-generic
+++ b/config-generic
@@ -52,7 +52,6 @@ CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
 CONFIG_CFQ_GROUP_IOSCHED=y
 CONFIG_DEFAULT_CFQ=y
-CONFIG_USER_NS=y
 CONFIG_PID_NS=y
 CONFIG_UTS_NS=y
 CONFIG_IPC_NS=y
@@ -66,12 +65,9 @@ CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_SLUB=y
 # CONFIG_SLUB_STATS is not set
 
-CONFIG_MISC_DEVICES=y
 # CONFIG_AD525X_DPOT is not set
 # CONFIG_ATMEL_PWM is not set
-CONFIG_IWMC3200TOP=m
-# CONFIG_IWMC3200TOP_DEBUG is not set
-CONFIG_IWMC3200TOP_DEBUGFS=y
+# CONFIG_IWMC3200TOP is not set
 
 #
 # Loadable module support
@@ -102,7 +98,6 @@ CONFIG_HOTPLUG_PCI_PCIE=y
 CONFIG_HOTPLUG_PCI_FAKE=m
 
 # CONFIG_ISA is not set
-# CONFIG_MCA is not set
 # CONFIG_SCx200 is not set
 
 #
@@ -194,7 +189,12 @@ CONFIG_EXTRA_FIRMWARE=""
 #
 # Memory Technology Devices (MTD)
 #
-# CONFIG_MTD is not set
+CONFIG_MTD=m
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_CHAR is not set
+CONFIG_MTD_BLKDEVS=m
+CONFIG_MTD_BLOCK=m
+# CONFIG_MTD_BLOCK_RO is not set
 # CONFIG_MTD_REDBOOT_PARTS is not set
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
@@ -217,7 +217,21 @@ CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_MTD_NAND_MUSEUM_IDS is not set
 # CONFIG_MTD_NAND_DISKONCHIP is not set
 # CONFIG_MTD_LPDDR is not set
-# CONFIG_MTD_UBI is not set
+# CONFIG_SM_FTL is not set
+# CONFIG_MTD_TS5500 is not set
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_AR7_PARTS is not set
+# CONFIG_MTD_SLRAM is not set
+CONFIG_MTD_PHRAM=m
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+# 
+CONFIG_MTD_UBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=2
+CONFIG_MTD_UBI_GLUEBI=m
 
 
 #
@@ -243,8 +257,6 @@ CONFIG_BLK_DEV=y
 CONFIG_BLK_DEV_FD=m
 # CONFIG_PARIDE is not set
 
-# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
-
 CONFIG_BLK_CPQ_DA=m
 CONFIG_BLK_CPQ_CISS_DA=m
 CONFIG_CISS_SCSI_TAPE=y
@@ -255,20 +267,14 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_NVME is not set
+CONFIG_BLK_DEV_NVME=m
 CONFIG_BLK_DEV_OSD=m
 CONFIG_BLK_DEV_RAM=m
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=16384
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_LBD=y
 CONFIG_BLK_DEV_IO_TRACE=y
 
-CONFIG_BLK_DEV_DELKIN=m
-# CONFIG_BLK_DEV_IT8213 is not set
-# CONFIG_BLK_DEV_TC86C001 is not set
-CONFIG_LBDAF=y
 CONFIG_BLK_DEV_BSG=y
 CONFIG_BLK_DEV_BSGLIB=y
 CONFIG_BLK_DEV_INTEGRITY=y
@@ -280,52 +286,6 @@ CONFIG_BLK_DEV_THROTTLING=y
 #
 # CONFIG_IDE is not set
 
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_IDE_TASK_IOCTL=y
-# CONFIG_BLK_DEV_IDE_SATA is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPCI=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_BLK_DEV_AMD74XX is not set
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_CS5535=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_IT821X=y
-CONFIG_BLK_DEV_JMICRON=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_BLK_DEV_HD is not set
 
 CONFIG_SCSI_VIRTIO=m
@@ -339,6 +299,7 @@ CONFIG_VMXNET3=m
 CONFIG_HW_RANDOM_VIRTIO=m
 CONFIG_VIRTIO_CONSOLE=y
 CONFIG_VHOST_NET=m
+# CONFIG_TCM_VHOST is not set
 
 #
 # SCSI device support
@@ -688,6 +649,7 @@ CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
 CONFIG_ARPD=y
 CONFIG_SYN_COOKIES=y
+CONFIG_NET_IPVTI=m
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
@@ -760,7 +722,7 @@ CONFIG_BRIDGE=m
 CONFIG_BRIDGE_IGMP_SNOOPING=y
 
 # PHY timestamping adds overhead
-# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
+CONFIG_NETWORK_PHY_TIMESTAMPING=y
 
 CONFIG_NETFILTER=y
 CONFIG_NETFILTER_ADVANCED=y
@@ -768,6 +730,7 @@ CONFIG_NF_CONNTRACK=m
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_ACCT=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_QUEUE_CT=y
 CONFIG_NETFILTER_NETLINK_LOG=m
 CONFIG_NETFILTER_TPROXY=m
 CONFIG_NETFILTER_XTABLES=y
@@ -873,6 +836,7 @@ CONFIG_NF_CT_PROTO_DCCP=m
 CONFIG_NF_CT_PROTO_SCTP=m
 CONFIG_NF_CT_NETLINK=m
 # CONFIG_NF_CT_NETLINK_TIMEOUT is not set
+CONFIG_NF_CT_NETLINK_HELPER=m
 CONFIG_NF_CT_PROTO_UDPLITE=m
 
 CONFIG_IP_NF_MATCH_AH=m
@@ -1061,6 +1025,7 @@ CONFIG_NET_EMATCH_META=m
 CONFIG_NET_EMATCH_NBYTE=m
 CONFIG_NET_EMATCH_STACK=32
 CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_EMATCH_IPSET=m
 CONFIG_NET_EMATCH_U32=m
 
 CONFIG_NET_ACT_CSUM=m
@@ -1075,6 +1040,10 @@ CONFIG_NET_ACT_SIMP=m
 CONFIG_NET_ACT_SKBEDIT=m
 
 CONFIG_DCB=y
+CONFIG_DNS_RESOLVER=m
+CONFIG_BATMAN_ADV=m
+CONFIG_BATMAN_ADV_BLA=y
+# CONFIG_BATMAN_ADV_DEBUG is not set
 CONFIG_OPENVSWITCH=m
 CONFIG_NETPRIO_CGROUP=m
 
@@ -1098,6 +1067,7 @@ CONFIG_NET_TEAM=m
 CONFIG_NET_TEAM_MODE_ROUNDROBIN=m
 CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
 CONFIG_NET_TEAM_MODE_LOADBALANCE=m
+CONFIG_NET_TEAM_MODE_BROADCAST=m
 CONFIG_DUMMY=m
 CONFIG_BONDING=m
 CONFIG_MACVLAN=m
@@ -1249,6 +1219,7 @@ CONFIG_IXGBE_DCB=y
 CONFIG_IXGBE_HWMON=y
 CONFIG_IXGBE_PTP=y
 
+
 # CONFIG_NET_VENDOR_I825XX is not set
 CONFIG_NET_VENDOR_MARVELL=y
 CONFIG_SKGE=m
@@ -1349,15 +1320,16 @@ CONFIG_VIA_VELOCITY=m
 CONFIG_NET_VENDOR_WIZNET=y
 CONFIG_WIZNET_W5100=m
 CONFIG_WIZNET_W5300=m
-
 CONFIG_NET_VENDOR_XIRCOM=y
 CONFIG_PCMCIA_XIRC2PS=m
 
 CONFIG_PHYLIB=y
 CONFIG_AMD_PHY=m
 CONFIG_BROADCOM_PHY=m
+CONFIG_BCM87XX_PHY=m
 CONFIG_CICADA_PHY=m
 CONFIG_DAVICOM_PHY=m
+CONFIG_DP83640_PHY=m
 CONFIG_FIXED_PHY=y
 CONFIG_MDIO_BITBANG=m
 CONFIG_NATIONAL_PHY=m
@@ -1448,7 +1420,7 @@ CONFIG_CFG80211_DEFAULT_PS=y
 CONFIG_NL80211=y
 # CONFIG_NL80211_TESTMODE is not set
 CONFIG_WIRELESS_EXT=y
-CONFIG_WIRELESS_EXT_SYSFS=y
+# CONFIG_WIRELESS_EXT_SYSFS is not set
 CONFIG_LIB80211=m
 CONFIG_LIB80211_CRYPT_WEP=m
 CONFIG_LIB80211_CRYPT_CCMP=m
@@ -1470,9 +1442,9 @@ CONFIG_WIMAX_DEBUG_LEVEL=8
 CONFIG_WIMAX_I2400M_USB=m
 CONFIG_WIMAX_I2400M_SDIO=m
 CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8
-CONFIG_WIMAX_IWMC3200_SDIO=y
+# CONFIG_WIMAX_IWMC3200_SDIO is not set
 
-CONFIG_ADM8211=m
+# CONFIG_ADM8211 is not set
 CONFIG_ATH_COMMON=m
 CONFIG_ATH5K=m
 CONFIG_ATH5K_DEBUG=y
@@ -1495,9 +1467,9 @@ CONFIG_CARL9170=m
 CONFIG_CARL9170_LEDS=y
 # CONFIG_CARL9170_HWRNG is not set
 CONFIG_AT76C50X_USB=m
-CONFIG_AIRO=m
-CONFIG_AIRO_CS=m
-CONFIG_ATMEL=m
+# CONFIG_AIRO is not set
+# CONFIG_AIRO_CS is not set
+# CONFIG_ATMEL is not set
 CONFIG_B43=m
 CONFIG_B43_PCMCIA=y
 CONFIG_B43_SDIO=y
@@ -1522,20 +1494,8 @@ CONFIG_BRCMFMAC_SDIO=y
 CONFIG_BRCMFMAC_SDIO_OOB=y
 CONFIG_BRCMFMAC_USB=y
 # CONFIG_BRCMDBG is not set
-CONFIG_HERMES=m
-CONFIG_HERMES_CACHE_FW_ON_INIT=y
-# CONFIG_HERMES_PRISM is not set
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_PCMCIA_HERMES=m
-CONFIG_ORINOCO_USB=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_CS=m
+# CONFIG_HERMES is not set
+# CONFIG_HOSTAP is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2200 is not set
 # CONFIG_IPW2100_DEBUG is not set
@@ -1546,15 +1506,14 @@ CONFIG_LIBERTAS_USB=m
 CONFIG_LIBERTAS_CS=m
 CONFIG_LIBERTAS_SDIO=m
 # CONFIG_LIBERTAS_DEBUG is not set
-CONFIG_LIBERTAS_THINFIRM=m
-CONFIG_LIBERTAS_THINFIRM_USB=m
-# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set
+# CONFIG_LIBERTAS_THINFIRM is not set
 CONFIG_LIBERTAS_MESH=y
 CONFIG_IWLWIFI=m
 CONFIG_IWLWIFI_DEBUG=y
 CONFIG_IWLWIFI_DEBUGFS=y
 CONFIG_IWLWIFI_DEVICE_SVTOOL=y
 # CONFIG_IWLWIFI_EXPERIMENTAL_MFP is not set
+CONFIG_IWLWIFI_UCODE16=y
 # CONFIG_IWLWIFI_P2P is not set
 CONFIG_IWLEGACY=m
 CONFIG_IWLEGACY_DEBUG=y
@@ -1562,20 +1521,15 @@ CONFIG_IWLEGACY_DEBUGFS=y
 # CONFIG_IWLWIFI_LEGACY_DEVICE_TRACING is not set
 CONFIG_IWL4965=y
 CONFIG_IWL3945=m
+# CONFIG_IWM is not set
 # CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE is not set
-CONFIG_IWM=m
-# CONFIG_IWM_DEBUG is not set
-# CONFIG_IWM_TRACING is not set
 CONFIG_MAC80211_HWSIM=m
 CONFIG_P54_COMMON=m
 CONFIG_P54_USB=m
 CONFIG_P54_PCI=m
-CONFIG_PCI_ATMEL=m
 CONFIG_MWL8K=m
 # CONFIG_PRISM54 is not set
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
+# CONFIG_PCMCIA_WL3501 is not set
 CONFIG_RT2X00=m
 CONFIG_RT2X00_LIB_DEBUGFS=y
 # CONFIG_RT2X00_DEBUG is not set
@@ -1589,6 +1543,7 @@ CONFIG_RT2800USB_RT35XX=y
 CONFIG_RT2800USB_RT53XX=y
 CONFIG_RT2800USB_UNKNOWN=y
 CONFIG_RT2800PCI=m
+CONFIG_RT2800PCI_RT3290=y
 CONFIG_RT2800PCI_RT33XX=y
 CONFIG_RT2800PCI_RT35XX=y
 CONFIG_RT2800PCI_RT53XX=y
@@ -1596,8 +1551,7 @@ CONFIG_RT73USB=m
 CONFIG_RTL8180=m
 CONFIG_RTL8187=m
 # CONFIG_RTLWIFI_DEBUG is not set
-CONFIG_TMD_HERMES=m
-CONFIG_USB_ZD1201=m
+# CONFIG_USB_ZD1201 is not set
 CONFIG_USB_NET_RNDIS_WLAN=m
 CONFIG_USB_NET_KALMIA=m
 CONFIG_USB_NET_QMI_WWAN=m
@@ -1667,7 +1621,18 @@ CONFIG_BAYCOM_PAR=m
 CONFIG_BAYCOM_EPP=m
 CONFIG_YAM=m
 
-# CONFIG_NFC is not set
+CONFIG_NFC=m
+CONFIG_NFC_NCI=m
+CONFIG_NFC_HCI=m
+CONFIG_NFC_SHDLC=y
+CONFIG_NFC_LLCP=y
+
+#
+# Near Field Communication (NFC) devices
+#
+CONFIG_PN544_NFC=m
+CONFIG_PN544_HCI_NFC=m
+CONFIG_NFC_PN533=m
 
 #
 # IrDA (infrared) support
@@ -1731,6 +1696,7 @@ CONFIG_BT_HCIUART=m
 CONFIG_BT_HCIUART_H4=y
 CONFIG_BT_HCIUART_BCSP=y
 CONFIG_BT_HCIUART_ATH3K=y
+CONFIG_BT_HCIUART_3WIRE=y
 CONFIG_BT_HCIDTL1=m
 CONFIG_BT_HCIBT3C=m
 CONFIG_BT_HCIBLUECARD=m
@@ -1998,6 +1964,7 @@ CONFIG_TOUCHSCREEN_AD7879_I2C=m
 # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
 # CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
 CONFIG_TOUCHSCREEN_DYNAPRO=m
+CONFIG_TOUCHSCREEN_EDT_FT5X06=m
 CONFIG_TOUCHSCREEN_EETI=m
 CONFIG_TOUCHSCREEN_EGALAX=m
 CONFIG_TOUCHSCREEN_ELO=m
@@ -2006,6 +1973,7 @@ CONFIG_TOUCHSCREEN_GUNZE=m
 # CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
 CONFIG_TOUCHSCREEN_INEXIO=m
 CONFIG_TOUCHSCREEN_ILI210X=m
+CONFIG_TOUCHSCREEN_MMS114=m
 CONFIG_TOUCHSCREEN_MTOUCH=m
 CONFIG_TOUCHSCREEN_MCS5000=m
 CONFIG_TOUCHSCREEN_MK712=m
@@ -2212,6 +2180,7 @@ CONFIG_SENSORS_G760A=m
 CONFIG_SENSORS_GL518SM=m
 CONFIG_SENSORS_GL520SM=m
 CONFIG_SENSORS_HDAPS=m
+# CONFIG_SENSORS_HIH6130 is not set
 # CONFIG_SENSORS_I5K_AMB is not set
 # FIXME: IBMAEM x86 only?
 CONFIG_SENSORS_IBMAEM=m
@@ -2470,16 +2439,16 @@ CONFIG_VGA_ARB_MAX_GPUS=16
 # CONFIG_STUB_POULSBO is not set
 
 CONFIG_DRM=m
-# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
-# CONFIG_DRM_AST is not set
-# CONFIG_DRM_CIRRUS_QEMU is not set
+CONFIG_DRM_LOAD_EDID_FIRMWARE=y
+# CONFIG_DRM_AST is not set # do not enable on f17 or older
+# CONFIG_DRM_CIRRUS_QEMU is not set  # do not enable on f17 or older
 # CONFIG_DRM_TDFX is not set
 # CONFIG_DRM_R128 is not set
 CONFIG_DRM_RADEON=m
 CONFIG_DRM_RADEON_KMS=y
 # CONFIG_DRM_I810 is not set
 # CONFIG_DRM_MGA is not set
-# CONFIG_DRM_MGAG200 is not set
+# CONFIG_DRM_MGAG200 is not set  # do not enable on f17 or older
 # CONFIG_DRM_SIS is not set
 # CONFIG_DRM_SAVAGE is not set
 CONFIG_DRM_I915=m
@@ -2491,8 +2460,9 @@ CONFIG_DRM_NOUVEAU_DEBUG=y
 # CONFIG_DRM_PSB is not set
 CONFIG_DRM_I2C_CH7006=m
 CONFIG_DRM_I2C_SIL164=m
-# CONFIG_DRM_UDL is not set
+CONFIG_DRM_UDL=m
 CONFIG_DRM_VMWGFX=m
+# CONFIG_DRM_VMWGFX_FBCON is not set
 CONFIG_DRM_VGEM=m
 
 #
@@ -2512,6 +2482,11 @@ CONFIG_HANGCHECK_TIMER=m
 # Multimedia devices
 #
 CONFIG_MEDIA_SUPPORT=m
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_MEDIA_RADIO_SUPPORT=y
+CONFIG_MEDIA_RC_SUPPORT=y
 CONFIG_MEDIA_CONTROLLER=y
 CONFIG_VIDEO_DEV=m
 # CONFIG_VIDEO_ADV_DEBUG is not set
@@ -2588,15 +2563,6 @@ CONFIG_VIDEO_TM6000=m
 CONFIG_VIDEO_TM6000_ALSA=m
 CONFIG_VIDEO_TM6000_DVB=m
 CONFIG_VIDEO_TLG2300=m
-# CONFIG_VIDEO_ADV7183 is not set
-# CONFIG_VIDEO_VS6624 is not set
-# CONFIG_VIDEO_MT9M032 is not set
-
-CONFIG_IR_GPIO_CIR=m
-CONFIG_MEDIA_TUNER_FC0011=m
-CONFIG_MEDIA_TUNER_TUA9001=m
-CONFIG_USB_KEENE=n
-
 # CONFIG_VIDEO_TIMBERDALE is not set
 # CONFIG_VIDEO_M5MOLS is not set
 # CONFIG_EXYNOS_VIDEO is not set
@@ -2608,10 +2574,17 @@ CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
 # Radio Adapters
 #
 CONFIG_RADIO_MAXIRADIO=m
+CONFIG_RADIO_SHARK=m
+CONFIG_RADIO_SHARK2=m
 CONFIG_RADIO_WL1273=m
 # CONFIG_RADIO_WL128X is not set # depends on TI_ST which we don't enable
 
 CONFIG_MEDIA_ATTACH=y
+
+#
+# V4L/DVB tuners
+# Selected automatically by not setting CONFIG_MEDIA_TUNER_CUSTOMISE
+#
 # CONFIG_MEDIA_TUNER_CUSTOMISE is not set
 
 #
@@ -2623,14 +2596,14 @@ CONFIG_DVB_NET=y
 CONFIG_DVB_MAX_ADAPTERS=8
 CONFIG_DVB_DYNAMIC_MINORS=y
 
+#
+# DVB frontends
+# Selected automatically by not setting CONFIG_DVB_FE_CUSTOMISE
+#
 # CONFIG_DVB_FE_CUSTOMISE is not set
 
-CONFIG_DVB_USB_AZ6007=m
-CONFIG_DVB_USB_RTL28XXU=m
-CONFIG_DVB_USB_AF9035=m
-
 #
-# Supported DVB Modules
+# Supported DVB bridge Modules
 #
 CONFIG_DVB_BT8XX=m
 CONFIG_DVB_BUDGET_CORE=m
@@ -2654,9 +2627,6 @@ CONFIG_DVB_NGENE=m
 CONFIG_DVB_DDBRIDGE=m
 CONFIG_DVB_USB_TECHNISAT_USB2=m
 
-#
-# Supported SAA7146 based PCI Adapters
-#
 CONFIG_DVB_AV7110=m
 CONFIG_DVB_AV7110_OSD=y
 CONFIG_DVB_BUDGET=m
@@ -2666,9 +2636,6 @@ CONFIG_DVB_BUDGET_PATCH=m
 
 CONFIG_DVB_TTUSB_BUDGET=m
 
-#
-# Supported FlexCopII (B2C2) Adapters
-#
 CONFIG_DVB_USB_CINERGY_T2=m
 CONFIG_DVB_B2C2_FLEXCOP=m
 CONFIG_DVB_B2C2_FLEXCOP_PCI=m
@@ -2698,7 +2665,10 @@ CONFIG_DVB_USB_UMT_010=m
 CONFIG_DVB_USB_VP702X=m
 CONFIG_DVB_USB_VP7045=m
 CONFIG_DVB_USB_AZ6027=m
+CONFIG_DVB_USB_AZ6007=m
 CONFIG_DVB_USB_LME2510=m
+CONFIG_DVB_USB_RTL28XXU=m
+CONFIG_DVB_USB_AF9035=m
 
 CONFIG_DVB_PT1=m
 
@@ -2715,8 +2685,11 @@ CONFIG_VIDEO_PVRUSB2_SYSFS=y
 # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
 
 CONFIG_RC_CORE=m
+CONFIG_RC_DECODERS=y
+CONFIG_LIRC=m
 CONFIG_RC_LOOPBACK=m
 CONFIG_RC_MAP=m
+CONFIG_RC_DEVICES=y
 CONFIG_RC_ATI_REMOTE=m
 CONFIG_IR_NEC_DECODER=m
 CONFIG_IR_RC5_DECODER=m
@@ -2736,6 +2709,8 @@ CONFIG_IR_REDRAT3=m
 CONFIG_IR_ENE=m
 CONFIG_IR_STREAMZAP=m
 CONFIG_IR_WINBOND_CIR=m
+CONFIG_IR_IGUANA=m
+CONFIG_IR_GPIO_CIR=m
 
 CONFIG_V4L_MEM2MEM_DRIVERS=y
 # CONFIG_VIDEO_MEM2MEM_TESTDEV is not set
@@ -2804,6 +2779,7 @@ CONFIG_FB_I810_I2C=y
 # CONFIG_FB_SM501 is not set
 # CONFIG_FB_SMSCUFX is not set
 CONFIG_FB_TILEBLITTING=y
+# CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_UVESA is not set
 CONFIG_FB_VESA=y
@@ -2819,7 +2795,7 @@ CONFIG_FB_EFI=y
 # CONFIG_FB_PRE_INIT_FB is not set
 # CONFIG_FB_TMIO is not set
 # CONFIG_FB_BROADSHEET is not set
-CONFIG_FB_UDL=m
+# CONFIG_FB_UDL is not set
 
 # CONFIG_FIRMWARE_EDID is not set
 
@@ -3018,7 +2994,7 @@ CONFIG_USB_SUPPORT=y
 # Miscellaneous USB options
 #
 
-# Deprecated:
+# Deprecated.
 # CONFIG_USB_DEVICEFS is not set
 
 # CONFIG_USB_DYNAMIC_MINORS is not set
@@ -3087,6 +3063,7 @@ CONFIG_HID=y
 CONFIG_HID_BATTERY_STRENGTH=y
 # debugging default is y upstream now
 CONFIG_HIDRAW=y
+CONFIG_UHID=m
 CONFIG_HID_PID=y
 CONFIG_LOGITECH_FF=y
 CONFIG_HID_LOGITECH_DJ=m
@@ -3138,6 +3115,7 @@ CONFIG_HID_ACRUX=m
 CONFIG_HID_ACRUX_FF=y
 CONFIG_HID_KEYTOUCH=m
 CONFIG_HID_LCPOWER=m
+CONFIG_HID_LENOVO_TPKBD=m
 CONFIG_HID_ROCCAT_ARVO=m
 CONFIG_HID_ROCCAT_ISKU=m
 CONFIG_HID_ROCCAT_KOVAPLUS=m
@@ -3152,6 +3130,7 @@ CONFIG_HID_TIVO=m
 CONFIG_HID_GENERIC=y
 CONFIG_HID_AUREAL=m
 
+
 #
 # USB Imaging devices
 #
@@ -3386,6 +3365,7 @@ CONFIG_USB_PWC_INPUT_EVDEV=y
 CONFIG_USB_SISUSBVGA=m
 CONFIG_USB_SISUSBVGA_CON=y
 CONFIG_RADIO_SI470X=y
+CONFIG_USB_KEENE=m
 CONFIG_USB_SI470X=m
 CONFIG_I2C_SI470X=m
 CONFIG_RADIO_SI4713=m
@@ -3432,7 +3412,7 @@ CONFIG_MFD_VX855=m
 CONFIG_MFD_SM501=m
 CONFIG_MFD_SM501_GPIO=y
 # CONFIG_MFD_TC6393XB is not set
-CONFIG_MFD_WM8400=m
+# CONFIG_MFD_WM8400 is not set
 # CONFIG_MFD_WM8350_I2C is not set
 # CONFIG_MFD_WM8350 is not set
 # CONFIG_MFD_WM831X is not set
@@ -3460,6 +3440,8 @@ CONFIG_MFD_WM8400=m
 # CONFIG_MFD_TPS65217 is not set
 # CONFIG_MFD_LM3533 is not set
 # CONFIG_MFD_MC13XXX_I2C is not set
+# CONFIG_MFD_ARIZONA is not set
+# CONFIG_MFD_ARIZONA_I2C is not set
 
 #
 # File systems
@@ -3506,7 +3488,7 @@ CONFIG_DNOTIFY=y
 CONFIG_AUTOFS4_FS=y
 # CONFIG_EXOFS_FS is not set
 # CONFIG_EXOFS_DEBUG is not set
-# CONFIG_NILFS2_FS is not set
+CONFIG_NILFS2_FS=m
 # CONFIG_LOGFS is not set
 CONFIG_CEPH_FS=m
 CONFIG_BLK_DEV_RBD=m
@@ -3600,17 +3582,15 @@ CONFIG_NFS_V2=y
 CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
+# CONFIG_NFS_SWAP is not set
 CONFIG_NFS_V4_1=y
 CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
 CONFIG_NFSD_V3_ACL=y
 CONFIG_NFSD_V4=y
-# Maybe see if we want this on for debug kernels?
-# CONFIG_NFSD_FAULT_INJECTION is not set
 CONFIG_NFS_FSCACHE=y
 # CONFIG_NFS_USE_LEGACY_DNS is not set
-CONFIG_NFS_USE_NEW_IDMAPPER=y
 CONFIG_PNFS_OBJLAYOUT=m
 CONFIG_PNFS_BLOCK=m
 CONFIG_LOCKD=m
@@ -3665,7 +3645,11 @@ CONFIG_DLM_DEBUG=y
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_DLM=y
 
-# CONFIG_UBIFS_FS is not set
+
+CONFIG_UBIFS_FS=m
+CONFIG_UBIFS_FS_XATTR=y
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+# CONFIG_UBIFS_FS_DEBUG is not set
 
 #
 # Partition Types
@@ -3764,6 +3748,7 @@ CONFIG_FRAME_POINTER=y
 # CONFIG_DEBUG_DRIVER is not set
 CONFIG_HEADERS_CHECK=y
 # CONFIG_LKDTM is not set
+# CONFIG_NOTIFIER_ERROR_INJECTION is not set
 # CONFIG_READABLE_ASM is not set
 
 # CONFIG_RT_MUTEX_TESTER is not set
@@ -3896,7 +3881,7 @@ CONFIG_CRYPTO_SEED=m
 CONFIG_CRYPTO_SEQIV=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_TEA=m
 CONFIG_CRYPTO_TGR192=m
@@ -3982,10 +3967,11 @@ CONFIG_CGROUP_CPUACCT=y
 CONFIG_CGROUP_DEVICE=y
 CONFIG_CGROUP_FREEZER=y
 CONFIG_CGROUP_SCHED=y
-CONFIG_CGROUP_MEM_RES_CTLR=y
-CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y # XXX disabled by default, pass 'swapaccount'
-# CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set
-CONFIG_CGROUP_MEM_RES_CTLR_KMEM=y
+CONFIG_MEMCG=y
+CONFIG_MEMCG_SWAP=y # XXX disabled by default, pass 'swapaccount'
+# CONFIG_MEMCG_SWAP_ENABLED is not set
+CONFIG_MEMCG_KMEM=y
+# CONFIG_CGROUP_HUGETLB is not set
 CONFIG_CGROUP_PERF=y
 CONFIG_BLK_CGROUP=y
 
@@ -4090,6 +4076,7 @@ CONFIG_LEDS_DELL_NETBOOKS=m
 # CONFIG_LEDS_OT200 is not set
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_ONESHOT=m
 CONFIG_LEDS_TRIGGER_IDE_DISK=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
 CONFIG_LEDS_TRIGGER_BACKLIGHT=m
@@ -4099,6 +4086,8 @@ CONFIG_LEDS_ALIX2=m
 CONFIG_LEDS_CLEVO_MAIL=m
 CONFIG_LEDS_INTEL_SS4200=m
 CONFIG_LEDS_LM3530=m
+CONFIG_LEDS_LM3556=m
+CONFIG_LEDS_BLINKM=m
 CONFIG_LEDS_LP3944=m
 CONFIG_LEDS_LP5521=m
 CONFIG_LEDS_LP5523=m
@@ -4117,7 +4106,7 @@ CONFIG_ASYNC_TX_DMA=y
 
 CONFIG_UNUSED_SYMBOLS=y
 
-CONFIG_UTRACE=y
+CONFIG_UPROBE_EVENT=y
 
 CONFIG_FTRACE=y
 CONFIG_DYNAMIC_FTRACE=y
@@ -4136,7 +4125,6 @@ CONFIG_STACK_TRACER=y
 
 CONFIG_KPROBES=y
 CONFIG_KPROBE_EVENT=y
-CONFIG_UPROBE_EVENT=y
 # CONFIG_KPROBES_SANITY_TEST is not set
 CONFIG_JUMP_LABEL=y
 CONFIG_OPTPROBES=y
@@ -4153,7 +4141,6 @@ CONFIG_CFAG12864B=y
 CONFIG_CFAG12864B_RATE=20
 
 # CONFIG_PHANTOM is not set
-# CONFIG_INTEL_MID_PTI is not set
 
 CONFIG_POWER_SUPPLY=y
 # CONFIG_POWER_SUPPLY_DEBUG is not set
@@ -4191,6 +4178,7 @@ CONFIG_UIO_SERCOS3=m
 CONFIG_UIO_PCI_GENERIC=m
 # CONFIG_UIO_NETX is not set
 
+# CONFIG_VFIO is not set
 
 
 # LIRC
@@ -4313,7 +4301,6 @@ CONFIG_USB_ATMEL=m
 # CONFIG_VIDEO_CX25821 is not set
 # CONFIG_R8187SE is not set
 # CONFIG_RTL8192U is not set
-# CONFIG_BATMAN_ADV is not set
 # CONFIG_FB_SM7XX is not set
 # CONFIG_SPECTRA is not set
 # CONFIG_ZRAM is not set
@@ -4344,6 +4331,7 @@ CONFIG_ALTERA_STAPL=m
 # CONFIG_USB_WPAN_HCD is not set
 # CONFIG_WIMAX_GDM72XX is not set 
 # CONFIG_IPACK_BUS is not set
+# CONFIG_CSR_WIFI is not set
 #
 # END OF STAGING
 
@@ -4360,12 +4348,14 @@ CONFIG_IMA_AUDIT=y
 CONFIG_IMA_LSM_RULES=y
 
 # CONFIG_EVM is not set
+# CONFIG_PWM is not set
 
 CONFIG_LSM_MMAP_MIN_ADDR=65536
 
 CONFIG_STRIP_ASM_SYMS=y
 
 # CONFIG_RCU_FANOUT_EXACT is not set
+# FIXME: Revisit FAST_NO_HZ after 3.5
 # CONFIG_RCU_FAST_NO_HZ is not set
 CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_RCU_TORTURE_TEST is not set
@@ -4434,7 +4424,8 @@ CONFIG_GPIO_SYSFS=y
 # CONFIG_GPIO_VX855 is not set
 # CONFIG_GPIO_PCH is not set
 # CONFIG_GPIO_ML_IOH is not set
-
+# CONFIG_GPIO_AMD8111 is not set
+# CONFIG_GPIO_BT8XX is not set
 # CONFIG_GPIO_SX150X is not set
 
 # FIXME: Why?
@@ -4443,6 +4434,8 @@ CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
 CONFIG_TEST_KSTRTOX=y
 # CONFIG_XZ_DEC_TEST is not set
 
+# CONFIG_POWER_AVS is not set
+
 CONFIG_TARGET_CORE=m
 CONFIG_ISCSI_TARGET=m
 CONFIG_LOOPBACK_TARGET=m
@@ -4456,6 +4449,9 @@ CONFIG_HWSPINLOCK=m
 
 CONFIG_PSTORE=y
 CONFIG_PSTORE_RAM=m
+# CONFIG_PSTORE_CONSOLE is not set
+# CONFIG_PSTORE_FTRACE is not set
+
 
 # CONFIG_AVERAGE is not set
 
@@ -4467,11 +4463,18 @@ CONFIG_BCMA=m
 CONFIG_BCMA_BLOCKIO=y
 CONFIG_BCMA_HOST_PCI_POSSIBLE=y
 CONFIG_BCMA_HOST_PCI=y
+CONFIG_BCMA_DRIVER_GMAC_CMN=y
 # CONFIG_BCMA_DEBUG is not set
 
 # CONFIG_GOOGLE_FIRMWARE is not set
+# CONFIG_INTEL_MID_PTI is not set
 CONFIG_IOMMU_SUPPORT=y
 
 # CONFIG_HSI is not set
 
 # CONFIG_PM_DEVFREQ is not set
+# CONFIG_MODULE_SIG is not set
+# CONFIG_MODULE_VERIFY_ELF is not set
+# CONFIG_CRYPTO_KEY_TYPE is not set
+# CONFIG_PGP_LIBRARY is not set
+# CONFIG_PGP_PRELOAD is not set
diff --git a/config-nodebug b/config-nodebug
index aff3001..5b41876 100644
--- a/config-nodebug
+++ b/config-nodebug
@@ -72,6 +72,8 @@ CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
 
 # CONFIG_JBD2_DEBUG is not set
 
+# CONFIG_NFSD_FAULT_INJECTION is not set
+
 # CONFIG_DEBUG_BLK_CGROUP is not set
 
 # CONFIG_DRBD_FAULT_INJECTION is not set
@@ -109,3 +111,4 @@ CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024
 # CONFIG_DEBUG_KMEMLEAK_TEST is not set
 CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
 
+# CONFIG_MAC80211_MESSAGE_TRACING is not set
diff --git a/config-powerpc-generic b/config-powerpc-generic
index 366756b..58c3393 100644
--- a/config-powerpc-generic
+++ b/config-powerpc-generic
@@ -160,7 +160,14 @@ CONFIG_IDE_TASK_IOCTL=y
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
 # CONFIG_BLK_DEV_IDE_PMAC is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_DELKIN=m
+# CONFIG_BLK_DEV_IT8213 is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
 CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_BLK_DEV_GENERIC=y
 # CONFIG_BLK_DEV_HD is not set
 # CONFIG_USB_STORAGE_ISD200 is not set
 CONFIG_MTD_PHYSMAP_OF=m
@@ -179,6 +186,7 @@ CONFIG_EDAC_MM_EDAC=m
 CONFIG_EDAC_PASEMI=m
 CONFIG_EDAC_AMD8131=m
 CONFIG_EDAC_AMD8111=m
+CONFIG_EDAC_LEGACY_SYSFS=y
 
 # CONFIG_AXON_RAM is not set
 # CONFIG_OPROFILE_CELL is not set
@@ -349,9 +357,6 @@ CONFIG_RFKILL_GPIO=m
 # CONFIG_NET_VENDOR_PASEMI is not set
 # CONFIG_NET_VENDOR_TOSHIBA is not set
 
-# Disable btrfs until it is shown to work with 64k pages (rhbz 747079)
-# CONFIG_BTRFS_FS is not set
-#
 # CONFIG_CPU_IDLE is not set
 # CONFIG_OF_SELFTEST is not set
 # CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
@@ -365,3 +370,6 @@ CONFIG_RCU_FANOUT_LEAF=16
 # CONFIG_MPIC_MSGR is not set
 # CONFIG_FA_DUMP is not set
 # CONFIG_MDIO_BUS_MUX_GPIO is not set
+# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
+
+# CONFIG_FAIL_IOMMU is not set
diff --git a/config-powerpc32-generic b/config-powerpc32-generic
index e856b9f..935aab4 100644
--- a/config-powerpc32-generic
+++ b/config-powerpc32-generic
@@ -33,6 +33,8 @@ CONFIG_SCSI_MESH=m
 CONFIG_SCSI_MESH_SYNC_RATE=5
 CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
 
+CONFIG_LBDAF=y
+
 CONFIG_SCSI_MAC53C94=m
 CONFIG_ADB_CUDA=y
 CONFIG_ADB_MACIO=y
@@ -45,7 +47,7 @@ CONFIG_NET_VENDOR_APPLE=y
 CONFIG_BMAC=m
 CONFIG_MACE=m
 # CONFIG_MACE_AAUI_PORT is not set
-CONFIG_MV643XX_ETH=m
+# CONFIG_MV643XX_ETH is not set
 CONFIG_I2C_HYDRA=m
 CONFIG_I2C_MPC=m
 CONFIG_THERM_WINDTUNNEL=m
diff --git a/config-powerpc64 b/config-powerpc64
index af7c05a..ccd0e85 100644
--- a/config-powerpc64
+++ b/config-powerpc64
@@ -1,8 +1,9 @@
-CONFIG_WINDFARM_PM72=y
 CONFIG_WINDFARM_PM81=y
 CONFIG_WINDFARM_PM91=y
 CONFIG_WINDFARM_PM121=y
+CONFIG_WINDFARM_PM72=y
 CONFIG_WINDFARM_RM31=y
+
 CONFIG_PPC_PMAC64=y
 CONFIG_PPC_MAPLE=y
 # CONFIG_PPC_CELL is not set
diff --git a/config-sparc64-generic b/config-sparc64-generic
index a2b72df..ebc891d 100644
--- a/config-sparc64-generic
+++ b/config-sparc64-generic
@@ -199,3 +199,5 @@ CONFIG_CRYPTO_DEV_NIAGARA2=y
 # CONFIG_OF_SELFTEST is not set
 
 CONFIG_BPF_JIT=y
+# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
+# CONFIG_IRQ_DOMAIN_DEBUG is not set
diff --git a/config-x86-32-generic b/config-x86-32-generic
index 1c75224..b1a0499 100644
--- a/config-x86-32-generic
+++ b/config-x86-32-generic
@@ -89,9 +89,6 @@ CONFIG_X86_LONGRUN=y
 CONFIG_X86_HT=y
 CONFIG_X86_TRAMPOLINE=y
 
-# Turn back on in 3.4
-# CONFIG_RELOCATABLE is not set
-
 
 # CONFIG_4KSTACKS is not set
 
@@ -141,6 +138,8 @@ CONFIG_XEN_MAX_DOMAIN_MEMORY=8
 
 CONFIG_MTD_NAND_CAFE=m
 
+CONFIG_LBDAF=y
+
 # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
 
 
@@ -156,8 +155,6 @@ CONFIG_OLPC_XO1_SCI=y
 # staging
 # CONFIG_FB_OLPC_DCON is not set
 
-# CONFIG_IRQ_DOMAIN_DEBUG is not set
-
 # CONFIG_SPARSE_IRQ is not set
 
 CONFIG_RCU_FANOUT=32
diff --git a/config-x86-generic b/config-x86-generic
index 4fab1ce..fe5a4b7 100644
--- a/config-x86-generic
+++ b/config-x86-generic
@@ -172,6 +172,7 @@ CONFIG_EDAC_R82600=m
 CONFIG_EDAC_X38=m
 CONFIG_EDAC_MCE_INJ=m
 CONFIG_EDAC_DECODE_MCE=m
+CONFIG_EDAC_LEGACY_SYSFS=y
 
 CONFIG_SCHED_MC=y
 
@@ -188,10 +189,12 @@ CONFIG_HW_RANDOM_VIA=m
 
 CONFIG_X86_PLATFORM_DEVICES=y
 
+CONFIG_AMILO_RFKILL=m
 CONFIG_ASUS_LAPTOP=m
 CONFIG_COMPAL_LAPTOP=m
 CONFIG_DELL_LAPTOP=m
 CONFIG_EEEPC_LAPTOP=m
+CONFIG_FUJITSU_TABLET=m
 CONFIG_FUJITSU_LAPTOP=m
 # CONFIG_FUJITSU_LAPTOP_DEBUG is not set
 CONFIG_IDEAPAD_LAPTOP=m
@@ -200,8 +203,7 @@ CONFIG_PANASONIC_LAPTOP=m
 CONFIG_SAMSUNG_LAPTOP=m
 CONFIG_SONY_LAPTOP=m
 CONFIG_TOPSTAR_LAPTOP=m
-CONFIG_FUJITSU_TABLET=m
-CONFIG_AMILO_RFKILL=m
+
 
 CONFIG_ACPI_WMI=m
 CONFIG_ACER_WMI=m
@@ -215,6 +217,7 @@ CONFIG_DELL_WMI_AIO=m
 CONFIG_EEEPC_WMI=m
 CONFIG_INTEL_OAKTRAIL=m
 CONFIG_SAMSUNG_Q10=m
+CONFIG_APPLE_GMUX=m
 CONFIG_XO15_EBOOK=m
 
 # CONFIG_TOUCHSCREEN_INTEL_MID is not set
@@ -316,6 +319,7 @@ CONFIG_STRICT_DEVMEM=y
 # CONFIG_NO_BOOTMEM is not set
 
 # CONFIG_MEMTEST is not set
+# CONFIG_DEBUG_TLBFLUSH is not set
 # CONFIG_MAXSMP is not set
 
 
@@ -381,6 +385,8 @@ CONFIG_VIDEO_VIA_CAMERA=m
 CONFIG_IRQ_TIME_ACCOUNTING=y
 CONFIG_X86_RESERVE_LOW=64
 
+# CONFIG_IRQ_DOMAIN_DEBUG is not set
+
 CONFIG_PCH_GBE=m
 CONFIG_PCH_PHUB=m
 
@@ -406,7 +412,7 @@ CONFIG_HID_HYPERV_MOUSE=m
 CONFIG_HYPERV_NET=m
 CONFIG_HYPERV_STORAGE=m
 
-# Depends on PCI
+# Depends on HOTPLUG_PCI_PCIE
 CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m
 
 CONFIG_DRM_GMA500=m
@@ -415,8 +421,7 @@ CONFIG_DRM_GMA3600=y
 
 CONFIG_RCU_FANOUT_LEAF=16
 
+CONFIG_INTEL_MEI=m
+
 # Maybe enable in debug kernels?
 # CONFIG_DEBUG_NMI_SELFTEST is not set
-
-CONFIG_APPLE_GMUX=m
-CONFIG_INTEL_MEI=m
diff --git a/config-x86_64-generic b/config-x86_64-generic
index 6df21fe..342b862 100644
--- a/config-x86_64-generic
+++ b/config-x86_64-generic
@@ -46,6 +46,8 @@ CONFIG_CRYPTO_SHA1_SSSE3=m
 CONFIG_CRYPTO_BLOWFISH_X86_64=m
 CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=m
 CONFIG_CRYPTO_CAMELLIA_X86_64=m
+CONFIG_CRYPTO_SERPENT_AVX_X86_64=m
+CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m
 
 # CONFIG_I2C_ALI1535 is not set
 # CONFIG_I2C_ALI1563 is not set
@@ -86,6 +88,7 @@ CONFIG_XEN_MAX_DOMAIN_MEMORY=128
 # CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not set
 CONFIG_XEN_DEV_EVTCHN=m
 CONFIG_XEN_SYS_HYPERVISOR=y
+# CONFIG_XEN_MCE_LOG is not set
 
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 
diff --git a/kernel.spec b/kernel.spec
index 46def3c..98f07c6 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -60,13 +60,13 @@ Summary: The Linux kernel
 # base_sublevel is the kernel version we're starting with and patching
 # on top of -- for example, 2.6.22-rc7-git1 starts with a 2.6.21 base,
 # which yields a base_sublevel of 21.
-%define base_sublevel 5
+%define base_sublevel 6
 
 ## If this is a released kernel ##
 %if 0%{?released_kernel}
 
 # Do we have a -stable update to apply?
-%define stable_update 6
+%define stable_update 1
 # Is it a -stable RC?
 %define stable_rc 0
 # Set rpm version accordingly
@@ -705,13 +705,8 @@ Patch13003: efi-dont-map-boot-services-on-32bit.patch
 
 Patch14010: lis3-improve-handling-of-null-rate.patch
 
-Patch14015: team-update-from-net-next.patch
-
 Patch19000: ips-noirq.patch
 
-# Uprobes (rhbz 832083)
-Patch20001: uprobes-backport.patch
-
 # ARM
 # Flattened devicetree support
 Patch21000: arm-omap-dt-compat.patch
@@ -726,7 +721,7 @@ Patch21005: arm-tegra-usb-no-reset-linux33.patch
 
 # ARM highbank patches
 # Highbank clock functions need to be EXPORT for module builds
-Patch21010: highbank-export-clock-functions.patch
+#atch21010: highbank-export-clock-functions.patch
 
 Patch21094: power-x86-destdir.patch
 
@@ -735,8 +730,6 @@ Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
 
 Patch21270: x86-Avoid-invoking-RCU-when-CPU-is-idle.patch
 
-Patch21400: unhandled-irqs-switch-to-polling.patch
-
 Patch22000: weird-root-dentry-name-debug.patch
 
 #selinux ptrace child permissions
@@ -744,16 +737,11 @@ Patch22001: selinux-apply-different-permission-to-ptrace-child.patch
 
 Patch22014: efifb-skip-DMI-checks-if-bootloader-knows.patch
 
-#Fix FIPS for aesni hardare
-Patch22055: crypto-testmgr-allow-aesni-intel-and-ghash_clmulni-intel.patch
-Patch22056: crypto-aesni-intel-fix-wrong-kfree-pointer.patch
-
-#rhbz 714271
-Patch22060: CPU-hotplug-cpusets-suspend-Dont-modify-cpusets-during.patch
-
 #rhbz 857324
 Patch22070: net-tcp-bz857324.patch
 
+Patch22071: 3.6.2-stable-queue.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1425,40 +1413,28 @@ ApplyPatch efi-dont-map-boot-services-on-32bit.patch
 
 ApplyPatch lis3-improve-handling-of-null-rate.patch
 
-ApplyPatch team-update-from-net-next.patch
-
 ApplyPatch ips-noirq.patch
 
-# Uprobes (rhbz 832083)
-ApplyPatch uprobes-backport.patch
-
 ApplyPatch power-x86-destdir.patch
 
 #rhbz 754518
 ApplyPatch scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
 
-ApplyPatch unhandled-irqs-switch-to-polling.patch
-
 ApplyPatch weird-root-dentry-name-debug.patch
 
 #Highbank clock functions
-ApplyPatch highbank-export-clock-functions.patch 
+# pplyPatch highbank-export-clock-functions.patch 
 
 #selinux ptrace child permissions
 ApplyPatch selinux-apply-different-permission-to-ptrace-child.patch
 
 ApplyPatch efifb-skip-DMI-checks-if-bootloader-knows.patch
 
-#Fix FIPS for aesni hardare
-ApplyPatch crypto-testmgr-allow-aesni-intel-and-ghash_clmulni-intel.patch
-ApplyPatch crypto-aesni-intel-fix-wrong-kfree-pointer.patch
-
-#rhbz 714271
-ApplyPatch CPU-hotplug-cpusets-suspend-Dont-modify-cpusets-during.patch
-
 #rhbz 857324
 ApplyPatch net-tcp-bz857324.patch
 
+ApplyPatch 3.6.2-stable-queue.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2322,6 +2298,11 @@ fi
 #    '-'      |  |
 #              '-'
 %changelog
+* Tue Oct 09 2012 Josh Boyer <jwboyer at redhat.com> - 3.6.1-1
+- Linux v3.6.1
+- Include patches from 3.6.2 stable queue
+- Drop unhandled irq patch.  Proving to be not worthwhile
+
 * Sun Oct 07 2012 Josh Boyer <jwboyer at redhat.com> - 3.5.6-1
 - Linux v3.5.6
 
diff --git a/power-x86-destdir.patch b/power-x86-destdir.patch
index 5fb48ac..9766531 100644
--- a/power-x86-destdir.patch
+++ b/power-x86-destdir.patch
@@ -1,13 +1,14 @@
 diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
-index fd8e1f1..7af5e8c 100644
+index f856495..984cc00 100644
 --- a/tools/power/x86/turbostat/Makefile
 +++ b/tools/power/x86/turbostat/Makefile
-@@ -1,8 +1,10 @@
+@@ -1,3 +1,5 @@
 +DESTDIR ?=
 +
  turbostat : turbostat.c
+ CFLAGS +=	-Wall
  
- clean :
+@@ -5,5 +7,5 @@ clean :
  	rm -f turbostat
  
  install :
diff --git a/sources b/sources
index 5f11dc7..152630c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-24153eaaa81dedc9481ada8cd9c3b83d  linux-3.5.tar.xz
-e9502f047c251db3b0c911e53344bad5  patch-3.5.6.xz
+1a1760420eac802c541a20ab51a093d1  linux-3.6.tar.xz
+775f1389a934512341726f9b4aeaf661  patch-3.6.1.xz


More information about the scm-commits mailing list