diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-17 06:52:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-17 06:56:49 -0400 |
commit | eadb8a091b27a840de7450f84ecff5ef13476424 (patch) | |
tree | 58c3782d40def63baa8167f3d31e3048cb4c7660 /arch/x86/kernel/traps.c | |
parent | 73874005cd8800440be4299bd095387fff4b90ac (diff) | |
parent | 65795efbd380a832ae508b04dba8f8e53f0b84d9 (diff) |
Merge branch 'linus' into tracing/hw-breakpoints
Conflicts:
arch/x86/Kconfig
arch/x86/kernel/traps.c
arch/x86/power/cpu.c
arch/x86/power/cpu_32.c
kernel/Makefile
Semantic conflict:
arch/x86/kernel/hw_breakpoint.c
Merge reason: Resolve the conflicts, move from put_cpu_no_sched() to
put_cpu() in arch/x86/kernel/hw_breakpoint.c.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 124a4d5a95b2..286d64eba31b 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/edac.h> | 45 | #include <linux/edac.h> |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #include <asm/kmemcheck.h> | ||
48 | #include <asm/stacktrace.h> | 49 | #include <asm/stacktrace.h> |
49 | #include <asm/processor.h> | 50 | #include <asm/processor.h> |
50 | #include <asm/debugreg.h> | 51 | #include <asm/debugreg.h> |
@@ -534,6 +535,10 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) | |||
534 | 535 | ||
535 | get_debugreg(dr6, 6); | 536 | get_debugreg(dr6, 6); |
536 | 537 | ||
538 | /* Catch kmemcheck conditions first of all! */ | ||
539 | if ((dr6 & DR_STEP) && kmemcheck_trap(regs)) | ||
540 | return; | ||
541 | |||
537 | /* DR6 may or may not be cleared by the CPU */ | 542 | /* DR6 may or may not be cleared by the CPU */ |
538 | set_debugreg(0, 6); | 543 | set_debugreg(0, 6); |
539 | /* | 544 | /* |
@@ -777,15 +782,15 @@ unsigned long patch_espfix_desc(unsigned long uesp, unsigned long kesp) | |||
777 | 782 | ||
778 | return new_kesp; | 783 | return new_kesp; |
779 | } | 784 | } |
780 | #else | 785 | #endif |
786 | |||
781 | asmlinkage void __attribute__((weak)) smp_thermal_interrupt(void) | 787 | asmlinkage void __attribute__((weak)) smp_thermal_interrupt(void) |
782 | { | 788 | { |
783 | } | 789 | } |
784 | 790 | ||
785 | asmlinkage void __attribute__((weak)) mce_threshold_interrupt(void) | 791 | asmlinkage void __attribute__((weak)) smp_threshold_interrupt(void) |
786 | { | 792 | { |
787 | } | 793 | } |
788 | #endif | ||
789 | 794 | ||
790 | /* | 795 | /* |
791 | * 'math_state_restore()' saves the current math information in the | 796 | * 'math_state_restore()' saves the current math information in the |
@@ -818,9 +823,6 @@ asmlinkage void math_state_restore(void) | |||
818 | } | 823 | } |
819 | 824 | ||
820 | clts(); /* Allow maths ops (or we recurse) */ | 825 | clts(); /* Allow maths ops (or we recurse) */ |
821 | #ifdef CONFIG_X86_32 | ||
822 | restore_fpu(tsk); | ||
823 | #else | ||
824 | /* | 826 | /* |
825 | * Paranoid restore. send a SIGSEGV if we fail to restore the state. | 827 | * Paranoid restore. send a SIGSEGV if we fail to restore the state. |
826 | */ | 828 | */ |
@@ -829,7 +831,7 @@ asmlinkage void math_state_restore(void) | |||
829 | force_sig(SIGSEGV, tsk); | 831 | force_sig(SIGSEGV, tsk); |
830 | return; | 832 | return; |
831 | } | 833 | } |
832 | #endif | 834 | |
833 | thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */ | 835 | thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */ |
834 | tsk->fpu_counter++; | 836 | tsk->fpu_counter++; |
835 | } | 837 | } |
@@ -924,8 +926,13 @@ void __init trap_init(void) | |||
924 | #endif | 926 | #endif |
925 | set_intr_gate(19, &simd_coprocessor_error); | 927 | set_intr_gate(19, &simd_coprocessor_error); |
926 | 928 | ||
929 | /* Reserve all the builtin and the syscall vector: */ | ||
930 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | ||
931 | set_bit(i, used_vectors); | ||
932 | |||
927 | #ifdef CONFIG_IA32_EMULATION | 933 | #ifdef CONFIG_IA32_EMULATION |
928 | set_system_intr_gate(IA32_SYSCALL_VECTOR, ia32_syscall); | 934 | set_system_intr_gate(IA32_SYSCALL_VECTOR, ia32_syscall); |
935 | set_bit(IA32_SYSCALL_VECTOR, used_vectors); | ||
929 | #endif | 936 | #endif |
930 | 937 | ||
931 | #ifdef CONFIG_X86_32 | 938 | #ifdef CONFIG_X86_32 |
@@ -942,17 +949,9 @@ void __init trap_init(void) | |||
942 | } | 949 | } |
943 | 950 | ||
944 | set_system_trap_gate(SYSCALL_VECTOR, &system_call); | 951 | set_system_trap_gate(SYSCALL_VECTOR, &system_call); |
945 | #endif | ||
946 | |||
947 | /* Reserve all the builtin and the syscall vector: */ | ||
948 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | ||
949 | set_bit(i, used_vectors); | ||
950 | |||
951 | #ifdef CONFIG_X86_64 | ||
952 | set_bit(IA32_SYSCALL_VECTOR, used_vectors); | ||
953 | #else | ||
954 | set_bit(SYSCALL_VECTOR, used_vectors); | 952 | set_bit(SYSCALL_VECTOR, used_vectors); |
955 | #endif | 953 | #endif |
954 | |||
956 | /* | 955 | /* |
957 | * Should be a barrier for any external CPU state: | 956 | * Should be a barrier for any external CPU state: |
958 | */ | 957 | */ |