Merge tag 'v4.20-rc5' into sched/core, to pick up fixes
[linux-2.6-microblaze.git] / kernel / sched / sched.h
index 4e524ab..71cd8b7 100644 (file)
@@ -177,6 +177,11 @@ static inline bool valid_policy(int policy)
                rt_policy(policy) || dl_policy(policy);
 }
 
+static inline int task_has_idle_policy(struct task_struct *p)
+{
+       return idle_policy(p->policy);
+}
+
 static inline int task_has_rt_policy(struct task_struct *p)
 {
        return rt_policy(p->policy);
@@ -1794,12 +1799,12 @@ static inline void add_nr_running(struct rq *rq, unsigned count)
 
        rq->nr_running = prev_nr + count;
 
-       if (prev_nr < 2 && rq->nr_running >= 2) {
 #ifdef CONFIG_SMP
+       if (prev_nr < 2 && rq->nr_running >= 2) {
                if (!READ_ONCE(rq->rd->overload))
                        WRITE_ONCE(rq->rd->overload, 1);
-#endif
        }
+#endif
 
        sched_update_tick_dependency(rq);
 }