diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index b3f1b55bb408..10ede4912b33 100755 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3054,7 +3054,17 @@ task_in_cum_window_demand(struct rq *rq, struct task_struct *p) static inline bool hmp_capable(void) { return false; } static inline bool is_max_capacity_cpu(int cpu) { return true; } -static inline bool is_min_capacity_cpu(int cpu) { return true; } +static inline bool is_min_capacity_cpu(int cpu) +{ +#ifdef CONFIG_SMP + int min_cpu = cpu_rq(cpu)->rd->min_cap_orig_cpu; + + return unlikely(min_cpu == -1) || + capacity_orig_of(cpu) == capacity_orig_of(min_cpu); +#else + return true; +#endif +} static inline int preferred_cluster(struct sched_cluster *cluster, struct task_struct *p)