Skip to content

Commit c94a88f

Browse files
melverPeter Zijlstra
authored andcommitted
sched: Use __always_inline on is_idle_task()
is_idle_task() may be used from noinstr functions such as irqentry_enter(). Since the compiler is free to not inline regular inline functions, switch to using __always_inline. Signed-off-by: Marco Elver <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent d012a71 commit c94a88f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ extern struct task_struct *idle_task(int cpu);
16661666
*
16671667
* Return: 1 if @p is an idle task. 0 otherwise.
16681668
*/
1669-
static inline bool is_idle_task(const struct task_struct *p)
1669+
static __always_inline bool is_idle_task(const struct task_struct *p)
16701670
{
16711671
return !!(p->flags & PF_IDLE);
16721672
}

0 commit comments

Comments
 (0)