ARM: proc-v7.S: remove HARVARD_CACHE preprocessor guards
PATCH 1/1 ARM: proc-v7.S: remove HARVARD_CACHE preprocessor guards
On v7, we use the same cache maintenance instructions for data lines as for unified lines. This was not the case for v6, where HARVARD_CACHE was defined to indicate the L1 cache topology.
This patch removes the erroneous compile-time check for HARVARD_CACHE in proc-v7.S, ensuring that we perform I-side invalidation at boot.
---
This is based on the original patch from Shawn posted here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/079235.html
However, it seems like that thread died so I've picked it up.
arch/arm/mm/proc-v7.S | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mm/proc-v7.S +0 -6
@@ -148,10 +148,6 @@ ENDPROC(cpu_v7_do_resume) * Initialise TLB, Caches, and MMU state ready to switch the MMU * on. Return in r0 the new CP15 C1 control register setting. * - * We automatically detect if we have a Harvard cache, and use the - * Harvard cache control instructions insead of the unified cache - * control instructions. - * * This should be able to cover all ARMv7 cores. * * It is assumed that:
@@ -251,9 +247,7 @@ __v7_setup: #endif 3: mov r10, #0 -#ifdef HARVARD_CACHE mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate -#endif dsb #ifdef CONFIG_MMU mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs
Signature · 1 line
1.7.4.1
PATCH 1/1 ARM: proc-v7.S: remove HARVARD_CACHE preprocessor guards
Quoted 10 lines · Will Deacon
On v7, we use the same cache maintenance instructions for data lines as for unified lines. This was not the case for v6, where
HARVARD_CACHEwas defined to indicate the L1 cache topology.This patch removes the erroneous compile-time check for
HARVARD_CACHEinproc-v7.S, ensuring that we perform I-side invalidation at boot.Reported-by Shawn Guo <[email protected]>Acked-by Catalin Marinas <[email protected]>Signed-off-by Will Deacon <[email protected]>