irqflags.h (651a88798412e216f337d70181127e847f00a4b7) irqflags.h (c89191ce67efa4e5353db6a67f7287c28e673740)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _X86_IRQFLAGS_H_
3#define _X86_IRQFLAGS_H_
4
5#include <asm/processor-flags.h>
6
7#ifndef __ASSEMBLY__
8

--- 123 unchanged lines hidden (view full) ---

132 return arch_irqs_disabled_flags(flags);
133}
134
135static __always_inline void arch_local_irq_restore(unsigned long flags)
136{
137 if (!arch_irqs_disabled_flags(flags))
138 arch_local_irq_enable();
139}
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _X86_IRQFLAGS_H_
3#define _X86_IRQFLAGS_H_
4
5#include <asm/processor-flags.h>
6
7#ifndef __ASSEMBLY__
8

--- 123 unchanged lines hidden (view full) ---

132 return arch_irqs_disabled_flags(flags);
133}
134
135static __always_inline void arch_local_irq_restore(unsigned long flags)
136{
137 if (!arch_irqs_disabled_flags(flags))
138 arch_local_irq_enable();
139}
140#else
141#ifdef CONFIG_X86_64
142#ifdef CONFIG_XEN_PV
143#define SWAPGS ALTERNATIVE "swapgs", "", X86_FEATURE_XENPV
144#else
145#define SWAPGS swapgs
146#endif
147#endif
148#endif /* !__ASSEMBLY__ */
149
150#endif
140#endif /* !__ASSEMBLY__ */
141
142#endif