Skip to content

Commit 51d8905

Browse files
jpoimboealoktiwa
authored andcommitted
sched/smt: Always inline sched_smt_active()
[ Upstream commit 09f37f2d7b21ff35b8b533f9ab8cfad2fe8f72f6 ] 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 <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/1d03907b0a247cf7fb5c1d518de378864f603060.1743481539.git.jpoimboe@kernel.org Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 99bd64445f36c5be47f9014161de002fd2598f41) Signed-off-by: Alok Tiwari <[email protected]>
1 parent 9376cbe commit 51d8905

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)