All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: hisilicon/sec - fix the process of disabling sva prefetching
@ 2021-06-26  2:50 Kai Ye
  2021-06-28  3:32 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Ye @ 2021-06-26  2:50 UTC (permalink / raw
  To: herbert; +Cc: linux-crypto, linux-kernel, wangzhou1, yekai13

The open interface of the sva prefetching function is distinguish the chip
version. But the close interface of the sva prefetching function doesn't
distinguish the chip version. As a result, the sva prefetching close
operation is also performed on Kunpeng920, those registers are important
on Kunpeng920, which eventually leads to abnormal hardware problems. So
need to fix it immediately.

Signed-off-by: Kai Ye <yekai13@huawei.com>
---
 drivers/crypto/hisilicon/sec2/sec_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c
index 8ab4e67..710ea8d 100644
--- a/drivers/crypto/hisilicon/sec2/sec_main.c
+++ b/drivers/crypto/hisilicon/sec2/sec_main.c
@@ -363,6 +363,9 @@ static void sec_close_sva_prefetch(struct hisi_qm *qm)
 	u32 val;
 	int ret;
 
+	if (qm->ver < QM_HW_V3)
+		return;
+
 	val = readl_relaxed(qm->io_base + SEC_PREFETCH_CFG);
 	val |= SEC_PREFETCH_DISABLE;
 	writel(val, qm->io_base + SEC_PREFETCH_CFG);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: hisilicon/sec - fix the process of disabling sva prefetching
  2021-06-26  2:50 [PATCH] crypto: hisilicon/sec - fix the process of disabling sva prefetching Kai Ye
@ 2021-06-28  3:32 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-06-28  3:32 UTC (permalink / raw
  To: Kai Ye; +Cc: linux-crypto, linux-kernel, wangzhou1

On Sat, Jun 26, 2021 at 10:50:33AM +0800, Kai Ye wrote:
> The open interface of the sva prefetching function is distinguish the chip
> version. But the close interface of the sva prefetching function doesn't
> distinguish the chip version. As a result, the sva prefetching close
> operation is also performed on Kunpeng920, those registers are important
> on Kunpeng920, which eventually leads to abnormal hardware problems. So
> need to fix it immediately.
> 
> Signed-off-by: Kai Ye <yekai13@huawei.com>
> ---
>  drivers/crypto/hisilicon/sec2/sec_main.c | 3 +++
>  1 file changed, 3 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-28  3:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-26  2:50 [PATCH] crypto: hisilicon/sec - fix the process of disabling sva prefetching Kai Ye
2021-06-28  3:32 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.