update commit
(cherry picked from commit a271c4b05813a2f4ef93a233569c8ef8dc665ca9)
This commit is contained in:
parent
25803249bf
commit
7a45ae2f3f
@ -1,22 +0,0 @@
|
||||
From 690b5230ec25237c82630ec7c3766381b2a8c467 Mon Sep 17 00:00:00 2001
|
||||
From: wang_yue111 <648774160@qq.com>
|
||||
Date: Wed, 11 Nov 2020 14:43:58 +0800
|
||||
Subject: [PATCH] fix Makefile compilation failed
|
||||
|
||||
---
|
||||
kae_driver/hisilicon/Makefile | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/kae_driver/hisilicon/Makefile b/kae_driver-1.3.9/kae_driver/hisilicon/Makefile
|
||||
index c766a09..eafceb9 100644
|
||||
--- a/kae_driver/hisilicon/Makefile
|
||||
+++ b/kae_driver/hisilicon/Makefile
|
||||
@@ -1,5 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
-obj-$(CONFIG_CRYPTO_DEV_HISI_SEC) += sec/
|
||||
obj-$(CONFIG_CRYPTO_DEV_HISI_QM) += hisi_qm.o
|
||||
hisi_qm-objs = qm.o sgl.o
|
||||
obj-$(CONFIG_CRYPTO_DEV_HISI_ZIP) += zip/
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
From 41654427d727cdc7e5f63ed148265054d530998b Mon Sep 17 00:00:00 2001
|
||||
From: wang_yue111 <648774160@qq.com>
|
||||
Date: Wed, 11 Nov 2020 15:15:21 +0800
|
||||
Subject: [PATCH] fix value not ignored as itought to be
|
||||
|
||||
---
|
||||
kae_driver/hisilicon/rde/rde_main.c | 10 +++-------
|
||||
1 file changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/kae_driver/hisilicon/rde/rde_main.c b/KAEdriver-1.3.9/kae_driver/hisilicon/rde/rde_main.c
|
||||
index bdc4c55..f900369 100644
|
||||
--- a/kae_driver/hisilicon/rde/rde_main.c
|
||||
+++ b/kae_driver/hisilicon/rde/rde_main.c
|
||||
@@ -479,7 +479,7 @@ static int hisi_rde_chn_debug_init(struct hisi_qm *qm)
|
||||
{
|
||||
struct device *dev = &qm->pdev->dev;
|
||||
struct debugfs_regset32 *regset, *regset_ooo;
|
||||
- struct dentry *tmp_d, *tmp;
|
||||
+ struct dentry *tmp_d;
|
||||
char buf[HRDE_DBGFS_VAL_MAX_LEN];
|
||||
int ret;
|
||||
|
||||
@@ -497,9 +497,7 @@ static int hisi_rde_chn_debug_init(struct hisi_qm *qm)
|
||||
regset->regs = hrde_dfx_regs;
|
||||
regset->nregs = ARRAY_SIZE(hrde_dfx_regs);
|
||||
regset->base = qm->io_base;
|
||||
- tmp = debugfs_create_regset32("chn_regs", 0444, tmp_d, regset);
|
||||
- if (!tmp)
|
||||
- return -ENOENT;
|
||||
+ debugfs_create_regset32("chn_regs", 0444, tmp_d, regset);
|
||||
|
||||
regset_ooo = devm_kzalloc(dev, sizeof(*regset_ooo), GFP_KERNEL);
|
||||
if (!regset_ooo)
|
||||
@@ -507,9 +505,7 @@ static int hisi_rde_chn_debug_init(struct hisi_qm *qm)
|
||||
regset_ooo->regs = hrde_ooo_dfx_regs;
|
||||
regset_ooo->nregs = ARRAY_SIZE(hrde_ooo_dfx_regs);
|
||||
regset_ooo->base = qm->io_base;
|
||||
- tmp = debugfs_create_regset32("ooo_regs", 0444, tmp_d, regset_ooo);
|
||||
- if (!tmp)
|
||||
- return -ENOENT;
|
||||
+ debugfs_create_regset32("ooo_regs", 0444, tmp_d, regset_ooo);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
From 47c1fc7609ad25b54896c8715eff0e05b45d9956 Mon Sep 17 00:00:00 2001
|
||||
From: wang_yue111 <648774160@qq.com>
|
||||
Date: Wed, 11 Nov 2020 14:13:19 +0800
|
||||
Subject: [PATCH] fix vm_fault_t conflict error
|
||||
|
||||
---
|
||||
kae_driver/uacce/uacce.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/kae_driver/uacce/uacce.c b/KAEdriver-1.3.9/kae_driver/uacce/uacce.c
|
||||
index 0ce0702..f897456 100644
|
||||
--- a/kae_driver/uacce/uacce.c
|
||||
+++ b/kae_driver/uacce/uacce.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../include_linux/uacce.h"
|
||||
#include <linux/wait.h>
|
||||
#include <linux/eventpoll.h>
|
||||
+#include <linux/version.h>
|
||||
|
||||
static struct class *uacce_class;
|
||||
static DEFINE_IDR(uacce_idr);
|
||||
@@ -31,7 +32,9 @@ static DECLARE_RWSEM(uacce_qs_lock);
|
||||
static const struct file_operations uacce_fops;
|
||||
static void uacce_put_queue(struct uacce_queue *q);
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)
|
||||
typedef int vm_fault_t;
|
||||
+#endif
|
||||
typedef unsigned int __poll_t;
|
||||
|
||||
/* match with enum uacce_qfrt */
|
||||
--
|
||||
2.23.0
|
||||
|
||||
BIN
kae_driver-1.3.10.tar.gz
Normal file
BIN
kae_driver-1.3.10.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -2,7 +2,7 @@
|
||||
|
||||
Name: kae_driver
|
||||
Summary: Kunpeng Accelerator Engine Kernel Driver
|
||||
Version: 1.3.9
|
||||
Version: 1.3.10
|
||||
Release: 1
|
||||
License: GPL-2.0
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
@ -14,10 +14,6 @@ Conflicts: %{name} < %{version}-%{release}
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
BuildRequires: kernel-devel, gcc, make
|
||||
ExclusiveArch: aarch64
|
||||
Patch0001: fix-vm_fault_t-conflict.patch
|
||||
Patch0002: fix-Makefile-compilation-failed.patch
|
||||
Patch0003: fix-value-not-ignored-as-it-ought-to-be.patch
|
||||
Patch0004: support-kernel-5.7.0-compation.patch
|
||||
|
||||
%define kernel_version %(uname -r)
|
||||
%define kae_driver_path %{_builddir}/%{name}-%{version}/%{name}
|
||||
@ -60,14 +56,14 @@ Provides: %{name} = %{version}-%{release}
|
||||
%description -n hisi_zip
|
||||
This package contains the Huawei Hisilicon ZIP Accelerator Driver.
|
||||
|
||||
%package -n hisi_rde
|
||||
Summary: Huawei Hisilicon RDE Accelerator Driver
|
||||
%package -n hisi_trng_v2
|
||||
Summary: Huawei Hisilicon TRNG Accelerator Driver
|
||||
Requires: uacce >= %{version}-%{release}
|
||||
Conflicts: %{name} < %{version}-%{release}
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
|
||||
%description -n hisi_rde
|
||||
This package contains the Huawei Hisilicon RDE Accelerator Driver.
|
||||
%description -n hisi_trng_v2
|
||||
This package contains the Huawei Hisilicon TRNG Accelerator Driver.
|
||||
|
||||
|
||||
%prep
|
||||
@ -88,8 +84,8 @@ install -b -m644 %{kae_driver_path}/hisilicon/hpre/hisi_hpre.ko ${RPM_BUILD_ROOT
|
||||
install -b -m644 %{kae_driver_path}/conf/hisi_hpre.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_hpre.conf
|
||||
install -b -m644 %{kae_driver_path}/hisilicon/zip/hisi_zip.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||
install -b -m644 %{kae_driver_path}/conf/hisi_zip.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_zip.conf
|
||||
install -b -m644 %{kae_driver_path}/hisilicon/rde/hisi_rde.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||
install -b -m644 %{kae_driver_path}/conf/hisi_rde.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_rde.conf
|
||||
install -b -m644 %{kae_driver_path}/hisilicon/rde/hisi-trng-v2.ko ${RPM_BUILD_ROOT}/lib/modules/%{kernel_version}/extra
|
||||
install -b -m644 %{kae_driver_path}/conf/hisi_trng_v2.conf ${RPM_BUILD_ROOT}/etc/modprobe.d/hisi_trng_v2.conf
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
@ -118,10 +114,10 @@ if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
||||
echo "hisi_zip modules start to install"
|
||||
fi
|
||||
|
||||
%pre -n hisi_rde
|
||||
%pre -n hisi_trng_v2
|
||||
echo "checking installed modules"
|
||||
if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
||||
echo "hisi_rde modules start to install"
|
||||
echo "hisi_trng_v2 modules start to install"
|
||||
fi
|
||||
|
||||
%post -n uacce
|
||||
@ -148,11 +144,11 @@ if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
||||
fi
|
||||
echo "hisi_zip modules installed"
|
||||
|
||||
%post -n hisi_rde
|
||||
%post -n hisi_trng_v2
|
||||
if [[ "$1" = "1" || "$1" = "2" ]] ; then #1: install 2: update
|
||||
/sbin/depmod -a > /dev/null 2>&1 || true
|
||||
fi
|
||||
echo "hisi_rde modules installed"
|
||||
echo "hisi_trng_v2 modules installed"
|
||||
|
||||
%preun -n uacce
|
||||
if [ "$1" = "0" ] ; then #0: uninstall
|
||||
@ -174,9 +170,9 @@ if [ "$1" = "0" ] ; then #0: uninstall
|
||||
echo "hisi_zip modules uninstalling"
|
||||
fi
|
||||
|
||||
%preun -n hisi_rde
|
||||
%preun -n hisi_trng_v2
|
||||
if [ "$1" = "0" ] ; then #0: uninstall
|
||||
echo "hisi_rde modules uninstalling"
|
||||
echo "hisi_trng_v2 modules uninstalling"
|
||||
fi
|
||||
|
||||
%postun -n uacce
|
||||
@ -203,11 +199,11 @@ if [ "$1" = "0" ] ; then #0: uninstall
|
||||
fi
|
||||
echo "hisi_zip modules uninstalled"
|
||||
|
||||
%postun -n hisi_rde
|
||||
%postun -n hisi_trng_v2
|
||||
if [ "$1" = "0" ] ; then #0: uninstall
|
||||
/sbin/depmod -a > /dev/null 2>&1 || true
|
||||
fi
|
||||
echo "hisi_rde modules uninstalled"
|
||||
echo "hisi_trng_v2 modules uninstalled"
|
||||
|
||||
%files -n uacce
|
||||
%defattr(644,root,root)
|
||||
@ -230,10 +226,10 @@ echo "hisi_rde modules uninstalled"
|
||||
/lib/modules/%{kernel_version}/extra/hisi_zip.ko
|
||||
%config(noreplace) /etc/modprobe.d/hisi_zip.conf
|
||||
|
||||
%files -n hisi_rde
|
||||
%files -n hisi_trng_v2
|
||||
%defattr(644,root,root)
|
||||
/lib/modules/%{kernel_version}/extra/hisi_rde.ko
|
||||
%config(noreplace) /etc/modprobe.d/hisi_rde.conf
|
||||
/lib/modules/%{kernel_version}/extra/hisi-trng-v2.ko
|
||||
%config(noreplace) /etc/modprobe.d/hisi_trng_v2.conf
|
||||
|
||||
%changelog
|
||||
* Wed Nov 11 2020 wangyue <wangyue92@huawei.com> - 1.3.9-1
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
From b3dd45f0dc62148045cdbdc52dbaac6c7f136efe Mon Sep 17 00:00:00 2001
|
||||
From: wang_yue111 <648774160@qq.com>
|
||||
Date: Wed, 11 Nov 2020 15:43:59 +0800
|
||||
Subject: [PATCH] fix pci_cleanup_aer_uncorrect_error_status renamed to pci_aer_clear_nonfatal_status since kernel 5.7.0
|
||||
|
||||
---
|
||||
kae_driver/hisilicon/qm.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/kae_driver/hisilicon/qm.c b/KAEdriver-1.3.9/kae_driver/hisilicon/qm.c
|
||||
index 35aa107..601b9c2 100644
|
||||
--- a/kae_driver/hisilicon/qm.c
|
||||
+++ b/kae_driver/hisilicon/qm.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include "qm.h"
|
||||
#include "qm_usr_if.h"
|
||||
+#include <linux/version.h>
|
||||
|
||||
/* eq/aeq irq enable */
|
||||
#define QM_VF_AEQ_INT_SOURCE 0x0
|
||||
@@ -4127,8 +4128,11 @@ pci_ers_result_t hisi_qm_dev_slot_reset(struct pci_dev *pdev)
|
||||
return PCI_ERS_RESULT_RECOVERED;
|
||||
|
||||
pci_info(pdev, "Requesting reset due to PCI error\n");
|
||||
- pci_cleanup_aer_uncorrect_error_status(pdev);
|
||||
-
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)
|
||||
+ pci_aer_clear_nonfatal_status(pdev);
|
||||
+#else
|
||||
+ pci_cleanup_aer_uncorrect_error_status(pdev);
|
||||
+#endif
|
||||
/* reset pcie device controller */
|
||||
ret = hisi_qm_controller_reset(qm);
|
||||
if (ret) {
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user