arm64: mm: Add __clean_dcache_louis
Krishna Reddy [Mon, 6 Apr 2015 18:30:13 +0000 (11:30 -0700)]
This allows perform L1 cache clean alone.

Bug 200077334

Change-Id: I776de6e6726862e330b626fd19f8ae8f70055538
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/742254
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

arch/arm64/mm/cache.S

index e64b6d8..334d4f9 100644 (file)
@@ -103,6 +103,21 @@ ENTRY(__clean_dcache_all)
 ENDPROC(__clean_dcache_all)
 
 /*
+ *     __clean_dcache_louis()
+ *
+ *     Clean D-cache to the level of unification inner shareable
+ *
+ *     Corrupted registers: x0-x7, x9-x11
+ */
+ENTRY(__clean_dcache_louis)
+       dsb     sy                              // ensure ordering with previous memory accesses
+       mrs     x0, clidr_el1                   // read clidr
+       and     x3, x0, #0xe00000               // extract louis from clidr
+       lsr     x3, x3, #20                     // left align louis bit field
+       v8_op_dcache_all csw
+ENDPROC(__clean_dcache_louis)
+
+/*
  *     flush_cache_all()
  *
  *     Flush the entire cache system.  The data cache flush is now achieved