]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: talitos - making mapping helpers more generic
authorLEROY Christophe <christophe.leroy@c-s.fr>
Mon, 6 Jun 2016 11:20:38 +0000 (13:20 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 8 Jun 2016 08:20:02 +0000 (16:20 +0800)
commit2408d91d4c63e517b784bca7aadbe02e5ed0d00f
treea237324632a7573d19fc0533f00b9e7daa8196c8
parent100b56cda6c513084a931e4c819d0fcda1f47bdc
crypto: talitos - making mapping helpers more generic

In preparation of IPSEC for SEC1, first step is to make the mapping
helpers more generic so that they can also be used by AEAD functions.

First, the functions are moved before IPSEC functions in talitos.c

talitos_sg_unmap() and unmap_sg_talitos_ptr() are merged as they
are quite similar, the second one handling the SEC1 case an calling
the first one for SEC2

map_sg_in_talitos_ptr() and map_sg_out_talitos_ptr() are merged
into talitos_sg_map() and enhenced to support offseted zones
as used for AEAD. The actual mapping is now performed outside that
helper. The DMA sync is also done outside to not make it several
times.

talitos_edesc_alloc() size calculation are fixed to also take into
account AEAD specific parts also for SEC1

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/talitos.c