diff options
author | Peter Zijlstra <peterz@infradead.org> | 2017-04-25 16:29:40 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-05-15 11:15:29 +0300 |
commit | 8d5dc5126bb2bbcebf0b1e061cca2fc02c935620 (patch) | |
tree | a268d8f9529747ce0821bfcbf940482f4cbb1b5b /kernel/sched/topology.c | |
parent | 73bb059f9b8a00c5e1bf2f7ca83138c05d05e600 (diff) | |
download | linux-8d5dc5126bb2bbcebf0b1e061cca2fc02c935620.tar.xz |
sched/topology: Small cleanup
Move the allocation of topology specific cpumasks into the topology
code.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/topology.c')
-rw-r--r-- | kernel/sched/topology.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 09563c1d1d5b..a4b868c76f3c 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1526,7 +1526,7 @@ static struct sched_domain_attr *dattr_cur; * cpumask) fails, then fallback to a single sched domain, * as determined by the single cpumask fallback_doms. */ -cpumask_var_t fallback_doms; +static cpumask_var_t fallback_doms; /* * arch_update_cpu_topology lets virtualized architectures update the @@ -1568,10 +1568,13 @@ void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms) * For now this just excludes isolated CPUs, but could be used to * exclude other special cases in the future. */ -int init_sched_domains(const struct cpumask *cpu_map) +int sched_init_domains(const struct cpumask *cpu_map) { int err; + zalloc_cpumask_var(&sched_domains_tmpmask, GFP_KERNEL); + zalloc_cpumask_var(&fallback_doms, GFP_KERNEL); + arch_update_cpu_topology(); ndoms_cur = 1; doms_cur = alloc_sched_domains(ndoms_cur); |