Skip to content

Commit 9ac50f7

Browse files
jpoimboeIngo Molnar
authored andcommitted
context_tracking: Always inline ct_{nmi,irq}_{enter,exit}()
Thanks to CONFIG_DEBUG_SECTION_MISMATCH, empty functions can be generated out of line. These can be called from noinstr code, so make sure they're always inlined. Fixes the following warnings: vmlinux.o: warning: objtool: irqentry_nmi_enter+0xa2: call to ct_nmi_enter() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_nmi_exit+0x16: call to ct_nmi_exit() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_exit+0x78: call to ct_irq_exit() leaves .noinstr.text section Fixes: 6f0e6c1 ("context_tracking: Take IRQ eqs entrypoints over RCU") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Cc: Paul E. McKenney <paulmck@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/8509bce3f536bcd4ae7af3a2cf6930d48c5e631a.1743481539.git.jpoimboe@kernel.org Closes: https://lore.kernel.org/d1eca076-fdde-484a-b33e-70e0d167c36d@infradead.org
1 parent 09f37f2 commit 9ac50f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/linux/context_tracking_irq.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ void ct_irq_exit_irqson(void);
1010
void ct_nmi_enter(void);
1111
void ct_nmi_exit(void);
1212
#else
13-
static inline void ct_irq_enter(void) { }
14-
static inline void ct_irq_exit(void) { }
13+
static __always_inline void ct_irq_enter(void) { }
14+
static __always_inline void ct_irq_exit(void) { }
1515
static inline void ct_irq_enter_irqson(void) { }
1616
static inline void ct_irq_exit_irqson(void) { }
17-
static inline void ct_nmi_enter(void) { }
18-
static inline void ct_nmi_exit(void) { }
17+
static __always_inline void ct_nmi_enter(void) { }
18+
static __always_inline void ct_nmi_exit(void) { }
1919
#endif
2020

2121
#endif

0 commit comments

Comments
 (0)