diff options
Diffstat (limited to 'arch/powerpc/lib/sstep.c')
-rw-r--r-- | arch/powerpc/lib/sstep.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index e0a9858d537e..ae5189ab0049 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
@@ -30,6 +30,7 @@ extern char system_call_common[]; | |||
30 | #define XER_OV 0x40000000U | 30 | #define XER_OV 0x40000000U |
31 | #define XER_CA 0x20000000U | 31 | #define XER_CA 0x20000000U |
32 | 32 | ||
33 | #ifdef CONFIG_PPC_FPU | ||
33 | /* | 34 | /* |
34 | * Functions in ldstfp.S | 35 | * Functions in ldstfp.S |
35 | */ | 36 | */ |
@@ -41,6 +42,7 @@ extern int do_lvx(int rn, unsigned long ea); | |||
41 | extern int do_stvx(int rn, unsigned long ea); | 42 | extern int do_stvx(int rn, unsigned long ea); |
42 | extern int do_lxvd2x(int rn, unsigned long ea); | 43 | extern int do_lxvd2x(int rn, unsigned long ea); |
43 | extern int do_stxvd2x(int rn, unsigned long ea); | 44 | extern int do_stxvd2x(int rn, unsigned long ea); |
45 | #endif | ||
44 | 46 | ||
45 | /* | 47 | /* |
46 | * Determine whether a conditional branch instruction would branch. | 48 | * Determine whether a conditional branch instruction would branch. |
@@ -290,6 +292,7 @@ static int __kprobes write_mem(unsigned long val, unsigned long ea, int nb, | |||
290 | return write_mem_unaligned(val, ea, nb, regs); | 292 | return write_mem_unaligned(val, ea, nb, regs); |
291 | } | 293 | } |
292 | 294 | ||
295 | #ifdef CONFIG_PPC_FPU | ||
293 | /* | 296 | /* |
294 | * Check the address and alignment, and call func to do the actual | 297 | * Check the address and alignment, and call func to do the actual |
295 | * load or store. | 298 | * load or store. |
@@ -351,6 +354,7 @@ static int __kprobes do_fp_store(int rn, int (*func)(int, unsigned long), | |||
351 | } | 354 | } |
352 | return err; | 355 | return err; |
353 | } | 356 | } |
357 | #endif | ||
354 | 358 | ||
355 | #ifdef CONFIG_ALTIVEC | 359 | #ifdef CONFIG_ALTIVEC |
356 | /* For Altivec/VMX, no need to worry about alignment */ | 360 | /* For Altivec/VMX, no need to worry about alignment */ |
@@ -1393,6 +1397,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1393 | regs->gpr[rd] = byterev_4(val); | 1397 | regs->gpr[rd] = byterev_4(val); |
1394 | goto ldst_done; | 1398 | goto ldst_done; |
1395 | 1399 | ||
1400 | #ifdef CONFIG_PPC_CPU | ||
1396 | case 535: /* lfsx */ | 1401 | case 535: /* lfsx */ |
1397 | case 567: /* lfsux */ | 1402 | case 567: /* lfsux */ |
1398 | if (!(regs->msr & MSR_FP)) | 1403 | if (!(regs->msr & MSR_FP)) |
@@ -1424,6 +1429,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1424 | ea = xform_ea(instr, regs, u); | 1429 | ea = xform_ea(instr, regs, u); |
1425 | err = do_fp_store(rd, do_stfd, ea, 8, regs); | 1430 | err = do_fp_store(rd, do_stfd, ea, 8, regs); |
1426 | goto ldst_done; | 1431 | goto ldst_done; |
1432 | #endif | ||
1427 | 1433 | ||
1428 | #ifdef __powerpc64__ | 1434 | #ifdef __powerpc64__ |
1429 | case 660: /* stdbrx */ | 1435 | case 660: /* stdbrx */ |
@@ -1534,6 +1540,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1534 | } while (++rd < 32); | 1540 | } while (++rd < 32); |
1535 | goto instr_done; | 1541 | goto instr_done; |
1536 | 1542 | ||
1543 | #ifdef CONFIG_PPC_FPU | ||
1537 | case 48: /* lfs */ | 1544 | case 48: /* lfs */ |
1538 | case 49: /* lfsu */ | 1545 | case 49: /* lfsu */ |
1539 | if (!(regs->msr & MSR_FP)) | 1546 | if (!(regs->msr & MSR_FP)) |
@@ -1565,6 +1572,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1565 | ea = dform_ea(instr, regs); | 1572 | ea = dform_ea(instr, regs); |
1566 | err = do_fp_store(rd, do_stfd, ea, 8, regs); | 1573 | err = do_fp_store(rd, do_stfd, ea, 8, regs); |
1567 | goto ldst_done; | 1574 | goto ldst_done; |
1575 | #endif | ||
1568 | 1576 | ||
1569 | #ifdef __powerpc64__ | 1577 | #ifdef __powerpc64__ |
1570 | case 58: /* ld[u], lwa */ | 1578 | case 58: /* ld[u], lwa */ |