summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChenghai Huang <huangchenghai2@huawei.com>2025-12-18 21:44:48 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2026-01-16 14:02:06 +0800
commit4705489742fdc294fe3de7bd9855432fb3cfe3cd (patch)
treef005a22d4126782cd01c1e2f3174cbd996f27ab0 /include
parent72f3bbebff15e87171271d643ee2672fb8e92031 (diff)
crypto: hisilicon/qm - add reference counting to queues for tfm kernel reuse
Add reference counting to queues. When all queues are occupied, tfm will reuse queues with the same algorithm type that have already been allocated in the kernel. The corresponding queue will be released when the reference count reaches 1. Reviewed-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hisi_acc_qm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hisi_acc_qm.h b/include/linux/hisi_acc_qm.h
index 59f985804958..f517b9db8392 100644
--- a/include/linux/hisi_acc_qm.h
+++ b/include/linux/hisi_acc_qm.h
@@ -475,6 +475,7 @@ struct hisi_qp {
u16 pasid;
struct uacce_queue *uacce_q;
+ u32 ref_count;
spinlock_t qp_lock;
struct instance_backlog backlog;
const void **msg;