DTLB Error needs to adjust the HW PTE bits as DTLB Miss
does.

Signed-off-by: Joakim Tjernlund <joakim.tjernl...@transmode.se>
---
 arch/ppc/kernel/head_8xx.S |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
index a29a011..d701542 100644
--- a/arch/ppc/kernel/head_8xx.S
+++ b/arch/ppc/kernel/head_8xx.S
@@ -592,7 +592,12 @@ DARFixed:
        mfspr   r21, MD_TWC             /* get the pte address again */
        ori     r20, r20, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
        stw     r20, 0(r21)             /* and update pte in table */
-       xori    r20, r20, _PAGE_RW      /* RW bit is inverted */
+       rlwimi  r20, r20, 32-2, _PAGE_USER>>2 /* Copy USER to Encoding */
+       /* r21 =  (r20 & _PAGE_RW) >> 1 */
+       rlwinm  r21, r20, 32-1, _PAGE_RW>>1
+       or      r20, r21, r20
+       /* invert RW and 0x200 bits */
+       xori    r20, r20, _PAGE_RW | 0x200
        b       finish_DTLB
 2:
        mfspr   r20, M_TW       /* Restore registers */
-- 
1.7.3.4

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to