diff options
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index d36a502d87ab..17483fe98e9c 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -895,7 +895,7 @@ asmlinkage void math_state_restore(void) | |||
895 | EXPORT_SYMBOL_GPL(math_state_restore); | 895 | EXPORT_SYMBOL_GPL(math_state_restore); |
896 | 896 | ||
897 | #ifndef CONFIG_MATH_EMULATION | 897 | #ifndef CONFIG_MATH_EMULATION |
898 | asmlinkage void math_emulate(long arg) | 898 | void math_emulate(struct math_emu_info *info) |
899 | { | 899 | { |
900 | printk(KERN_EMERG | 900 | printk(KERN_EMERG |
901 | "math-emulation not enabled and no coprocessor found.\n"); | 901 | "math-emulation not enabled and no coprocessor found.\n"); |
@@ -905,16 +905,19 @@ asmlinkage void math_emulate(long arg) | |||
905 | } | 905 | } |
906 | #endif /* CONFIG_MATH_EMULATION */ | 906 | #endif /* CONFIG_MATH_EMULATION */ |
907 | 907 | ||
908 | dotraplinkage void __kprobes | 908 | dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs) |
909 | do_device_not_available(struct pt_regs *regs, long error) | ||
910 | { | 909 | { |
911 | #ifdef CONFIG_X86_32 | 910 | #ifdef CONFIG_X86_32 |
912 | if (read_cr0() & X86_CR0_EM) { | 911 | if (read_cr0() & X86_CR0_EM) { |
913 | conditional_sti(regs); | 912 | struct math_emu_info info = { }; |
914 | math_emulate(0); | 913 | |
914 | conditional_sti(®s); | ||
915 | |||
916 | info.regs = ®s; | ||
917 | math_emulate(&info); | ||
915 | } else { | 918 | } else { |
916 | math_state_restore(); /* interrupts still off */ | 919 | math_state_restore(); /* interrupts still off */ |
917 | conditional_sti(regs); | 920 | conditional_sti(®s); |
918 | } | 921 | } |
919 | #else | 922 | #else |
920 | math_state_restore(); | 923 | math_state_restore(); |