linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix sstep compile on powerpcspe
@ 2016-05-05 20:44 Lennart Sorensen
  2016-05-05 20:53 ` Lennart Sorensen
  2016-05-10 21:48 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Lennart Sorensen @ 2016-05-05 20:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Len Sorensen, Paul Mackerras, Michael Ellerman,
	Benjamin Herrenschmidt, linuxppc-dev

powerpc: Fix sstep compile on powerpcspe

Commit be96f63375a14ee8e690856ac77e579c75bd0bae introduced ldarx and stdcx
into the instructions in sstep.c, which are not accepted by the assembler
on powerpcspe, but does seem to be accepted by the normal powerpc assembler
even in 32 bit mode.

Wrap these two instructions in a __powerpc64__ check like it is everywhere
else in the file.

Fixes: be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()")
Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
---
 arch/powerpc/lib/sstep.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index dc885b3..6d34310 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -1818,9 +1818,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
 		case 4:
 			__get_user_asmx(val, op.ea, err, "lwarx");
 			break;
+#ifdef __powerpc64__
 		case 8:
 			__get_user_asmx(val, op.ea, err, "ldarx");
 			break;
+#endif
 		default:
 			return 0;
 		}
@@ -1841,9 +1843,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
 		case 4:
 			__put_user_asmx(op.val, op.ea, err, "stwcx.", cr);
 			break;
+#ifdef __powerpc64__
 		case 8:
 			__put_user_asmx(op.val, op.ea, err, "stdcx.", cr);
 			break;
+#endif
 		default:
 			return 0;
 		}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-10 21:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-05 20:44 [PATCH] powerpc: Fix sstep compile on powerpcspe Lennart Sorensen
2016-05-05 20:53 ` Lennart Sorensen
2016-05-10 21:48 ` 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).