From: Siva Durga Prasad Paladugu Date: Tue, 13 Jan 2015 09:25:47 +0000 (+0530) Subject: armv8: caches: Disable dcache after flush X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f632afcfb28dd0d2d0427389a3103115a262199a;p=thirdparty%2Fu-boot.git armv8: caches: Disable dcache after flush Always disable dcache after the flush operation The following sequence is advisable while disabling d-cache: 1. disable_dcache() - flushes and disables d-cache 2. invalidate_dcache_all() - invalid any entry that came to the cache in the short period after the cache was flushed but before the cache got disabled Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index 3b63571d970..d2bf7ffe2ba 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -124,10 +124,10 @@ void dcache_disable(void) if (!(sctlr & CR_C)) return; - set_sctlr(sctlr & ~(CR_C|CR_M)); - flush_dcache_all(); __asm_invalidate_tlb_all(); + + set_sctlr(sctlr & ~(CR_C|CR_M)); } int dcache_status(void)