.. | .. |
---|
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; |
---|
.. | .. |
---|
1980 | 1979 | .name = "ap:online", |
---|
1981 | 1980 | }, |
---|
1982 | 1981 | /* |
---|
1983 | | - * Handled on control processor until the plugged processor manages |
---|
| 1982 | + * Handled on controll processor until the plugged processor manages |
---|
1984 | 1983 | * this itself. |
---|
1985 | 1984 | */ |
---|
1986 | 1985 | [CPUHP_TEARDOWN_CPU] = { |
---|
.. | .. |
---|
1989 | 1988 | .teardown.single = takedown_cpu, |
---|
1990 | 1989 | .cant_stop = true, |
---|
1991 | 1990 | }, |
---|
1992 | | - |
---|
1993 | | - [CPUHP_AP_SCHED_WAIT_EMPTY] = { |
---|
1994 | | - .name = "sched:waitempty", |
---|
1995 | | - .startup.single = NULL, |
---|
1996 | | - .teardown.single = sched_cpu_wait_empty, |
---|
1997 | | - }, |
---|
1998 | | - |
---|
1999 | 1991 | /* Handle smpboot threads park/unpark */ |
---|
2000 | 1992 | [CPUHP_AP_SMPBOOT_THREADS] = { |
---|
2001 | 1993 | .name = "smpboot/threads:online", |
---|
.. | .. |
---|
2545 | 2537 | |
---|
2546 | 2538 | if (st->state < target) |
---|
2547 | 2539 | ret = cpu_up(dev->id, target); |
---|
2548 | | - else |
---|
| 2540 | + else if (st->state > target) |
---|
2549 | 2541 | ret = cpu_down(dev->id, target); |
---|
| 2542 | + else if (WARN_ON(st->target != target)) |
---|
| 2543 | + st->target = target; |
---|
2550 | 2544 | out: |
---|
2551 | 2545 | unlock_device_hotplug(); |
---|
2552 | 2546 | return ret ? ret : count; |
---|