]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 11:52:19 +0000 (13:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 11:52:19 +0000 (13:52 +0200)
added patches:
dt-bindings-iio-io-channel-mux-fix-compatible-string-in-example-code.patch
iio-dac-ad5592r-fix-unbalanced-mutex-unlocks-in-ad5592r_read_raw.patch
powerpc-fix-circular-dependency-between-percpu.h-and-mmu.h.patch
xtensa-fix-xtensa_pmu_setup-prototype.patch

queue-4.14/dt-bindings-iio-io-channel-mux-fix-compatible-string-in-example-code.patch [new file with mode: 0644]
queue-4.14/iio-dac-ad5592r-fix-unbalanced-mutex-unlocks-in-ad5592r_read_raw.patch [new file with mode: 0644]
queue-4.14/powerpc-fix-circular-dependency-between-percpu.h-and-mmu.h.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/xtensa-fix-xtensa_pmu_setup-prototype.patch [new file with mode: 0644]

diff --git a/queue-4.14/dt-bindings-iio-io-channel-mux-fix-compatible-string-in-example-code.patch b/queue-4.14/dt-bindings-iio-io-channel-mux-fix-compatible-string-in-example-code.patch
new file mode 100644 (file)
index 0000000..8d3b53a
--- /dev/null
@@ -0,0 +1,34 @@
+From add48ba425192c6e04ce70549129cacd01e2a09e Mon Sep 17 00:00:00 2001
+From: Christian Eggers <ceggers@arri.de>
+Date: Mon, 27 Jul 2020 12:16:05 +0200
+Subject: dt-bindings: iio: io-channel-mux: Fix compatible string in example code
+
+From: Christian Eggers <ceggers@arri.de>
+
+commit add48ba425192c6e04ce70549129cacd01e2a09e upstream.
+
+The correct compatible string is "gpio-mux" (see
+bindings/mux/gpio-mux.txt).
+
+Cc: stable@vger.kernel.org # v4.13+
+Reviewed-by: Peter Rosin <peda@axentia.se>
+Signed-off-by: Christian Eggers <ceggers@arri.de>
+Link: https://lore.kernel.org/r/20200727101605.24384-1-ceggers@arri.de
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt
++++ b/Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt
+@@ -21,7 +21,7 @@ controller state. The mux controller sta
+ Example:
+       mux: mux-controller {
+-              compatible = "mux-gpio";
++              compatible = "gpio-mux";
+               #mux-control-cells = <0>;
+               mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
diff --git a/queue-4.14/iio-dac-ad5592r-fix-unbalanced-mutex-unlocks-in-ad5592r_read_raw.patch b/queue-4.14/iio-dac-ad5592r-fix-unbalanced-mutex-unlocks-in-ad5592r_read_raw.patch
new file mode 100644 (file)
index 0000000..7cacef7
--- /dev/null
@@ -0,0 +1,47 @@
+From 65afb0932a81c1de719ceee0db0b276094b10ac8 Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <alexandru.ardelean@analog.com>
+Date: Mon, 6 Jul 2020 14:02:57 +0300
+Subject: iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
+
+From: Alexandru Ardelean <alexandru.ardelean@analog.com>
+
+commit 65afb0932a81c1de719ceee0db0b276094b10ac8 upstream.
+
+There are 2 exit paths where the lock isn't held, but try to unlock the
+mutex when exiting. In these places we should just return from the
+function.
+
+A neater approach would be to cleanup the ad5592r_read_raw(), but that
+would make this patch more difficult to backport to stable versions.
+
+Fixes 56ca9db862bf3: ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")
+Reported-by: Charles Stanhope <charles.stanhope@gmail.com>
+Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
+Cc: <Stable@vger.kernel.org>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/dac/ad5592r-base.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/iio/dac/ad5592r-base.c
++++ b/drivers/iio/dac/ad5592r-base.c
+@@ -417,7 +417,7 @@ static int ad5592r_read_raw(struct iio_d
+                       s64 tmp = *val * (3767897513LL / 25LL);
+                       *val = div_s64_rem(tmp, 1000000000LL, val2);
+-                      ret = IIO_VAL_INT_PLUS_MICRO;
++                      return IIO_VAL_INT_PLUS_MICRO;
+               } else {
+                       int mult;
+@@ -448,7 +448,7 @@ static int ad5592r_read_raw(struct iio_d
+               ret =  IIO_VAL_INT;
+               break;
+       default:
+-              ret = -EINVAL;
++              return -EINVAL;
+       }
+ unlock:
diff --git a/queue-4.14/powerpc-fix-circular-dependency-between-percpu.h-and-mmu.h.patch b/queue-4.14/powerpc-fix-circular-dependency-between-percpu.h-and-mmu.h.patch
new file mode 100644 (file)
index 0000000..ced8e21
--- /dev/null
@@ -0,0 +1,66 @@
+From 0c83b277ada72b585e6a3e52b067669df15bcedb Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Tue, 4 Aug 2020 22:44:06 +1000
+Subject: powerpc: Fix circular dependency between percpu.h and mmu.h
+
+From: Michael Ellerman <mpe@ellerman.id.au>
+
+commit 0c83b277ada72b585e6a3e52b067669df15bcedb upstream.
+
+Recently random.h started including percpu.h (see commit
+f227e3ec3b5c ("random32: update the net random state on interrupt and
+activity")), which broke corenet64_smp_defconfig:
+
+  In file included from /linux/arch/powerpc/include/asm/paca.h:18,
+                   from /linux/arch/powerpc/include/asm/percpu.h:13,
+                   from /linux/include/linux/random.h:14,
+                   from /linux/lib/uuid.c:14:
+  /linux/arch/powerpc/include/asm/mmu.h:139:22: error: unknown type name 'next_tlbcam_idx'
+    139 | DECLARE_PER_CPU(int, next_tlbcam_idx);
+
+This is due to a circular header dependency:
+  asm/mmu.h includes asm/percpu.h, which includes asm/paca.h, which
+  includes asm/mmu.h
+
+Which means DECLARE_PER_CPU() isn't defined when mmu.h needs it.
+
+We can fix it by moving the include of paca.h below the include of
+asm-generic/percpu.h.
+
+This moves the include of paca.h out of the #ifdef __powerpc64__, but
+that is OK because paca.h is almost entirely inside #ifdef
+CONFIG_PPC64 anyway.
+
+It also moves the include of paca.h out of the #ifdef CONFIG_SMP,
+which could possibly break something, but seems to have no ill
+effects.
+
+Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and activity")
+Cc: stable@vger.kernel.org # v5.8
+Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20200804130558.292328-1-mpe@ellerman.id.au
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/include/asm/percpu.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/powerpc/include/asm/percpu.h
++++ b/arch/powerpc/include/asm/percpu.h
+@@ -10,8 +10,6 @@
+ #ifdef CONFIG_SMP
+-#include <asm/paca.h>
+-
+ #define __my_cpu_offset local_paca->data_offset
+ #endif /* CONFIG_SMP */
+@@ -19,4 +17,6 @@
+ #include <asm-generic/percpu.h>
++#include <asm/paca.h>
++
+ #endif /* _ASM_POWERPC_PERCPU_H_ */
index 61d1d402adf18af02750f83c212be8433fb15d87..8091fcd74da238bb6d0ab37445a6430af509b115 100644 (file)
@@ -169,3 +169,7 @@ pci-hotplug-acpi-fix-context-refcounting-in-acpiphp_grab_context.patch
 btrfs-don-t-allocate-anonymous-block-device-for-user-invisible-roots.patch
 btrfs-only-search-for-left_info-if-there-is-no-right_info-in-try_merge_free_space.patch
 btrfs-fix-memory-leaks-after-failure-to-lookup-checksums-during-inode-logging.patch
+dt-bindings-iio-io-channel-mux-fix-compatible-string-in-example-code.patch
+iio-dac-ad5592r-fix-unbalanced-mutex-unlocks-in-ad5592r_read_raw.patch
+xtensa-fix-xtensa_pmu_setup-prototype.patch
+powerpc-fix-circular-dependency-between-percpu.h-and-mmu.h.patch
diff --git a/queue-4.14/xtensa-fix-xtensa_pmu_setup-prototype.patch b/queue-4.14/xtensa-fix-xtensa_pmu_setup-prototype.patch
new file mode 100644 (file)
index 0000000..d56e9dc
--- /dev/null
@@ -0,0 +1,38 @@
+From 6d65d3769d1910379e1cfa61ebf387efc6bfb22c Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+Date: Fri, 31 Jul 2020 12:37:32 -0700
+Subject: xtensa: fix xtensa_pmu_setup prototype
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Max Filippov <jcmvbkbc@gmail.com>
+
+commit 6d65d3769d1910379e1cfa61ebf387efc6bfb22c upstream.
+
+Fix the following build error in configurations with
+CONFIG_XTENSA_VARIANT_HAVE_PERF_EVENTS=y:
+
+  arch/xtensa/kernel/perf_event.c:420:29: error: passing argument 3 of
+  ‘cpuhp_setup_state’ from incompatible pointer type
+
+Cc: stable@vger.kernel.org
+Fixes: 25a77b55e74c ("xtensa/perf: Convert the hotplug notifier to state machine callbacks")
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/xtensa/kernel/perf_event.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/xtensa/kernel/perf_event.c
++++ b/arch/xtensa/kernel/perf_event.c
+@@ -404,7 +404,7 @@ static struct pmu xtensa_pmu = {
+       .read = xtensa_pmu_read,
+ };
+-static int xtensa_pmu_setup(int cpu)
++static int xtensa_pmu_setup(unsigned int cpu)
+ {
+       unsigned i;