Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67026
b: refs/heads/master
c: 70dec23
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Oct 10, 2007
1 parent 3145de5 commit cbcf493
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c09f17c3d11f3e98928f55b600e6de22f58017a
refs/heads/master: 70dec235d8ac8cfb56ed2a3597e7d6c5b801f018
11 changes: 8 additions & 3 deletions trunk/crypto/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,16 @@ extern struct list_head crypto_alg_list;
extern struct rw_semaphore crypto_alg_sem;
extern struct blocking_notifier_head crypto_chain;

extern enum km_type crypto_km_types[];

static inline enum km_type crypto_kmap_type(int out)
{
return crypto_km_types[(in_softirq() ? 2 : 0) + out];
enum km_type type;

if (in_softirq())
type = out * (KM_SOFTIRQ1 - KM_SOFTIRQ0) + KM_SOFTIRQ0;
else
type = out * (KM_USER1 - KM_USER0) + KM_USER0;

return type;
}

static inline void *crypto_kmap(struct page *page, int out)
Expand Down
8 changes: 0 additions & 8 deletions trunk/crypto/scatterwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@
#include "internal.h"
#include "scatterwalk.h"

enum km_type crypto_km_types[] = {
KM_USER0,
KM_USER1,
KM_SOFTIRQ0,
KM_SOFTIRQ1,
};
EXPORT_SYMBOL_GPL(crypto_km_types);

static inline void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out)
{
void *src = out ? buf : sgdata;
Expand Down

0 comments on commit cbcf493

Please sign in to comment.