aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index dd95a4708370..3d0666c5e026 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8513,6 +8513,22 @@ static struct sched_domain *__build_numa_sched_domains(struct s_data *d,
8513 return sd; 8513 return sd;
8514} 8514}
8515 8515
8516static struct sched_domain *__build_cpu_sched_domain(struct s_data *d,
8517 const struct cpumask *cpu_map, struct sched_domain_attr *attr,
8518 struct sched_domain *parent, int i)
8519{
8520 struct sched_domain *sd;
8521 sd = &per_cpu(phys_domains, i).sd;
8522 SD_INIT(sd, CPU);
8523 set_domain_attribute(sd, attr);
8524 cpumask_copy(sched_domain_span(sd), d->nodemask);
8525 sd->parent = parent;
8526 if (parent)
8527 parent->child = sd;
8528 cpu_to_phys_group(i, cpu_map, &sd->groups, d->tmpmask);
8529 return sd;
8530}
8531
8516/* 8532/*
8517 * Build sched domains for a given set of cpus and attach the sched domains 8533 * Build sched domains for a given set of cpus and attach the sched domains
8518 * to the individual cpus 8534 * to the individual cpus
@@ -8542,15 +8558,7 @@ static int __build_sched_domains(const struct cpumask *cpu_map,
8542 cpu_map); 8558 cpu_map);
8543 8559
8544 sd = __build_numa_sched_domains(&d, cpu_map, attr, i); 8560 sd = __build_numa_sched_domains(&d, cpu_map, attr, i);
8545 p = sd; 8561 sd = __build_cpu_sched_domain(&d, cpu_map, attr, sd, i);
8546 sd = &per_cpu(phys_domains, i).sd;
8547 SD_INIT(sd, CPU);
8548 set_domain_attribute(sd, attr);
8549 cpumask_copy(sched_domain_span(sd), d.nodemask);
8550 sd->parent = p;
8551 if (p)
8552 p->child = sd;
8553 cpu_to_phys_group(i, cpu_map, &sd->groups, d.tmpmask);
8554 8562
8555#ifdef CONFIG_SCHED_MC 8563#ifdef CONFIG_SCHED_MC
8556 p = sd; 8564 p = sd;