]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Mar 2020 11:20:28 +0000 (12:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Mar 2020 11:20:28 +0000 (12:20 +0100)
added patches:
arm-dts-imx6dl-colibri-eval-v3-fix-sram-compatible-properties.patch
arm-imx-build-v7_cpu_resume-unconditionally.patch
dmaengine-coh901318-fix-a-double-lock-bug-in-dma_tc_handle.patch
hwmon-adt7462-fix-an-error-return-in-adt7462_reg_volt.patch
powerpc-fix-hardware-pmu-exception-bug-on-powervm-compatibility-mode-systems.patch

queue-4.14/arm-dts-imx6dl-colibri-eval-v3-fix-sram-compatible-properties.patch [new file with mode: 0644]
queue-4.14/arm-imx-build-v7_cpu_resume-unconditionally.patch [new file with mode: 0644]
queue-4.14/dmaengine-coh901318-fix-a-double-lock-bug-in-dma_tc_handle.patch [new file with mode: 0644]
queue-4.14/hwmon-adt7462-fix-an-error-return-in-adt7462_reg_volt.patch [new file with mode: 0644]
queue-4.14/powerpc-fix-hardware-pmu-exception-bug-on-powervm-compatibility-mode-systems.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/arm-dts-imx6dl-colibri-eval-v3-fix-sram-compatible-properties.patch b/queue-4.14/arm-dts-imx6dl-colibri-eval-v3-fix-sram-compatible-properties.patch
new file mode 100644 (file)
index 0000000..cdea65a
--- /dev/null
@@ -0,0 +1,52 @@
+From bcbf53a0dab50980867476994f6079c1ec5bb3a3 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 12 Feb 2020 11:46:29 +0100
+Subject: ARM: dts: imx6dl-colibri-eval-v3: fix sram compatible properties
+
+From: Johan Hovold <johan@kernel.org>
+
+commit bcbf53a0dab50980867476994f6079c1ec5bb3a3 upstream.
+
+The sram-node compatible properties have mistakingly combined the
+model-specific string with the generic "mtd-ram" string.
+
+Note that neither "cy7c1019dv33-10zsxi, mtd-ram" or
+"cy7c1019dv33-10zsxi" are used by any in-kernel driver and they are
+not present in any binding.
+
+The physmap driver will however bind to platform devices that specify
+"mtd-ram".
+
+Fixes: fc48e76489fd ("ARM: dts: imx6: Add support for Toradex Colibri iMX6 module")
+Cc: Sanchayan Maity <maitysanchayan@gmail.com>
+Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
+Cc: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
++++ b/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
+@@ -231,7 +231,7 @@
+       /* SRAM on Colibri nEXT_CS0 */
+       sram@0,0 {
+-              compatible = "cypress,cy7c1019dv33-10zsxi, mtd-ram";
++              compatible = "cypress,cy7c1019dv33-10zsxi", "mtd-ram";
+               reg = <0 0 0x00010000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+@@ -242,7 +242,7 @@
+       /* SRAM on Colibri nEXT_CS1 */
+       sram@1,0 {
+-              compatible = "cypress,cy7c1019dv33-10zsxi, mtd-ram";
++              compatible = "cypress,cy7c1019dv33-10zsxi", "mtd-ram";
+               reg = <1 0 0x00010000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
diff --git a/queue-4.14/arm-imx-build-v7_cpu_resume-unconditionally.patch b/queue-4.14/arm-imx-build-v7_cpu_resume-unconditionally.patch
new file mode 100644 (file)
index 0000000..a2e8c84
--- /dev/null
@@ -0,0 +1,119 @@
+From 512a928affd51c2dc631401e56ad5ee5d5dd68b6 Mon Sep 17 00:00:00 2001
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Thu, 16 Jan 2020 15:18:49 +0100
+Subject: ARM: imx: build v7_cpu_resume() unconditionally
+
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+
+commit 512a928affd51c2dc631401e56ad5ee5d5dd68b6 upstream.
+
+This function is not only needed by the platform suspend code, but is also
+reused as the CPU resume function when the ARM cores can be powered down
+completely in deep idle, which is the case on i.MX6SX and i.MX6UL(L).
+
+Providing the static inline stub whenever CONFIG_SUSPEND is disabled means
+that those platforms will hang on resume from cpuidle if suspend is disabled.
+
+So there are two problems:
+
+  - The static inline stub masks the linker error
+  - The function is not available where needed
+
+Fix both by just building the function unconditionally, when
+CONFIG_SOC_IMX6 is enabled. The actual code is three instructions long,
+so it's arguably ok to just leave it in for all i.MX6 kernel configurations.
+
+Fixes: 05136f0897b5 ("ARM: imx: support arm power off in cpuidle for i.mx6sx")
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-imx/Makefile       |    2 ++
+ arch/arm/mach-imx/common.h       |    4 ++--
+ arch/arm/mach-imx/resume-imx6.S  |   24 ++++++++++++++++++++++++
+ arch/arm/mach-imx/suspend-imx6.S |   14 --------------
+ 4 files changed, 28 insertions(+), 16 deletions(-)
+
+--- a/arch/arm/mach-imx/Makefile
++++ b/arch/arm/mach-imx/Makefile
+@@ -87,6 +87,8 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7
+ obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
+ obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
+ endif
++AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a
++obj-$(CONFIG_SOC_IMX6) += resume-imx6.o
+ obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
+ obj-$(CONFIG_SOC_IMX1) += mach-imx1.o
+--- a/arch/arm/mach-imx/common.h
++++ b/arch/arm/mach-imx/common.h
+@@ -111,17 +111,17 @@ void imx_cpu_die(unsigned int cpu);
+ int imx_cpu_kill(unsigned int cpu);
+ #ifdef CONFIG_SUSPEND
+-void v7_cpu_resume(void);
+ void imx53_suspend(void __iomem *ocram_vbase);
+ extern const u32 imx53_suspend_sz;
+ void imx6_suspend(void __iomem *ocram_vbase);
+ #else
+-static inline void v7_cpu_resume(void) {}
+ static inline void imx53_suspend(void __iomem *ocram_vbase) {}
+ static const u32 imx53_suspend_sz;
+ static inline void imx6_suspend(void __iomem *ocram_vbase) {}
+ #endif
++void v7_cpu_resume(void);
++
+ void imx6_pm_ccm_init(const char *ccm_compat);
+ void imx6q_pm_init(void);
+ void imx6dl_pm_init(void);
+--- /dev/null
++++ b/arch/arm/mach-imx/resume-imx6.S
+@@ -0,0 +1,24 @@
++/* SPDX-License-Identifier: GPL-2.0-or-later */
++/*
++ * Copyright 2014 Freescale Semiconductor, Inc.
++ */
++
++#include <linux/linkage.h>
++#include <asm/assembler.h>
++#include <asm/asm-offsets.h>
++#include <asm/hardware/cache-l2x0.h>
++#include "hardware.h"
++
++/*
++ * The following code must assume it is running from physical address
++ * where absolute virtual addresses to the data section have to be
++ * turned into relative ones.
++ */
++
++ENTRY(v7_cpu_resume)
++      bl      v7_invalidate_l1
++#ifdef CONFIG_CACHE_L2X0
++      bl      l2c310_early_resume
++#endif
++      b       cpu_resume
++ENDPROC(v7_cpu_resume)
+--- a/arch/arm/mach-imx/suspend-imx6.S
++++ b/arch/arm/mach-imx/suspend-imx6.S
+@@ -333,17 +333,3 @@ resume:
+       ret     lr
+ ENDPROC(imx6_suspend)
+-
+-/*
+- * The following code must assume it is running from physical address
+- * where absolute virtual addresses to the data section have to be
+- * turned into relative ones.
+- */
+-
+-ENTRY(v7_cpu_resume)
+-      bl      v7_invalidate_l1
+-#ifdef CONFIG_CACHE_L2X0
+-      bl      l2c310_early_resume
+-#endif
+-      b       cpu_resume
+-ENDPROC(v7_cpu_resume)
diff --git a/queue-4.14/dmaengine-coh901318-fix-a-double-lock-bug-in-dma_tc_handle.patch b/queue-4.14/dmaengine-coh901318-fix-a-double-lock-bug-in-dma_tc_handle.patch
new file mode 100644 (file)
index 0000000..bae45a3
--- /dev/null
@@ -0,0 +1,41 @@
+From 36d5d22090d13fd3a7a8c9663a711cbe6970aac8 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Mon, 17 Feb 2020 17:40:50 +0300
+Subject: dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 36d5d22090d13fd3a7a8c9663a711cbe6970aac8 upstream.
+
+The caller is already holding the lock so this will deadlock.
+
+Fixes: 0b58828c923e ("DMAENGINE: COH 901 318 remove irq counting")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Link: https://lore.kernel.org/r/20200217144050.3i4ymbytogod4ijn@kili.mountain
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/dma/coh901318.c |    4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/drivers/dma/coh901318.c
++++ b/drivers/dma/coh901318.c
+@@ -1944,8 +1944,6 @@ static void dma_tc_handle(struct coh9013
+               return;
+       }
+-      spin_lock(&cohc->lock);
+-
+       /*
+        * When we reach this point, at least one queue item
+        * should have been moved over from cohc->queue to
+@@ -1966,8 +1964,6 @@ static void dma_tc_handle(struct coh9013
+       if (coh901318_queue_start(cohc) == NULL)
+               cohc->busy = 0;
+-      spin_unlock(&cohc->lock);
+-
+       /*
+        * This tasklet will remove items from cohc->active
+        * and thus terminates them.
diff --git a/queue-4.14/hwmon-adt7462-fix-an-error-return-in-adt7462_reg_volt.patch b/queue-4.14/hwmon-adt7462-fix-an-error-return-in-adt7462_reg_volt.patch
new file mode 100644 (file)
index 0000000..c671ca7
--- /dev/null
@@ -0,0 +1,36 @@
+From 44f2f882909fedfc3a56e4b90026910456019743 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Tue, 3 Mar 2020 13:16:08 +0300
+Subject: hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 44f2f882909fedfc3a56e4b90026910456019743 upstream.
+
+This is only called from adt7462_update_device().  The caller expects it
+to return zero on error.  I fixed a similar issue earlier in commit
+a4bf06d58f21 ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0")
+but I missed this one.
+
+Fixes: c0b4e3ab0c76 ("adt7462: new hwmon driver")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Link: https://lore.kernel.org/r/20200303101608.kqjwfcazu2ylhi2a@kili.mountain
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/adt7462.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/adt7462.c
++++ b/drivers/hwmon/adt7462.c
+@@ -426,7 +426,7 @@ static int ADT7462_REG_VOLT(struct adt74
+                       return 0x95;
+               break;
+       }
+-      return -ENODEV;
++      return 0;
+ }
+ /* Provide labels for sysfs */
diff --git a/queue-4.14/powerpc-fix-hardware-pmu-exception-bug-on-powervm-compatibility-mode-systems.patch b/queue-4.14/powerpc-fix-hardware-pmu-exception-bug-on-powervm-compatibility-mode-systems.patch
new file mode 100644 (file)
index 0000000..9a7f826
--- /dev/null
@@ -0,0 +1,45 @@
+From fc37a1632d40c80c067eb1bc235139f5867a2667 Mon Sep 17 00:00:00 2001
+From: "Desnes A. Nunes do Rosario" <desnesn@linux.ibm.com>
+Date: Thu, 27 Feb 2020 10:47:15 -0300
+Subject: powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems
+
+From: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>
+
+commit fc37a1632d40c80c067eb1bc235139f5867a2667 upstream.
+
+PowerVM systems running compatibility mode on a few Power8 revisions are
+still vulnerable to the hardware defect that loses PMU exceptions arriving
+prior to a context switch.
+
+The software fix for this issue is enabled through the CPU_FTR_PMAO_BUG
+cpu_feature bit, nevertheless this bit also needs to be set for PowerVM
+compatibility mode systems.
+
+Fixes: 68f2f0d431d9ea4 ("powerpc: Add a cpu feature CPU_FTR_PMAO_BUG")
+Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>
+Reviewed-by: Leonardo Bras <leonardo@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20200227134715.9715-1-desnesn@linux.ibm.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/kernel/cputable.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/cputable.c
++++ b/arch/powerpc/kernel/cputable.c
+@@ -2232,11 +2232,13 @@ static struct cpu_spec * __init setup_cp
+                * oprofile_cpu_type already has a value, then we are
+                * possibly overriding a real PVR with a logical one,
+                * and, in that case, keep the current value for
+-               * oprofile_cpu_type.
++               * oprofile_cpu_type. Futhermore, let's ensure that the
++               * fix for the PMAO bug is enabled on compatibility mode.
+                */
+               if (old.oprofile_cpu_type != NULL) {
+                       t->oprofile_cpu_type = old.oprofile_cpu_type;
+                       t->oprofile_type = old.oprofile_type;
++                      t->cpu_features |= old.cpu_features & CPU_FTR_PMAO_BUG;
+               }
+       }
index eb97fc88e4d061bb13864fc426b41803e84dbe7b..e05c5b5aaee0f25d5618d425f18cfbcabe081734 100644 (file)
@@ -117,3 +117,8 @@ asoc-dapm-correct-dapm-handling-of-active-widgets-during-shutdown.patch
 rdma-iwcm-fix-iwcm-work-deallocation.patch
 rmda-cm-fix-missing-ib_cm_destroy_id-in-ib_cm_insert_listen.patch
 ib-hfi1-qib-ensure-rcu-is-locked-when-accessing-list.patch
+arm-imx-build-v7_cpu_resume-unconditionally.patch
+arm-dts-imx6dl-colibri-eval-v3-fix-sram-compatible-properties.patch
+hwmon-adt7462-fix-an-error-return-in-adt7462_reg_volt.patch
+dmaengine-coh901318-fix-a-double-lock-bug-in-dma_tc_handle.patch
+powerpc-fix-hardware-pmu-exception-bug-on-powervm-compatibility-mode-systems.patch