From ab0382745fe19e70a58267a8e9641a9c7d3b7f43 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 25 Mar 2014 14:07:13 -0700 Subject: [PATCH] 3.10-stable patches added patches: arm-highbank-avoid-l2-cache-smc-calls-when-pl310-is-not.patch arm-move-outer_cache-declaration-out-of-ifdef.patch --- ...l2-cache-smc-calls-when-pl310-is-not.patch | 60 +++++++++++++++++++ ...outer_cache-declaration-out-of-ifdef.patch | 36 +++++++++++ queue-3.10/series | 2 + 3 files changed, 98 insertions(+) create mode 100644 queue-3.10/arm-highbank-avoid-l2-cache-smc-calls-when-pl310-is-not.patch create mode 100644 queue-3.10/arm-move-outer_cache-declaration-out-of-ifdef.patch diff --git a/queue-3.10/arm-highbank-avoid-l2-cache-smc-calls-when-pl310-is-not.patch b/queue-3.10/arm-highbank-avoid-l2-cache-smc-calls-when-pl310-is-not.patch new file mode 100644 index 00000000000..295a6f105dc --- /dev/null +++ b/queue-3.10/arm-highbank-avoid-l2-cache-smc-calls-when-pl310-is-not.patch @@ -0,0 +1,60 @@ +From a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf Mon Sep 17 00:00:00 2001 +From: Rob Herring +Date: Sat, 17 Aug 2013 20:10:28 -0500 +Subject: ARM: highbank: avoid L2 cache smc calls when PL310 is not + present + +From: Rob Herring + +commit a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf upstream. + +While Midway firmware handles L2 smc calls as nops, the custom smc calls +present a problem when running virtualized Midway guest. They aren't +needed so just avoid calling them. + +In the process, cleanup the L2X0 ifdefs and use IS_ENABLED instead. + +Signed-off-by: Rob Herring +Signed-off-by: Ian Campbell +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-highbank/highbank.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +--- a/arch/arm/mach-highbank/highbank.c ++++ b/arch/arm/mach-highbank/highbank.c +@@ -65,14 +65,12 @@ void highbank_set_cpu_jump(int cpu, void + HB_JUMP_TABLE_PHYS(cpu) + 15); + } + +-#ifdef CONFIG_CACHE_L2X0 + static void highbank_l2x0_disable(void) + { + outer_flush_all(); + /* Disable PL310 L2 Cache controller */ + highbank_smc1(0x102, 0x0); + } +-#endif + + static void __init highbank_init_irq(void) + { +@@ -81,12 +79,13 @@ static void __init highbank_init_irq(voi + if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) + highbank_scu_map_io(); + +-#ifdef CONFIG_CACHE_L2X0 + /* Enable PL310 L2 Cache controller */ +- highbank_smc1(0x102, 0x1); +- l2x0_of_init(0, ~0UL); +- outer_cache.disable = highbank_l2x0_disable; +-#endif ++ if (IS_ENABLED(CONFIG_CACHE_L2X0) && ++ of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) { ++ highbank_smc1(0x102, 0x1); ++ l2x0_of_init(0, ~0UL); ++ outer_cache.disable = highbank_l2x0_disable; ++ } + } + + static void __init highbank_timer_init(void) diff --git a/queue-3.10/arm-move-outer_cache-declaration-out-of-ifdef.patch b/queue-3.10/arm-move-outer_cache-declaration-out-of-ifdef.patch new file mode 100644 index 00000000000..dcca542b46c --- /dev/null +++ b/queue-3.10/arm-move-outer_cache-declaration-out-of-ifdef.patch @@ -0,0 +1,36 @@ +From 0b53c11d533a8f6688d73fad0baf67dd08ec1b90 Mon Sep 17 00:00:00 2001 +From: Rob Herring +Date: Sat, 17 Aug 2013 20:12:57 -0500 +Subject: ARM: move outer_cache declaration out of ifdef + +From: Rob Herring + +commit 0b53c11d533a8f6688d73fad0baf67dd08ec1b90 upstream. + +Move the outer_cache declaration of the CONFIG_OUTER_CACHE ifdef so that +outer_cache can be used inside IS_ENABLED condition. + +Signed-off-by: Rob Herring +Cc: Russell King +Signed-off-by: Ian Campbell +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/include/asm/outercache.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/include/asm/outercache.h ++++ b/arch/arm/include/asm/outercache.h +@@ -37,10 +37,10 @@ struct outer_cache_fns { + void (*resume)(void); + }; + +-#ifdef CONFIG_OUTER_CACHE +- + extern struct outer_cache_fns outer_cache; + ++#ifdef CONFIG_OUTER_CACHE ++ + static inline void outer_inv_range(phys_addr_t start, phys_addr_t end) + { + if (outer_cache.inv_range) diff --git a/queue-3.10/series b/queue-3.10/series index dc430ceb36e..461312481fc 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -11,3 +11,5 @@ x86-bpf_jit-support-negative-offsets.patch deb-pkg-fix-cross-building-linux-headers-package.patch p54-clamp-properly-instead-of-just-truncating.patch regulator-core-replace-direct-ops-disable-usage.patch +arm-move-outer_cache-declaration-out-of-ifdef.patch +arm-highbank-avoid-l2-cache-smc-calls-when-pl310-is-not.patch -- 2.47.3