Skip to content

Commit ddc6cd0

Browse files
chleroyScott Wood
authored andcommitted
powerpc32: Use instruction symbolic names in check_io_access()
Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Scott Wood <[email protected]>
1 parent 5066943 commit ddc6cd0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arch/powerpc/include/asm/ppc-opcode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
#define PPC_INST_LWSYNC 0x7c2004ac
153153
#define PPC_INST_SYNC 0x7c0004ac
154154
#define PPC_INST_SYNC_MASK 0xfc0007fe
155+
#define PPC_INST_ISYNC 0x4c00012c
155156
#define PPC_INST_LXVD2X 0x7c000698
156157
#define PPC_INST_MCRXR 0x7c000400
157158
#define PPC_INST_MCRXR_MASK 0xfc0007fe

arch/powerpc/kernel/traps.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,11 @@ static inline int check_io_access(struct pt_regs *regs)
352352
* For the debug message, we look at the preceding
353353
* load or store.
354354
*/
355-
if (*nip == 0x60000000) /* nop */
355+
if (*nip == PPC_INST_NOP)
356356
nip -= 2;
357-
else if (*nip == 0x4c00012c) /* isync */
357+
else if (*nip == PPC_INST_ISYNC)
358358
--nip;
359-
if (*nip == 0x7c0004ac || (*nip >> 26) == 3) {
360-
/* sync or twi */
359+
if (*nip == PPC_INST_SYNC || (*nip >> 26) == OP_TRAP) {
361360
unsigned int rb;
362361

363362
--nip;

0 commit comments

Comments
 (0)