Commit 0d61c3f1 authored by Kai Ye's avatar Kai Ye Committed by Herbert Xu

crypto: hisilicon/qm - SVA bugfixed on Kunpeng920

Kunpeng920 SEC/HPRE/ZIP cannot support running user space SVA and kernel
Crypto at the same time. Therefore, the algorithms should not be registered
to Crypto as user space SVA is enabled.
Signed-off-by: default avatarKai Ye <yekai13@huawei.com>
Reviewed-by: default avatarZaibo Xu <xuzaibo@huawei.com>
Reviewed-by: default avatarZhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f7f2b43e
...@@ -4004,6 +4004,9 @@ int hisi_qm_alg_register(struct hisi_qm *qm, struct hisi_qm_list *qm_list) ...@@ -4004,6 +4004,9 @@ int hisi_qm_alg_register(struct hisi_qm *qm, struct hisi_qm_list *qm_list)
{ {
int flag = 0; int flag = 0;
int ret = 0; int ret = 0;
/* HW V2 not support both use uacce sva mode and hardware crypto algs */
if (qm->ver <= QM_HW_V2 && qm->use_sva)
return 0;
mutex_lock(&qm_list->lock); mutex_lock(&qm_list->lock);
if (list_empty(&qm_list->list)) if (list_empty(&qm_list->list))
...@@ -4035,6 +4038,9 @@ EXPORT_SYMBOL_GPL(hisi_qm_alg_register); ...@@ -4035,6 +4038,9 @@ EXPORT_SYMBOL_GPL(hisi_qm_alg_register);
*/ */
void hisi_qm_alg_unregister(struct hisi_qm *qm, struct hisi_qm_list *qm_list) void hisi_qm_alg_unregister(struct hisi_qm *qm, struct hisi_qm_list *qm_list)
{ {
if (qm->ver <= QM_HW_V2 && qm->use_sva)
return;
mutex_lock(&qm_list->lock); mutex_lock(&qm_list->lock);
list_del(&qm->list); list_del(&qm->list);
mutex_unlock(&qm_list->lock); mutex_unlock(&qm_list->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment