diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-11-03 14:53:40 +1030 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-04 13:16:40 +0100 |
commit | acc3f5d7cabbfd6cec71f0c1f9900621fa2d6ae7 (patch) | |
tree | 672ed45f6df2f52e8f3cced2ee11ad29a1533890 /include | |
parent | e2c880630438f80b474378d5487b511b07665051 (diff) | |
download | kernel_samsung_tuna-acc3f5d7cabbfd6cec71f0c1f9900621fa2d6ae7.zip kernel_samsung_tuna-acc3f5d7cabbfd6cec71f0c1f9900621fa2d6ae7.tar.gz kernel_samsung_tuna-acc3f5d7cabbfd6cec71f0c1f9900621fa2d6ae7.tar.bz2 |
cpumask: Partition_sched_domains takes array of cpumask_var_t
Currently partition_sched_domains() takes a 'struct cpumask
*doms_new' which is a kmalloc'ed array of cpumask_t. You can't
have such an array if 'struct cpumask' is undefined, as we plan
for CONFIG_CPUMASK_OFFSTACK=y.
So, we make this an array of cpumask_var_t instead: this is the
same for the CONFIG_CPUMASK_OFFSTACK=n case, but requires
multiple allocations for the CONFIG_CPUMASK_OFFSTACK=y case.
Hence we add alloc_sched_domains() and free_sched_domains()
functions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <200911031453.40668.rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index dfc21fb..78ba664 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1009,9 +1009,13 @@ static inline struct cpumask *sched_domain_span(struct sched_domain *sd) return to_cpumask(sd->span); } -extern void partition_sched_domains(int ndoms_new, struct cpumask *doms_new, +extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], struct sched_domain_attr *dattr_new); +/* Allocate an array of sched domains, for partition_sched_domains(). */ +cpumask_var_t *alloc_sched_domains(unsigned int ndoms); +void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); + /* Test a flag in parent sched domain */ static inline int test_sd_parent(struct sched_domain *sd, int flag) { @@ -1029,7 +1033,7 @@ unsigned long default_scale_smt_power(struct sched_domain *sd, int cpu); struct sched_domain_attr; static inline void -partition_sched_domains(int ndoms_new, struct cpumask *doms_new, +partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], struct sched_domain_attr *dattr_new) { } |