crypto: hisilicon/qm - optimize the barrier operation
Subsystems (2)
PATCH 1/1 crypto: hisilicon/qm - optimize the barrier operation
A 'dma_wmb' barrier is enough to guarantee previous writes before accessing by acc device in the outer shareable domain.
A 'smp_wmb' barrier is enough to guarantee previous writes before accessing by other cpus in the inner shareble domain.
Signed-off-by Hui Tang <[email protected]>
--- drivers/crypto/hisilicon/qm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/hisilicon/qm.c +3 -3
@@ -710,13 +710,13 @@ static void qm_mb_write(struct hisi_qm *qm, const void *src)if (!IS_ENABLED (CONFIG_ARM64 )) {memcpy_toio (fun_base, src,16 ); -wmb (); +dma_wmb ();return ; } asmvolatile ("ldp %0, %1, %3\n" "stp %0, %1, %2\n" -"dsb sy\n" +"dmb oshst\n" :"=&r" (tmp0),"=&r" (tmp1), "+Q" (*((char __iomem *)fun_base))
@@ -1004,7 +1004,7 @@ static void qm_set_qp_disable(struct hisi_qp *qp, int offset) *addr =1 ;/* make sure setup is completed */ -mb (); +smp_wmb (); }static void qm_disable_qp (struct hisi_qm *qm,u32 qp_id)
Signature · 1 line
2.33.0
Herbert Xu
maintainerQuoted 10 lines · Hui Tang
A '
dma_wmb' barrier is enough to guarantee previous writes before accessing by acc device in the outer shareable domain.A '
smp_wmb' barrier is enough to guarantee previous writes before accessing by other cpus in the inner shareble domain.Signed-off-by Hui Tang <[email protected]>--- drivers/crypto/hisilicon/qm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt