summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/cache-feroceon-l2.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2014-01-31 19:49:24 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-02-10 12:48:08 +0100
commit0f054e3ceab33a7fd3b41a9708286bce420d570d (patch)
treeb7f019678c6daca55d3a5b7611f0de4c3f1c276b /arch/arm/mm/cache-feroceon-l2.c
parentARM: 7948/1: hw_breakpoint: Add ARMv8 support (diff)
downloadlinux-0f054e3ceab33a7fd3b41a9708286bce420d570d.tar.xz
linux-0f054e3ceab33a7fd3b41a9708286bce420d570d.zip
ARM: 7949/1: feroceon: Log a FW_BUG if the L2 cache is turned on at boot
Booting on feroceon CPUS requires the L2 cache to be turned off. With some kernel configurations (notably CONFIG_ARM_PATCH_PHYS_VIRT disabled) the kernel will boot even if the L2 is turned on. However there may be subtle breakage, and when PATCH_PHYS_VIRT is enabled it is very likely that booting with L2 will crash at early boot before any kernel diagnostic output. The diagnostic message is intended to discourage people from shipping bootloaders that leave the L2 turned on. The issue on feroceon is that the L2 is bypassed when the L1 caches are disabled. So the decompressor will place parts of the kernel image into the L2 and the early cache-off boot code in head.S will write to parts of the kernel image, bypassing the L2 and creating inconsistency. Tested on ARM Kirkwood. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/cache-feroceon-l2.c')
-rw-r--r--arch/arm/mm/cache-feroceon-l2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c
index 48bc3c0a87ce..aae891820f8f 100644
--- a/arch/arm/mm/cache-feroceon-l2.c
+++ b/arch/arm/mm/cache-feroceon-l2.c
@@ -331,7 +331,9 @@ static void __init enable_l2(void)
enable_icache();
if (d)
enable_dcache();
- }
+ } else
+ pr_err(FW_BUG
+ "Feroceon L2: bootloader left the L2 cache on!\n");
}
void __init feroceon_l2_init(int __l2_wt_override)