diff options
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r-- | arch/x86/kernel/traps.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 8c8093b146ca..b857ed890b4c 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -88,7 +88,7 @@ static inline void conditional_sti(struct pt_regs *regs) | |||
88 | 88 | ||
89 | static inline void preempt_conditional_sti(struct pt_regs *regs) | 89 | static inline void preempt_conditional_sti(struct pt_regs *regs) |
90 | { | 90 | { |
91 | inc_preempt_count(); | 91 | preempt_count_inc(); |
92 | if (regs->flags & X86_EFLAGS_IF) | 92 | if (regs->flags & X86_EFLAGS_IF) |
93 | local_irq_enable(); | 93 | local_irq_enable(); |
94 | } | 94 | } |
@@ -103,7 +103,7 @@ static inline void preempt_conditional_cli(struct pt_regs *regs) | |||
103 | { | 103 | { |
104 | if (regs->flags & X86_EFLAGS_IF) | 104 | if (regs->flags & X86_EFLAGS_IF) |
105 | local_irq_disable(); | 105 | local_irq_disable(); |
106 | dec_preempt_count(); | 106 | preempt_count_dec(); |
107 | } | 107 | } |
108 | 108 | ||
109 | static int __kprobes | 109 | static int __kprobes |
@@ -653,7 +653,7 @@ void math_state_restore(void) | |||
653 | return; | 653 | return; |
654 | } | 654 | } |
655 | 655 | ||
656 | tsk->fpu_counter++; | 656 | tsk->thread.fpu_counter++; |
657 | } | 657 | } |
658 | EXPORT_SYMBOL_GPL(math_state_restore); | 658 | EXPORT_SYMBOL_GPL(math_state_restore); |
659 | 659 | ||
@@ -713,7 +713,7 @@ void __init early_trap_init(void) | |||
713 | /* int3 can be called from all */ | 713 | /* int3 can be called from all */ |
714 | set_system_intr_gate_ist(X86_TRAP_BP, &int3, DEBUG_STACK); | 714 | set_system_intr_gate_ist(X86_TRAP_BP, &int3, DEBUG_STACK); |
715 | #ifdef CONFIG_X86_32 | 715 | #ifdef CONFIG_X86_32 |
716 | set_intr_gate(X86_TRAP_PF, &page_fault); | 716 | set_intr_gate(X86_TRAP_PF, page_fault); |
717 | #endif | 717 | #endif |
718 | load_idt(&idt_descr); | 718 | load_idt(&idt_descr); |
719 | } | 719 | } |
@@ -721,7 +721,7 @@ void __init early_trap_init(void) | |||
721 | void __init early_trap_pf_init(void) | 721 | void __init early_trap_pf_init(void) |
722 | { | 722 | { |
723 | #ifdef CONFIG_X86_64 | 723 | #ifdef CONFIG_X86_64 |
724 | set_intr_gate(X86_TRAP_PF, &page_fault); | 724 | set_intr_gate(X86_TRAP_PF, page_fault); |
725 | #endif | 725 | #endif |
726 | } | 726 | } |
727 | 727 | ||
@@ -737,30 +737,30 @@ void __init trap_init(void) | |||
737 | early_iounmap(p, 4); | 737 | early_iounmap(p, 4); |
738 | #endif | 738 | #endif |
739 | 739 | ||
740 | set_intr_gate(X86_TRAP_DE, ÷_error); | 740 | set_intr_gate(X86_TRAP_DE, divide_error); |
741 | set_intr_gate_ist(X86_TRAP_NMI, &nmi, NMI_STACK); | 741 | set_intr_gate_ist(X86_TRAP_NMI, &nmi, NMI_STACK); |
742 | /* int4 can be called from all */ | 742 | /* int4 can be called from all */ |
743 | set_system_intr_gate(X86_TRAP_OF, &overflow); | 743 | set_system_intr_gate(X86_TRAP_OF, &overflow); |
744 | set_intr_gate(X86_TRAP_BR, &bounds); | 744 | set_intr_gate(X86_TRAP_BR, bounds); |
745 | set_intr_gate(X86_TRAP_UD, &invalid_op); | 745 | set_intr_gate(X86_TRAP_UD, invalid_op); |
746 | set_intr_gate(X86_TRAP_NM, &device_not_available); | 746 | set_intr_gate(X86_TRAP_NM, device_not_available); |
747 | #ifdef CONFIG_X86_32 | 747 | #ifdef CONFIG_X86_32 |
748 | set_task_gate(X86_TRAP_DF, GDT_ENTRY_DOUBLEFAULT_TSS); | 748 | set_task_gate(X86_TRAP_DF, GDT_ENTRY_DOUBLEFAULT_TSS); |
749 | #else | 749 | #else |
750 | set_intr_gate_ist(X86_TRAP_DF, &double_fault, DOUBLEFAULT_STACK); | 750 | set_intr_gate_ist(X86_TRAP_DF, &double_fault, DOUBLEFAULT_STACK); |
751 | #endif | 751 | #endif |
752 | set_intr_gate(X86_TRAP_OLD_MF, &coprocessor_segment_overrun); | 752 | set_intr_gate(X86_TRAP_OLD_MF, coprocessor_segment_overrun); |
753 | set_intr_gate(X86_TRAP_TS, &invalid_TSS); | 753 | set_intr_gate(X86_TRAP_TS, invalid_TSS); |
754 | set_intr_gate(X86_TRAP_NP, &segment_not_present); | 754 | set_intr_gate(X86_TRAP_NP, segment_not_present); |
755 | set_intr_gate_ist(X86_TRAP_SS, &stack_segment, STACKFAULT_STACK); | 755 | set_intr_gate_ist(X86_TRAP_SS, &stack_segment, STACKFAULT_STACK); |
756 | set_intr_gate(X86_TRAP_GP, &general_protection); | 756 | set_intr_gate(X86_TRAP_GP, general_protection); |
757 | set_intr_gate(X86_TRAP_SPURIOUS, &spurious_interrupt_bug); | 757 | set_intr_gate(X86_TRAP_SPURIOUS, spurious_interrupt_bug); |
758 | set_intr_gate(X86_TRAP_MF, &coprocessor_error); | 758 | set_intr_gate(X86_TRAP_MF, coprocessor_error); |
759 | set_intr_gate(X86_TRAP_AC, &alignment_check); | 759 | set_intr_gate(X86_TRAP_AC, alignment_check); |
760 | #ifdef CONFIG_X86_MCE | 760 | #ifdef CONFIG_X86_MCE |
761 | set_intr_gate_ist(X86_TRAP_MC, &machine_check, MCE_STACK); | 761 | set_intr_gate_ist(X86_TRAP_MC, &machine_check, MCE_STACK); |
762 | #endif | 762 | #endif |
763 | set_intr_gate(X86_TRAP_XF, &simd_coprocessor_error); | 763 | set_intr_gate(X86_TRAP_XF, simd_coprocessor_error); |
764 | 764 | ||
765 | /* Reserve all the builtin and the syscall vector: */ | 765 | /* Reserve all the builtin and the syscall vector: */ |
766 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | 766 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) |