Commit a163900d authored by James Morris's avatar James Morris Committed by David S. Miller

[CRYPTO]: Move km_types out of header.

parent 0640fae6
...@@ -34,6 +34,13 @@ struct scatter_walk { ...@@ -34,6 +34,13 @@ struct scatter_walk {
unsigned int offset; unsigned int offset;
}; };
enum km_type crypto_km_types[] = {
KM_USER0,
KM_USER1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
};
static inline void xor_64(u8 *a, const u8 *b) static inline void xor_64(u8 *a, const u8 *b)
{ {
((u32 *)a)[0] ^= ((u32 *)b)[0]; ((u32 *)a)[0] ^= ((u32 *)b)[0];
......
...@@ -18,19 +18,13 @@ ...@@ -18,19 +18,13 @@
#include <asm/softirq.h> #include <asm/softirq.h>
#include <asm/kmap_types.h> #include <asm/kmap_types.h>
static enum km_type km_types[] = { extern enum km_type crypto_km_types[];
KM_USER0,
KM_USER1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
};
static inline enum km_type crypto_kmap_type(int out) static inline enum km_type crypto_kmap_type(int out)
{ {
return km_types[(in_softirq() ? 2 : 0) + out]; return crypto_km_types[(in_softirq() ? 2 : 0) + out];
} }
static inline void *crypto_kmap(struct page *page, int out) static inline void *crypto_kmap(struct page *page, int out)
{ {
return kmap_atomic(page, crypto_kmap_type(out)); return kmap_atomic(page, crypto_kmap_type(out));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment