Skip to content

Commit 09f37f2

Browse files
jpoimboeIngo Molnar
authored andcommitted
sched/smt: Always inline sched_smt_active()
sched_smt_active() can be called from noinstr code, so it should always be inlined. The CONFIG_SCHED_SMT version already has __always_inline. Do the same for its !CONFIG_SCHED_SMT counterpart. Fixes the following warning: vmlinux.o: error: objtool: intel_idle_ibrs+0x13: call to sched_smt_active() leaves .noinstr.text section Fixes: 321a874 ("sched/smt: Expose sched_smt_present static key") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/1d03907b0a247cf7fb5c1d518de378864f603060.1743481539.git.jpoimboe@kernel.org Closes: https://lore.kernel.org/r/202503311434.lyw2Tveh-lkp@intel.com/
1 parent e77956e commit 09f37f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/sched/smt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static __always_inline bool sched_smt_active(void)
1212
return static_branch_likely(&sched_smt_present);
1313
}
1414
#else
15-
static inline bool sched_smt_active(void) { return false; }
15+
static __always_inline bool sched_smt_active(void) { return false; }
1616
#endif
1717

1818
void arch_smt_update(void);

0 commit comments

Comments
 (0)