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;
....@@ -1980,7 +1979,7 @@
19801979 .name = "ap:online",
19811980 },
19821981 /*
1983
- * Handled on control processor until the plugged processor manages
1982
+ * Handled on controll processor until the plugged processor manages
19841983 * this itself.
19851984 */
19861985 [CPUHP_TEARDOWN_CPU] = {
....@@ -1989,13 +1988,6 @@
19891988 .teardown.single = takedown_cpu,
19901989 .cant_stop = true,
19911990 },
1992
-
1993
- [CPUHP_AP_SCHED_WAIT_EMPTY] = {
1994
- .name = "sched:waitempty",
1995
- .startup.single = NULL,
1996
- .teardown.single = sched_cpu_wait_empty,
1997
- },
1998
-
19991991 /* Handle smpboot threads park/unpark */
20001992 [CPUHP_AP_SMPBOOT_THREADS] = {
20011993 .name = "smpboot/threads:online",
....@@ -2545,8 +2537,10 @@
25452537
25462538 if (st->state < target)
25472539 ret = cpu_up(dev->id, target);
2548
- else
2540
+ else if (st->state > target)
25492541 ret = cpu_down(dev->id, target);
2542
+ else if (WARN_ON(st->target != target))
2543
+ st->target = target;
25502544 out:
25512545 unlock_device_hotplug();
25522546 return ret ? ret : count;