ARM: OMAP4/highbank: Flush L2 cache before disabling
PATCH 1/1 ARM: OMAP4/highbank: Flush L2 cache before disabling
Kexec disables outer cache before jumping to reboot code, but it doesn't flush it explicitly. Flush is done implicitly inside of l2x0_disable(). But some SoC's override default .disable handler and don't flush cache. This may lead to a corrupted memory during Kexec reboot on these platforms.
This patch adds cache flush inside of OMAP4 and Highbank outer_cache.disable() handlers to make it consistent with default l2x0_disable().
Also it removes redundant outer_flush_all() call just before outer_disable().
---
Based on v3.12-rc3
RFC v2: https://patchwork.kernel.org/patch/2990231/
Make the fix specific to platforms that don't use l2x0_disable().
RFC v1: https://patchwork.kernel.org/patch/2974431/
---
Cc: Will Deacon <[email protected]>
Cc: Russell King <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: linaro-kernel at lists.linaro.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-omap at vger.kernel.org
--- arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/pm.c | 1 - arch/arm/mach-omap2/omap4-common.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-highbank/highbank.c +1 -0
@@ -63,6 +63,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)static void highbank_l2x0_disable (void ) { +outer_flush_all ();/* Disable PL310 L2 Cache controller */ highbank_smc1 (0x102 ,0x0 ); }
arch/arm/mach-highbank/pm.c +0 -1
@@ -28,7 +28,6 @@static int highbank_suspend_finish (unsigned long val) { -outer_flush_all ();outer_disable ();highbank_set_pwr_suspend ();
arch/arm/mach-omap2/omap4-common.c +1 -0
@@ -163,6 +163,7 @@ void __iomem *omap4_get_l2cache_base(void)static void omap4_l2x0_disable (void ) { +outer_flush_all ();/* Disable PL310 L2 Cache controller */ omap_smc1 (0x102 ,0x0 ); }
Signature · 1 line
1.7.9.5
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP4/highbank: Flush L2 cache before disabling
Quoted 8 lines · Taras Kondratiuk
Kexec disables outer cache before jumping to reboot code, but it doesn't flush it explicitly. Flush is done implicitly inside of
l2x0_disable(). But some SoC's override default .disable handler and don't flush cache. This may lead to a corrupted memory during Kexec reboot on these platforms.This patch adds cache flush inside of OMAP4 and Highbank
outer_cache.disable()handlers to make it consistent with defaultl2x0_disable().
Also it removes redundantouter_flush_all()call just beforeouter_disable().
Sounds correct to me:
Quoted 66 lines
Acked-by Rob Herring <[email protected]>Signed-off-by Taras Kondratiuk <[email protected]>---
Based on v3.12-rc3RFC v2: https://patchwork.kernel.org/patch/2990231/
Make the fix specific to platforms that don't usel2x0_disable().
RFC v1: https://patchwork.kernel.org/patch/2974431/
---
Cc: Will Deacon <[email protected]>
Cc: Russell King <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: linaro-kernel at lists.linaro.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-omap at vger.kernel.org--- arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/pm.c | 1 - arch/arm/mach-omap2/omap4-common.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)arch/arm/mach-highbank/highbank.c +1
-0@@ -63,6 +63,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)static void highbank_l2x0_disable (void ) { +outer_flush_all ();/* Disable PL310 L2 Cache controller */ highbank_smc1 (0x102 ,0x0 ); }arch/arm/mach-highbank/pm.c +0
-1@@ -28,7 +28,6 @@static int highbank_suspend_finish (unsigned long val) { -outer_flush_all ();outer_disable ();highbank_set_pwr_suspend ();arch/arm/mach-omap2/omap4-common.c +1
-0@@ -163,6 +163,7 @@ void __iomem *omap4_get_l2cache_base(void)static void omap4_l2x0_disable (void ) { +outer_flush_all ();/* Disable PL310 L2 Cache controller */ omap_smc1 (0x102 ,0x0 ); }Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html