Lines Matching defs:pcrypt
2 * pcrypt - Parallel crypto wrapper.
30 #include <crypto/pcrypt.h>
73 struct padata_pcrypt *pcrypt)
81 cpumask = rcu_dereference(pcrypt->cb_cpumask);
98 return padata_do_parallel(pcrypt->pinst, padata, cpu);
323 "pcrypt(%s)", alg->cra_driver_name) >= CRYPTO_MAX_ALG_NAME)
411 struct padata_pcrypt *pcrypt;
418 pcrypt = container_of(self, struct padata_pcrypt, nblock);
427 old_mask = pcrypt->cb_cpumask;
430 rcu_assign_pointer(pcrypt->cb_cpumask, new_mask);
450 static int pcrypt_init_padata(struct padata_pcrypt *pcrypt,
458 pcrypt->wq = create_workqueue(name);
459 if (!pcrypt->wq)
462 pcrypt->pinst = padata_alloc_possible(pcrypt->wq);
463 if (!pcrypt->pinst)
475 rcu_assign_pointer(pcrypt->cb_cpumask, mask);
477 pcrypt->nblock.notifier_call = pcrypt_cpumask_change_notify;
478 ret = padata_register_cpumask_notifier(pcrypt->pinst, &pcrypt->nblock);
482 ret = pcrypt_sysfs_add(pcrypt->pinst, name);
491 padata_unregister_cpumask_notifier(pcrypt->pinst, &pcrypt->nblock);
496 padata_free(pcrypt->pinst);
498 destroy_workqueue(pcrypt->wq);
505 static void pcrypt_fini_padata(struct padata_pcrypt *pcrypt)
507 kobject_put(&pcrypt->pinst->kobj);
508 free_cpumask_var(pcrypt->cb_cpumask->mask);
509 kfree(pcrypt->cb_cpumask);
511 padata_stop(pcrypt->pinst);
512 padata_unregister_cpumask_notifier(pcrypt->pinst, &pcrypt->nblock);
513 destroy_workqueue(pcrypt->wq);
514 padata_free(pcrypt->pinst);
518 .name = "pcrypt",
528 pcrypt_kset = kset_create_and_add("pcrypt", NULL, kernel_kobj);