ARC: mm: do_page_fault refactor #3: tidyup vma access permission code
[linux-2.6-microblaze.git] / crypto / crypto_wq.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Workqueue for crypto subsystem
4  *
5  * Copyright (c) 2009 Intel Corp.
6  *   Author: Huang Ying <ying.huang@intel.com>
7  */
8
9 #include <linux/workqueue.h>
10 #include <linux/module.h>
11 #include <crypto/algapi.h>
12 #include <crypto/crypto_wq.h>
13
14 struct workqueue_struct *kcrypto_wq;
15 EXPORT_SYMBOL_GPL(kcrypto_wq);
16
17 static int __init crypto_wq_init(void)
18 {
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;
24 }
25
26 static void __exit crypto_wq_exit(void)
27 {
28         destroy_workqueue(kcrypto_wq);
29 }
30
31 subsys_initcall(crypto_wq_init);
32 module_exit(crypto_wq_exit);
33
34 MODULE_LICENSE("GPL");
35 MODULE_DESCRIPTION("Workqueue for crypto subsystem");