diff options
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index abb01f71f817..32f4c2145603 100644 --- a/crypto/internal.h +++ b/crypto/internal.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/notifier.h> | 25 | #include <linux/notifier.h> |
26 | #include <linux/rwsem.h> | 26 | #include <linux/rwsem.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <asm/kmap_types.h> | ||
29 | 28 | ||
30 | /* Crypto notification events. */ | 29 | /* Crypto notification events. */ |
31 | enum { | 30 | enum { |
@@ -50,34 +49,6 @@ extern struct list_head crypto_alg_list; | |||
50 | extern struct rw_semaphore crypto_alg_sem; | 49 | extern struct rw_semaphore crypto_alg_sem; |
51 | extern struct blocking_notifier_head crypto_chain; | 50 | extern struct blocking_notifier_head crypto_chain; |
52 | 51 | ||
53 | static inline enum km_type crypto_kmap_type(int out) | ||
54 | { | ||
55 | enum km_type type; | ||
56 | |||
57 | if (in_softirq()) | ||
58 | type = out * (KM_SOFTIRQ1 - KM_SOFTIRQ0) + KM_SOFTIRQ0; | ||
59 | else | ||
60 | type = out * (KM_USER1 - KM_USER0) + KM_USER0; | ||
61 | |||
62 | return type; | ||
63 | } | ||
64 | |||
65 | static inline void *crypto_kmap(struct page *page, int out) | ||
66 | { | ||
67 | return kmap_atomic(page, crypto_kmap_type(out)); | ||
68 | } | ||
69 | |||
70 | static inline void crypto_kunmap(void *vaddr, int out) | ||
71 | { | ||
72 | kunmap_atomic(vaddr, crypto_kmap_type(out)); | ||
73 | } | ||
74 | |||
75 | static inline void crypto_yield(u32 flags) | ||
76 | { | ||
77 | if (flags & CRYPTO_TFM_REQ_MAY_SLEEP) | ||
78 | cond_resched(); | ||
79 | } | ||
80 | |||
81 | #ifdef CONFIG_PROC_FS | 52 | #ifdef CONFIG_PROC_FS |
82 | void __init crypto_init_proc(void); | 53 | void __init crypto_init_proc(void); |
83 | void __exit crypto_exit_proc(void); | 54 | void __exit crypto_exit_proc(void); |
@@ -122,6 +93,8 @@ void crypto_exit_digest_ops(struct crypto_tfm *tfm); | |||
122 | void crypto_exit_cipher_ops(struct crypto_tfm *tfm); | 93 | void crypto_exit_cipher_ops(struct crypto_tfm *tfm); |
123 | void crypto_exit_compress_ops(struct crypto_tfm *tfm); | 94 | void crypto_exit_compress_ops(struct crypto_tfm *tfm); |
124 | 95 | ||
96 | void crypto_larval_kill(struct crypto_alg *alg); | ||
97 | struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask); | ||
125 | void crypto_larval_error(const char *name, u32 type, u32 mask); | 98 | void crypto_larval_error(const char *name, u32 type, u32 mask); |
126 | 99 | ||
127 | void crypto_shoot_alg(struct crypto_alg *alg); | 100 | void crypto_shoot_alg(struct crypto_alg *alg); |