!25 Update the uadk package to 2.3.20
From: @aichixxbg Reviewed-by: @hao-fang Signed-off-by: @hao-fang
This commit is contained in:
commit
ec5ce4d685
@ -1,21 +0,0 @@
|
||||
diff -Nur a/uadk/v1/wd.h b/uadk/v1/wd.h
|
||||
--- a/uadk/v1/wd.h 2021-07-01 21:56:26.000000000 +0800
|
||||
+++ b/uadk/v1/wd.h 2021-08-07 14:08:16.547113400 +0800
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
#ifndef WD_ERR
|
||||
#ifndef WITH_LOG_FILE
|
||||
-wd_log log_out;
|
||||
+extern wd_log log_out;
|
||||
|
||||
#define __WD_FILENAME__ (strrchr(__FILE__, '/') ? \
|
||||
((char *)((uintptr_t)strrchr(__FILE__, '/') + 1)) : __FILE__)
|
||||
@@ -150,7 +150,7 @@
|
||||
__WD_FILENAME__, __LINE__, __func__, ##args) : \
|
||||
fprintf(stderr, format, ##args))
|
||||
#else
|
||||
-FILE *flog_fd;
|
||||
+extern FILE *flog_fd;
|
||||
#define WD_ERR(format, args...) \
|
||||
if (!flog_fd) \
|
||||
flog_fd = fopen(WITH_LOG_FILE, "a+"); \
|
||||
Binary file not shown.
BIN
libwd-2.3.20.tar.gz
Normal file
BIN
libwd-2.3.20.tar.gz
Normal file
Binary file not shown.
@ -1,60 +0,0 @@
|
||||
From 3b86295963c24a1dc0ec0da9e1e7f16aced8f3a4 Mon Sep 17 00:00:00 2001
|
||||
From: Yang Shen <shenyang39@huawei.com>
|
||||
Date: Tue, 24 Aug 2021 11:24:25 +0800
|
||||
Subject: [PATCH] uadk: 'access' the file 'isolate' before read it
|
||||
|
||||
The feature 'isolate' isn't enabled for all 'uacce' versions. So need check
|
||||
whether this feature is enabled before read it value.
|
||||
|
||||
Signed-off-by: Yang Shen <shenyang39@huawei.com>
|
||||
---
|
||||
wd.c | 25 ++++++++++++++++++++++---
|
||||
1 file changed, 22 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/uadk/wd.c b/uadk/wd.c
|
||||
index 2d7fc49..bc347e7 100644
|
||||
--- a/uadk/wd.c
|
||||
+++ b/uadk/wd.c
|
||||
@@ -104,17 +104,36 @@ static int get_str_attr(struct uacce_dev *dev, char *attr, char *buf,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int access_attr(char *dev_root, char *attr, int mode)
|
||||
+{
|
||||
+ char attr_file[PATH_STR_SIZE];
|
||||
+ ssize_t size;
|
||||
+
|
||||
+ if (!dev_root || !attr)
|
||||
+ return -WD_EINVAL;
|
||||
+
|
||||
+ size = snprintf(attr_file, PATH_STR_SIZE, "%s/%s", dev_root, attr);
|
||||
+ if (size < 0)
|
||||
+ return -WD_EINVAL;
|
||||
+
|
||||
+ return access(attr_file, mode);
|
||||
+}
|
||||
+
|
||||
static int get_dev_info(struct uacce_dev *dev)
|
||||
{
|
||||
int value = 0;
|
||||
+ int ret;
|
||||
|
||||
get_int_attr(dev, "flags", &dev->flags);
|
||||
get_str_attr(dev, "api", dev->api, WD_NAME_SIZE);
|
||||
|
||||
/* hardware err isolate flag */
|
||||
- get_int_attr(dev, "isolate", &value);
|
||||
- if (value == 1)
|
||||
- return -ENODEV;
|
||||
+ ret = access_attr(dev->dev_root, "isolate", F_OK);
|
||||
+ if (!ret) {
|
||||
+ get_int_attr(dev, "isolate", &value);
|
||||
+ if (value == 1)
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
|
||||
get_str_attr(dev, "algorithms", dev->algs, MAX_ATTR_STR_SIZE);
|
||||
get_int_attr(dev, "region_mmio_size", &value);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Name: libwd
|
||||
Summary: User Space Accelerator Development Kit
|
||||
Version: 2.3.11
|
||||
Release: 4
|
||||
Version: 2.3.20
|
||||
Release: 1
|
||||
License: Apache-2.0
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Vendor: Huawei Corporation
|
||||
@ -14,8 +14,6 @@ BuildRequires: numactl-devel
|
||||
BuildRequires: automake, autoconf, libtool
|
||||
BuildRequires: gcc, make
|
||||
ExclusiveArch: aarch64
|
||||
Patch0001: bugfix-of-gcc-10.patch
|
||||
Patch0002: uadk-access-the-file-isolate-before-read-it.patch
|
||||
|
||||
%description
|
||||
This package contains the User Space Accelerator Library
|
||||
@ -156,6 +154,9 @@ fi
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Mon Nov 22 2021 Yang Shen <shenyang39@huawei.com>2.3.20-1
|
||||
- libwd: update uadk from 2.3.11 to 2.3.20
|
||||
|
||||
* Fri Sep 03 2021 Yang Shen <shenyang39@huawei.com>2.3.11-4
|
||||
- uadk-access-the-file-isolate-before-read-it.patch
|
||||
|
||||
@ -165,7 +166,7 @@ fi
|
||||
* Wed Jul 21 2021 caodongxia <caodongxia@huawei.com> 2.3.11-2
|
||||
- change uacce.h path.
|
||||
|
||||
* Wed Jun 06 2021 Hao Fang <fanghao11@huawei.com> 2.3.11-1
|
||||
* Tue Jul 06 2021 Hao Fang <fanghao11@huawei.com> 2.3.11-1
|
||||
- update warpdrive to uadk, support kunpeng 920/930.
|
||||
|
||||
* Sun Mar 15 2020 zhangtao <zhangtao221@huawei.com> 1.2.10-3
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user