From d608254b0aa23607df1dcb5a7ca07de9a8ec9bb0 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Wed, 21 Sep 2016 11:18:58 +0100 Subject: [PATCH] MIPS: Clear hazard between TagLo writes & cache ops 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 --- arch/mips/lib/cache_init.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/lib/cache_init.S b/arch/mips/lib/cache_init.S index e61432ee9c..53e903a27e 100644 --- a/arch/mips/lib/cache_init.S +++ b/arch/mips/lib/cache_init.S @@ -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 -- 2.30.2