]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc32: Use instruction symbolic names in check_io_access()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 17 May 2016 12:01:39 +0000 (14:01 +0200)
committerScott Wood <oss@buserror.net>
Sun, 25 Sep 2016 04:51:06 +0000 (23:51 -0500)
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kernel/traps.c

index 127ebf5862b463009120958f8e56a2df211c69e1..e6d2c33781fc78af57b578680c6821121c8b4a63 100644 (file)
 #define PPC_INST_LWSYNC                        0x7c2004ac
 #define PPC_INST_SYNC                  0x7c0004ac
 #define PPC_INST_SYNC_MASK             0xfc0007fe
+#define PPC_INST_ISYNC                 0x4c00012c
 #define PPC_INST_LXVD2X                        0x7c000698
 #define PPC_INST_MCRXR                 0x7c000400
 #define PPC_INST_MCRXR_MASK            0xfc0007fe
index 6b108ed29c20492f2d4f020839040e36e57020de..68f8b5b0d8858731e7ed6587e46cc723acdc97b9 100644 (file)
@@ -352,12 +352,11 @@ static inline int check_io_access(struct pt_regs *regs)
                 * For the debug message, we look at the preceding
                 * load or store.
                 */
-               if (*nip == 0x60000000)         /* nop */
+               if (*nip == PPC_INST_NOP)
                        nip -= 2;
-               else if (*nip == 0x4c00012c)    /* isync */
+               else if (*nip == PPC_INST_ISYNC)
                        --nip;
-               if (*nip == 0x7c0004ac || (*nip >> 26) == 3) {
-                       /* sync or twi */
+               if (*nip == PPC_INST_SYNC || (*nip >> 26) == OP_TRAP) {
                        unsigned int rb;
 
                        --nip;