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
..
2019-05-16 19:08:15 -07:00
2019-05-16 19:08:15 -07:00
2019-05-16 09:19:14 -07:00
2019-05-15 18:56:50 -07:00
2019-05-09 08:51:45 -07:00
2019-05-16 09:19:14 -07:00
2019-05-07 08:50:40 -07:00
2019-05-16 08:31:32 -07:00
2019-05-14 10:39:08 -07:00
2019-05-07 12:56:19 -07:00
2019-05-15 18:56:50 -07:00
2019-05-16 19:08:15 -07:00
2019-05-16 09:19:14 -07:00
2019-05-09 08:40:55 -07:00
2019-05-14 10:30:10 -07:00
2019-05-08 10:03:52 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 19:52:51 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 11:57:16 -07:00
2019-05-16 09:19:14 -07:00
2019-05-14 14:12:59 -07:00
2019-05-07 13:39:22 -07:00
2019-05-16 08:31:32 -07:00
2019-05-15 18:44:52 -07:00