hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/kernel/cpu.c
....@@ -45,6 +45,7 @@
4545 #include <trace/hooks/sched.h>
4646 #include <trace/hooks/cpu.h>
4747
48
+#include "sched/sched.h"
4849 #include "smpboot.h"
4950
5051 /**
....@@ -1159,8 +1160,6 @@
11591160 }
11601161 EXPORT_SYMBOL_GPL(remove_cpu);
11611162
1162
-extern int dl_cpu_busy(int cpu, struct task_struct *p);
1163
-
11641163 int __pause_drain_rq(struct cpumask *cpus)
11651164 {
11661165 unsigned int cpu;
....@@ -1234,7 +1233,7 @@
12341233 cpumask_and(cpus, cpus, cpu_active_mask);
12351234
12361235 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) ||
12381237 get_cpu_device(cpu)->offline_disabled == true) {
12391238 err = -EBUSY;
12401239 goto err_cpu_maps_update;
....@@ -2538,8 +2537,10 @@
25382537
25392538 if (st->state < target)
25402539 ret = cpu_up(dev->id, target);
2541
- else
2540
+ else if (st->state > target)
25422541 ret = cpu_down(dev->id, target);
2542
+ else if (WARN_ON(st->target != target))
2543
+ st->target = target;
25432544 out:
25442545 unlock_device_hotplug();
25452546 return ret ? ret : count;