.. | .. |
---|
45 | 45 | #include <trace/hooks/sched.h> |
---|
46 | 46 | #include <trace/hooks/cpu.h> |
---|
47 | 47 | |
---|
| 48 | +#include "sched/sched.h" |
---|
48 | 49 | #include "smpboot.h" |
---|
49 | 50 | |
---|
50 | 51 | /** |
---|
.. | .. |
---|
1159 | 1160 | } |
---|
1160 | 1161 | EXPORT_SYMBOL_GPL(remove_cpu); |
---|
1161 | 1162 | |
---|
1162 | | -extern int dl_cpu_busy(int cpu, struct task_struct *p); |
---|
1163 | | - |
---|
1164 | 1163 | int __pause_drain_rq(struct cpumask *cpus) |
---|
1165 | 1164 | { |
---|
1166 | 1165 | unsigned int cpu; |
---|
.. | .. |
---|
1234 | 1233 | cpumask_and(cpus, cpus, cpu_active_mask); |
---|
1235 | 1234 | |
---|
1236 | 1235 | for_each_cpu(cpu, cpus) { |
---|
1237 | | - if (!cpu_online(cpu) || dl_cpu_busy(cpu, NULL) || |
---|
| 1236 | + if (!cpu_online(cpu) || dl_bw_check_overflow(cpu) || |
---|
1238 | 1237 | get_cpu_device(cpu)->offline_disabled == true) { |
---|
1239 | 1238 | err = -EBUSY; |
---|
1240 | 1239 | goto err_cpu_maps_update; |
---|
.. | .. |
---|
2538 | 2537 | |
---|
2539 | 2538 | if (st->state < target) |
---|
2540 | 2539 | ret = cpu_up(dev->id, target); |
---|
2541 | | - else |
---|
| 2540 | + else if (st->state > target) |
---|
2542 | 2541 | ret = cpu_down(dev->id, target); |
---|
| 2542 | + else if (WARN_ON(st->target != target)) |
---|
| 2543 | + st->target = target; |
---|
2543 | 2544 | out: |
---|
2544 | 2545 | unlock_device_hotplug(); |
---|
2545 | 2546 | return ret ? ret : count; |
---|