mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
crypto: inside-secure - move hash result dma mapping to request
In heavy traffic the DMA mapping is overwritten by multiple requests as
the DMA address is stored in a global context. This patch moves this
information to the per-hash request context so that it can't be
overwritten.
Fixes: 1b44c5a60c ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver")
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
[Antoine: rebased the patch, small fixes, commit message.]
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -580,7 +580,6 @@ struct safexcel_context {
|
||||
bool exit_inv;
|
||||
|
||||
/* Used for ahash requests */
|
||||
dma_addr_t result_dma;
|
||||
void *cache;
|
||||
dma_addr_t cache_dma;
|
||||
unsigned int cache_sz;
|
||||
@@ -608,8 +607,7 @@ struct safexcel_inv_result {
|
||||
void safexcel_dequeue(struct safexcel_crypto_priv *priv, int ring);
|
||||
void safexcel_complete(struct safexcel_crypto_priv *priv, int ring);
|
||||
void safexcel_free_context(struct safexcel_crypto_priv *priv,
|
||||
struct crypto_async_request *req,
|
||||
int result_sz);
|
||||
struct crypto_async_request *req);
|
||||
int safexcel_invalidate_cache(struct crypto_async_request *async,
|
||||
struct safexcel_crypto_priv *priv,
|
||||
dma_addr_t ctxr_dma, int ring,
|
||||
|
||||
Reference in New Issue
Block a user