Skip to content

Commit

Permalink
crypto: hisilicon/sec - fix the process of disabling sva prefetching
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
yekai123123 authored and herbertx committed Jun 28, 2021
1 parent e29dd5c commit 66192b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/crypto/hisilicon/sec2/sec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,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);
Expand Down

0 comments on commit 66192b2

Please sign in to comment.