Searched refs:padata (Results 1 - 5 of 5) sorted by relevance
/linux-4.4.14/include/crypto/ |
H A D | pcrypt.h | 26 #include <linux/padata.h> 29 struct padata_priv padata; member in struct:pcrypt_request 42 return &req->padata; pcrypt_request_padata() 46 struct pcrypt_request *pcrypt_padata_request(struct padata_priv *padata) pcrypt_padata_request() argument 48 return container_of(padata, struct pcrypt_request, padata); pcrypt_padata_request()
|
/linux-4.4.14/crypto/ |
H A D | pcrypt.c | 39 * equal to serial cpumask of corresponding padata instance, 40 * so it is updated when padata notifies us about serial 73 static int pcrypt_do_parallel(struct padata_priv *padata, unsigned int *cb_cpu, pcrypt_do_parallel() argument 99 return padata_do_parallel(pcrypt->pinst, padata, cpu); pcrypt_do_parallel() 118 static void pcrypt_aead_serial(struct padata_priv *padata) pcrypt_aead_serial() argument 120 struct pcrypt_request *preq = pcrypt_padata_request(padata); pcrypt_aead_serial() 123 aead_request_complete(req->base.data, padata->info); pcrypt_aead_serial() 130 struct padata_priv *padata = pcrypt_request_padata(preq); pcrypt_aead_done() local 132 padata->info = err; pcrypt_aead_done() 135 padata_do_serial(padata); pcrypt_aead_done() 138 static void pcrypt_aead_enc(struct padata_priv *padata) pcrypt_aead_enc() argument 140 struct pcrypt_request *preq = pcrypt_padata_request(padata); pcrypt_aead_enc() 143 padata->info = crypto_aead_encrypt(req); pcrypt_aead_enc() 145 if (padata->info == -EINPROGRESS) pcrypt_aead_enc() 148 padata_do_serial(padata); pcrypt_aead_enc() 156 struct padata_priv *padata = pcrypt_request_padata(preq); pcrypt_aead_encrypt() local 161 memset(padata, 0, sizeof(struct padata_priv)); pcrypt_aead_encrypt() 163 padata->parallel = pcrypt_aead_enc; pcrypt_aead_encrypt() 164 padata->serial = pcrypt_aead_serial; pcrypt_aead_encrypt() 173 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, &pencrypt); pcrypt_aead_encrypt() 180 static void pcrypt_aead_dec(struct padata_priv *padata) pcrypt_aead_dec() argument 182 struct pcrypt_request *preq = pcrypt_padata_request(padata); pcrypt_aead_dec() 185 padata->info = crypto_aead_decrypt(req); pcrypt_aead_dec() 187 if (padata->info == -EINPROGRESS) pcrypt_aead_dec() 190 padata_do_serial(padata); pcrypt_aead_dec() 198 struct padata_priv *padata = pcrypt_request_padata(preq); pcrypt_aead_decrypt() local 203 memset(padata, 0, sizeof(struct padata_priv)); pcrypt_aead_decrypt() 205 padata->parallel = pcrypt_aead_dec; pcrypt_aead_decrypt() 206 padata->serial = pcrypt_aead_serial; pcrypt_aead_decrypt() 215 err = pcrypt_do_parallel(padata, &ctx->cb_cpu, &pdecrypt); pcrypt_aead_decrypt()
|
/linux-4.4.14/include/linux/ |
H A D | padata.h | 2 * padata.h - header for the padata parallelization interface 37 * @list: List entry, to attach to the padata lists. 50 void (*parallel)(struct padata_priv *padata); 51 void (*serial)(struct padata_priv *padata); 66 * struct padata_serial_queue - The percpu padata serial queue 79 * struct padata_parallel_queue - The percpu padata parallel queue 115 * @pinst: padata instance. 116 * @pqueue: percpu padata queues used for parallelization. 117 * @squeue: percpu padata queues used for serialuzation. 149 * @kobj: padata instance kernel object. 150 * @lock: padata instance lock. 151 * @flags: padata flags. 174 struct padata_priv *padata, int cb_cpu); 175 extern void padata_do_serial(struct padata_priv *padata);
|
/linux-4.4.14/kernel/ |
H A D | padata.c | 2 * padata.c - generic interface to process data streams in parallel 4 * See Documentation/padata.txt for an api documentation. 27 #include <linux/padata.h> 81 struct padata_priv *padata; padata_parallel_worker() local 83 padata = list_entry(local_list.next, padata_parallel_worker() 86 list_del_init(&padata->list); padata_parallel_worker() 88 padata->parallel(padata); padata_parallel_worker() 95 * padata_do_parallel - padata parallelization function 97 * @pinst: padata instance 98 * @padata: object to be parallelized 100 * must be in the serial cpumask of padata(i.e. cpumask.cbcpu). 107 struct padata_priv *padata, int cb_cpu) padata_do_parallel() 133 padata->pd = pd; padata_do_parallel() 134 padata->cb_cpu = cb_cpu; padata_do_parallel() 140 list_add_tail(&padata->list, &queue->parallel.list); padata_do_parallel() 174 struct padata_priv *padata; padata_get_next() local 188 padata = NULL; padata_get_next() 193 padata = list_entry(reorder->list.next, padata_get_next() 197 list_del_init(&padata->list); padata_get_next() 207 padata = ERR_PTR(-ENODATA); padata_get_next() 211 padata = ERR_PTR(-EINPROGRESS); padata_get_next() 213 return padata; padata_get_next() 219 struct padata_priv *padata; padata_reorder() local 237 padata = padata_get_next(pd); padata_reorder() 245 if (!padata || PTR_ERR(padata) == -EINPROGRESS) padata_reorder() 253 if (PTR_ERR(padata) == -ENODATA) { padata_reorder() 259 cb_cpu = padata->cb_cpu; padata_reorder() 263 list_add_tail(&padata->list, &squeue->serial.list); padata_reorder() 307 struct padata_priv *padata; padata_serial_worker() local 309 padata = list_entry(local_list.next, padata_serial_worker() 312 list_del_init(&padata->list); padata_serial_worker() 314 padata->serial(padata); padata_serial_worker() 321 * padata_do_serial - padata serialization function 323 * @padata: object to be serialized. 328 void padata_do_serial(struct padata_priv *padata) padata_do_serial() argument 334 pd = padata->pd; padata_do_serial() 341 list_add_tail(&padata->list, &pqueue->reorder.list); padata_do_serial() 458 /* Flush all objects out of the padata queues. */ padata_flush_queues() 535 * @pinst: A poineter to padata instance 614 * @pinst: padata instance 640 * @pinst: padata instance 699 * padata cpumasks. 701 * @pinst: padata instance 759 * padata cpumasks. 761 * @pinst: padata instance 795 * @pinst: padata instance to start 817 * @pinst: padata instance to stop 1016 * padata_alloc_possible - Allocate and initialize padata instance. 1020 * @wq: workqueue to use for the allocated padata instance 1029 * padata_alloc - allocate and initialize a padata instance and specify 1032 * @wq: workqueue to use for the allocated padata instance 1033 * @pcpumask: cpumask that will be used for padata parallelization 1034 * @cbcpumask: cpumask that will be used for padata serialization 1097 * padata_free - free a padata instance 1099 * @padata_inst: padata instance to free 106 padata_do_parallel(struct padata_instance *pinst, struct padata_priv *padata, int cb_cpu) padata_do_parallel() argument
|
H A D | Makefile | 98 obj-$(CONFIG_PADATA) += padata.o
|
Completed in 250 milliseconds