diff options
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index abb01f71f817..cb13952f82bf 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); |