[PATCH 46/78] ARM: aarch64: mmu: Fix disabling the MMU
Sascha Hauer
s.hauer at pengutronix.de
Fri Mar 16 05:53:22 PDT 2018
Do it as U-Boot: Disable MMU first, then flush caches and finally
invalidate tlbs. I wish I could reference some document instead of
U-Boot code, but I haven't found anything.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/cpu/mmu_64.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c
index 165ff5bac6..6606405b21 100644
--- a/arch/arm/cpu/mmu_64.c
+++ b/arch/arm/cpu/mmu_64.c
@@ -329,12 +329,9 @@ void mmu_disable(void)
cr = get_cr();
cr &= ~(CR_M | CR_C);
- tlb_invalidate();
-
- dsb();
- isb();
-
set_cr(cr);
+ v8_flush_dcache_all();
+ tlb_invalidate();
dsb();
isb();
--
2.16.1
More information about the barebox
mailing list