fix sva build error
This commit is contained in:
parent
92732b42b2
commit
7de80ba84f
66
change-sva-macros-to-version2.patch
Normal file
66
change-sva-macros-to-version2.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
diff -Nur kae_driver-1.2.8.old/uacce/uacce.c kae_driver-1.2.8/uacce/uacce.c
|
||||||
|
--- kae_driver-1.2.8.old/uacce/uacce.c 2020-02-03 16:15:12.585798416 +0800
|
||||||
|
+++ kae_driver-1.2.8/uacce/uacce.c 2020-02-03 16:16:25.797131365 +0800
|
||||||
|
@@ -969,7 +969,7 @@
|
||||||
|
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
|
||||||
|
@@ -1019,7 +1019,7 @@
|
||||||
|
int ret;
|
||||||
|
int pasid = 0;
|
||||||
|
|
||||||
|
-#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);
|
||||||
|
@@ -1052,7 +1052,7 @@
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_unbind:
|
||||||
|
-#ifdef CONFIG_IOMMU_SVA
|
||||||
|
+#ifdef CONFIG_IOMMU_SVA2
|
||||||
|
if (uacce->flags & UACCE_DEV_PASID)
|
||||||
|
iommu_sva_unbind_device(uacce->pdev, pasid);
|
||||||
|
#endif
|
||||||
|
@@ -1557,7 +1557,7 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifndef CONFIG_IOMMU_SVA
|
||||||
|
+#ifndef CONFIG_IOMMU_SVA2
|
||||||
|
static int uacce_dev_match(struct device *dev, void *data)
|
||||||
|
{
|
||||||
|
if (dev->parent == data)
|
||||||
|
@@ -1732,7 +1732,7 @@
|
||||||
|
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;
|
||||||
|
@@ -1745,7 +1745,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
@@ -1780,7 +1780,7 @@
|
||||||
|
return -EAGAIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef CONFIG_IOMMU_SVA
|
||||||
|
+#ifdef CONFIG_IOMMU_SVA2
|
||||||
|
iommu_sva_shutdown_device(uacce->pdev);
|
||||||
|
#else
|
||||||
|
uacce_unset_iommu_domain(uacce);
|
||||||
@ -6,7 +6,7 @@
|
|||||||
Name: kae_driver
|
Name: kae_driver
|
||||||
Summary: Kunpeng Accelerator Engine Kernel Driver
|
Summary: Kunpeng Accelerator Engine Kernel Driver
|
||||||
Version: 1.2.8
|
Version: 1.2.8
|
||||||
Release: 2
|
Release: 3
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
Vendor: Huawei Corporation
|
Vendor: Huawei Corporation
|
||||||
@ -17,6 +17,8 @@ Conflicts: %{name} < %{version}-%{release}
|
|||||||
Provides: %{name} = %{version}-%{release}
|
Provides: %{name} = %{version}-%{release}
|
||||||
BuildRequires: kernel-devel, gcc, make
|
BuildRequires: kernel-devel, gcc, make
|
||||||
|
|
||||||
|
Patch0000: change-sva-macros-to-version2.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains the Kunpeng Accelerator Engine Kernel Driver
|
This package contains the Kunpeng Accelerator Engine Kernel Driver
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ Provides: %{name} = %{version}-%{release}
|
|||||||
This package contains the Huawei Hisilicon RDE Accelerator Driver.
|
This package contains the Huawei Hisilicon RDE Accelerator Driver.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make
|
make
|
||||||
@ -73,16 +75,16 @@ make
|
|||||||
%install
|
%install
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
mkdir -p ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/etc/modprobe.d
|
mkdir -p ${RPM_BUILD_ROOT}/etc/modprobe.d
|
||||||
install -b -m -644 %{kae_driver_path}/uacce/uacce.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
install -b -m644 %{kae_driver_path}/uacce/uacce.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||||
install -b -m -644 %{kae_driver_path}/hisilicon/hisi_qm.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
install -b -m644 %{kae_driver_path}/hisilicon/hisi_qm.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||||
install -b -m -644 %{kae_driver_path}/hisilicon/sec2/hisi_sec2.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
install -b -m644 %{kae_driver_path}/hisilicon/sec2/hisi_sec2.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||||
install -b -m -644 %{kae_driver_path}/conf/hisi_sec2.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_sec2.conf
|
install -b -m644 %{kae_driver_path}/conf/hisi_sec2.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_sec2.conf
|
||||||
install -b -m -644 %{kae_driver_path}/hisilicon/hpre/hisi_hpre.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
install -b -m644 %{kae_driver_path}/hisilicon/hpre/hisi_hpre.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||||
install -b -m -644 %{kae_driver_path}/conf/hisi_hpre.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_hpre.conf
|
install -b -m644 %{kae_driver_path}/conf/hisi_hpre.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_hpre.conf
|
||||||
install -b -m -644 %{kae_driver_path}/hisilicon/zip/hisi_zip.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
install -b -m644 %{kae_driver_path}/hisilicon/zip/hisi_zip.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||||
install -b -m -644 %{kae_driver_path}/conf/hisi_zip.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_zip.conf
|
install -b -m644 %{kae_driver_path}/conf/hisi_zip.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_zip.conf
|
||||||
install -b -m -644 %{kae_driver_path}/hisilicon/rde/hisi_rde.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
install -b -m644 %{kae_driver_path}/hisilicon/rde/hisi_rde.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||||
install -b -m -644 %{kae_driver_path}/conf/hisi_rde.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_rde.conf
|
install -b -m644 %{kae_driver_path}/conf/hisi_rde.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_rde.conf
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
@ -229,6 +231,9 @@ echo "hisi_rde modules uninstalled"
|
|||||||
%config(noreplace) /etc/modprobe.d/hisi_rde.conf
|
%config(noreplace) /etc/modprobe.d/hisi_rde.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 03 2020 catastrowings <jianghuhao1994@163.com> 1.2.8-3
|
||||||
|
- fix sva build error
|
||||||
|
|
||||||
* Mon Jan 20 2020 catastrowings <jianghuhao1994@163.com> 1.2.7-2
|
* Mon Jan 20 2020 catastrowings <jianghuhao1994@163.com> 1.2.7-2
|
||||||
- compatible with openEuler
|
- compatible with openEuler
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user