summaryrefslogtreecommitdiff
path: root/drivers/crypto/hisilicon/qm.h
diff options
context:
space:
mode:
authorWeili Qian <qianweili@huawei.com>2020-05-09 17:44:02 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2020-05-15 16:15:03 +1000
commit5308f6600a393ee848ed9d9f77b167aa6b202e9c (patch)
treeb2289a5668f2577275afaf4f74bff42c4831912c /drivers/crypto/hisilicon/qm.h
parentd9701f8d9b12903bf212f542235659477024a43f (diff)
crypto: hisilicon - QM memory management optimization
Put all the code for the memory allocation into the QM initialization process. Before, The qp memory was allocated when the qp was created, and released when the qp was released, It is now changed to allocate all the qp memory once. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Shukun Tan <tanshukun1@huawei.com> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon/qm.h')
-rw-r--r--drivers/crypto/hisilicon/qm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/hisilicon/qm.h b/drivers/crypto/hisilicon/qm.h
index 743cb63d2de6..80b9746dfe19 100644
--- a/drivers/crypto/hisilicon/qm.h
+++ b/drivers/crypto/hisilicon/qm.h
@@ -214,8 +214,8 @@ struct hisi_qm {
unsigned long reset_flag;
struct rw_semaphore qps_lock;
- unsigned long *qp_bitmap;
- struct hisi_qp **qp_array;
+ struct idr qp_idr;
+ struct hisi_qp *qp_array;
struct mutex mailbox_lock;