!42 vdo/cpu.h: 补充添加loongarch支持,修复dkms编译错误

From: @fuowang 
Reviewed-by: @starlet-dx 
Signed-off-by: @starlet-dx
This commit is contained in:
openeuler-ci-bot 2024-12-19 07:30:05 +00:00 committed by Gitee
commit 9a7e95b5a2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 7f57cf2b2dcb9dc5b0b08b47e33ce989269dfe78 Mon Sep 17 00:00:00 2001
From: wangshuo <wangshuo@kylinos.cn>
Date: Thu, 12 Dec 2024 20:34:23 +0800
Subject: [PATCH] add loongarch64 support for kmod-kvdo
---
vdo/cpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vdo/cpu.h b/vdo/cpu.h
index ee449b7..b3fbfd9 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__) || defined(__riscv)
+#elif defined(__x86_64__) || defined(__aarch64__) || defined(__riscv) || defined(__loongarch64)
#define CACHE_LINE_BYTES 64
#else
#error "unknown cache line size"
--
2.27.0

View File

@ -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 4 %define spec_release 5
%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}
@ -17,6 +17,7 @@ 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 Patch1: 01-add-riscv64-support.patch
Patch2: 0002-replace-kernel-obsolete-api.patch Patch2: 0002-replace-kernel-obsolete-api.patch
Patch3: 0001-add-loongarch64-support-for-kmod-kvdo.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires: dkms Requires: dkms
@ -79,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT
%{_usr}/src/%{kmod_name}-%{version}-%{kmod_rpm_release}/* %{_usr}/src/%{kmod_name}-%{version}-%{kmod_rpm_release}/*
%changelog %changelog
* Fri Dec 13 2024 wangshuo <wangshuo@kylinos.cn> - 8.2.1.2-5
- vdo/cpu.h: add loongarch64 support, fix dkms build error
* Tue Mar 26 2024 Ge Wang <wang__ge@126.com> - 8.2.1.2-4 * Tue Mar 26 2024 Ge Wang <wang__ge@126.com> - 8.2.1.2-4
- Replace kernel obsolete api - Replace kernel obsolete api