aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorEvgeniy Polyakov <zbr@ioremap.net>2008-11-25 10:17:10 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-24 19:02:00 -0500
commit5f459f0adc7581da01cdd9b7f84db14a4559a390 (patch)
tree2cf044d2b7a9c43609c280028a519c3f6c90af29 /drivers/crypto
parentd6a10c84a2a2b08bdd637852c9cc42c41e109b25 (diff)
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>
Diffstat (limited to 'drivers/crypto')
-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,
1393 n = nbytes; 1393 n = nbytes;
1394 while (n) { 1394 while (n) {
1395 if (t->length && rctx->walk.flags & ASYNC_FLAGS_MISALIGNED) { 1395 if (t->length && rctx->walk.flags & ASYNC_FLAGS_MISALIGNED) {
1396 BUG_ON(!sg_page(t));
1396 dpage = sg_page(t); 1397 dpage = sg_page(t);
1397 doff = 0; 1398 doff = 0;
1398 len = t->length; 1399 len = t->length;
1399 } else { 1400 } else {
1401 BUG_ON(!sg_page(dst));
1400 dpage = sg_page(dst); 1402 dpage = sg_page(dst);
1401 doff = dst->offset; 1403 doff = dst->offset;
1402 len = dst->length; 1404 len = dst->length;
@@ -1791,17 +1793,17 @@ static void hifn_process_ready(struct ablkcipher_request *req, int error)
1791 continue; 1793 continue;
1792 } 1794 }
1793 1795
1794 saddr = kmap_atomic(sg_page(t), KM_IRQ1); 1796 saddr = kmap_atomic(sg_page(t), KM_SOFTIRQ0);
1795 1797
1796 err = ablkcipher_get(saddr, &t->length, t->offset, 1798 err = ablkcipher_get(saddr, &t->length, t->offset,
1797 dst, nbytes, &nbytes); 1799 dst, nbytes, &nbytes);
1798 if (err < 0) { 1800 if (err < 0) {
1799 kunmap_atomic(saddr, KM_IRQ1); 1801 kunmap_atomic(saddr, KM_SOFTIRQ0);
1800 break; 1802 break;
1801 } 1803 }
1802 1804
1803 idx += err; 1805 idx += err;
1804 kunmap_atomic(saddr, KM_IRQ1); 1806 kunmap_atomic(saddr, KM_SOFTIRQ0);
1805 } 1807 }
1806 1808
1807 ablkcipher_walk_exit(&rctx->walk); 1809 ablkcipher_walk_exit(&rctx->walk);