[U-Boot,17/18] ARC: cache: don't invalidate SLC in invalidate_icache_all

Message ID 20180213173451.6317-18-Eugeniy.Paltsev@synopsys.com
State Superseded
Delegated to: Alexey Brodkin
Headers show
Series
  • ARC: cache subsystem improvement/refactoring
Related show

Commit Message

Eugeniy Paltsev Feb. 13, 2018, 5:34 p.m.
We don't want to invalidate SLC in invalidate_icache_all as we
can lose some data from SLC (especially if L1 D$ is disabled)
because SLC is shared for data and instructions.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
 arch/arc/lib/cache.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index 4e93ab9..907e9e3 100644
--- a/arch/arc/lib/cache.c
+++ b/arch/arc/lib/cache.c
@@ -326,8 +326,11 @@  void invalidate_icache_all(void)
 {
 	__ic_entire_invalidate();
 
-	if (is_isa_arcv2())
-		__slc_entire_op(OP_INV);
+	/*
+	 * We don't to invalidate SLC here as we can lose some data from
+	 * SLC (especially if L1 D$ is disabled) because SLC is shared for
+	 * data and instructions.
+	 */
 }
 
 int dcache_status(void)