* [PATCH] powerpc/xmon: Don't use ld on 32-bit
@ 2016-09-09 5:54 Michael Ellerman
2016-09-13 12:16 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2016-09-09 5:54 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus, glaubitz
In commit 31cdd0c39c75 ("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: 31cdd0c39c75 ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs")
Cc: stable@vger.kernel.org # v4.7+
Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/xmon/spr_access.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/xmon/spr_access.S b/arch/powerpc/xmon/spr_access.S
index 84ad74213c83..7d8b0e8ed6d9 100644
--- a/arch/powerpc/xmon/spr_access.S
+++ b/arch/powerpc/xmon/spr_access.S
@@ -2,12 +2,12 @@
/* unsigned long xmon_mfspr(sprn, default_value) */
_GLOBAL(xmon_mfspr)
- ld r5, .Lmfspr_table@got(r2)
+ PPC_LL r5, .Lmfspr_table@got(r2)
b xmon_mxspr
/* void xmon_mtspr(sprn, new_value) */
_GLOBAL(xmon_mtspr)
- ld r5, .Lmtspr_table@got(r2)
+ PPC_LL r5, .Lmtspr_table@got(r2)
b xmon_mxspr
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/xmon: Don't use ld on 32-bit
2016-09-09 5:54 [PATCH] powerpc/xmon: Don't use ld on 32-bit Michael Ellerman
@ 2016-09-13 12:16 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2016-09-13 12:16 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: paulus, glaubitz
On Fri, 2016-09-09 at 05:54:37 UTC, Michael Ellerman wrote:
> In commit 31cdd0c39c75 ("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: 31cdd0c39c75 ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs")
> Cc: stable@vger.kernel.org # v4.7+
> Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/b42d9023a31e384504f5b53fc9
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-13 12:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 5:54 [PATCH] powerpc/xmon: Don't use ld on 32-bit Michael Ellerman
2016-09-13 12:16 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).