diff options
Diffstat (limited to 'arch/mips/kernel/unaligned.c')
| -rw-r--r-- | arch/mips/kernel/unaligned.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index c327b21bca81..bf4c4a979abb 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c | |||
| @@ -499,22 +499,10 @@ sigill: | |||
| 499 | 499 | ||
| 500 | asmlinkage void do_ade(struct pt_regs *regs) | 500 | asmlinkage void do_ade(struct pt_regs *regs) |
| 501 | { | 501 | { |
| 502 | extern int do_dsemulret(struct pt_regs *); | ||
| 503 | unsigned int __user *pc; | 502 | unsigned int __user *pc; |
| 504 | mm_segment_t seg; | 503 | mm_segment_t seg; |
| 505 | 504 | ||
| 506 | /* | 505 | /* |
| 507 | * Address errors may be deliberately induced by the FPU emulator to | ||
| 508 | * retake control of the CPU after executing the instruction in the | ||
| 509 | * delay slot of an emulated branch. | ||
| 510 | */ | ||
| 511 | /* Terminate if exception was recognized as a delay slot return */ | ||
| 512 | if (do_dsemulret(regs)) | ||
| 513 | return; | ||
| 514 | |||
| 515 | /* Otherwise handle as normal */ | ||
| 516 | |||
| 517 | /* | ||
| 518 | * Did we catch a fault trying to load an instruction? | 506 | * Did we catch a fault trying to load an instruction? |
| 519 | * Or are we running in MIPS16 mode? | 507 | * Or are we running in MIPS16 mode? |
| 520 | */ | 508 | */ |
| @@ -560,12 +548,12 @@ static int __init debugfs_unaligned(void) | |||
| 560 | return -ENODEV; | 548 | return -ENODEV; |
| 561 | d = debugfs_create_u32("unaligned_instructions", S_IRUGO, | 549 | d = debugfs_create_u32("unaligned_instructions", S_IRUGO, |
| 562 | mips_debugfs_dir, &unaligned_instructions); | 550 | mips_debugfs_dir, &unaligned_instructions); |
| 563 | if (IS_ERR(d)) | 551 | if (!d) |
| 564 | return PTR_ERR(d); | 552 | return -ENOMEM; |
| 565 | d = debugfs_create_u32("unaligned_action", S_IRUGO | S_IWUSR, | 553 | d = debugfs_create_u32("unaligned_action", S_IRUGO | S_IWUSR, |
| 566 | mips_debugfs_dir, &unaligned_action); | 554 | mips_debugfs_dir, &unaligned_action); |
| 567 | if (IS_ERR(d)) | 555 | if (!d) |
| 568 | return PTR_ERR(d); | 556 | return -ENOMEM; |
| 569 | return 0; | 557 | return 0; |
| 570 | } | 558 | } |
| 571 | __initcall(debugfs_unaligned); | 559 | __initcall(debugfs_unaligned); |
