Skip to content

Commit b42d902

Browse files
committed
powerpc/xmon: Don't use ld on 32-bit
In commit 31cdd0c ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs") I added two uses of the "ld" instruction in spr_access.S. "ld" is a 64-bit instruction, so shouldn't be used on 32-bit CPUs. Replace it with PPC_LL which is a macro that gives us either "ld" or "lwz" depending on whether we're 64 or 32-bit. Fixes: 31cdd0c ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs") Cc: [email protected] # v4.7+ Reported-by: John Paul Adrian Glaubitz <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 0545d54 commit b42d902

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/xmon/spr_access.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
/* unsigned long xmon_mfspr(sprn, default_value) */
44
_GLOBAL(xmon_mfspr)
5-
ld r5, .Lmfspr_table@got(r2)
5+
PPC_LL r5, .Lmfspr_table@got(r2)
66
b xmon_mxspr
77

88
/* void xmon_mtspr(sprn, new_value) */
99
_GLOBAL(xmon_mtspr)
10-
ld r5, .Lmtspr_table@got(r2)
10+
PPC_LL r5, .Lmtspr_table@got(r2)
1111
b xmon_mxspr
1212

1313
/*

0 commit comments

Comments
 (0)