linux_dsm_epyc7002/drivers/crypto/caam
Horia Geantă a5e5c13398 crypto: caam - fix S/G table passing page boundary
According to CAAM RM:
-crypto engine reads 4 S/G entries (64 bytes) at a time,
even if the S/G table has fewer entries
-it's the responsibility of the user / programmer to make sure
this HW behaviour has no side effect

The drivers do not take care of this currently, leading to IOMMU faults
when the S/G table ends close to a page boundary - since only one page
is DMA mapped, while CAAM's DMA engine accesses two pages.

Fix this by rounding up the number of allocated S/G table entries
to a multiple of 4.
Note that in case of two *contiguous* S/G tables, only the last table
might needs extra entries.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-05-23 14:01:03 +08:00
..
caamalg_desc.c crypto: caam - add ecb(*) support 2019-02-15 13:21:55 +08:00
caamalg_desc.h
caamalg_qi2.c crypto: caam - fix S/G table passing page boundary 2019-05-23 14:01:03 +08:00
caamalg_qi2.h crypto: caam/qi2 - fix DMA mapping of stack memory 2019-05-03 14:03:29 +08:00
caamalg_qi.c crypto: caam - fix S/G table passing page boundary 2019-05-23 14:01:03 +08:00
caamalg.c crypto: caam - fix S/G table passing page boundary 2019-05-23 14:01:03 +08:00
caamhash_desc.c
caamhash_desc.h
caamhash.c crypto: caam - fix S/G table passing page boundary 2019-05-23 14:01:03 +08:00
caampkc.c crypto: caam - fix S/G table passing page boundary 2019-05-23 14:01:03 +08:00
caampkc.h
caamrng.c crypto: caam - add missing put_device() call 2019-03-07 16:24:52 +08:00
compat.h crypto: caam - add ecb(*) support 2019-02-15 13:21:55 +08:00
ctrl.c crypto: caam - limit AXI pipeline to a depth of 1 2019-03-28 13:55:34 +08:00
ctrl.h
desc_constr.h crypto: caam - fix S/G table passing page boundary 2019-05-23 14:01:03 +08:00
desc.h
dpseci_cmd.h
dpseci.c
dpseci.h
error.c crypto: caam - fix caam_dump_sg that iterates through scatterlist 2019-05-09 13:17:56 +08:00
error.h
intern.h crypto: caam/jr - Removed redundant vars from job ring private data 2019-03-28 13:55:34 +08:00
jr.c Revert "crypto: caam/jr - Remove extra memory barrier during job ring dequeue" 2019-05-09 13:20:48 +08:00
jr.h
Kconfig crypto: caam - add ecb(*) support 2019-02-15 13:21:55 +08:00
key_gen.c crypto: caam - generate hash keys in-place 2019-02-28 14:17:58 +08:00
key_gen.h
Makefile
pdb.h
pkc_desc.c
qi.c crypto: caam - avoid S/G table fetching for AEAD zero-length output 2019-05-23 14:01:03 +08:00
qi.h
regs.h Revert "crypto: caam/jr - Remove extra memory barrier during job ring dequeue" 2019-05-09 13:20:48 +08:00
sg_sw_qm2.h
sg_sw_qm.h
sg_sw_sec4.h