Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b42d9023 authored by Michael Ellerman's avatar Michael Ellerman
Browse files

powerpc/xmon: Don't use ld on 32-bit



In commit 31cdd0c3 ("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: 31cdd0c3 ("powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs")
Cc: stable@vger.kernel.org # v4.7+
Reported-by: default avatarJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 0545d543
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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

/*