Commit 04545a3a authored by Taras Kondratiuk's avatar Taras Kondratiuk Committed by Greg Kroah-Hartman

ARM: 7938/1: OMAP4/highbank: Flush L2 cache before disabling

commit b25f3e1c upstream.

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().
Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarTaras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Cc: Wang Nan <wangnan0@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b176ae1
...@@ -68,6 +68,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr) ...@@ -68,6 +68,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
#ifdef CONFIG_CACHE_L2X0 #ifdef CONFIG_CACHE_L2X0
static void highbank_l2x0_disable(void) static void highbank_l2x0_disable(void)
{ {
outer_flush_all();
/* Disable PL310 L2 Cache controller */ /* Disable PL310 L2 Cache controller */
highbank_smc1(0x102, 0x0); highbank_smc1(0x102, 0x0);
} }
......
...@@ -162,6 +162,7 @@ void __iomem *omap4_get_l2cache_base(void) ...@@ -162,6 +162,7 @@ void __iomem *omap4_get_l2cache_base(void)
static void omap4_l2x0_disable(void) static void omap4_l2x0_disable(void)
{ {
outer_flush_all();
/* Disable PL310 L2 Cache controller */ /* Disable PL310 L2 Cache controller */
omap_smc1(0x102, 0x0); omap_smc1(0x102, 0x0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment