add riscv64 support
Modify get_cache_size to get_cache_size_alias because it conflicts with KERNEL/arch/riscv/include/asm/cacheinfo.h namespace.
This commit is contained in:
parent
2f28fc170d
commit
b585583b89
27
01-add-riscv64-support.patch
Normal file
27
01-add-riscv64-support.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/vdo/cpu.h b/vdo/cpu.h
|
||||||
|
index e4b39c2b..ee449b7c 100644
|
||||||
|
--- a/vdo/cpu.h
|
||||||
|
+++ b/vdo/cpu.h
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
#define CACHE_LINE_BYTES 128
|
||||||
|
#elif defined(__s390x__)
|
||||||
|
#define CACHE_LINE_BYTES 256
|
||||||
|
-#elif defined(__x86_64__) || defined(__aarch64__)
|
||||||
|
+#elif defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
|
||||||
|
#define CACHE_LINE_BYTES 64
|
||||||
|
#else
|
||||||
|
#error "unknown cache line size"
|
||||||
|
diff --git a/vdo/volume.h b/vdo/volume.h
|
||||||
|
index 3a9a8d5e..93f13a42 100644
|
||||||
|
--- a/vdo/volume.h
|
||||||
|
+++ b/vdo/volume.h
|
||||||
|
@@ -356,6 +356,9 @@ int __must_check get_volume_page(struct volume *volume,
|
||||||
|
byte **data_ptr,
|
||||||
|
struct delta_index_page **index_page_ptr);
|
||||||
|
|
||||||
|
+#if defined(__riscv)
|
||||||
|
+#define get_cache_size get_cache_size_alias
|
||||||
|
+#endif
|
||||||
|
size_t __must_check get_cache_size(struct volume *volume);
|
||||||
|
|
||||||
|
int __must_check
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#This spec is obtained from source code(kvdo-6.2.2.24.tar.gz)
|
#This spec is obtained from source code(kvdo-6.2.2.24.tar.gz)
|
||||||
%define spec_release 2
|
%define spec_release 3
|
||||||
%define kmod_name kmod-kvdo
|
%define kmod_name kmod-kvdo
|
||||||
%define kmod_driver_version 8.2.1.2
|
%define kmod_driver_version 8.2.1.2
|
||||||
%define kmod_rpm_release %{spec_release}
|
%define kmod_rpm_release %{spec_release}
|
||||||
@ -15,12 +15,13 @@ Summary: Kernel Modules for Virtual Data Optimizer
|
|||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://github.com/dm-vdo/kvdo
|
URL: http://github.com/dm-vdo/kvdo
|
||||||
Source0: https://github.com/dm-vdo/kvdo/archive/refs/tags/%{kmod_driver_version}.tar.gz
|
Source0: https://github.com/dm-vdo/kvdo/archive/refs/tags/%{kmod_driver_version}.tar.gz
|
||||||
|
Patch1: 01-add-riscv64-support.patch
|
||||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
|
|
||||||
Requires: dkms
|
Requires: dkms
|
||||||
Requires: kernel-devel >= %{kmod_kernel_version}
|
Requires: kernel-devel >= %{kmod_kernel_version}
|
||||||
Requires: make
|
Requires: make
|
||||||
ExclusiveArch: x86_64 aarch64 loongarch64
|
ExclusiveArch: x86_64 aarch64 loongarch64 riscv64
|
||||||
ExcludeArch: s390 s390x ppc ppc64 ppc64le i686
|
ExcludeArch: s390 s390x ppc ppc64 ppc64le i686
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -77,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_usr}/src/%{kmod_name}-%{version}-%{kmod_rpm_release}/*
|
%{_usr}/src/%{kmod_name}-%{version}-%{kmod_rpm_release}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 12 2023 laokz <zhangkai@iscas.ac.cn> - 8.2.1.2-3
|
||||||
|
- Add riscv64 support
|
||||||
|
|
||||||
* Thu Feb 16 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 8.2.1.2-2
|
* Thu Feb 16 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 8.2.1.2-2
|
||||||
- Add loongarch64 support
|
- Add loongarch64 support
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user