2 * include/asm-i386/irqflags.h
6 * This file gets included from lowlevel asm headers too, to provide
7 * wrapped versions of the local_irq_*() APIs, based on the
8 * raw_local_irq_*() functions from the lowlevel headers.
10 #ifndef _ASM_IRQFLAGS_H
11 #define _ASM_IRQFLAGS_H
13 #ifdef CONFIG_PARAVIRT
14 #include <asm/paravirt.h>
18 unsigned long __raw_local_save_flags(void);
20 void raw_local_irq_restore(unsigned long flags);
21 void raw_local_irq_disable(void);
22 void raw_local_irq_enable(void);
25 * Used in the idle loop; sti takes one instruction cycle
28 void raw_safe_halt(void);
31 * Used when interrupts are already enabled or to
32 * shutdown the processor:
39 unsigned long __raw_local_irq_save(void);
42 #define DISABLE_INTERRUPTS(clobbers) GET_VCPU_INFO ; \
44 #define ENABLE_INTERRUPTS(clobbers) GET_VCPU_INFO ; \
46 #define ENABLE_INTERRUPTS_SYSEXIT NET_DONE_YET
47 #define INTERRUPT_RETURN iret
48 #define GET_CR0_INTO_EAX NOT_DONE_YET
49 #endif /* __ASSEMBLY__ */
50 #endif /* CONFIG_PARAVIRT */
53 #define raw_local_save_flags(flags) \
54 do { (flags) = __raw_local_save_flags(); } while (0)
56 #define raw_local_irq_save(flags) \
57 do { (flags) = __raw_local_irq_save(); } while (0)
59 static inline int raw_irqs_disabled_flags(unsigned long flags)
64 int raw_irqs_disabled(void);
65 #endif /* __ASSEMBLY__ */
68 * Do the CPU's IRQ-state tracing from assembly code. We call a
69 * C function, so save all the C-clobbered registers:
71 #ifdef CONFIG_TRACE_IRQFLAGS
73 # define TRACE_IRQS_ON \
77 call trace_hardirqs_on; \
82 # define TRACE_IRQS_OFF \
86 call trace_hardirqs_off; \
92 # define TRACE_IRQS_ON
93 # define TRACE_IRQS_OFF