crypto: hisilicon/qm - add state machine for QM
authorZhou Wang <wangzhou1@hisilicon.com>
Sat, 9 May 2020 09:43:58 +0000 (17:43 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 May 2020 06:15:02 +0000 (16:15 +1000)
commitb67202e8ed30bfa07b07a6f8fc762417a9a4e6de
treeefcedcfc1b87c209d4981e85e88761a56a9b180b
parent20b291f51802b35d84e20efbf110e8c9a853a22c
crypto: hisilicon/qm - add state machine for QM

Add specific states for qm and qp, every state change under critical region
to prevent from race condition. Meanwhile, qp state change will also depend
on qm state.

Due to the introduction of these states, it is necessary to pay attention
to the calls of public logic, such as concurrent scenarios resetting and
releasing queue will call hisi_qm_stop, which needs to add additional
status to distinguish and process.

Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Shukun Tan <tanshukun1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c
drivers/crypto/hisilicon/qm.h