提交 541d167d 编写于 作者: L lingmingqiang 提交者: Xie XiuQi

uacce compile error on CONFIG_IOMMU_SVA

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Modify config macro name to avoid error, adapt to modify the code
after the sva patch merged.

Feature or Bugfix: Bugfix
Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com>
Reviewed-by: Nhucheng.hu <hucheng.hu@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 9e68018c
......@@ -714,7 +714,7 @@ static int hpre_qm_pre_init(struct hisi_qm *qm, struct pci_dev *pdev)
qm->use_uacce = false;
break;
case UACCE_MODE_UACCE:
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
qm->use_dma_api = true;
qm->use_sva = true;
#else
......@@ -1258,7 +1258,7 @@ static int __init hpre_init(void)
pr_err("hpre: can't register hisi hpre driver.\n");
goto fail_to_register_pci;
}
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
if (uacce_mode == UACCE_MODE_UACCE)
return 0;
#endif
......@@ -1279,7 +1279,7 @@ static int __init hpre_init(void)
static void __exit hpre_exit(void)
{
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
if (uacce_mode != UACCE_MODE_UACCE)
hpre_algs_unregister();
#else
......
......@@ -578,7 +578,7 @@ static int hisi_rde_qm_pre_init(struct hisi_qm *qm, struct pci_dev *pdev)
qm->use_uacce = false;
break;
case UACCE_MODE_UACCE:
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
qm->use_dma_api = true;
qm->use_sva = true;
#else
......@@ -1015,7 +1015,7 @@ static int __init hisi_rde_init(void)
pr_err("Failed to register pci driver.\n");
goto err_pci;
}
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
if (uacce_mode == UACCE_MODE_UACCE)
return 0;
#endif
......
......@@ -857,7 +857,7 @@ static int hisi_sec_probe(struct pci_dev *pdev, const struct pci_device_id *id)
qm->use_uacce = false;
break;
case UACCE_MODE_UACCE:
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
qm->use_dma_api = true;
qm->use_sva = true;
#else
......@@ -1391,7 +1391,7 @@ static int __init hisi_sec_init(void)
pr_err("Failed to register pci driver.\n");
goto err_pci;
}
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
if (uacce_mode == UACCE_MODE_UACCE)
return 0;
#endif
......@@ -1414,7 +1414,7 @@ static int __init hisi_sec_init(void)
static void __exit hisi_sec_exit(void)
{
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
if (uacce_mode != UACCE_MODE_UACCE)
hisi_sec_unregister_from_crypto();
#else
......
......@@ -695,7 +695,7 @@ static int hisi_zip_probe(struct pci_dev *pdev, const struct pci_device_id *id)
qm->use_uacce = false;
break;
case UACCE_MODE_UACCE:
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
qm->use_dma_api = true;
qm->use_sva = true;
#else
......@@ -1236,7 +1236,7 @@ static int __init hisi_zip_init(void)
goto err_pci;
}
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
if (uacce_mode == UACCE_MODE_UACCE)
return 0;
#endif
......@@ -1259,7 +1259,7 @@ static int __init hisi_zip_init(void)
static void __exit hisi_zip_exit(void)
{
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
if (uacce_mode != UACCE_MODE_UACCE)
hisi_zip_unregister_from_crypto();
#else
......
......@@ -611,7 +611,7 @@ static int uacce_queue_drain(struct uacce_queue *q)
if (is_to_free_region)
uacce_destroy_region(q, qfr);
}
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
if (uacce->flags & UACCE_DEV_SVA)
iommu_sva_unbind_device(uacce->pdev, q->pasid);
#endif
......@@ -674,7 +674,7 @@ static int uacce_fops_open(struct inode *inode, struct file *filep)
ret = uacce_dev_open_check(uacce);
if (ret)
goto open_err;
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
if (uacce->flags & UACCE_DEV_PASID) {
ret = iommu_sva_bind_device(uacce->pdev, current->mm, &pasid,
IOMMU_SVA_FEAT_IOPF, NULL);
......@@ -1084,7 +1084,7 @@ static int uacce_default_start_queue(struct uacce_queue *q)
return 0;
}
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
static int uacce_dev_match(struct device *dev, void *data)
{
if (dev->parent == data)
......@@ -1254,7 +1254,7 @@ int uacce_register(struct uacce *uacce)
uacce->ops->get_available_instances =
uacce_default_get_available_instances;
#ifndef CONFIG_IOMMU_SVA
#ifndef CONFIG_IOMMU_SVA2
ret = uacce_set_iommu_domain(uacce);
if (ret)
return ret;
......@@ -1269,7 +1269,7 @@ int uacce_register(struct uacce *uacce)
}
if (uacce->flags & UACCE_DEV_PASID) {
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
ret = iommu_sva_init_device(uacce->pdev, IOMMU_SVA_FEAT_IOPF,
0, 0, NULL);
if (ret) {
......@@ -1307,7 +1307,7 @@ void uacce_unregister(struct uacce *uacce)
{
mutex_lock(&uacce_mutex);
#ifdef CONFIG_IOMMU_SVA
#ifdef CONFIG_IOMMU_SVA2
iommu_sva_shutdown_device(uacce->pdev);
#else
uacce_unset_iommu_domain(uacce);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册