Merge tag 'v5.6-rc3' into sched/core, to pick up fixes and dependent patches
[linux-2.6-microblaze.git] / kernel / sched / sched.h
index 878910e..12bf82d 100644 (file)
@@ -896,7 +896,7 @@ struct rq {
         */
        unsigned long           nr_uninterruptible;
 
-       struct task_struct      *curr;
+       struct task_struct __rcu        *curr;
        struct task_struct      *idle;
        struct task_struct      *stop;
        unsigned long           next_balance;
@@ -2484,3 +2484,16 @@ static inline void membarrier_switch_mm(struct rq *rq,
 {
 }
 #endif
+
+#ifdef CONFIG_SMP
+static inline bool is_per_cpu_kthread(struct task_struct *p)
+{
+       if (!(p->flags & PF_KTHREAD))
+               return false;
+
+       if (p->nr_cpus_allowed != 1)
+               return false;
+
+       return true;
+}
+#endif