diff options
-rw-r--r-- | kernel/sched/topology.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 9318acf1d1fe..49b835f1305f 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c | |||
@@ -2029,7 +2029,7 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att | |||
2029 | rcu_read_unlock(); | 2029 | rcu_read_unlock(); |
2030 | 2030 | ||
2031 | if (has_asym) | 2031 | if (has_asym) |
2032 | static_branch_enable_cpuslocked(&sched_asym_cpucapacity); | 2032 | static_branch_inc_cpuslocked(&sched_asym_cpucapacity); |
2033 | 2033 | ||
2034 | if (rq && sched_debug_enabled) { | 2034 | if (rq && sched_debug_enabled) { |
2035 | pr_info("root domain span: %*pbl (max cpu_capacity = %lu)\n", | 2035 | pr_info("root domain span: %*pbl (max cpu_capacity = %lu)\n", |
@@ -2124,8 +2124,12 @@ int sched_init_domains(const struct cpumask *cpu_map) | |||
2124 | */ | 2124 | */ |
2125 | static void detach_destroy_domains(const struct cpumask *cpu_map) | 2125 | static void detach_destroy_domains(const struct cpumask *cpu_map) |
2126 | { | 2126 | { |
2127 | unsigned int cpu = cpumask_any(cpu_map); | ||
2127 | int i; | 2128 | int i; |
2128 | 2129 | ||
2130 | if (rcu_access_pointer(per_cpu(sd_asym_cpucapacity, cpu))) | ||
2131 | static_branch_dec_cpuslocked(&sched_asym_cpucapacity); | ||
2132 | |||
2129 | rcu_read_lock(); | 2133 | rcu_read_lock(); |
2130 | for_each_cpu(i, cpu_map) | 2134 | for_each_cpu(i, cpu_map) |
2131 | cpu_attach_domain(NULL, &def_root_domain, i); | 2135 | cpu_attach_domain(NULL, &def_root_domain, i); |