Skip to content

Commit 7a745be

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
x86/entry: __always_inline irqflags for noinstr
vmlinux.o: warning: objtool: lockdep_hardirqs_on()+0x65: call to arch_local_save_flags() leaves .noinstr.text section vmlinux.o: warning: objtool: lockdep_hardirqs_off()+0x5d: call to arch_local_save_flags() leaves .noinstr.text section vmlinux.o: warning: objtool: lock_is_held_type()+0x35: call to arch_local_irq_save() leaves .noinstr.text section vmlinux.o: warning: objtool: check_preemption_disabled()+0x31: call to arch_local_save_flags() leaves .noinstr.text section vmlinux.o: warning: objtool: check_preemption_disabled()+0x33: call to arch_irqs_disabled_flags() leaves .noinstr.text section vmlinux.o: warning: objtool: lock_is_held_type()+0x2f: call to native_irq_disable() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 28eaf87 commit 7a745be

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

arch/x86/include/asm/irqflags.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/* Declaration required for gcc < 4.9 to prevent -Werror=missing-prototypes */
1919
extern inline unsigned long native_save_fl(void);
20-
extern inline unsigned long native_save_fl(void)
20+
extern __always_inline unsigned long native_save_fl(void)
2121
{
2222
unsigned long flags;
2323

@@ -44,12 +44,12 @@ extern inline void native_restore_fl(unsigned long flags)
4444
:"memory", "cc");
4545
}
4646

47-
static inline void native_irq_disable(void)
47+
static __always_inline void native_irq_disable(void)
4848
{
4949
asm volatile("cli": : :"memory");
5050
}
5151

52-
static inline void native_irq_enable(void)
52+
static __always_inline void native_irq_enable(void)
5353
{
5454
asm volatile("sti": : :"memory");
5555
}
@@ -74,22 +74,22 @@ static inline __cpuidle void native_halt(void)
7474
#ifndef __ASSEMBLY__
7575
#include <linux/types.h>
7676

77-
static inline notrace unsigned long arch_local_save_flags(void)
77+
static __always_inline unsigned long arch_local_save_flags(void)
7878
{
7979
return native_save_fl();
8080
}
8181

82-
static inline notrace void arch_local_irq_restore(unsigned long flags)
82+
static __always_inline void arch_local_irq_restore(unsigned long flags)
8383
{
8484
native_restore_fl(flags);
8585
}
8686

87-
static inline notrace void arch_local_irq_disable(void)
87+
static __always_inline void arch_local_irq_disable(void)
8888
{
8989
native_irq_disable();
9090
}
9191

92-
static inline notrace void arch_local_irq_enable(void)
92+
static __always_inline void arch_local_irq_enable(void)
9393
{
9494
native_irq_enable();
9595
}
@@ -115,7 +115,7 @@ static inline __cpuidle void halt(void)
115115
/*
116116
* For spinlocks, etc:
117117
*/
118-
static inline notrace unsigned long arch_local_irq_save(void)
118+
static __always_inline unsigned long arch_local_irq_save(void)
119119
{
120120
unsigned long flags = arch_local_save_flags();
121121
arch_local_irq_disable();
@@ -159,12 +159,12 @@ static inline notrace unsigned long arch_local_irq_save(void)
159159
#endif /* CONFIG_PARAVIRT_XXL */
160160

161161
#ifndef __ASSEMBLY__
162-
static inline int arch_irqs_disabled_flags(unsigned long flags)
162+
static __always_inline int arch_irqs_disabled_flags(unsigned long flags)
163163
{
164164
return !(flags & X86_EFLAGS_IF);
165165
}
166166

167-
static inline int arch_irqs_disabled(void)
167+
static __always_inline int arch_irqs_disabled(void)
168168
{
169169
unsigned long flags = arch_local_save_flags();
170170

0 commit comments

Comments
 (0)