]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: hisilicon/qm - obtain the mailbox configuration at one time
authorWeili Qian <qianweili@huawei.com>
Sat, 17 Jan 2026 10:18:05 +0000 (18:18 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 31 Jan 2026 02:52:31 +0000 (10:52 +0800)
commit3296992ffc4362fff6e8fb979090b4638f50e066
tree763bfbe75f7cb3e1ed74625ed4c7184562dce844
parentfc8ae11b84458673a3000ab3caa9617d849fc260
crypto: hisilicon/qm - obtain the mailbox configuration at one time

The malibox needs to be triggered by a 128bit atomic operation.
The reason is that the PF and VFs of the device share the mmio memory
of the mailbox, and the mutex cannot lock mailbox operations in
different functions, especially when passing through VFs to
virtual machines.

Currently, the write operation to the mailbox is already a 128-bit
atomic write. The read operation also needs to be modified to a
128-bit atomic read. Since there is no general 128-bit IO memory
access API in the current ARM64 architecture, and the stp and ldp
instructions do not guarantee atomic access to device memory, they
cannot be extracted as a general API. Therefore, the 128-bit atomic
read and write operations need to be implemented in the driver.

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>
drivers/crypto/hisilicon/qm.c
include/linux/hisi_acc_qm.h