summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeniy Polyakov <zbr@ioremap.net>2008-11-25 23:17:10 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-25 11:02:00 +1100
commit5f459f0adc7581da01cdd9b7f84db14a4559a390 (patch)
tree2cf044d2b7a9c43609c280028a519c3f6c90af29
parentd6a10c84a2a2b08bdd637852c9cc42c41e109b25 (diff)
downloadlinux-5f459f0adc7581da01cdd9b7f84db14a4559a390.tar.gz
linux-5f459f0adc7581da01cdd9b7f84db14a4559a390.tar.bz2
linux-5f459f0adc7581da01cdd9b7f84db14a4559a390.zip
crypto: hifn_795x - Use softirq kernel mapping in bh context
Use KM_SOFTIRQ instead of KM_IRQ in tasklet context. Added bug_on on input no-page condition. Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/hifn_795x.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index ab4f94bec4ff..0c79fe7f1567 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -1393,10 +1393,12 @@ static int hifn_setup_dma(struct hifn_device *dev,
n = nbytes;
while (n) {
if (t->length && rctx->walk.flags & ASYNC_FLAGS_MISALIGNED) {
+ BUG_ON(!sg_page(t));
dpage = sg_page(t);
doff = 0;
len = t->length;
} else {
+ BUG_ON(!sg_page(dst));
dpage = sg_page(dst);
doff = dst->offset;
len = dst->length;
@@ -1791,17 +1793,17 @@ static void hifn_process_ready(struct ablkcipher_request *req, int error)
continue;
}
- saddr = kmap_atomic(sg_page(t), KM_IRQ1);
+ saddr = kmap_atomic(sg_page(t), KM_SOFTIRQ0);
err = ablkcipher_get(saddr, &t->length, t->offset,
dst, nbytes, &nbytes);
if (err < 0) {
- kunmap_atomic(saddr, KM_IRQ1);
+ kunmap_atomic(saddr, KM_SOFTIRQ0);
break;
}
idx += err;
- kunmap_atomic(saddr, KM_IRQ1);
+ kunmap_atomic(saddr, KM_SOFTIRQ0);
}
ablkcipher_walk_exit(&rctx->walk);