powerpc/8xx: Use symbolic names for DSISR bits in DSI
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 8 Aug 2017 11:59:00 +0000 (13:59 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 10 Aug 2017 13:32:20 +0000 (23:32 +1000)
Use symbolic names for DSISR bits in DSI

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/head_8xx.S
arch/powerpc/mm/fault.c

index 778a0e11d0e6c0a8d6b0c403fb7fa2c69d4d195e..a1c2a2cfec7efbbb4144383d59b3edd956e4d881 100644 (file)
@@ -595,7 +595,7 @@ DARFixed:/* Return from dcbx instruction bug workaround */
        mfspr   r5,SPRN_DSISR
        stw     r5,_DSISR(r11)
        mfspr   r4,SPRN_DAR
-       andis.  r10,r5,0x4000
+       andis.  r10,r5,DSISR_NOHPTE@h
        beq+    1f
        tlbie   r4
 dtlbie:
index f88fac3d281b98e3e9e1b17f35cc575d6417ffc1..4797d08581cec347b6cf34a316c1ef585209653c 100644 (file)
@@ -354,7 +354,7 @@ static void sanity_check_fault(bool is_write, unsigned long error_code) { }
 #else
 #define page_fault_is_write(__err)     ((__err) & DSISR_ISSTORE)
 #if defined(CONFIG_PPC_8xx)
-#define page_fault_is_bad(__err)       ((__err) & 0x10000000)
+#define page_fault_is_bad(__err)       ((__err) & DSISR_NOEXEC_OR_G)
 #elif defined(CONFIG_PPC64)
 #define page_fault_is_bad(__err)       ((__err) & DSISR_BAD_FAULT_64S)
 #else