From: Gleb Natapov <gleb@xxxxxxxxxx> Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx> Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> diff --git a/lib/x86/processor.h b/lib/x86/processor.h index d0ace9e..8fb70cd 100644 --- a/lib/x86/processor.h +++ b/lib/x86/processor.h @@ -280,4 +280,14 @@ static inline void wrtsc(u64 tsc) asm volatile("wrmsr" : : "a"(a), "d"(d), "c"(0x10)); } +static inline void irq_disable(void) +{ + asm volatile("cli"); +} + +static inline void irq_enable(void) +{ + asm volatile("sti"); +} + #endif diff --git a/x86/apic.c b/x86/apic.c index 4f05b02..3dd2485 100644 --- a/x86/apic.c +++ b/x86/apic.c @@ -134,16 +134,6 @@ static void handle_irq(unsigned vec, void (*func)(isr_regs_t *regs)) #endif } -static void irq_disable(void) -{ - asm volatile("cli"); -} - -static void irq_enable(void) -{ - asm volatile("sti"); -} - static void eoi(void) { apic_write(APIC_EOI, 0); -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html