]>
Commit | Line | Data |
---|---|---|
71fe0565 GKH |
1 | From b42d9023a31e384504f5b53fc9a437d5536a3f63 Mon Sep 17 00:00:00 2001 |
2 | From: Michael Ellerman <mpe@ellerman.id.au> | |
3 | Date: Fri, 9 Sep 2016 14:01:07 +1000 | |
4 | Subject: powerpc/xmon: Don't use ld on 32-bit | |
5 | ||
6 | From: Michael Ellerman <mpe@ellerman.id.au> | |
7 | ||
8 | commit b42d9023a31e384504f5b53fc9a437d5536a3f63 upstream. | |
9 | ||
10 | In commit 31cdd0c39c75 ("powerpc/xmon: Fix SPR read/write commands and | |
11 | add command to dump SPRs") I added two uses of the "ld" instruction in | |
12 | spr_access.S. "ld" is a 64-bit instruction, so shouldn't be used on | |
13 | 32-bit CPUs. | |
14 | ||
15 | Replace it with PPC_LL which is a macro that gives us either "ld" or | |
16 | "lwz" depending on whether we're 64 or 32-bit. | |
17 | ||
18 | Fixes: 31cdd0c39c75 ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs") | |
19 | Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | |
20 | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
22 | ||
23 | --- | |
24 | arch/powerpc/xmon/spr_access.S | 4 ++-- | |
25 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
26 | ||
27 | --- a/arch/powerpc/xmon/spr_access.S | |
28 | +++ b/arch/powerpc/xmon/spr_access.S | |
29 | @@ -2,12 +2,12 @@ | |
30 | ||
31 | /* unsigned long xmon_mfspr(sprn, default_value) */ | |
32 | _GLOBAL(xmon_mfspr) | |
33 | - ld r5, .Lmfspr_table@got(r2) | |
34 | + PPC_LL r5, .Lmfspr_table@got(r2) | |
35 | b xmon_mxspr | |
36 | ||
37 | /* void xmon_mtspr(sprn, new_value) */ | |
38 | _GLOBAL(xmon_mtspr) | |
39 | - ld r5, .Lmtspr_table@got(r2) | |
40 | + PPC_LL r5, .Lmtspr_table@got(r2) | |
41 | b xmon_mxspr | |
42 | ||
43 | /* |