Re: [PATCH] crypto: caam - increase the domain of write memory barrier to full system
From: Herbert Xu
Date: Fri Aug 18 2023 - 05:31:06 EST
On Tue, Aug 08, 2023 at 12:55:26PM +0200, meenakshi.aggarwal@xxxxxxx wrote:
> From: Iuliana Prodan <iuliana.prodan@xxxxxxx>
>
> In caam_jr_enqueue, under heavy DDR load, smp_wmb() or dma_wmb()
> fail to make the input ring be updated before the CAAM starts
> reading it. So, CAAM will process, again, an old descriptor address
> and will put it in the output ring. This will make caam_jr_dequeue()
> to fail, since this old descriptor is not in the software ring.
> To fix this, use wmb() which works on the full system instead of
> inner/outer shareable domains.
>
> Signed-off-by: Iuliana Prodan <iuliana.prodan@xxxxxxx>
> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx>
> ---
> drivers/crypto/caam/jr.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt