diff options
author | Iuliana Prodan <iuliana.prodan@nxp.com> | 2020-03-04 16:06:26 +0200 |
---|---|---|
committer | Iuliana Prodan <iuliana.prodan@nxp.com> | 2020-03-06 11:50:16 +0200 |
commit | fc7c45cf829d1ed562f04cc219b5a79419ffa0c1 (patch) | |
tree | 100c0afc05082ecfb18fa5f5f4fe037881f7061a | |
parent | 359d8f37b464afea3718796fdd6eb27b0d2df8b1 (diff) |
MLK-23396: crypto: caam - ensure CAAM context is not sharing the cacheline
In caam_hash_state struct, caam_ctx buffer needs to have a
separate cacheline, not sharing it with "update" callback.
On imx8, the cacheline size is 64 and the MAX_CTX_LEN,
from caam_ctx buffer, is (8 + 64).
Therefore, add a ____cacheline_aligned to the update callback,
in caam_hash_state struct, to ensure that caam_ctx buffer is
not sharing the cacheline.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
-rw-r--r-- | drivers/crypto/caam/caamhash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 961d848ebc6c..6051f7dc79e6 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -119,7 +119,7 @@ struct caam_hash_state { u8 buf_1[CAAM_MAX_HASH_BLOCK_SIZE] ____cacheline_aligned; int buflen_1; u8 caam_ctx[MAX_CTX_LEN] ____cacheline_aligned; - int (*update)(struct ahash_request *req); + int (*update)(struct ahash_request *req) ____cacheline_aligned; int (*final)(struct ahash_request *req); int (*finup)(struct ahash_request *req); int current_buf; |