We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3f38fa commit b547fc2Copy full SHA for b547fc2
arch/x86/include/asm/irqflags.h
@@ -54,6 +54,26 @@ static __always_inline void native_halt(void)
54
asm volatile("hlt": : :"memory");
55
}
56
57
+static __always_inline int native_irqs_disabled_flags(unsigned long flags)
58
+{
59
+ return !(flags & X86_EFLAGS_IF);
60
+}
61
+
62
+static __always_inline unsigned long native_local_irq_save(void)
63
64
+ unsigned long flags = native_save_fl();
65
66
+ native_irq_disable();
67
68
+ return flags;
69
70
71
+static __always_inline void native_local_irq_restore(unsigned long flags)
72
73
+ if (!native_irqs_disabled_flags(flags))
74
+ native_irq_enable();
75
76
77
#endif
78
79
#ifdef CONFIG_PARAVIRT_XXL
0 commit comments