Skip to content

Commit fc8ae11

Browse files
Weili Qianherbertx
authored andcommitted
crypto: hisilicon/qm - remove unnecessary code in qm_mb_write()
Since the HiSilicon accelerator is used only on the ARM64 architectures, the implementations for other architectures are not needed, so remove the unnecessary code. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent ebf35d8 commit fc8ae11

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

  • drivers/crypto/hisilicon

drivers/crypto/hisilicon/qm.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -596,19 +596,9 @@ EXPORT_SYMBOL_GPL(hisi_qm_wait_mb_ready);
596596
/* 128 bit should be written to hardware at one time to trigger a mailbox */
597597
static void qm_mb_write(struct hisi_qm *qm, const void *src)
598598
{
599-
void __iomem *fun_base = qm->io_base + QM_MB_CMD_SEND_BASE;
600-
601-
#if IS_ENABLED(CONFIG_ARM64)
602-
unsigned long tmp0 = 0, tmp1 = 0;
603-
#endif
604-
605-
if (!IS_ENABLED(CONFIG_ARM64)) {
606-
memcpy_toio(fun_base, src, 16);
607-
dma_wmb();
608-
return;
609-
}
610-
611599
#if IS_ENABLED(CONFIG_ARM64)
600+
void __iomem *fun_base = qm->io_base + QM_MB_CMD_SEND_BASE;
601+
unsigned long tmp0, tmp1;
612602
/*
613603
* The dmb oshst instruction ensures that the data in the
614604
* mailbox is written before it is sent to the hardware.

0 commit comments

Comments
 (0)