sched: Use __always_inline on is_idle_task()
authorMarco Elver <elver@google.com>
Thu, 20 Aug 2020 17:20:46 +0000 (19:20 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 26 Aug 2020 10:41:51 +0000 (12:41 +0200)
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
include/linux/sched.h

index 93ecd93..afe01e2 100644 (file)
@@ -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);
 }