crypto: starfive - fix recursive mutex_lock
authorTan En De <ende.tan@starfivetech.com>
Wed, 2 Nov 2022 07:00:47 +0000 (15:00 +0800)
committerJia Jie Ho <jiajie.ho@starfivetech.com>
Fri, 24 Feb 2023 05:50:03 +0000 (13:50 +0800)
commitb7f1e0d4089fcc661691cc1fbebdd2316c4aa648
tree38ec5d836dbe8332d97ecd4e0e820d48d3ec9a8e
parent352b307132880c5c82b596ad6ff9c1ced0cf8816
crypto: starfive - fix recursive mutex_lock

In jh7110_rsa_domain_transfer(), there is a path that may lead to
recursive mutex_lock when calling jh7110_pka_wait_done(). Replace it
with completion variable, which is more suitable for signaling
completion instead of using mutex, not to mention using mutex_*() in
interrupt context is bad.

Signed-off-by: Tan En De <ende.tan@starfivetech.com>
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
drivers/crypto/starfive/jh7110/jh7110-pka.c
drivers/crypto/starfive/jh7110/jh7110-sec.c
drivers/crypto/starfive/jh7110/jh7110-str.h