diff options
-rw-r--r-- | crypto/pcrypt.c | 2 | ||||
-rw-r--r-- | include/linux/padata.h | 9 | ||||
-rw-r--r-- | kernel/padata.c | 24 |
3 files changed, 18 insertions, 17 deletions
diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index 794c172b99f7..55460839624e 100644 --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c | |||
@@ -457,7 +457,7 @@ static int __pcrypt_init_instance(struct pcrypt_instance *pcrypt, | |||
457 | if (!pcrypt->wq) | 457 | if (!pcrypt->wq) |
458 | goto err; | 458 | goto err; |
459 | 459 | ||
460 | pcrypt->pinst = padata_alloc(pcrypt->wq); | 460 | pcrypt->pinst = padata_alloc_possible(pcrypt->wq); |
461 | if (!pcrypt->pinst) | 461 | if (!pcrypt->pinst) |
462 | goto err_destroy_workqueue; | 462 | goto err_destroy_workqueue; |
463 | 463 | ||
diff --git a/include/linux/padata.h b/include/linux/padata.h index 293ad46ffced..71dfc9d1f856 100644 --- a/include/linux/padata.h +++ b/include/linux/padata.h | |||
@@ -165,10 +165,11 @@ struct padata_instance { | |||
165 | #define PADATA_INVALID 4 | 165 | #define PADATA_INVALID 4 |
166 | }; | 166 | }; |
167 | 167 | ||
168 | extern struct padata_instance *padata_alloc(struct workqueue_struct *wq); | 168 | extern struct padata_instance *padata_alloc_possible( |
169 | extern struct padata_instance *__padata_alloc(struct workqueue_struct *wq, | 169 | struct workqueue_struct *wq); |
170 | const struct cpumask *pcpumask, | 170 | extern struct padata_instance *padata_alloc(struct workqueue_struct *wq, |
171 | const struct cpumask *cbcpumask); | 171 | const struct cpumask *pcpumask, |
172 | const struct cpumask *cbcpumask); | ||
172 | extern void padata_free(struct padata_instance *pinst); | 173 | extern void padata_free(struct padata_instance *pinst); |
173 | extern int padata_do_parallel(struct padata_instance *pinst, | 174 | extern int padata_do_parallel(struct padata_instance *pinst, |
174 | struct padata_priv *padata, int cb_cpu); | 175 | struct padata_priv *padata, int cb_cpu); |
diff --git a/kernel/padata.c b/kernel/padata.c index 7f895e2b4efb..12860bce6b78 100644 --- a/kernel/padata.c +++ b/kernel/padata.c | |||
@@ -1060,29 +1060,29 @@ static struct kobj_type padata_attr_type = { | |||
1060 | }; | 1060 | }; |
1061 | 1061 | ||
1062 | /** | 1062 | /** |
1063 | * padata_alloc - Allocate and initialize padata instance. | 1063 | * padata_alloc_possible - Allocate and initialize padata instance. |
1064 | * Use default cpumask(cpu_possible_mask) | 1064 | * Use the cpu_possible_mask for serial and |
1065 | * for serial and parallel workes. | 1065 | * parallel workers. |
1066 | * | 1066 | * |
1067 | * @wq: workqueue to use for the allocated padata instance | 1067 | * @wq: workqueue to use for the allocated padata instance |
1068 | */ | 1068 | */ |
1069 | struct padata_instance *padata_alloc(struct workqueue_struct *wq) | 1069 | struct padata_instance *padata_alloc_possible(struct workqueue_struct *wq) |
1070 | { | 1070 | { |
1071 | return __padata_alloc(wq, cpu_possible_mask, cpu_possible_mask); | 1071 | return padata_alloc(wq, cpu_possible_mask, cpu_possible_mask); |
1072 | } | 1072 | } |
1073 | EXPORT_SYMBOL(padata_alloc); | 1073 | EXPORT_SYMBOL(padata_alloc_possible); |
1074 | 1074 | ||
1075 | /** | 1075 | /** |
1076 | * __padata_alloc - allocate and initialize a padata instance | 1076 | * padata_alloc - allocate and initialize a padata instance and specify |
1077 | * and specify cpumasks for serial and parallel workers. | 1077 | * cpumasks for serial and parallel workers. |
1078 | * | 1078 | * |
1079 | * @wq: workqueue to use for the allocated padata instance | 1079 | * @wq: workqueue to use for the allocated padata instance |
1080 | * @pcpumask: cpumask that will be used for padata parallelization | 1080 | * @pcpumask: cpumask that will be used for padata parallelization |
1081 | * @cbcpumask: cpumask that will be used for padata serialization | 1081 | * @cbcpumask: cpumask that will be used for padata serialization |
1082 | */ | 1082 | */ |
1083 | struct padata_instance *__padata_alloc(struct workqueue_struct *wq, | 1083 | struct padata_instance *padata_alloc(struct workqueue_struct *wq, |
1084 | const struct cpumask *pcpumask, | 1084 | const struct cpumask *pcpumask, |
1085 | const struct cpumask *cbcpumask) | 1085 | const struct cpumask *cbcpumask) |
1086 | { | 1086 | { |
1087 | struct padata_instance *pinst; | 1087 | struct padata_instance *pinst; |
1088 | struct parallel_data *pd = NULL; | 1088 | struct parallel_data *pd = NULL; |
@@ -1138,7 +1138,7 @@ err_free_inst: | |||
1138 | err: | 1138 | err: |
1139 | return NULL; | 1139 | return NULL; |
1140 | } | 1140 | } |
1141 | EXPORT_SYMBOL(__padata_alloc); | 1141 | EXPORT_SYMBOL(padata_alloc); |
1142 | 1142 | ||
1143 | /** | 1143 | /** |
1144 | * padata_free - free a padata instance | 1144 | * padata_free - free a padata instance |