crypto: marvell/cesa - Fix use of sg_pcopy on iomem pointer
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 21 Jan 2021 05:16:46 +0000 (16:16 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Jan 2021 05:07:03 +0000 (16:07 +1100)
commitc114cf7f86242bbd6841de4c49923100ad41b6d5
treed22395b53d9d940f4e87b50274c6b8795415c8c2
parent43a942d27eaaf33bca560121cbe42f3637e92880
crypto: marvell/cesa - Fix use of sg_pcopy on iomem pointer

The cesa driver mixes use of iomem pointers and normal kernel
pointers.  Sometimes it uses memcpy_toio/memcpy_fromio on both
while other times it would use straight memcpy on both, through
the sg_pcopy_* helpers.

This patch fixes this by adding a new field sram_pool to the engine
for the normal pointer case which then allows us to use the right
interface depending on the value of engine->pool.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/cesa/cesa.c
drivers/crypto/marvell/cesa/cesa.h
drivers/crypto/marvell/cesa/cipher.c
drivers/crypto/marvell/cesa/hash.c
drivers/crypto/marvell/cesa/tdma.c