diff options
Diffstat (limited to 'include/asm-x86_64/irqflags.h')
-rw-r--r-- | include/asm-x86_64/irqflags.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/asm-x86_64/irqflags.h b/include/asm-x86_64/irqflags.h index cce6937e87c0..86e70fe23659 100644 --- a/include/asm-x86_64/irqflags.h +++ b/include/asm-x86_64/irqflags.h | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | #ifndef _ASM_IRQFLAGS_H | 10 | #ifndef _ASM_IRQFLAGS_H |
11 | #define _ASM_IRQFLAGS_H | 11 | #define _ASM_IRQFLAGS_H |
12 | #include <asm/processor-flags.h> | ||
12 | 13 | ||
13 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
14 | /* | 15 | /* |
@@ -53,19 +54,19 @@ static inline void raw_local_irq_disable(void) | |||
53 | { | 54 | { |
54 | unsigned long flags = __raw_local_save_flags(); | 55 | unsigned long flags = __raw_local_save_flags(); |
55 | 56 | ||
56 | raw_local_irq_restore((flags & ~(1 << 9)) | (1 << 18)); | 57 | raw_local_irq_restore((flags & ~X86_EFLAGS_IF) | X86_EFLAGS_AC); |
57 | } | 58 | } |
58 | 59 | ||
59 | static inline void raw_local_irq_enable(void) | 60 | static inline void raw_local_irq_enable(void) |
60 | { | 61 | { |
61 | unsigned long flags = __raw_local_save_flags(); | 62 | unsigned long flags = __raw_local_save_flags(); |
62 | 63 | ||
63 | raw_local_irq_restore((flags | (1 << 9)) & ~(1 << 18)); | 64 | raw_local_irq_restore((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC)); |
64 | } | 65 | } |
65 | 66 | ||
66 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 67 | static inline int raw_irqs_disabled_flags(unsigned long flags) |
67 | { | 68 | { |
68 | return !(flags & (1<<9)) || (flags & (1 << 18)); | 69 | return !(flags & X86_EFLAGS_IF) || (flags & X86_EFLAGS_AC); |
69 | } | 70 | } |
70 | 71 | ||
71 | #else /* CONFIG_X86_VSMP */ | 72 | #else /* CONFIG_X86_VSMP */ |
@@ -82,7 +83,7 @@ static inline void raw_local_irq_enable(void) | |||
82 | 83 | ||
83 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 84 | static inline int raw_irqs_disabled_flags(unsigned long flags) |
84 | { | 85 | { |
85 | return !(flags & (1 << 9)); | 86 | return !(flags & X86_EFLAGS_IF); |
86 | } | 87 | } |
87 | 88 | ||
88 | #endif | 89 | #endif |