Commit ddc6cd0d authored by Christophe Leroy's avatar Christophe Leroy Committed by Scott Wood

powerpc32: Use instruction symbolic names in check_io_access()

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarScott Wood <oss@buserror.net>
parent 5066943a
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
#define PPC_INST_LWSYNC 0x7c2004ac #define PPC_INST_LWSYNC 0x7c2004ac
#define PPC_INST_SYNC 0x7c0004ac #define PPC_INST_SYNC 0x7c0004ac
#define PPC_INST_SYNC_MASK 0xfc0007fe #define PPC_INST_SYNC_MASK 0xfc0007fe
#define PPC_INST_ISYNC 0x4c00012c
#define PPC_INST_LXVD2X 0x7c000698 #define PPC_INST_LXVD2X 0x7c000698
#define PPC_INST_MCRXR 0x7c000400 #define PPC_INST_MCRXR 0x7c000400
#define PPC_INST_MCRXR_MASK 0xfc0007fe #define PPC_INST_MCRXR_MASK 0xfc0007fe
......
...@@ -352,12 +352,11 @@ static inline int check_io_access(struct pt_regs *regs) ...@@ -352,12 +352,11 @@ static inline int check_io_access(struct pt_regs *regs)
* For the debug message, we look at the preceding * For the debug message, we look at the preceding
* load or store. * load or store.
*/ */
if (*nip == 0x60000000) /* nop */ if (*nip == PPC_INST_NOP)
nip -= 2; nip -= 2;
else if (*nip == 0x4c00012c) /* isync */ else if (*nip == PPC_INST_ISYNC)
--nip; --nip;
if (*nip == 0x7c0004ac || (*nip >> 26) == 3) { if (*nip == PPC_INST_SYNC || (*nip >> 26) == OP_TRAP) {
/* sync or twi */
unsigned int rb; unsigned int rb;
--nip; --nip;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment