Commit 7048c846 authored by Paul Mackerras's avatar Paul Mackerras Committed by Michael Ellerman

powerpc: Fix compilation of emulate_step()

Commit be96f633 ("powerpc: Split out instruction analysis
part of emulate_step()") added some calls to do_fp_load()
and do_fp_store(), which fail to compile on configs with
CONFIG_PPC_FPU=n and CONFIG_PPC_EMULATE_SSTEP=y.  This fixes
the compile by adding #ifdef CONFIG_PPC_FPU around the code
that calls these functions.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 8b91a255
...@@ -1865,6 +1865,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1865,6 +1865,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
} }
goto ldst_done; goto ldst_done;
#ifdef CONFIG_PPC_FPU
case LOAD_FP: case LOAD_FP:
if (regs->msr & MSR_LE) if (regs->msr & MSR_LE)
return 0; return 0;
...@@ -1873,7 +1874,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1873,7 +1874,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
else else
err = do_fp_load(op.reg, do_lfd, op.ea, size, regs); err = do_fp_load(op.reg, do_lfd, op.ea, size, regs);
goto ldst_done; goto ldst_done;
#endif
#ifdef CONFIG_ALTIVEC #ifdef CONFIG_ALTIVEC
case LOAD_VMX: case LOAD_VMX:
if (regs->msr & MSR_LE) if (regs->msr & MSR_LE)
...@@ -1919,6 +1920,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1919,6 +1920,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
err = write_mem(op.val, op.ea, size, regs); err = write_mem(op.val, op.ea, size, regs);
goto ldst_done; goto ldst_done;
#ifdef CONFIG_PPC_FPU
case STORE_FP: case STORE_FP:
if (regs->msr & MSR_LE) if (regs->msr & MSR_LE)
return 0; return 0;
...@@ -1927,7 +1929,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) ...@@ -1927,7 +1929,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
else else
err = do_fp_store(op.reg, do_stfd, op.ea, size, regs); err = do_fp_store(op.reg, do_stfd, op.ea, size, regs);
goto ldst_done; goto ldst_done;
#endif
#ifdef CONFIG_ALTIVEC #ifdef CONFIG_ALTIVEC
case STORE_VMX: case STORE_VMX:
if (regs->msr & MSR_LE) if (regs->msr & MSR_LE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment