diff options
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 9f4edeb21323..cb838ca42c96 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -777,21 +777,10 @@ asmlinkage void math_state_restore(void) | |||
777 | } | 777 | } |
778 | EXPORT_SYMBOL_GPL(math_state_restore); | 778 | EXPORT_SYMBOL_GPL(math_state_restore); |
779 | 779 | ||
780 | #ifndef CONFIG_MATH_EMULATION | ||
781 | void math_emulate(struct math_emu_info *info) | ||
782 | { | ||
783 | printk(KERN_EMERG | ||
784 | "math-emulation not enabled and no coprocessor found.\n"); | ||
785 | printk(KERN_EMERG "killing %s.\n", current->comm); | ||
786 | force_sig(SIGFPE, current); | ||
787 | schedule(); | ||
788 | } | ||
789 | #endif /* CONFIG_MATH_EMULATION */ | ||
790 | |||
791 | dotraplinkage void __kprobes | 780 | dotraplinkage void __kprobes |
792 | do_device_not_available(struct pt_regs *regs, long error_code) | 781 | do_device_not_available(struct pt_regs *regs, long error_code) |
793 | { | 782 | { |
794 | #ifdef CONFIG_X86_32 | 783 | #ifdef CONFIG_MATH_EMULATION |
795 | if (read_cr0() & X86_CR0_EM) { | 784 | if (read_cr0() & X86_CR0_EM) { |
796 | struct math_emu_info info = { }; | 785 | struct math_emu_info info = { }; |
797 | 786 | ||
@@ -799,12 +788,12 @@ do_device_not_available(struct pt_regs *regs, long error_code) | |||
799 | 788 | ||
800 | info.regs = regs; | 789 | info.regs = regs; |
801 | math_emulate(&info); | 790 | math_emulate(&info); |
802 | } else { | 791 | return; |
803 | math_state_restore(); /* interrupts still off */ | ||
804 | conditional_sti(regs); | ||
805 | } | 792 | } |
806 | #else | 793 | #endif |
807 | math_state_restore(); | 794 | math_state_restore(); /* interrupts still off */ |
795 | #ifdef CONFIG_X86_32 | ||
796 | conditional_sti(regs); | ||
808 | #endif | 797 | #endif |
809 | } | 798 | } |
810 | 799 | ||
@@ -882,18 +871,6 @@ void __init trap_init(void) | |||
882 | #endif | 871 | #endif |
883 | 872 | ||
884 | #ifdef CONFIG_X86_32 | 873 | #ifdef CONFIG_X86_32 |
885 | if (cpu_has_fxsr) { | ||
886 | printk(KERN_INFO "Enabling fast FPU save and restore... "); | ||
887 | set_in_cr4(X86_CR4_OSFXSR); | ||
888 | printk("done.\n"); | ||
889 | } | ||
890 | if (cpu_has_xmm) { | ||
891 | printk(KERN_INFO | ||
892 | "Enabling unmasked SIMD FPU exception support... "); | ||
893 | set_in_cr4(X86_CR4_OSXMMEXCPT); | ||
894 | printk("done.\n"); | ||
895 | } | ||
896 | |||
897 | set_system_trap_gate(SYSCALL_VECTOR, &system_call); | 874 | set_system_trap_gate(SYSCALL_VECTOR, &system_call); |
898 | set_bit(SYSCALL_VECTOR, used_vectors); | 875 | set_bit(SYSCALL_VECTOR, used_vectors); |
899 | #endif | 876 | #endif |