diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2016-05-17 08:01:39 -0400 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-09-25 00:51:06 -0400 |
commit | ddc6cd0d70a6f958b2c01758ee53279d36db2234 (patch) | |
tree | 943550d7127cf19a93f23ad7cf7b494a0d2f76e5 | |
parent | 5066943a5170838e58e07163d32ba45b0b360417 (diff) |
powerpc32: Use instruction symbolic names in check_io_access()
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <oss@buserror.net>
-rw-r--r-- | arch/powerpc/include/asm/ppc-opcode.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 127ebf5862b4..e6d2c33781fc 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -152,6 +152,7 @@ | |||
152 | #define PPC_INST_LWSYNC 0x7c2004ac | 152 | #define PPC_INST_LWSYNC 0x7c2004ac |
153 | #define PPC_INST_SYNC 0x7c0004ac | 153 | #define PPC_INST_SYNC 0x7c0004ac |
154 | #define PPC_INST_SYNC_MASK 0xfc0007fe | 154 | #define PPC_INST_SYNC_MASK 0xfc0007fe |
155 | #define PPC_INST_ISYNC 0x4c00012c | ||
155 | #define PPC_INST_LXVD2X 0x7c000698 | 156 | #define PPC_INST_LXVD2X 0x7c000698 |
156 | #define PPC_INST_MCRXR 0x7c000400 | 157 | #define PPC_INST_MCRXR 0x7c000400 |
157 | #define PPC_INST_MCRXR_MASK 0xfc0007fe | 158 | #define PPC_INST_MCRXR_MASK 0xfc0007fe |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 6b108ed29c20..68f8b5b0d885 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -352,12 +352,11 @@ static inline int check_io_access(struct pt_regs *regs) | |||
352 | * For the debug message, we look at the preceding | 352 | * For the debug message, we look at the preceding |
353 | * load or store. | 353 | * load or store. |
354 | */ | 354 | */ |
355 | if (*nip == 0x60000000) /* nop */ | 355 | if (*nip == PPC_INST_NOP) |
356 | nip -= 2; | 356 | nip -= 2; |
357 | else if (*nip == 0x4c00012c) /* isync */ | 357 | else if (*nip == PPC_INST_ISYNC) |
358 | --nip; | 358 | --nip; |
359 | if (*nip == 0x7c0004ac || (*nip >> 26) == 3) { | 359 | if (*nip == PPC_INST_SYNC || (*nip >> 26) == OP_TRAP) { |
360 | /* sync or twi */ | ||
361 | unsigned int rb; | 360 | unsigned int rb; |
362 | 361 | ||
363 | --nip; | 362 | --nip; |