]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: hisilicon/qm - fix the call trace when unbind device
authorWeili Qian <qianweili@huawei.com>
Sat, 15 Aug 2020 09:56:16 +0000 (17:56 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Aug 2020 04:47:53 +0000 (14:47 +1000)
commit6a1af9fe1a6168255b39a896163e8c7f709da181
treea60e6abc18cec248fcb41fc1cacf8f91bd425c58
parent4b960b6d00d0b63aa19e1d1754e97b5009c0550f
crypto: hisilicon/qm - fix the call trace when unbind device

Call trace will appear in the Hisilicon crypto driver unbinding or
disabling SRIOV during task running with TFMs on the corresponding
function.
The log looks like this:
[  293.908078] Call trace:
[  293.908080]  __queue_work+0x494/0x548
[  293.908081]  queue_work_on+0x84/0xd8
[  293.908092]  qm_irq+0x4c/0xd0 [hisi_qm]
[  293.908096]  __handle_irq_event_percpu+0x74/0x2a0
[  293.908098]  handle_irq_event_percpu+0x40/0x98
[  293.908099]  handle_irq_event+0x4c/0x80
[  293.908101]  handle_fasteoi_irq+0xb0/0x170
[  293.908102]  generic_handle_irq+0x3c/0x58
[  293.908103]  __handle_domain_irq+0x68/0xc0
[  293.908104]  gic_handle_irq+0xb4/0x298
[  293.908105]  el1_irq+0xcc/0x180
[  293.908107]  arch_cpu_idle+0x38/0x228
[  293.908110]  default_idle_call+0x20/0x40
[  293.908113]  do_idle+0x1cc/0x2b8
[  293.908114]  cpu_startup_entry+0x2c/0x30
[  293.908115]  rest_init+0xdc/0xe8
[  293.908117]  arch_call_rest_init+0x14/0x1c
[  293.908117]  start_kernel+0x490/0x4c4

This patch adds a waiting logic as user doing the above two operations
to avoid panic. The two operations will hold on in the driver
remove function until the tasks release all their relative TFMs.

Signed-off-by: Hui Tang <tanghui20@huawei.com>
Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Yang Shen <shenyang39@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/hpre/hpre_main.c
drivers/crypto/hisilicon/qm.c
drivers/crypto/hisilicon/qm.h
drivers/crypto/hisilicon/sec2/sec_main.c
drivers/crypto/hisilicon/zip/zip_main.c