summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2020-08-20 19:20:46 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-08-26 12:41:51 +0200
commitc94a88f341c9b8f05d8639f62bb5d95936f881cd (patch)
tree2834965193a52c31739d9ef69877df6b4c9dd70c /include
parentd012a7190fc1fd72ed48911e77ca97ba4521bccd (diff)
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 <elver@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20200820172046.GA177701@elver.google.com
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 93ecd930efd3..afe01e232935 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1666,7 +1666,7 @@ extern struct task_struct *idle_task(int cpu);
*
* Return: 1 if @p is an idle task. 0 otherwise.
*/
-static inline bool is_idle_task(const struct task_struct *p)
+static __always_inline bool is_idle_task(const struct task_struct *p)
{
return !!(p->flags & PF_IDLE);
}