aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/padata.h
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2010-07-07 09:30:10 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2010-07-14 08:29:28 -0400
commit4c879170296174bde05cd1c643dac16594edee77 (patch)
tree467afaa9ad1235caa110789621edb7726fdcb4cd /include/linux/padata.h
parent7e3de7b1be6ce0643f60aed697070e2286db32cd (diff)
padata: Check for valid padata instance on start
This patch introduces the PADATA_INVALID flag which is checked on padata start. This will be used to mark a padata instance as invalid, if the padata cpumask does not intersect with the active cpumask. we change padata_start to return an error if the PADATA_INVALID is set. Also we adapt the only padata user, pcrypt to this change. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/padata.h')
-rw-r--r--include/linux/padata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/padata.h b/include/linux/padata.h
index 8d8406246eef..e4c17f9b7c9e 100644
--- a/include/linux/padata.h
+++ b/include/linux/padata.h
@@ -126,6 +126,7 @@ struct padata_instance {
126 u8 flags; 126 u8 flags;
127#define PADATA_INIT 1 127#define PADATA_INIT 1
128#define PADATA_RESET 2 128#define PADATA_RESET 2
129#define PADATA_INVALID 4
129}; 130};
130 131
131extern struct padata_instance *padata_alloc(const struct cpumask *cpumask, 132extern struct padata_instance *padata_alloc(const struct cpumask *cpumask,
@@ -138,6 +139,6 @@ extern int padata_set_cpumask(struct padata_instance *pinst,
138 cpumask_var_t cpumask); 139 cpumask_var_t cpumask);
139extern int padata_add_cpu(struct padata_instance *pinst, int cpu); 140extern int padata_add_cpu(struct padata_instance *pinst, int cpu);
140extern int padata_remove_cpu(struct padata_instance *pinst, int cpu); 141extern int padata_remove_cpu(struct padata_instance *pinst, int cpu);
141extern void padata_start(struct padata_instance *pinst); 142extern int padata_start(struct padata_instance *pinst);
142extern void padata_stop(struct padata_instance *pinst); 143extern void padata_stop(struct padata_instance *pinst);
143#endif 144#endif