perf time-utils: Factor out set_percent_time()
[linux/fpc-iii.git] / crypto / crypto_wq.c
blob80501928e0bbdc69a7507ac464a71660922d9c8c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Workqueue for crypto subsystem
5 * Copyright (c) 2009 Intel Corp.
6 * Author: Huang Ying <ying.huang@intel.com>
7 */
9 #include <linux/workqueue.h>
10 #include <linux/module.h>
11 #include <crypto/algapi.h>
12 #include <crypto/crypto_wq.h>
14 struct workqueue_struct *kcrypto_wq;
15 EXPORT_SYMBOL_GPL(kcrypto_wq);
17 static int __init crypto_wq_init(void)
19 kcrypto_wq = alloc_workqueue("crypto",
20 WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1);
21 if (unlikely(!kcrypto_wq))
22 return -ENOMEM;
23 return 0;
26 static void __exit crypto_wq_exit(void)
28 destroy_workqueue(kcrypto_wq);
31 subsys_initcall(crypto_wq_init);
32 module_exit(crypto_wq_exit);
34 MODULE_LICENSE("GPL");
35 MODULE_DESCRIPTION("Workqueue for crypto subsystem");