aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2014-11-02 23:46:43 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2014-11-11 23:54:29 -0500
commit7048c846949ac1feb09d1b624ea0e8c351d92a7b (patch)
treeec6707704c3afbb88ee9e2f1ff7fd454839a9027 /arch/powerpc/lib
parent8b91a2554610ac5e341de8fb0b5715fe90a0f2e2 (diff)
powerpc: Fix compilation of emulate_step()
Commit be96f63375a1 ("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: Paul Mackerras <paulus@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/sstep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 54651fc2d412..dc885b30f7a6 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -1865,6 +1865,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
1865 } 1865 }
1866 goto ldst_done; 1866 goto ldst_done;
1867 1867
1868#ifdef CONFIG_PPC_FPU
1868 case LOAD_FP: 1869 case LOAD_FP:
1869 if (regs->msr & MSR_LE) 1870 if (regs->msr & MSR_LE)
1870 return 0; 1871 return 0;
@@ -1873,7 +1874,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
1873 else 1874 else
1874 err = do_fp_load(op.reg, do_lfd, op.ea, size, regs); 1875 err = do_fp_load(op.reg, do_lfd, op.ea, size, regs);
1875 goto ldst_done; 1876 goto ldst_done;
1876 1877#endif
1877#ifdef CONFIG_ALTIVEC 1878#ifdef CONFIG_ALTIVEC
1878 case LOAD_VMX: 1879 case LOAD_VMX:
1879 if (regs->msr & MSR_LE) 1880 if (regs->msr & MSR_LE)
@@ -1919,6 +1920,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
1919 err = write_mem(op.val, op.ea, size, regs); 1920 err = write_mem(op.val, op.ea, size, regs);
1920 goto ldst_done; 1921 goto ldst_done;
1921 1922
1923#ifdef CONFIG_PPC_FPU
1922 case STORE_FP: 1924 case STORE_FP:
1923 if (regs->msr & MSR_LE) 1925 if (regs->msr & MSR_LE)
1924 return 0; 1926 return 0;
@@ -1927,7 +1929,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
1927 else 1929 else
1928 err = do_fp_store(op.reg, do_stfd, op.ea, size, regs); 1930 err = do_fp_store(op.reg, do_stfd, op.ea, size, regs);
1929 goto ldst_done; 1931 goto ldst_done;
1930 1932#endif
1931#ifdef CONFIG_ALTIVEC 1933#ifdef CONFIG_ALTIVEC
1932 case STORE_VMX: 1934 case STORE_VMX:
1933 if (regs->msr & MSR_LE) 1935 if (regs->msr & MSR_LE)