summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2010-07-27 07:19:27 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2010-07-31 19:53:06 +0800
commit0500e9b3f11ce84fc6ee48a3e29909145e58ba48 (patch)
tree42b21a89575b6b919c09ef33469143f38cf1a04e /kernel
parentd3f64e46aa21dd86a239274d218ec286461bfa68 (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')
-rw-r--r--kernel/padata.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/kernel/padata.c b/kernel/padata.c
index 1c8c1d1d301..fd4679266ed 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -589,41 +589,6 @@ static bool padata_validate_cpumask(struct padata_instance *pinst,
return true;
}
-/**
- * padata_get_cpumask: Fetch serial or parallel cpumask from the
- * given padata instance and copy it to @out_mask
- *
- * @pinst: A pointer to padata instance
- * @cpumask_type: Specifies which cpumask will be copied.
- * Possible values are PADATA_CPU_SERIAL *or* PADATA_CPU_PARALLEL
- * corresponding to serial and parallel cpumask respectively.
- * @out_mask: A pointer to cpumask structure where selected
- * cpumask will be copied.
- */
-int padata_get_cpumask(struct padata_instance *pinst,
- int cpumask_type, struct cpumask *out_mask)
-{
- struct parallel_data *pd;
- int ret = 0;
-
- rcu_read_lock_bh();
- pd = rcu_dereference(pinst->pd);
- switch (cpumask_type) {
- case PADATA_CPU_SERIAL:
- cpumask_copy(out_mask, pd->cpumask.cbcpu);
- break;
- case PADATA_CPU_PARALLEL:
- cpumask_copy(out_mask, pd->cpumask.pcpu);
- break;
- default:
- ret = -EINVAL;
- }
-
- rcu_read_unlock_bh();
- return ret;
-}
-EXPORT_SYMBOL(padata_get_cpumask);
-
static int __padata_set_cpumasks(struct padata_instance *pinst,
cpumask_var_t pcpumask,
cpumask_var_t cbcpumask)