diff options
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index b7292a56d4cd..cce8313ec27d 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -66,7 +66,7 @@ extern asmlinkage void handle_mcheck(void); | |||
66 | extern asmlinkage void handle_reserved(void); | 66 | extern asmlinkage void handle_reserved(void); |
67 | 67 | ||
68 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, | 68 | extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, |
69 | struct mips_fpu_struct *ctx); | 69 | struct mips_fpu_struct *ctx, int has_fpu); |
70 | 70 | ||
71 | void (*board_be_init)(void); | 71 | void (*board_be_init)(void); |
72 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); | 72 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); |
@@ -641,7 +641,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) | |||
641 | preempt_enable(); | 641 | preempt_enable(); |
642 | 642 | ||
643 | /* Run the emulator */ | 643 | /* Run the emulator */ |
644 | sig = fpu_emulator_cop1Handler (regs, ¤t->thread.fpu); | 644 | sig = fpu_emulator_cop1Handler (regs, ¤t->thread.fpu, 1); |
645 | 645 | ||
646 | preempt_disable(); | 646 | preempt_disable(); |
647 | 647 | ||
@@ -791,11 +791,13 @@ asmlinkage void do_cpu(struct pt_regs *regs) | |||
791 | set_used_math(); | 791 | set_used_math(); |
792 | } | 792 | } |
793 | 793 | ||
794 | preempt_enable(); | 794 | if (cpu_has_fpu) { |
795 | 795 | preempt_enable(); | |
796 | if (!cpu_has_fpu) { | 796 | } else { |
797 | int sig = fpu_emulator_cop1Handler(regs, | 797 | int sig; |
798 | ¤t->thread.fpu); | 798 | preempt_enable(); |
799 | sig = fpu_emulator_cop1Handler(regs, | ||
800 | ¤t->thread.fpu, 0); | ||
799 | if (sig) | 801 | if (sig) |
800 | force_sig(sig, current); | 802 | force_sig(sig, current); |
801 | #ifdef CONFIG_MIPS_MT_FPAFF | 803 | #ifdef CONFIG_MIPS_MT_FPAFF |