aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-13 03:34:07 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-13 03:34:07 -0500
commite9c4ffb11f0b19005b5b9dc8481687a3637e5887 (patch)
tree7007f2ff846b9b057c5cd7c25e8b82e49f9b4b63 /arch/x86/kernel/traps.c
parent4bcf349a0f90d1e69eb35c6df0fa285c886c1cd6 (diff)
parent071a0bc2ceace31266836801510879407a3701fa (diff)
Merge branch 'linus' into perfcounters/core
Conflicts: arch/x86/kernel/acpi/boot.c
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c15
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)
895EXPORT_SYMBOL_GPL(math_state_restore); 895EXPORT_SYMBOL_GPL(math_state_restore);
896 896
897#ifndef CONFIG_MATH_EMULATION 897#ifndef CONFIG_MATH_EMULATION
898asmlinkage void math_emulate(long arg) 898void 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
908dotraplinkage void __kprobes 908dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs)
909do_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(&regs);
915
916 info.regs = &regs;
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(&regs);
918 } 921 }
919#else 922#else
920 math_state_restore(); 923 math_state_restore();