diff options
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index a1d288327ff0..1e1e27b7d438 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -798,15 +798,15 @@ unsigned long patch_espfix_desc(unsigned long uesp, unsigned long kesp) | |||
798 | 798 | ||
799 | return new_kesp; | 799 | return new_kesp; |
800 | } | 800 | } |
801 | #else | 801 | #endif |
802 | |||
802 | asmlinkage void __attribute__((weak)) smp_thermal_interrupt(void) | 803 | asmlinkage void __attribute__((weak)) smp_thermal_interrupt(void) |
803 | { | 804 | { |
804 | } | 805 | } |
805 | 806 | ||
806 | asmlinkage void __attribute__((weak)) mce_threshold_interrupt(void) | 807 | asmlinkage void __attribute__((weak)) smp_threshold_interrupt(void) |
807 | { | 808 | { |
808 | } | 809 | } |
809 | #endif | ||
810 | 810 | ||
811 | /* | 811 | /* |
812 | * 'math_state_restore()' saves the current math information in the | 812 | * 'math_state_restore()' saves the current math information in the |
@@ -839,9 +839,6 @@ asmlinkage void math_state_restore(void) | |||
839 | } | 839 | } |
840 | 840 | ||
841 | clts(); /* Allow maths ops (or we recurse) */ | 841 | clts(); /* Allow maths ops (or we recurse) */ |
842 | #ifdef CONFIG_X86_32 | ||
843 | restore_fpu(tsk); | ||
844 | #else | ||
845 | /* | 842 | /* |
846 | * Paranoid restore. send a SIGSEGV if we fail to restore the state. | 843 | * Paranoid restore. send a SIGSEGV if we fail to restore the state. |
847 | */ | 844 | */ |
@@ -850,7 +847,7 @@ asmlinkage void math_state_restore(void) | |||
850 | force_sig(SIGSEGV, tsk); | 847 | force_sig(SIGSEGV, tsk); |
851 | return; | 848 | return; |
852 | } | 849 | } |
853 | #endif | 850 | |
854 | thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */ | 851 | thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */ |
855 | tsk->fpu_counter++; | 852 | tsk->fpu_counter++; |
856 | } | 853 | } |
@@ -945,8 +942,13 @@ void __init trap_init(void) | |||
945 | #endif | 942 | #endif |
946 | set_intr_gate(19, &simd_coprocessor_error); | 943 | set_intr_gate(19, &simd_coprocessor_error); |
947 | 944 | ||
945 | /* Reserve all the builtin and the syscall vector: */ | ||
946 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | ||
947 | set_bit(i, used_vectors); | ||
948 | |||
948 | #ifdef CONFIG_IA32_EMULATION | 949 | #ifdef CONFIG_IA32_EMULATION |
949 | set_system_intr_gate(IA32_SYSCALL_VECTOR, ia32_syscall); | 950 | set_system_intr_gate(IA32_SYSCALL_VECTOR, ia32_syscall); |
951 | set_bit(IA32_SYSCALL_VECTOR, used_vectors); | ||
950 | #endif | 952 | #endif |
951 | 953 | ||
952 | #ifdef CONFIG_X86_32 | 954 | #ifdef CONFIG_X86_32 |
@@ -963,17 +965,9 @@ void __init trap_init(void) | |||
963 | } | 965 | } |
964 | 966 | ||
965 | set_system_trap_gate(SYSCALL_VECTOR, &system_call); | 967 | set_system_trap_gate(SYSCALL_VECTOR, &system_call); |
966 | #endif | ||
967 | |||
968 | /* Reserve all the builtin and the syscall vector: */ | ||
969 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | ||
970 | set_bit(i, used_vectors); | ||
971 | |||
972 | #ifdef CONFIG_X86_64 | ||
973 | set_bit(IA32_SYSCALL_VECTOR, used_vectors); | ||
974 | #else | ||
975 | set_bit(SYSCALL_VECTOR, used_vectors); | 968 | set_bit(SYSCALL_VECTOR, used_vectors); |
976 | #endif | 969 | #endif |
970 | |||
977 | /* | 971 | /* |
978 | * Should be a barrier for any external CPU state: | 972 | * Should be a barrier for any external CPU state: |
979 | */ | 973 | */ |