]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jan 2015 05:21:42 +0000 (21:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jan 2015 05:21:42 +0000 (21:21 -0800)
added patches:
arm-dts-dra7-wdt-fix-compatible-property-for-watchdog.patch
arm-dts-enable-pwm-node-by-default-for-s3c64xx.patch
arm-mvebu-disable-i-o-coherency-on-non-smp-situations-on-armada-370-375-38x-xp.patch
arm-omap4-pm-only-do-static-dependency-configuration-in-omap4_init_static_deps.patch
ceph-do_sync-is-never-initialized.patch
ceph-fix-null-pointer-dereference-in-discard_cap_releases.patch
mtd-tests-abort-torturetest-on-erase-errors.patch
nilfs2-fix-the-nilfs_iget-vs.-nilfs_new_inode-races.patch
revert-arm-7830-1-delay-don-t-bother-reporting-bogomips-in-proc-cpuinfo.patch
sched-deadline-avoid-double-accounting-in-case-of-missed-deadlines.patch
sched-deadline-fix-migration-of-sched_deadline-tasks.patch
scripts-kernel-doc-don-t-eat-struct-members-with-__aligned.patch

13 files changed:
queue-3.14/arm-dts-dra7-wdt-fix-compatible-property-for-watchdog.patch [new file with mode: 0644]
queue-3.14/arm-dts-enable-pwm-node-by-default-for-s3c64xx.patch [new file with mode: 0644]
queue-3.14/arm-mvebu-disable-i-o-coherency-on-non-smp-situations-on-armada-370-375-38x-xp.patch [new file with mode: 0644]
queue-3.14/arm-omap4-pm-only-do-static-dependency-configuration-in-omap4_init_static_deps.patch [new file with mode: 0644]
queue-3.14/ceph-do_sync-is-never-initialized.patch [new file with mode: 0644]
queue-3.14/ceph-fix-null-pointer-dereference-in-discard_cap_releases.patch [new file with mode: 0644]
queue-3.14/mtd-tests-abort-torturetest-on-erase-errors.patch [new file with mode: 0644]
queue-3.14/nilfs2-fix-the-nilfs_iget-vs.-nilfs_new_inode-races.patch [new file with mode: 0644]
queue-3.14/revert-arm-7830-1-delay-don-t-bother-reporting-bogomips-in-proc-cpuinfo.patch [new file with mode: 0644]
queue-3.14/sched-deadline-avoid-double-accounting-in-case-of-missed-deadlines.patch [new file with mode: 0644]
queue-3.14/sched-deadline-fix-migration-of-sched_deadline-tasks.patch [new file with mode: 0644]
queue-3.14/scripts-kernel-doc-don-t-eat-struct-members-with-__aligned.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/arm-dts-dra7-wdt-fix-compatible-property-for-watchdog.patch b/queue-3.14/arm-dts-dra7-wdt-fix-compatible-property-for-watchdog.patch
new file mode 100644 (file)
index 0000000..59db853
--- /dev/null
@@ -0,0 +1,34 @@
+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
+@@ -458,7 +458,7 @@
+               };
+               wdt2: wdt@4ae14000 {
+-                      compatible = "ti,omap4-wdt";
++                      compatible = "ti,omap3-wdt";
+                       reg = <0x4ae14000 0x80>;
+                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                       ti,hwmods = "wd_timer2";
diff --git a/queue-3.14/arm-dts-enable-pwm-node-by-default-for-s3c64xx.patch b/queue-3.14/arm-dts-enable-pwm-node-by-default-for-s3c64xx.patch
new file mode 100644 (file)
index 0000000..1ca4b0c
--- /dev/null
@@ -0,0 +1,47 @@
+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
+@@ -168,7 +168,6 @@
+                       clocks = <&clocks PCLK_PWM>;
+                       samsung,pwm-outputs = <0>, <1>;
+                       #pwm-cells = <3>;
+-                      status = "disabled";
+               };
+               pinctrl0: pinctrl@7f008000 {
diff --git a/queue-3.14/arm-mvebu-disable-i-o-coherency-on-non-smp-situations-on-armada-370-375-38x-xp.patch b/queue-3.14/arm-mvebu-disable-i-o-coherency-on-non-smp-situations-on-armada-370-375-38x-xp.patch
new file mode 100644 (file)
index 0000000..a25b536
--- /dev/null
@@ -0,0 +1,100 @@
+From e55355453600a33bb5ca4f71f2d7214875f3b061 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Thu, 13 Nov 2014 10:38:57 +0100
+Subject: ARM: mvebu: disable I/O coherency on non-SMP situations on Armada 370/375/38x/XP
+
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+commit e55355453600a33bb5ca4f71f2d7214875f3b061 upstream.
+
+Enabling the hardware I/O coherency on Armada 370, Armada 375, Armada
+38x and Armada XP requires a certain number of conditions:
+
+ - On Armada 370, the cache policy must be set to write-allocate.
+
+ - On Armada 375, 38x and XP, the cache policy must be set to
+   write-allocate, the pages must be mapped with the shareable
+   attribute, and the SMP bit must be set
+
+Currently, on Armada XP, when CONFIG_SMP is enabled, those conditions
+are met. However, when Armada XP is used in a !CONFIG_SMP kernel, none
+of these conditions are met. With Armada 370, the situation is worse:
+since the processor is single core, regardless of whether CONFIG_SMP
+or !CONFIG_SMP is used, the cache policy will be set to write-back by
+the kernel and not write-allocate.
+
+Since solving this problem turns out to be quite complicated, and we
+don't want to let users with a mainline kernel known to have
+infrequent but existing data corruptions, this commit proposes to
+simply disable hardware I/O coherency in situations where it is known
+not to work.
+
+And basically, the is_smp() function of the kernel tells us whether it
+is OK to enable hardware I/O coherency or not, so this commit slightly
+refactors the coherency_type() function to return
+COHERENCY_FABRIC_TYPE_NONE when is_smp() is false, or the appropriate
+type of the coherency fabric in the other case.
+
+Thanks to this, the I/O coherency fabric will no longer be used at all
+in !CONFIG_SMP configurations. It will continue to be used in
+CONFIG_SMP configurations on Armada XP, Armada 375 and Armada 38x
+(which are multiple cores processors), but will no longer be used on
+Armada 370 (which is a single core processor).
+
+In the process, it simplifies the implementation of the
+coherency_type() function, and adds a missing call to of_node_put().
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Fixes: e60304f8cb7bb545e79fe62d9b9762460c254ec2 ("arm: mvebu: Add hardware I/O Coherency support")
+Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Link: https://lkml.kernel.org/r/1415871540-20302-3-git-send-email-thomas.petazzoni@free-electrons.com
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ arch/arm/mach-mvebu/coherency.c |   26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+--- a/arch/arm/mach-mvebu/coherency.c
++++ b/arch/arm/mach-mvebu/coherency.c
+@@ -125,6 +125,29 @@ int __init coherency_init(void)
+ {
+       struct device_node *np;
++      /*
++       * The coherency fabric is needed:
++       * - For coherency between processors on Armada XP, so only
++       *   when SMP is enabled.
++       * - For coherency between the processor and I/O devices, but
++       *   this coherency requires many pre-requisites (write
++       *   allocate cache policy, shareable pages, SMP bit set) that
++       *   are only meant in SMP situations.
++       *
++       * Note that this means that on Armada 370, there is currently
++       * no way to use hardware I/O coherency, because even when
++       * CONFIG_SMP is enabled, is_smp() returns false due to the
++       * Armada 370 being a single-core processor. To lift this
++       * limitation, we would have to find a way to make the cache
++       * policy set to write-allocate (on all Armada SoCs), and to
++       * set the shareable attribute in page tables (on all Armada
++       * SoCs except the Armada 370). Unfortunately, such decisions
++       * are taken very early in the kernel boot process, at a point
++       * where we don't know yet on which SoC we are running.
++       */
++      if (!is_smp())
++              return 0;
++
+       np = of_find_matching_node(NULL, of_coherency_table);
+       if (np) {
+               struct resource res;
+@@ -151,6 +174,9 @@ static int __init coherency_late_init(vo
+ {
+       struct device_node *np;
++      if (!is_smp())
++              return 0;
++
+       np = of_find_matching_node(NULL, of_coherency_table);
+       if (np) {
+               bus_register_notifier(&platform_bus_type,
diff --git a/queue-3.14/arm-omap4-pm-only-do-static-dependency-configuration-in-omap4_init_static_deps.patch b/queue-3.14/arm-omap4-pm-only-do-static-dependency-configuration-in-omap4_init_static_deps.patch
new file mode 100644 (file)
index 0000000..d3394a2
--- /dev/null
@@ -0,0 +1,77 @@
+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
+@@ -148,26 +148,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
+@@ -231,6 +211,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");
diff --git a/queue-3.14/ceph-do_sync-is-never-initialized.patch b/queue-3.14/ceph-do_sync-is-never-initialized.patch
new file mode 100644 (file)
index 0000000..6f8c367
--- /dev/null
@@ -0,0 +1,32 @@
+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
+@@ -676,7 +676,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;
diff --git a/queue-3.14/ceph-fix-null-pointer-dereference-in-discard_cap_releases.patch b/queue-3.14/ceph-fix-null-pointer-dereference-in-discard_cap_releases.patch
new file mode 100644 (file)
index 0000000..a6f5182
--- /dev/null
@@ -0,0 +1,51 @@
+From 00bd8edb861eb41d274938cfc0338999d9c593a3 Mon Sep 17 00:00:00 2001
+From: "Yan, Zheng" <zheng.z.yan@intel.com>
+Date: Mon, 24 Mar 2014 09:56:43 +0800
+Subject: ceph: fix null pointer dereference in discard_cap_releases()
+
+From: "Yan, Zheng" <zheng.z.yan@intel.com>
+
+commit 00bd8edb861eb41d274938cfc0338999d9c593a3 upstream.
+
+send_mds_reconnect() may call discard_cap_releases() after all
+release messages have been dropped by cleanup_cap_releases()
+
+Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
+Reviewed-by: Sage Weil <sage@inktank.com>
+Cc: Markus Blank-Burian <burian@muenster.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ceph/mds_client.c |   21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+--- a/fs/ceph/mds_client.c
++++ b/fs/ceph/mds_client.c
+@@ -1461,15 +1461,18 @@ static void discard_cap_releases(struct
+       dout("discard_cap_releases mds%d\n", session->s_mds);
+-      /* zero out the in-progress message */
+-      msg = list_first_entry(&session->s_cap_releases,
+-                             struct ceph_msg, list_head);
+-      head = msg->front.iov_base;
+-      num = le32_to_cpu(head->num);
+-      dout("discard_cap_releases mds%d %p %u\n", session->s_mds, msg, num);
+-      head->num = cpu_to_le32(0);
+-      msg->front.iov_len = sizeof(*head);
+-      session->s_num_cap_releases += num;
++      if (!list_empty(&session->s_cap_releases)) {
++              /* zero out the in-progress message */
++              msg = list_first_entry(&session->s_cap_releases,
++                                      struct ceph_msg, list_head);
++              head = msg->front.iov_base;
++              num = le32_to_cpu(head->num);
++              dout("discard_cap_releases mds%d %p %u\n",
++                   session->s_mds, msg, num);
++              head->num = cpu_to_le32(0);
++              msg->front.iov_len = sizeof(*head);
++              session->s_num_cap_releases += num;
++      }
+       /* requeue completed messages */
+       while (!list_empty(&session->s_cap_releases_done)) {
diff --git a/queue-3.14/mtd-tests-abort-torturetest-on-erase-errors.patch b/queue-3.14/mtd-tests-abort-torturetest-on-erase-errors.patch
new file mode 100644 (file)
index 0000000..2d3f1a7
--- /dev/null
@@ -0,0 +1,45 @@
+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) {
diff --git a/queue-3.14/nilfs2-fix-the-nilfs_iget-vs.-nilfs_new_inode-races.patch b/queue-3.14/nilfs2-fix-the-nilfs_iget-vs.-nilfs_new_inode-races.patch
new file mode 100644 (file)
index 0000000..431dd4e
--- /dev/null
@@ -0,0 +1,176 @@
+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;
+@@ -347,6 +349,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;
+@@ -382,7 +395,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. */
+@@ -398,21 +411,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:
+@@ -460,8 +476,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);
diff --git a/queue-3.14/revert-arm-7830-1-delay-don-t-bother-reporting-bogomips-in-proc-cpuinfo.patch b/queue-3.14/revert-arm-7830-1-delay-don-t-bother-reporting-bogomips-in-proc-cpuinfo.patch
new file mode 100644 (file)
index 0000000..f9ff5f5
--- /dev/null
@@ -0,0 +1,72 @@
+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
+@@ -1021,6 +1021,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
+@@ -388,8 +388,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();
+ }
diff --git a/queue-3.14/sched-deadline-avoid-double-accounting-in-case-of-missed-deadlines.patch b/queue-3.14/sched-deadline-avoid-double-accounting-in-case-of-missed-deadlines.patch
new file mode 100644 (file)
index 0000000..a7993db
--- /dev/null
@@ -0,0 +1,72 @@
+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
+@@ -550,24 +550,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);
diff --git a/queue-3.14/sched-deadline-fix-migration-of-sched_deadline-tasks.patch b/queue-3.14/sched-deadline-fix-migration-of-sched_deadline-tasks.patch
new file mode 100644 (file)
index 0000000..e859782
--- /dev/null
@@ -0,0 +1,62 @@
+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
+@@ -806,10 +806,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);
+ }
diff --git a/queue-3.14/scripts-kernel-doc-don-t-eat-struct-members-with-__aligned.patch b/queue-3.14/scripts-kernel-doc-don-t-eat-struct-members-with-__aligned.patch
new file mode 100644 (file)
index 0000000..c1fc67a
--- /dev/null
@@ -0,0 +1,53 @@
+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);
index ea17bfd022646f0fe7761d46988bdac55a480392..4c62f5cfa6cfa57f8760cd5bef52534d5e6a39f6 100644 (file)
@@ -49,3 +49,15 @@ n_tty-fix-read_buf-race-condition-increment-read_head-after-pushing-data.patch
 drivers-hv-vmbus-fix-a-race-condition-when-unregistering-a-device.patch
 fs-nfsd-fix-signedness-bug-in-compare_blob.patch
 nfsd4-fix-xdr4-inclusion-of-escaped-char.patch
+ceph-do_sync-is-never-initialized.patch
+ceph-fix-null-pointer-dereference-in-discard_cap_releases.patch
+mtd-tests-abort-torturetest-on-erase-errors.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
+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
+arm-mvebu-disable-i-o-coherency-on-non-smp-situations-on-armada-370-375-38x-xp.patch