summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-05 20:59:25 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 08:16:33 +1100
commitb2ab4a57b018aafbba35bff088218f5cc3d2142e (patch)
treea46c5bd42927c24c69f0786be2651ff3fba6c10e /include
parent42c271c6c538857cb13c5ead5184d264d745f675 (diff)
downloadop-kernel-dev-b2ab4a57b018aafbba35bff088218f5cc3d2142e.zip
op-kernel-dev-b2ab4a57b018aafbba35bff088218f5cc3d2142e.tar.gz
[CRYPTO] scatterwalk: Restore custom sg chaining for now
Unfortunately the generic chaining hasn't been ported to all architectures yet, and notably not s390. So this patch restores the chainging that we've been using previously which does work everywhere. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/scatterwalk.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h
index 07b6f17..bd62431 100644
--- a/include/crypto/scatterwalk.h
+++ b/include/crypto/scatterwalk.h
@@ -52,6 +52,17 @@ static inline void crypto_yield(u32 flags)
cond_resched();
}
+static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num,
+ struct scatterlist *sg2)
+{
+ sg_set_page(&sg1[num - 1], (void *)sg2, 0, 0);
+}
+
+static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
+{
+ return (++sg)->length ? sg : (void *)sg_page(sg);
+}
+
static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in,
struct scatter_walk *walk_out)
{
OpenPOWER on IntegriCloud