summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-17 17:20:11 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-17 17:20:11 +0100
commit0b6de0092244c98b5ba1abda34c92470a20e0d0c (patch)
tree478e4e18c33fd9fa517559e1ce951fe378d5965f /arch/x86/kernel/traps.c
parent37a25424252b6cff4dd4b1937ab6a1dbfcadabcc (diff)
parentf62bae5009c1ba596cd475cafbc83e0570a36e26 (diff)
downloadop-kernel-dev-0b6de0092244c98b5ba1abda34c92470a20e0d0c.zip
op-kernel-dev-0b6de0092244c98b5ba1abda34c92470a20e0d0c.tar.gz
Merge branch 'x86/apic' into perfcounters/core
Conflicts: arch/x86/kernel/cpu/perfctr-watchdog.c
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 6cba7ab..c85a86c 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -98,6 +98,12 @@ static inline void preempt_conditional_sti(struct pt_regs *regs)
local_irq_enable();
}
+static inline void conditional_cli(struct pt_regs *regs)
+{
+ if (regs->flags & X86_EFLAGS_IF)
+ local_irq_disable();
+}
+
static inline void preempt_conditional_cli(struct pt_regs *regs)
{
if (regs->flags & X86_EFLAGS_IF)
@@ -625,8 +631,10 @@ clear_dr7:
#ifdef CONFIG_X86_32
debug_vm86:
+ /* reenable preemption: handle_vm86_trap() might sleep */
+ dec_preempt_count();
handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1);
- preempt_conditional_cli(regs);
+ conditional_cli(regs);
return;
#endif
OpenPOWER on IntegriCloud