]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 20:54:58 +0000 (13:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 20:54:58 +0000 (13:54 -0700)
added patches:
autofs-remove-autofs-dentry-mount-check.patch
powerpc-emulate-non-privileged-dscr-read-and-write.patch
powerpc-fix-numa-distance-for-form0-device-tree.patch
pwm-spear-fix-checking-return-value-of-clk_enable-and-clk_prepare.patch
xen-arm-actually-pass-a-non-null-percpu-pointer-to-request_percpu_irq.patch

queue-3.8/autofs-remove-autofs-dentry-mount-check.patch [new file with mode: 0644]
queue-3.8/powerpc-emulate-non-privileged-dscr-read-and-write.patch [new file with mode: 0644]
queue-3.8/powerpc-fix-numa-distance-for-form0-device-tree.patch [new file with mode: 0644]
queue-3.8/pwm-spear-fix-checking-return-value-of-clk_enable-and-clk_prepare.patch [new file with mode: 0644]
queue-3.8/series [new file with mode: 0644]
queue-3.8/xen-arm-actually-pass-a-non-null-percpu-pointer-to-request_percpu_irq.patch [new file with mode: 0644]

diff --git a/queue-3.8/autofs-remove-autofs-dentry-mount-check.patch b/queue-3.8/autofs-remove-autofs-dentry-mount-check.patch
new file mode 100644 (file)
index 0000000..4d3e63c
--- /dev/null
@@ -0,0 +1,48 @@
+From ce8a5dbdf9e709bdaf4618d7ef8cceb91e8adc69 Mon Sep 17 00:00:00 2001
+From: David Jeffery <djeffery@redhat.com>
+Date: Mon, 6 May 2013 13:49:30 +0800
+Subject: autofs - remove autofs dentry mount check
+
+From: David Jeffery <djeffery@redhat.com>
+
+commit ce8a5dbdf9e709bdaf4618d7ef8cceb91e8adc69 upstream.
+
+When checking if an autofs mount point is busy it isn't sufficient to
+only check if it's a mount point.
+
+For example, if the mount of an offset mountpoint in a tree is denied
+for this host by its export and the dentry becomes a process working
+directory the check incorrectly returns the mount as not in use at
+expire.
+
+This can happen since the default when mounting within a tree is
+nostrict, which means ingnore mount fails on mounts within the tree and
+continue.  The nostrict option is meant to allow mounting in this case.
+
+Signed-off-by: David Jeffery <djeffery@redhat.com>
+Signed-off-by: Ian Kent <raven@themaw.net>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/autofs4/expire.c |    9 ---------
+ 1 file changed, 9 deletions(-)
+
+--- a/fs/autofs4/expire.c
++++ b/fs/autofs4/expire.c
+@@ -61,15 +61,6 @@ static int autofs4_mount_busy(struct vfs
+               /* This is an autofs submount, we can't expire it */
+               if (autofs_type_indirect(sbi->type))
+                       goto done;
+-
+-              /*
+-               * Otherwise it's an offset mount and we need to check
+-               * if we can umount its mount, if there is one.
+-               */
+-              if (!d_mountpoint(path.dentry)) {
+-                      status = 0;
+-                      goto done;
+-              }
+       }
+       /* Update the expiry counter if fs is busy */
diff --git a/queue-3.8/powerpc-emulate-non-privileged-dscr-read-and-write.patch b/queue-3.8/powerpc-emulate-non-privileged-dscr-read-and-write.patch
new file mode 100644 (file)
index 0000000..19b4e31
--- /dev/null
@@ -0,0 +1,71 @@
+From 73d2fb758e678c93bc76d40876c2359f0729b0ef Mon Sep 17 00:00:00 2001
+From: Anton Blanchard <anton@samba.org>
+Date: Wed, 1 May 2013 20:06:33 +0000
+Subject: powerpc: Emulate non privileged DSCR read and write
+
+From: Anton Blanchard <anton@samba.org>
+
+commit 73d2fb758e678c93bc76d40876c2359f0729b0ef upstream.
+
+POWER8 allows read and write of the DSCR in userspace. We added
+kernel emulation so applications could always use the instructions
+regardless of the CPU type.
+
+Unfortunately there are two SPRs for the DSCR and we only added
+emulation for the privileged one. Add code to match the non
+privileged one.
+
+A simple test was created to verify the fix:
+
+http://ozlabs.org/~anton/junkcode/user_dscr_test.c
+
+Without the patch we get a SIGILL and it passes with the patch.
+
+Signed-off-by: Anton Blanchard <anton@samba.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/include/asm/ppc-opcode.h |    4 ++++
+ arch/powerpc/kernel/traps.c           |   10 ++++++++--
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+--- a/arch/powerpc/include/asm/ppc-opcode.h
++++ b/arch/powerpc/include/asm/ppc-opcode.h
+@@ -112,6 +112,10 @@
+ #define PPC_INST_MFSPR_DSCR_MASK      0xfc1fffff
+ #define PPC_INST_MTSPR_DSCR           0x7c1103a6
+ #define PPC_INST_MTSPR_DSCR_MASK      0xfc1fffff
++#define PPC_INST_MFSPR_DSCR_USER      0x7c0302a6
++#define PPC_INST_MFSPR_DSCR_USER_MASK 0xfc1fffff
++#define PPC_INST_MTSPR_DSCR_USER      0x7c0303a6
++#define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1fffff
+ #define PPC_INST_SLBFEE                       0x7c0007a7
+ #define PPC_INST_STRING                       0x7c00042a
+--- a/arch/powerpc/kernel/traps.c
++++ b/arch/powerpc/kernel/traps.c
+@@ -961,7 +961,10 @@ static int emulate_instruction(struct pt
+ #ifdef CONFIG_PPC64
+       /* Emulate the mfspr rD, DSCR. */
+-      if (((instword & PPC_INST_MFSPR_DSCR_MASK) == PPC_INST_MFSPR_DSCR) &&
++      if ((((instword & PPC_INST_MFSPR_DSCR_USER_MASK) ==
++              PPC_INST_MFSPR_DSCR_USER) ||
++           ((instword & PPC_INST_MFSPR_DSCR_MASK) ==
++              PPC_INST_MFSPR_DSCR)) &&
+                       cpu_has_feature(CPU_FTR_DSCR)) {
+               PPC_WARN_EMULATED(mfdscr, regs);
+               rd = (instword >> 21) & 0x1f;
+@@ -969,7 +972,10 @@ static int emulate_instruction(struct pt
+               return 0;
+       }
+       /* Emulate the mtspr DSCR, rD. */
+-      if (((instword & PPC_INST_MTSPR_DSCR_MASK) == PPC_INST_MTSPR_DSCR) &&
++      if ((((instword & PPC_INST_MTSPR_DSCR_USER_MASK) ==
++              PPC_INST_MTSPR_DSCR_USER) ||
++           ((instword & PPC_INST_MTSPR_DSCR_MASK) ==
++              PPC_INST_MTSPR_DSCR)) &&
+                       cpu_has_feature(CPU_FTR_DSCR)) {
+               PPC_WARN_EMULATED(mtdscr, regs);
+               rd = (instword >> 21) & 0x1f;
diff --git a/queue-3.8/powerpc-fix-numa-distance-for-form0-device-tree.patch b/queue-3.8/powerpc-fix-numa-distance-for-form0-device-tree.patch
new file mode 100644 (file)
index 0000000..ce39320
--- /dev/null
@@ -0,0 +1,51 @@
+From 7122beeee7bc1757682049780179d7c216dd1c83 Mon Sep 17 00:00:00 2001
+From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
+Date: Fri, 22 Mar 2013 05:49:35 +0000
+Subject: powerpc: fix numa distance for form0 device tree
+
+From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
+
+commit 7122beeee7bc1757682049780179d7c216dd1c83 upstream.
+
+The following commit breaks numa distance setup for old powerpc
+systems that use form0 encoding in device tree.
+
+commit 41eab6f88f24124df89e38067b3766b7bef06ddb
+powerpc/numa: Use form 1 affinity to setup node distance
+
+Device tree node /rtas/ibm,associativity-reference-points would
+index into /cpus/PowerPCxxxx/ibm,associativity based on form0 or
+form1 encoding detected by ibm,architecture-vec-5 property.
+
+All modern systems use form1 and current kernel code is correct.
+However, on older systems with form0 encoding, the numa distance
+will get hard coded as LOCAL_DISTANCE for all nodes.  This causes
+task scheduling anomaly since scheduler will skip building numa
+level domain (topmost domain with all cpus) if all numa distances
+are same.  (value of 'level' in sched_init_numa() will remain 0)
+
+Prior to the above commit:
+((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE)
+
+Restoring compatible behavior with this patch for old powerpc systems
+with device tree where numa distance are encoded as form0.
+
+Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/mm/numa.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/mm/numa.c
++++ b/arch/powerpc/mm/numa.c
+@@ -201,7 +201,7 @@ int __node_distance(int a, int b)
+       int distance = LOCAL_DISTANCE;
+       if (!form1_affinity)
+-              return distance;
++              return ((a == b) ? LOCAL_DISTANCE : REMOTE_DISTANCE);
+       for (i = 0; i < distance_ref_points_depth; i++) {
+               if (distance_lookup_table[a][i] == distance_lookup_table[b][i])
diff --git a/queue-3.8/pwm-spear-fix-checking-return-value-of-clk_enable-and-clk_prepare.patch b/queue-3.8/pwm-spear-fix-checking-return-value-of-clk_enable-and-clk_prepare.patch
new file mode 100644 (file)
index 0000000..0e1fc85
--- /dev/null
@@ -0,0 +1,47 @@
+From 563861cd633ae52932843477bb6ca3f1c9e2f78b Mon Sep 17 00:00:00 2001
+From: Axel Lin <axel.lin@ingics.com>
+Date: Sat, 30 Mar 2013 20:43:22 +0800
+Subject: pwm: spear: Fix checking return value of clk_enable() and clk_prepare()
+
+From: Axel Lin <axel.lin@ingics.com>
+
+commit 563861cd633ae52932843477bb6ca3f1c9e2f78b upstream.
+
+The logic to check return value of clk_enable() and clk_prepare() is reversed,
+fix it.
+
+Signed-off-by: Axel Lin <axel.lin@ingics.com>
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pwm/pwm-spear.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/pwm/pwm-spear.c
++++ b/drivers/pwm/pwm-spear.c
+@@ -143,7 +143,7 @@ static int spear_pwm_enable(struct pwm_c
+       u32 val;
+       rc = clk_enable(pc->clk);
+-      if (!rc)
++      if (rc)
+               return rc;
+       val = spear_pwm_readl(pc, pwm->hwpwm, PWMCR);
+@@ -209,12 +209,12 @@ static int spear_pwm_probe(struct platfo
+       pc->chip.npwm = NUM_PWM;
+       ret = clk_prepare(pc->clk);
+-      if (!ret)
++      if (ret)
+               return ret;
+       if (of_device_is_compatible(np, "st,spear1340-pwm")) {
+               ret = clk_enable(pc->clk);
+-              if (!ret) {
++              if (ret) {
+                       clk_unprepare(pc->clk);
+                       return ret;
+               }
diff --git a/queue-3.8/series b/queue-3.8/series
new file mode 100644 (file)
index 0000000..0622557
--- /dev/null
@@ -0,0 +1,5 @@
+xen-arm-actually-pass-a-non-null-percpu-pointer-to-request_percpu_irq.patch
+powerpc-emulate-non-privileged-dscr-read-and-write.patch
+powerpc-fix-numa-distance-for-form0-device-tree.patch
+pwm-spear-fix-checking-return-value-of-clk_enable-and-clk_prepare.patch
+autofs-remove-autofs-dentry-mount-check.patch
diff --git a/queue-3.8/xen-arm-actually-pass-a-non-null-percpu-pointer-to-request_percpu_irq.patch b/queue-3.8/xen-arm-actually-pass-a-non-null-percpu-pointer-to-request_percpu_irq.patch
new file mode 100644 (file)
index 0000000..b2120be
--- /dev/null
@@ -0,0 +1,28 @@
+From 2798ba7d19aed645663398a21ec4006bfdbb1ef3 Mon Sep 17 00:00:00 2001
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Date: Thu, 25 Apr 2013 13:53:09 +0000
+Subject: xen/arm: actually pass a non-NULL percpu pointer to request_percpu_irq
+
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+
+commit 2798ba7d19aed645663398a21ec4006bfdbb1ef3 upstream.
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Reviewed-by: Ian Campbell <ian.camjpbell@citrix.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/xen/enlighten.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/xen/enlighten.c
++++ b/arch/arm/xen/enlighten.c
+@@ -237,7 +237,7 @@ static int __init xen_init_events(void)
+       xen_init_IRQ();
+       if (request_percpu_irq(xen_events_irq, xen_arm_callback,
+-                      "events", xen_vcpu)) {
++                      "events", &xen_vcpu)) {
+               pr_err("Error requesting IRQ %d\n", xen_events_irq);
+               return -EINVAL;
+       }