diff options
Diffstat (limited to 'include/asm-x86/irqflags_64.h')
-rw-r--r-- | include/asm-x86/irqflags_64.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-x86/irqflags_64.h b/include/asm-x86/irqflags_64.h index 5341ea1f815a..bb9163bb29d1 100644 --- a/include/asm-x86/irqflags_64.h +++ b/include/asm-x86/irqflags_64.h | |||
@@ -112,6 +112,26 @@ static inline int raw_irqs_disabled(void) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * makes the traced hardirq state match with the machine state | ||
116 | * | ||
117 | * should be a rarely used function, only in places where its | ||
118 | * otherwise impossible to know the irq state, like in traps. | ||
119 | */ | ||
120 | static inline void trace_hardirqs_fixup_flags(unsigned long flags) | ||
121 | { | ||
122 | if (raw_irqs_disabled_flags(flags)) | ||
123 | trace_hardirqs_off(); | ||
124 | else | ||
125 | trace_hardirqs_on(); | ||
126 | } | ||
127 | |||
128 | static inline void trace_hardirqs_fixup(void) | ||
129 | { | ||
130 | unsigned long flags = __raw_local_save_flags(); | ||
131 | |||
132 | trace_hardirqs_fixup_flags(flags); | ||
133 | } | ||
134 | /* | ||
115 | * Used in the idle loop; sti takes one instruction cycle | 135 | * Used in the idle loop; sti takes one instruction cycle |
116 | * to complete: | 136 | * to complete: |
117 | */ | 137 | */ |