提交 dd217310 编写于 作者: L Lennart Sorensen 提交者: Michael Ellerman

powerpc/sstep: Fix sstep.c compile on powerpcspe

Commit be96f633 ("powerpc: Split out instruction analysis part of
emulate_step()") 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: be96f633 ("powerpc: Split out instruction analysis part of emulate_step()")
Signed-off-by: NLen Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 31cdd0c3
...@@ -1818,9 +1818,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1818,9 +1818,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
case 4: case 4:
__get_user_asmx(val, op.ea, err, "lwarx"); __get_user_asmx(val, op.ea, err, "lwarx");
break; break;
#ifdef __powerpc64__
case 8: case 8:
__get_user_asmx(val, op.ea, err, "ldarx"); __get_user_asmx(val, op.ea, err, "ldarx");
break; break;
#endif
default: default:
return 0; return 0;
} }
...@@ -1841,9 +1843,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1841,9 +1843,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
case 4: case 4:
__put_user_asmx(op.val, op.ea, err, "stwcx.", cr); __put_user_asmx(op.val, op.ea, err, "stwcx.", cr);
break; break;
#ifdef __powerpc64__
case 8: case 8:
__put_user_asmx(op.val, op.ea, err, "stdcx.", cr); __put_user_asmx(op.val, op.ea, err, "stdcx.", cr);
break; break;
#endif
default: default:
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册