--- /dev/null
+From 9d312cd12e89ce08add99fe66e8f6baeaca16d7d Mon Sep 17 00:00:00 2001
+From: Viresh Kumar <viresh.kumar@linaro.org>
+Date: Mon, 15 Dec 2014 09:48:19 +0530
+Subject: ARM: defconfigs: use CONFIG_CPUFREQ_DT
+
+From: Viresh Kumar <viresh.kumar@linaro.org>
+
+commit 9d312cd12e89ce08add99fe66e8f6baeaca16d7d upstream.
+
+CONFIG_GENERIC_CPUFREQ_CPU0 disappeared with commit bbcf071969b20f
+("cpufreq: cpu0: rename driver and internals to 'cpufreq_dt'") and some
+defconfigs are still using it instead of the new one.
+
+Use the renamed CONFIG_CPUFREQ_DT generic driver.
+
+Reported-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Kevin Hilman <khilman@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/configs/multi_v7_defconfig | 2 +-
+ arch/arm/configs/shmobile_defconfig | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/configs/multi_v7_defconfig
++++ b/arch/arm/configs/multi_v7_defconfig
+@@ -446,4 +446,4 @@ CONFIG_DEBUG_FS=y
+ CONFIG_MAGIC_SYSRQ=y
+ CONFIG_LOCKUP_DETECTOR=y
+ CONFIG_CRYPTO_DEV_TEGRA_AES=y
+-CONFIG_GENERIC_CPUFREQ_CPU0=y
++CONFIG_CPUFREQ_DT=y
+--- a/arch/arm/configs/shmobile_defconfig
++++ b/arch/arm/configs/shmobile_defconfig
+@@ -176,5 +176,5 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
+ CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+ CONFIG_CPU_THERMAL=y
+-CONFIG_GENERIC_CPUFREQ_CPU0=y
++CONFIG_CPUFREQ_DT=y
+ CONFIG_REGULATOR_DA9210=y
--- /dev/null
+From d73f825e6efa723e81d9ffcc4949fe9f03f1df29 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Date: Fri, 5 Dec 2014 09:39:31 +0200
+Subject: ARM: dts: am437x-sk-evm.dts: fix LCD timings
+
+From: Tomi Valkeinen <tomi.valkeinen@ti.com>
+
+commit d73f825e6efa723e81d9ffcc4949fe9f03f1df29 upstream.
+
+The lcd0 node for am437x-sk-evm.dts contains bad LCD timings, and while
+they seem to work with a quick test, doing for example blank/unblank
+will give you a black display.
+
+This patch updates the timings to the 'typical' values from the LCD spec
+sheet.
+
+Also, the compatible string is completely bogus, as
+"osddisplays,osd057T0559-34ts" is _not_ a 480x272 panel. The panel on
+the board is a newhaven one. Update the compatible string to reflect
+this. Note that this hasn't caused any issues, as the "panel-dpi"
+matches the driver.
+
+Tested-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/am437x-sk-evm.dts | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/arch/arm/boot/dts/am437x-sk-evm.dts
++++ b/arch/arm/boot/dts/am437x-sk-evm.dts
+@@ -100,7 +100,7 @@
+ };
+
+ lcd0: display {
+- compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
++ compatible = "newhaven,nhd-4.3-480272ef-atxl", "panel-dpi";
+ label = "lcd";
+
+ pinctrl-names = "default";
+@@ -112,11 +112,11 @@
+ clock-frequency = <9000000>;
+ hactive = <480>;
+ vactive = <272>;
+- hfront-porch = <8>;
+- hback-porch = <43>;
+- hsync-len = <4>;
+- vback-porch = <12>;
+- vfront-porch = <4>;
++ hfront-porch = <2>;
++ hback-porch = <2>;
++ hsync-len = <41>;
++ vfront-porch = <2>;
++ vback-porch = <2>;
+ vsync-len = <10>;
+ hsync-active = <0>;
+ vsync-active = <0>;
--- /dev/null
+From 58230c2c443bc9801293f6535144d04ceaf731e0 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Thu, 4 Dec 2014 09:10:21 -0600
+Subject: ARM: dts: am437x-sk: fix lcd enable pin mux data
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 58230c2c443bc9801293f6535144d04ceaf731e0 upstream.
+
+Caused by a copy & paste error. Note that even with
+this bug AM437x SK display still works because GPIO
+mux mode is always enabled. It's still wrong to mux
+somebody else's pin.
+
+Luckily ball D25 (offset 0x238 - gpio5_8) on AM437x
+isn't used for anything.
+
+While at that, also replace a pullup with a pulldown
+as that gpio should be normally low, not high.
+
+Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/am437x-sk-evm.dts | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/am437x-sk-evm.dts
++++ b/arch/arm/boot/dts/am437x-sk-evm.dts
+@@ -320,8 +320,7 @@
+
+ lcd_pins: lcd_pins {
+ pinctrl-single,pins = <
+- /* GPIO 5_8 to select LCD / HDMI */
+- 0x238 (PIN_OUTPUT_PULLUP | MUX_MODE7)
++ 0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpcm_ad7.gpio1_7 */
+ >;
+ };
+ };
--- /dev/null
+From be6688350a4470e417aaeca54d162652aab40ac5 Mon Sep 17 00:00:00 2001
+From: Lokesh Vutla <lokeshvutla@ti.com>
+Date: Wed, 12 Nov 2014 10:54:15 +0530
+Subject: ARM: dts: DRA7: wdt: Fix compatible property for watchdog
+ node
+
+From: Lokesh Vutla <lokeshvutla@ti.com>
+
+commit be6688350a4470e417aaeca54d162652aab40ac5 upstream.
+
+OMAP wdt driver supports only ti,omap3-wdt compatible. In DRA7 dt
+wdt compatible property is defined as ti,omap4-wdt by mistake instead of
+ti,omap3-wdt. Correcting the typo.
+
+Fixes: 6e58b8f1daaf1a ("ARM: dts: DRA7: Add the dts files for dra7 SoC and dra7-evm board")
+Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/dra7.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/dra7.dtsi
++++ b/arch/arm/boot/dts/dra7.dtsi
+@@ -653,7 +653,7 @@
+ };
+
+ wdt2: wdt@4ae14000 {
+- compatible = "ti,omap4-wdt";
++ compatible = "ti,omap3-wdt";
+ reg = <0x4ae14000 0x80>;
+ interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+ ti,hwmods = "wd_timer2";
--- /dev/null
+From 5e794de514f56de1e78e979ca09c56a91aa2e9f1 Mon Sep 17 00:00:00 2001
+From: Tomasz Figa <tomasz.figa@gmail.com>
+Date: Wed, 24 Sep 2014 00:14:29 +0900
+Subject: ARM: dts: Enable PWM node by default for s3c64xx
+
+From: Tomasz Figa <tomasz.figa@gmail.com>
+
+commit 5e794de514f56de1e78e979ca09c56a91aa2e9f1 upstream.
+
+The PWM block is required for system clock source so it must be always
+enabled. This patch fixes boot issues on SMDK6410 which did not have
+the node enabled explicitly for other purposes.
+
+Fixes: eeb93d02 ("clocksource: of: Respect device tree node status")
+
+Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
+Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/s3c6410-mini6410.dts | 4 ----
+ arch/arm/boot/dts/s3c64xx.dtsi | 1 -
+ 2 files changed, 5 deletions(-)
+
+--- a/arch/arm/boot/dts/s3c6410-mini6410.dts
++++ b/arch/arm/boot/dts/s3c6410-mini6410.dts
+@@ -198,10 +198,6 @@
+ status = "okay";
+ };
+
+-&pwm {
+- status = "okay";
+-};
+-
+ &pinctrl0 {
+ gpio_leds: gpio-leds {
+ samsung,pins = "gpk-4", "gpk-5", "gpk-6", "gpk-7";
+--- a/arch/arm/boot/dts/s3c64xx.dtsi
++++ b/arch/arm/boot/dts/s3c64xx.dtsi
+@@ -172,7 +172,6 @@
+ clocks = <&clocks PCLK_PWM>;
+ samsung,pwm-outputs = <0>, <1>;
+ #pwm-cells = <3>;
+- status = "disabled";
+ };
+
+ pinctrl0: pinctrl@7f008000 {
--- /dev/null
+From 9008d83fe9dc2e0f19b8ba17a423b3759d8e0fd7 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Tue, 21 Oct 2014 15:22:28 -0500
+Subject: ARM: OMAP4: PM: Only do static dependency configuration in omap4_init_static_deps
+
+From: Nishanth Menon <nm@ti.com>
+
+commit 9008d83fe9dc2e0f19b8ba17a423b3759d8e0fd7 upstream.
+
+Commit 705814b5ea6f ("ARM: OMAP4+: PM: Consolidate OMAP4 PM code to
+re-use it for OMAP5")
+
+Moved logic generic for OMAP5+ as part of the init routine by
+introducing omap4_pm_init. However, the patch left the powerdomain
+initial setup, an unused omap4430 es1.0 check and a spurious log
+"Power Management for TI OMAP4." in the original code.
+
+Remove the duplicate code which is already present in omap4_pm_init from
+omap4_init_static_deps.
+
+As part of this change, also move the u-boot version print out of the
+static dependency function to the omap4_pm_init function.
+
+Fixes: 705814b5ea6f ("ARM: OMAP4+: PM: Consolidate OMAP4 PM code to re-use it for OMAP5")
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-omap2/pm44xx.c | 29 +++++++++--------------------
+ 1 file changed, 9 insertions(+), 20 deletions(-)
+
+--- a/arch/arm/mach-omap2/pm44xx.c
++++ b/arch/arm/mach-omap2/pm44xx.c
+@@ -160,26 +160,6 @@ static inline int omap4_init_static_deps
+ struct clockdomain *ducati_clkdm, *l3_2_clkdm;
+ int ret = 0;
+
+- if (omap_rev() == OMAP4430_REV_ES1_0) {
+- WARN(1, "Power Management not supported on OMAP4430 ES1.0\n");
+- return -ENODEV;
+- }
+-
+- pr_err("Power Management for TI OMAP4.\n");
+- /*
+- * OMAP4 chip PM currently works only with certain (newer)
+- * versions of bootloaders. This is due to missing code in the
+- * kernel to properly reset and initialize some devices.
+- * http://www.spinics.net/lists/arm-kernel/msg218641.html
+- */
+- pr_warn("OMAP4 PM: u-boot >= v2012.07 is required for full PM support\n");
+-
+- ret = pwrdm_for_each(pwrdms_setup, NULL);
+- if (ret) {
+- pr_err("Failed to setup powerdomains\n");
+- return ret;
+- }
+-
+ /*
+ * The dynamic dependency between MPUSS -> MEMIF and
+ * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
+@@ -272,6 +252,15 @@ int __init omap4_pm_init(void)
+
+ pr_info("Power Management for TI OMAP4+ devices.\n");
+
++ /*
++ * OMAP4 chip PM currently works only with certain (newer)
++ * versions of bootloaders. This is due to missing code in the
++ * kernel to properly reset and initialize some devices.
++ * http://www.spinics.net/lists/arm-kernel/msg218641.html
++ */
++ if (cpu_is_omap44xx())
++ pr_warn("OMAP4 PM: u-boot >= v2012.07 is required for full PM support\n");
++
+ ret = pwrdm_for_each(pwrdms_setup, NULL);
+ if (ret) {
+ pr_err("Failed to setup powerdomains.\n");
--- /dev/null
+From 021b77bee210843bed1ea91b5cad58235ff9c8e5 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Fri, 28 Nov 2014 11:33:34 +0300
+Subject: ceph: do_sync is never initialized
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 021b77bee210843bed1ea91b5cad58235ff9c8e5 upstream.
+
+Probably this code was syncing a lot more often then intended because
+the do_sync variable wasn't set to zero.
+
+Fixes: c62988ec0910 ('ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL.')
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ceph/addr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/ceph/addr.c
++++ b/fs/ceph/addr.c
+@@ -673,7 +673,7 @@ static int ceph_writepages_start(struct
+ int rc = 0;
+ unsigned wsize = 1 << inode->i_blkbits;
+ struct ceph_osd_request *req = NULL;
+- int do_sync;
++ int do_sync = 0;
+ u64 truncate_size, snap_size;
+ u32 truncate_seq;
+
--- /dev/null
+From 834b686552d9018e2d17bd56ac5361b78bcc75b8 Mon Sep 17 00:00:00 2001
+From: Alison Chaiken <alison_chaiken@mentor.com>
+Date: Mon, 10 Nov 2014 16:54:54 +0100
+Subject: MTD: m25p80: fix inconsistency in m25p_ids compared to spi_nor_ids
+
+From: Alison Chaiken <alison_chaiken@mentor.com>
+
+commit 834b686552d9018e2d17bd56ac5361b78bcc75b8 upstream.
+
+As stated in a5b7616c5, "mtd: m25p80,spi-nor: Fix module aliases for
+m25p80", m25p_ids[] in m25p80.c needs to be kept in sync with
+spi_nor_ids[] in spi-nor.c. The change here corrects a misalignment.
+
+(We were missing m25px80 and we had a duplicate w25q128.)
+
+Signed-off-by: Alison Chaiken <alison_chaiken@mentor.com>
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/devices/m25p80.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -300,11 +300,11 @@ static const struct spi_device_id m25p_i
+ {"m45pe10"}, {"m45pe80"}, {"m45pe16"},
+ {"m25pe20"}, {"m25pe80"}, {"m25pe16"},
+ {"m25px16"}, {"m25px32"}, {"m25px32-s0"}, {"m25px32-s1"},
+- {"m25px64"},
++ {"m25px64"}, {"m25px80"},
+ {"w25x10"}, {"w25x20"}, {"w25x40"}, {"w25x80"},
+ {"w25x16"}, {"w25x32"}, {"w25q32"}, {"w25q32dw"},
+- {"w25x64"}, {"w25q64"}, {"w25q128"}, {"w25q80"},
+- {"w25q80bl"}, {"w25q128"}, {"w25q256"}, {"cat25c11"},
++ {"w25x64"}, {"w25q64"}, {"w25q80"}, {"w25q80bl"},
++ {"w25q128"}, {"w25q256"}, {"cat25c11"},
+ {"cat25c03"}, {"cat25c09"}, {"cat25c17"}, {"cat25128"},
+ { },
+ };
--- /dev/null
+From 775a9134f4398ca98a10af8cc3cf9b664017267f Mon Sep 17 00:00:00 2001
+From: Roger Quadros <rogerq@ti.com>
+Date: Wed, 19 Nov 2014 14:22:23 +0200
+Subject: mtd: nand: omap: Fix NAND enumeration on 3430 LDP
+
+From: Roger Quadros <rogerq@ti.com>
+
+commit 775a9134f4398ca98a10af8cc3cf9b664017267f upstream.
+
+3430LDP has NAND flash with 32 bytes OOB size which is sufficient to hold
+BCH8 codes but the small page check introduced in
+commit b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")
+considers anything below 64 bytes unsuitable for BCH4/8/16. There is another
+bug in that code where it doesn't skip the check for OMAP_ECC_HAM1_CODE_SW.
+
+Get rid of that small page check code as it is insufficient and redundant
+because we are checking for OOB available bytes vs ecc layout before calling
+nand_scan_tail().
+
+Fixes: b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")
+
+Reported-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Roger Quadros <rogerq@ti.com>
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/nand/omap2.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/mtd/nand/omap2.c
++++ b/drivers/mtd/nand/omap2.c
+@@ -1741,13 +1741,6 @@ static int omap_nand_probe(struct platfo
+ goto return_error;
+ }
+
+- /* check for small page devices */
+- if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) {
+- dev_err(&info->pdev->dev, "small page devices are not supported\n");
+- err = -EINVAL;
+- goto return_error;
+- }
+-
+ /* re-populate low-level callbacks based on xfer modes */
+ switch (pdata->xfer_type) {
+ case NAND_OMAP_PREFETCH_POLLED:
--- /dev/null
+From 68f29815034e9dc9ed53cad85946c32b07adc8cc Mon Sep 17 00:00:00 2001
+From: Brian Norris <computersforpeace@gmail.com>
+Date: Fri, 21 Nov 2014 10:24:29 -0800
+Subject: mtd: tests: abort torturetest on erase errors
+
+From: Brian Norris <computersforpeace@gmail.com>
+
+commit 68f29815034e9dc9ed53cad85946c32b07adc8cc upstream.
+
+The torture test should quit once it actually induces an error in the
+flash. This step was accidentally removed during refactoring.
+
+Without this fix, the torturetest just continues infinitely, or until
+the maximum cycle count is reached. e.g.:
+
+ ...
+ [ 7619.218171] mtd_test: error -5 while erasing EB 100
+ [ 7619.297981] mtd_test: error -5 while erasing EB 100
+ [ 7619.377953] mtd_test: error -5 while erasing EB 100
+ [ 7619.457998] mtd_test: error -5 while erasing EB 100
+ [ 7619.537990] mtd_test: error -5 while erasing EB 100
+ ...
+
+Fixes: 6cf78358c94f ("mtd: mtd_torturetest: use mtd_test helpers")
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+Cc: Akinobu Mita <akinobu.mita@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/tests/torturetest.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/mtd/tests/torturetest.c
++++ b/drivers/mtd/tests/torturetest.c
+@@ -264,7 +264,9 @@ static int __init tort_init(void)
+ int i;
+ void *patt;
+
+- mtdtest_erase_good_eraseblocks(mtd, bad_ebs, eb, ebcnt);
++ err = mtdtest_erase_good_eraseblocks(mtd, bad_ebs, eb, ebcnt);
++ if (err)
++ goto out;
+
+ /* Check if the eraseblocks contain only 0xFF bytes */
+ if (check) {
--- /dev/null
+From 705304a863cc41585508c0f476f6d3ec28cf7e00 Mon Sep 17 00:00:00 2001
+From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
+Date: Wed, 10 Dec 2014 15:54:34 -0800
+Subject: nilfs2: fix the nilfs_iget() vs. nilfs_new_inode() races
+
+From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
+
+commit 705304a863cc41585508c0f476f6d3ec28cf7e00 upstream.
+
+Same story as in commit 41080b5a2401 ("nfsd race fixes: ext2") (similar
+ext2 fix) except that nilfs2 needs to use insert_inode_locked4() instead
+of insert_inode_locked() and a bug of a check for dead inodes needs to
+be fixed.
+
+If nilfs_iget() is called from nfsd after nilfs_new_inode() calls
+insert_inode_locked4(), nilfs_iget() will wait for unlock_new_inode() at
+the end of nilfs_mkdir()/nilfs_create()/etc to unlock the inode.
+
+If nilfs_iget() is called before nilfs_new_inode() calls
+insert_inode_locked4(), it will create an in-core inode and read its
+data from the on-disk inode. But, nilfs_iget() will find i_nlink equals
+zero and fail at nilfs_read_inode_common(), which will lead it to call
+iget_failed() and cleanly fail.
+
+However, this sanity check doesn't work as expected for reused on-disk
+inodes because they leave a non-zero value in i_mode field and it
+hinders the test of i_nlink. This patch also fixes the issue by
+removing the test on i_mode that nilfs2 doesn't need.
+
+Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nilfs2/inode.c | 32 ++++++++++++++++++++++++--------
+ fs/nilfs2/namei.c | 15 ++++++++++++---
+ 2 files changed, 36 insertions(+), 11 deletions(-)
+
+--- a/fs/nilfs2/inode.c
++++ b/fs/nilfs2/inode.c
+@@ -49,6 +49,8 @@ struct nilfs_iget_args {
+ int for_gc;
+ };
+
++static int nilfs_iget_test(struct inode *inode, void *opaque);
++
+ void nilfs_inode_add_blocks(struct inode *inode, int n)
+ {
+ struct nilfs_root *root = NILFS_I(inode)->i_root;
+@@ -348,6 +350,17 @@ const struct address_space_operations ni
+ .is_partially_uptodate = block_is_partially_uptodate,
+ };
+
++static int nilfs_insert_inode_locked(struct inode *inode,
++ struct nilfs_root *root,
++ unsigned long ino)
++{
++ struct nilfs_iget_args args = {
++ .ino = ino, .root = root, .cno = 0, .for_gc = 0
++ };
++
++ return insert_inode_locked4(inode, ino, nilfs_iget_test, &args);
++}
++
+ struct inode *nilfs_new_inode(struct inode *dir, umode_t mode)
+ {
+ struct super_block *sb = dir->i_sb;
+@@ -383,7 +396,7 @@ struct inode *nilfs_new_inode(struct ino
+ if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) {
+ err = nilfs_bmap_read(ii->i_bmap, NULL);
+ if (err < 0)
+- goto failed_bmap;
++ goto failed_after_creation;
+
+ set_bit(NILFS_I_BMAP, &ii->i_state);
+ /* No lock is needed; iget() ensures it. */
+@@ -399,21 +412,24 @@ struct inode *nilfs_new_inode(struct ino
+ spin_lock(&nilfs->ns_next_gen_lock);
+ inode->i_generation = nilfs->ns_next_generation++;
+ spin_unlock(&nilfs->ns_next_gen_lock);
+- insert_inode_hash(inode);
++ if (nilfs_insert_inode_locked(inode, root, ino) < 0) {
++ err = -EIO;
++ goto failed_after_creation;
++ }
+
+ err = nilfs_init_acl(inode, dir);
+ if (unlikely(err))
+- goto failed_acl; /* never occur. When supporting
++ goto failed_after_creation; /* never occur. When supporting
+ nilfs_init_acl(), proper cancellation of
+ above jobs should be considered */
+
+ return inode;
+
+- failed_acl:
+- failed_bmap:
++ failed_after_creation:
+ clear_nlink(inode);
++ unlock_new_inode(inode);
+ iput(inode); /* raw_inode will be deleted through
+- generic_delete_inode() */
++ nilfs_evict_inode() */
+ goto failed;
+
+ failed_ifile_create_inode:
+@@ -461,8 +477,8 @@ int nilfs_read_inode_common(struct inode
+ inode->i_atime.tv_nsec = le32_to_cpu(raw_inode->i_mtime_nsec);
+ inode->i_ctime.tv_nsec = le32_to_cpu(raw_inode->i_ctime_nsec);
+ inode->i_mtime.tv_nsec = le32_to_cpu(raw_inode->i_mtime_nsec);
+- if (inode->i_nlink == 0 && inode->i_mode == 0)
+- return -EINVAL; /* this inode is deleted */
++ if (inode->i_nlink == 0)
++ return -ESTALE; /* this inode is deleted */
+
+ inode->i_blocks = le64_to_cpu(raw_inode->i_blocks);
+ ii->i_flags = le32_to_cpu(raw_inode->i_flags);
+--- a/fs/nilfs2/namei.c
++++ b/fs/nilfs2/namei.c
+@@ -51,9 +51,11 @@ static inline int nilfs_add_nondir(struc
+ int err = nilfs_add_link(dentry, inode);
+ if (!err) {
+ d_instantiate(dentry, inode);
++ unlock_new_inode(inode);
+ return 0;
+ }
+ inode_dec_link_count(inode);
++ unlock_new_inode(inode);
+ iput(inode);
+ return err;
+ }
+@@ -182,6 +184,7 @@ out:
+ out_fail:
+ drop_nlink(inode);
+ nilfs_mark_inode_dirty(inode);
++ unlock_new_inode(inode);
+ iput(inode);
+ goto out;
+ }
+@@ -201,11 +204,15 @@ static int nilfs_link(struct dentry *old
+ inode_inc_link_count(inode);
+ ihold(inode);
+
+- err = nilfs_add_nondir(dentry, inode);
+- if (!err)
++ err = nilfs_add_link(dentry, inode);
++ if (!err) {
++ d_instantiate(dentry, inode);
+ err = nilfs_transaction_commit(dir->i_sb);
+- else
++ } else {
++ inode_dec_link_count(inode);
++ iput(inode);
+ nilfs_transaction_abort(dir->i_sb);
++ }
+
+ return err;
+ }
+@@ -243,6 +250,7 @@ static int nilfs_mkdir(struct inode *dir
+
+ nilfs_mark_inode_dirty(inode);
+ d_instantiate(dentry, inode);
++ unlock_new_inode(inode);
+ out:
+ if (!err)
+ err = nilfs_transaction_commit(dir->i_sb);
+@@ -255,6 +263,7 @@ out_fail:
+ drop_nlink(inode);
+ drop_nlink(inode);
+ nilfs_mark_inode_dirty(inode);
++ unlock_new_inode(inode);
+ iput(inode);
+ out_dir:
+ drop_nlink(dir);
--- /dev/null
+From 4bf9636c39ac70da091d5a2e28d3448eaa7f115c Mon Sep 17 00:00:00 2001
+From: Pavel Machek <pavel@ucw.cz>
+Date: Sun, 4 Jan 2015 20:01:23 +0100
+Subject: Revert "ARM: 7830/1: delay: don't bother reporting bogomips in /proc/cpuinfo"
+
+From: Pavel Machek <pavel@ucw.cz>
+
+commit 4bf9636c39ac70da091d5a2e28d3448eaa7f115c upstream.
+
+Commit 9fc2105aeaaf ("ARM: 7830/1: delay: don't bother reporting
+bogomips in /proc/cpuinfo") breaks audio in python, and probably
+elsewhere, with message
+
+ FATAL: cannot locate cpu MHz in /proc/cpuinfo
+
+I'm not the first one to hit it, see for example
+
+ https://theredblacktree.wordpress.com/2014/08/10/fatal-cannot-locate-cpu-mhz-in-proccpuinfo/
+ https://devtalk.nvidia.com/default/topic/765800/workaround-for-fatal-cannot-locate-cpu-mhz-in-proc-cpuinf/?offset=1
+
+Reading original changelog, I have to say "Stop breaking working setups.
+You know who you are!".
+
+Signed-off-by: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/kernel/setup.c | 9 +++++++++
+ arch/arm/kernel/smp.c | 13 +++++++++++--
+ 2 files changed, 20 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/kernel/setup.c
++++ b/arch/arm/kernel/setup.c
+@@ -1043,6 +1043,15 @@ static int c_show(struct seq_file *m, vo
+ seq_printf(m, "model name\t: %s rev %d (%s)\n",
+ cpu_name, cpuid & 15, elf_platform);
+
++#if defined(CONFIG_SMP)
++ seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
++ per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
++ (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
++#else
++ seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
++ loops_per_jiffy / (500000/HZ),
++ (loops_per_jiffy / (5000/HZ)) % 100);
++#endif
+ /* dump out the processor features */
+ seq_puts(m, "Features\t: ");
+
+--- a/arch/arm/kernel/smp.c
++++ b/arch/arm/kernel/smp.c
+@@ -387,8 +387,17 @@ asmlinkage void secondary_start_kernel(v
+
+ void __init smp_cpus_done(unsigned int max_cpus)
+ {
+- printk(KERN_INFO "SMP: Total of %d processors activated.\n",
+- num_online_cpus());
++ int cpu;
++ unsigned long bogosum = 0;
++
++ for_each_online_cpu(cpu)
++ bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
++
++ printk(KERN_INFO "SMP: Total of %d processors activated "
++ "(%lu.%02lu BogoMIPS).\n",
++ num_online_cpus(),
++ bogosum / (500000/HZ),
++ (bogosum / (5000/HZ)) % 100);
+
+ hyp_mode_check();
+ }
--- /dev/null
+From fd7de1e8d5b2b2b35e71332fafb899f584597150 Mon Sep 17 00:00:00 2001
+From: Andy Lutomirski <luto@amacapital.net>
+Date: Sat, 29 Nov 2014 08:13:51 -0800
+Subject: sched: Add missing rcu protection to wake_up_all_idle_cpus
+
+From: Andy Lutomirski <luto@amacapital.net>
+
+commit fd7de1e8d5b2b2b35e71332fafb899f584597150 upstream.
+
+Locklessly doing is_idle_task(rq->curr) is only okay because of
+RCU protection. The older variant of the broken code checked
+rq->curr == rq->idle instead and therefore didn't need RCU.
+
+Fixes: f6be8af1c95d ("sched: Add new API wake_up_if_idle() to wake up the idle cpu")
+Signed-off-by: Andy Lutomirski <luto@amacapital.net>
+Reviewed-by: Chuansheng Liu <chuansheng.liu@intel.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lkml.kernel.org/r/729365dddca178506dfd0a9451006344cd6808bc.1417277372.git.luto@amacapital.net
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/sched/core.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -1623,8 +1623,10 @@ void wake_up_if_idle(int cpu)
+ struct rq *rq = cpu_rq(cpu);
+ unsigned long flags;
+
+- if (!is_idle_task(rq->curr))
+- return;
++ rcu_read_lock();
++
++ if (!is_idle_task(rcu_dereference(rq->curr)))
++ goto out;
+
+ if (set_nr_if_polling(rq->idle)) {
+ trace_sched_wake_idle_without_ipi(cpu);
+@@ -1635,6 +1637,9 @@ void wake_up_if_idle(int cpu)
+ /* Else cpu is not in idle, do nothing here */
+ raw_spin_unlock_irqrestore(&rq->lock, flags);
+ }
++
++out:
++ rcu_read_unlock();
+ }
+
+ bool cpus_share_cache(int this_cpu, int that_cpu)
--- /dev/null
+From 269ad8015a6b2bb1cf9e684da4921eb6fa0a0c88 Mon Sep 17 00:00:00 2001
+From: Luca Abeni <luca.abeni@unitn.it>
+Date: Wed, 17 Dec 2014 11:50:32 +0100
+Subject: sched/deadline: Avoid double-accounting in case of missed deadlines
+
+From: Luca Abeni <luca.abeni@unitn.it>
+
+commit 269ad8015a6b2bb1cf9e684da4921eb6fa0a0c88 upstream.
+
+The dl_runtime_exceeded() function is supposed to ckeck if
+a SCHED_DEADLINE task must be throttled, by checking if its
+current runtime is <= 0. However, it also checks if the
+scheduling deadline has been missed (the current time is
+larger than the current scheduling deadline), further
+decreasing the runtime if this happens.
+This "double accounting" is wrong:
+
+- In case of partitioned scheduling (or single CPU), this
+ happens if task_tick_dl() has been called later than expected
+ (due to small HZ values). In this case, the current runtime is
+ also negative, and replenish_dl_entity() can take care of the
+ deadline miss by recharging the current runtime to a value smaller
+ than dl_runtime
+
+- In case of global scheduling on multiple CPUs, scheduling
+ deadlines can be missed even if the task did not consume more
+ runtime than expected, hence penalizing the task is wrong
+
+This patch fix this problem by throttling a SCHED_DEADLINE task
+only when its runtime becomes negative, and not modifying the runtime
+
+Signed-off-by: Luca Abeni <luca.abeni@unitn.it>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Acked-by: Juri Lelli <juri.lelli@gmail.com>
+Cc: Dario Faggioli <raistlin@linux.it>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Link: http://lkml.kernel.org/r/1418813432-20797-3-git-send-email-luca.abeni@unitn.it
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/sched/deadline.c | 19 +------------------
+ 1 file changed, 1 insertion(+), 18 deletions(-)
+
+--- a/kernel/sched/deadline.c
++++ b/kernel/sched/deadline.c
+@@ -575,24 +575,7 @@ void init_dl_task_timer(struct sched_dl_
+ static
+ int dl_runtime_exceeded(struct rq *rq, struct sched_dl_entity *dl_se)
+ {
+- int dmiss = dl_time_before(dl_se->deadline, rq_clock(rq));
+- int rorun = dl_se->runtime <= 0;
+-
+- if (!rorun && !dmiss)
+- return 0;
+-
+- /*
+- * If we are beyond our current deadline and we are still
+- * executing, then we have already used some of the runtime of
+- * the next instance. Thus, if we do not account that, we are
+- * stealing bandwidth from the system at each deadline miss!
+- */
+- if (dmiss) {
+- dl_se->runtime = rorun ? dl_se->runtime : 0;
+- dl_se->runtime -= rq_clock(rq) - dl_se->deadline;
+- }
+-
+- return 1;
++ return (dl_se->runtime <= 0);
+ }
+
+ extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
--- /dev/null
+From 6a503c3be937d275113b702e0421e5b0720abe8a Mon Sep 17 00:00:00 2001
+From: Luca Abeni <luca.abeni@unitn.it>
+Date: Wed, 17 Dec 2014 11:50:31 +0100
+Subject: sched/deadline: Fix migration of SCHED_DEADLINE tasks
+
+From: Luca Abeni <luca.abeni@unitn.it>
+
+commit 6a503c3be937d275113b702e0421e5b0720abe8a upstream.
+
+According to global EDF, tasks should be migrated between runqueues
+without checking if their scheduling deadlines and runtimes are valid.
+However, SCHED_DEADLINE currently performs such a check:
+a migration happens doing:
+
+ deactivate_task(rq, next_task, 0);
+ set_task_cpu(next_task, later_rq->cpu);
+ activate_task(later_rq, next_task, 0);
+
+which ends up calling dequeue_task_dl(), setting the new CPU, and then
+calling enqueue_task_dl().
+
+enqueue_task_dl() then calls enqueue_dl_entity(), which calls
+update_dl_entity(), which can modify scheduling deadline and runtime,
+breaking global EDF scheduling.
+
+As a result, some of the properties of global EDF are not respected:
+for example, a taskset {(30, 80), (40, 80), (120, 170)} scheduled on
+two cores can have unbounded response times for the third task even
+if 30/80+40/80+120/170 = 1.5809 < 2
+
+This can be fixed by invoking update_dl_entity() only in case of
+wakeup, or if this is a new SCHED_DEADLINE task.
+
+Signed-off-by: Luca Abeni <luca.abeni@unitn.it>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Acked-by: Juri Lelli <juri.lelli@gmail.com>
+Cc: Dario Faggioli <raistlin@linux.it>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Link: http://lkml.kernel.org/r/1418813432-20797-2-git-send-email-luca.abeni@unitn.it
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/sched/deadline.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/kernel/sched/deadline.c
++++ b/kernel/sched/deadline.c
+@@ -831,10 +831,10 @@ enqueue_dl_entity(struct sched_dl_entity
+ * parameters of the task might need updating. Otherwise,
+ * we want a replenishment of its runtime.
+ */
+- if (!dl_se->dl_new && flags & ENQUEUE_REPLENISH)
+- replenish_dl_entity(dl_se, pi_se);
+- else
++ if (dl_se->dl_new || flags & ENQUEUE_WAKEUP)
+ update_dl_entity(dl_se, pi_se);
++ else if (flags & ENQUEUE_REPLENISH)
++ replenish_dl_entity(dl_se, pi_se);
+
+ __enqueue_dl_entity(dl_se);
+ }
--- /dev/null
+From 7b990789a4c3420fa57596b368733158e432d444 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Wed, 10 Dec 2014 15:41:28 -0800
+Subject: scripts/kernel-doc: don't eat struct members with __aligned
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit 7b990789a4c3420fa57596b368733158e432d444 upstream.
+
+The change from \d+ to .+ inside __aligned() means that the following
+structure:
+
+ struct test {
+ u8 a __aligned(2);
+ u8 b __aligned(2);
+ };
+
+essentially gets modified to
+
+ struct test {
+ u8 a;
+ };
+
+for purposes of kernel-doc, thus dropping a struct member, which in
+turns causes warnings and invalid kernel-doc generation.
+
+Fix this by replacing the catch-all (".") with anything that's not a
+semicolon ("[^;]").
+
+Fixes: 9dc30918b23f ("scripts/kernel-doc: handle struct member __aligned without numbers")
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Cc: Nishanth Menon <nm@ti.com>
+Cc: Randy Dunlap <rdunlap@infradead.org>
+Cc: Michal Marek <mmarek@suse.cz>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ scripts/kernel-doc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/scripts/kernel-doc
++++ b/scripts/kernel-doc
+@@ -1753,7 +1753,7 @@ sub dump_struct($$) {
+ # strip kmemcheck_bitfield_{begin,end}.*;
+ $members =~ s/kmemcheck_bitfield_.*?;//gos;
+ # strip attributes
+- $members =~ s/__aligned\s*\(.+\)//gos;
++ $members =~ s/__aligned\s*\([^;]*\)//gos;
+
+ create_parameterlist($members, ';', $file);
+ check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested);
nfsd4-fix-xdr4-count-of-server-in-fs_location4.patch
nfsd-fix-fi_delegees-leak-when-fi_had_conflict-returns-true.patch
acpi-video-update-the-skip-case-for-acpi_video_device_in_dod.patch
+ceph-do_sync-is-never-initialized.patch
+mtd-tests-abort-torturetest-on-erase-errors.patch
+mtd-m25p80-fix-inconsistency-in-m25p_ids-compared-to-spi_nor_ids.patch
+mtd-nand-omap-fix-nand-enumeration-on-3430-ldp.patch
+nilfs2-fix-the-nilfs_iget-vs.-nilfs_new_inode-races.patch
+scripts-kernel-doc-don-t-eat-struct-members-with-__aligned.patch
+sched-deadline-fix-migration-of-sched_deadline-tasks.patch
+sched-deadline-avoid-double-accounting-in-case-of-missed-deadlines.patch
+sched-add-missing-rcu-protection-to-wake_up_all_idle_cpus.patch
+arm-dts-am437x-sk-fix-lcd-enable-pin-mux-data.patch
+arm-dts-am437x-sk-evm.dts-fix-lcd-timings.patch
+arm-defconfigs-use-config_cpufreq_dt.patch
+arm-dts-dra7-wdt-fix-compatible-property-for-watchdog.patch
+arm-dts-enable-pwm-node-by-default-for-s3c64xx.patch
+arm-omap4-pm-only-do-static-dependency-configuration-in-omap4_init_static_deps.patch
+revert-arm-7830-1-delay-don-t-bother-reporting-bogomips-in-proc-cpuinfo.patch