Signed-off-by: Paul Butler <paul.but...@windriver.com>
---
 arch/arm/mm/proc-v7-2level.S | 4 +++-
 arch/arm/mm/proc-v7-3level.S | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S
index 42ac069..e3f2ba9 100644
--- a/arch/arm/mm/proc-v7-2level.S
+++ b/arch/arm/mm/proc-v7-2level.S
@@ -101,7 +101,9 @@ ENTRY(cpu_v7_set_pte_ext)
  ARM(  str     r3, [r0, #2048]! )
  THUMB(        add     r0, r0, #2048 )
  THUMB(        str     r3, [r0] )
-       mcr     p15, 0, r0, c7, c10, 1          @ flush_pte
+       mrc     p15, 0, r3, c0, c1, 7           @ read ID_MMFR3
+       tst     r3, #0xf << 20                  @ check the coherent walk bits
+       mcreq   p15, 0, r0, c7, c10, 1          @ clean D-cache to PoU
 #endif
        mov     pc, lr
 ENDPROC(cpu_v7_set_pte_ext)
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S
index 8de0f1d..6b30605 100644
--- a/arch/arm/mm/proc-v7-3level.S
+++ b/arch/arm/mm/proc-v7-3level.S
@@ -70,7 +70,9 @@ ENTRY(cpu_v7_set_pte_ext)
        tst     r3, #1 << (55 - 32)             @ L_PTE_DIRTY
        orreq   r2, #L_PTE_RDONLY
 1:     strd    r2, r3, [r0]
-       mcr     p15, 0, r0, c7, c10, 1          @ flush_pte
+       mrc     p15, 0, r3, c0, c1, 7           @ read ID_MMFR3
+       tst     r3, #0xf << 20                  @ check the coherent walk bits
+       mcreq   p15, 0, r0, c7, c10, 1          @ clean D-cache to PoU
 #endif
        mov     pc, lr
 ENDPROC(cpu_v7_set_pte_ext)
-- 
1.8.3

_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to