]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
MIPS: Ensure cache ops complete in mips_cache_reset
authorPaul Burton <paul.burton@imgtec.com>
Wed, 21 Sep 2016 10:18:59 +0000 (11:18 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 21 Sep 2016 13:04:04 +0000 (15:04 +0200)
Ensure that cache operations complete before returning from
mips_cache_reset by placing a completion barrier (sync instruction)
before the return. Without this there is no guarantee that the cache ops
will complete before any subsequent memory accesses, since they are
indexed cache ops & thus not implicitly ordered with memory accesses.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
arch/mips/lib/cache_init.S

index 53e903a27ea97df9faf11c50ec48e7edb1b126bd..698a5afdee96a1a03e46d19e8e4584b5b3ac074a 100644 (file)
@@ -420,6 +420,8 @@ l2_unbypass:
 #endif
 
 return:
+       /* Ensure all cache operations complete before returning */
+       sync
        jr      ra
        END(mips_cache_reset)