Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-15 10:23:48 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-15 10:24:07 +0100
commit63fa1c986c2105a23204ef558f83f1ab5e695dae (patch)
tree095b7904f9d0ad2d5062ea9531b384d972a853d0
parentd3b24c49161036874eb22a466dfa5dcae2af58f2 (diff)
ARM: tango: Improve ARCH_MULTIPLATFORM compatibility
-rw-r--r--patches.kernel.org/4.20.9-030-ARM-tango-Improve-ARCH_MULTIPLATFORM-compatibi.patch85
-rw-r--r--series.conf1
2 files changed, 86 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.9-030-ARM-tango-Improve-ARCH_MULTIPLATFORM-compatibi.patch b/patches.kernel.org/4.20.9-030-ARM-tango-Improve-ARCH_MULTIPLATFORM-compatibi.patch
new file mode 100644
index 0000000000..63a202e6d3
--- /dev/null
+++ b/patches.kernel.org/4.20.9-030-ARM-tango-Improve-ARCH_MULTIPLATFORM-compatibi.patch
@@ -0,0 +1,85 @@
+From: Marc Gonzalez <marc.w.gonzalez@free.fr>
+Date: Wed, 16 Jan 2019 16:49:58 +0100
+Subject: [PATCH] ARM: tango: Improve ARCH_MULTIPLATFORM compatibility
+References: bnc#1012628
+Patch-mainline: 4.20.9
+Git-commit: d0f9f16788e15d9eb40f68b047732d49658c5a3a
+
+commit d0f9f16788e15d9eb40f68b047732d49658c5a3a upstream.
+
+Calling platform-specific code unconditionally blows up when running
+an ARCH_MULTIPLATFORM kernel on a different platform. Don't do it.
+
+Reported-by: Paolo Pisati <p.pisati@gmail.com>
+Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
+Acked-by: Pavel Machek <pavel@ucw.cz>
+Cc: stable@vger.kernel.org # v4.8+
+Fixes: a30eceb7a59d ("ARM: tango: add Suspend-to-RAM support")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/arm/mach-tango/pm.c | 6 ++----
+ arch/arm/mach-tango/pm.h | 7 +++++++
+ arch/arm/mach-tango/setup.c | 2 ++
+ 3 files changed, 11 insertions(+), 4 deletions(-)
+ create mode 100644 arch/arm/mach-tango/pm.h
+
+diff --git a/arch/arm/mach-tango/pm.c b/arch/arm/mach-tango/pm.c
+index 028e50c6383f..a32c3b631484 100644
+--- a/arch/arm/mach-tango/pm.c
++++ b/arch/arm/mach-tango/pm.c
+@@ -3,6 +3,7 @@
+ #include <linux/suspend.h>
+ #include <asm/suspend.h>
+ #include "smc.h"
++#include "pm.h"
+
+ static int tango_pm_powerdown(unsigned long arg)
+ {
+@@ -24,10 +25,7 @@ static const struct platform_suspend_ops tango_pm_ops = {
+ .valid = suspend_valid_only_mem,
+ };
+
+-static int __init tango_pm_init(void)
++void __init tango_pm_init(void)
+ {
+ suspend_set_ops(&tango_pm_ops);
+- return 0;
+ }
+-
+-late_initcall(tango_pm_init);
+diff --git a/arch/arm/mach-tango/pm.h b/arch/arm/mach-tango/pm.h
+new file mode 100644
+index 000000000000..35ea705a0ee2
+--- /dev/null
++++ b/arch/arm/mach-tango/pm.h
+@@ -0,0 +1,7 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++
++#ifdef CONFIG_SUSPEND
++void __init tango_pm_init(void);
++#else
++#define tango_pm_init NULL
++#endif
+diff --git a/arch/arm/mach-tango/setup.c b/arch/arm/mach-tango/setup.c
+index 677dd7b5efd9..824f90737b04 100644
+--- a/arch/arm/mach-tango/setup.c
++++ b/arch/arm/mach-tango/setup.c
+@@ -2,6 +2,7 @@
+ #include <asm/mach/arch.h>
+ #include <asm/hardware/cache-l2x0.h>
+ #include "smc.h"
++#include "pm.h"
+
+ static void tango_l2c_write(unsigned long val, unsigned int reg)
+ {
+@@ -15,4 +16,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango DT")
+ .dt_compat = tango_dt_compat,
+ .l2c_aux_mask = ~0,
+ .l2c_write_sec = tango_l2c_write,
++ .init_late = tango_pm_init,
+ MACHINE_END
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 9c46279a42..297af7442f 100644
--- a/series.conf
+++ b/series.conf
@@ -1112,6 +1112,7 @@
patches.kernel.org/4.20.9-027-mips-loongson64-remove-unreachable-fix-loongso.patch
patches.kernel.org/4.20.9-028-MIPS-VDSO-Include-ccflags-vdso-in-o32-n32-.lds.patch
patches.kernel.org/4.20.9-029-ARM-iop32x-n2100-fix-PCI-IRQ-mapping.patch
+ patches.kernel.org/4.20.9-030-ARM-tango-Improve-ARCH_MULTIPLATFORM-compatibi.patch
########################################################
# Build fixes that apply to the vanilla kernel too.