aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 8eef8e5512d4..1a0c084b1cf9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6552,31 +6552,23 @@ cpu_to_cpu_group(int cpu, const struct cpumask *cpu_map,
6552#ifdef CONFIG_SCHED_MC 6552#ifdef CONFIG_SCHED_MC
6553static DEFINE_PER_CPU(struct static_sched_domain, core_domains); 6553static DEFINE_PER_CPU(struct static_sched_domain, core_domains);
6554static DEFINE_PER_CPU(struct static_sched_group, sched_group_core); 6554static DEFINE_PER_CPU(struct static_sched_group, sched_group_core);
6555#endif /* CONFIG_SCHED_MC */
6556 6555
6557#if defined(CONFIG_SCHED_MC) && defined(CONFIG_SCHED_SMT)
6558static int 6556static int
6559cpu_to_core_group(int cpu, const struct cpumask *cpu_map, 6557cpu_to_core_group(int cpu, const struct cpumask *cpu_map,
6560 struct sched_group **sg, struct cpumask *mask) 6558 struct sched_group **sg, struct cpumask *mask)
6561{ 6559{
6562 int group; 6560 int group;
6563 6561#ifdef CONFIG_SCHED_SMT
6564 cpumask_and(mask, topology_thread_cpumask(cpu), cpu_map); 6562 cpumask_and(mask, topology_thread_cpumask(cpu), cpu_map);
6565 group = cpumask_first(mask); 6563 group = cpumask_first(mask);
6564#else
6565 group = cpu;
6566#endif
6566 if (sg) 6567 if (sg)
6567 *sg = &per_cpu(sched_group_core, group).sg; 6568 *sg = &per_cpu(sched_group_core, group).sg;
6568 return group; 6569 return group;
6569} 6570}
6570#elif defined(CONFIG_SCHED_MC) 6571#endif /* CONFIG_SCHED_MC */
6571static int
6572cpu_to_core_group(int cpu, const struct cpumask *cpu_map,
6573 struct sched_group **sg, struct cpumask *unused)
6574{
6575 if (sg)
6576 *sg = &per_cpu(sched_group_core, cpu).sg;
6577 return cpu;
6578}
6579#endif
6580 6572
6581static DEFINE_PER_CPU(struct static_sched_domain, phys_domains); 6573static DEFINE_PER_CPU(struct static_sched_domain, phys_domains);
6582static DEFINE_PER_CPU(struct static_sched_group, sched_group_phys); 6574static DEFINE_PER_CPU(struct static_sched_group, sched_group_phys);