MIPS: Clear hazard between TagLo writes & cache ops
authorPaul Burton <paul.burton@imgtec.com>
Wed, 21 Sep 2016 10:18:58 +0000 (11:18 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 21 Sep 2016 13:04:04 +0000 (15:04 +0200)
Writing to the coprocessor 0 TagLo registers introduces an execution
hazard in that we need that write to complete before any cache
instructions execute. Ensure that hazard is cleared by inserting an ehb
instruction between the TagLo writes & cache op loop.

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

index e61432e..53e903a 100644 (file)
@@ -293,6 +293,7 @@ l2_init:
 l1_init:
        mtc0            zero, CP0_TAGLO
        mtc0            zero, CP0_TAGLO, 2
+       ehb
 
        /*
         * The caches are probably in an indeterminate state, so we force good