diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2010-07-27 01:19:27 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-07-31 07:53:06 -0400 |
commit | 0500e9b3f11ce84fc6ee48a3e29909145e58ba48 (patch) | |
tree | 42b21a89575b6b919c09ef33469143f38cf1a04e /kernel/padata.c | |
parent | d3f64e46aa21dd86a239274d218ec286461bfa68 (diff) |
padata: Remove padata_get_cpumask
A function that copies the padata cpumasks to a user buffer
is a bit error prone. The cpumask can change any time so we
can't be sure to have the right cpumask when using this function.
A user who is interested in the padata cpumasks should register
to the padata cpumask notifier chain instead. Users of
padata_get_cpumask are already updated, so we can remove it.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'kernel/padata.c')
-rw-r--r-- | kernel/padata.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/kernel/padata.c b/kernel/padata.c index 1c8c1d1d301d..fd4679266ede 100644 --- a/kernel/padata.c +++ b/kernel/padata.c | |||
@@ -589,41 +589,6 @@ static bool padata_validate_cpumask(struct padata_instance *pinst, | |||
589 | return true; | 589 | return true; |
590 | } | 590 | } |
591 | 591 | ||
592 | /** | ||
593 | * padata_get_cpumask: Fetch serial or parallel cpumask from the | ||
594 | * given padata instance and copy it to @out_mask | ||
595 | * | ||
596 | * @pinst: A pointer to padata instance | ||
597 | * @cpumask_type: Specifies which cpumask will be copied. | ||
598 | * Possible values are PADATA_CPU_SERIAL *or* PADATA_CPU_PARALLEL | ||
599 | * corresponding to serial and parallel cpumask respectively. | ||
600 | * @out_mask: A pointer to cpumask structure where selected | ||
601 | * cpumask will be copied. | ||
602 | */ | ||
603 | int padata_get_cpumask(struct padata_instance *pinst, | ||
604 | int cpumask_type, struct cpumask *out_mask) | ||
605 | { | ||
606 | struct parallel_data *pd; | ||
607 | int ret = 0; | ||
608 | |||
609 | rcu_read_lock_bh(); | ||
610 | pd = rcu_dereference(pinst->pd); | ||
611 | switch (cpumask_type) { | ||
612 | case PADATA_CPU_SERIAL: | ||
613 | cpumask_copy(out_mask, pd->cpumask.cbcpu); | ||
614 | break; | ||
615 | case PADATA_CPU_PARALLEL: | ||
616 | cpumask_copy(out_mask, pd->cpumask.pcpu); | ||
617 | break; | ||
618 | default: | ||
619 | ret = -EINVAL; | ||
620 | } | ||
621 | |||
622 | rcu_read_unlock_bh(); | ||
623 | return ret; | ||
624 | } | ||
625 | EXPORT_SYMBOL(padata_get_cpumask); | ||
626 | |||
627 | static int __padata_set_cpumasks(struct padata_instance *pinst, | 592 | static int __padata_set_cpumasks(struct padata_instance *pinst, |
628 | cpumask_var_t pcpumask, | 593 | cpumask_var_t pcpumask, |
629 | cpumask_var_t cbcpumask) | 594 | cpumask_var_t cbcpumask) |