Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
eb8fca2a61
!26 [sync] PR-19: first check if Valgrind supports the build architecture
From: @openeuler-sync-bot 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2024-09-28 09:23:02 +00:00
Yinsist
fecc09cab7 first check if Valgrind supports the build architecture
(cherry picked from commit 439fadafb5c1cadffd068002f2e7434277179586)
2024-07-10 21:22:03 +08:00
openeuler-ci-bot
cac00714cf
!17 Upgrade to 8.2.2.2
From: @lyn1001 
Reviewed-by: @zhangwenlong01, @laokz, @starlet-dx 
Signed-off-by: @starlet-dx
2024-02-27 06:09:58 +00:00
lyn1001
5d0e2d7fe6 Upgrade to 8.2.2.2 2024-02-27 09:26:34 +08:00
openeuler-ci-bot
42e6206657
!15 Upgrade to 6.2.9.7
From: @gifthu 
Reviewed-by: @starlet-dx 
Signed-off-by: @starlet-dx
2023-10-16 02:16:20 +00:00
huxintao
d2f2d62a4b Upgrade to 6.2.9.7
Change-Id: I6f02b7aca2b65941d07d3b4914fc87ed9e6619ff
2023-10-16 09:47:01 +08:00
openeuler-ci-bot
b3c10b5bba
!12 增加riscv架构支持
From: @laokz 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
2023-05-22 11:50:17 +00:00
YukariChiba
b41e0ac5e6 Add RISC-V support 2023-03-17 18:11:55 +08:00
openeuler-ci-bot
d59da9614b
!11 add loongarch64 support
From: @dpdwaj 
Reviewed-by: @starlet-dx 
Signed-off-by: @starlet-dx
2023-03-08 01:17:18 +00:00
doupengda
d866ac3a89 Add loongarch64 support 2023-03-07 11:27:17 +08:00
7 changed files with 179 additions and 79 deletions

View File

@ -0,0 +1,54 @@
From 249491af07c735d93fc743e413a5304057e43a75 Mon Sep 17 00:00:00 2001
From: doupengda <doupengda@loongson.cn>
Date: Tue, 7 Mar 2023 11:08:46 +0800
Subject: [PATCH] Add loongarch64 support
---
utils/uds/atomicDefs.h | 8 +++++++-
utils/uds/cpu.h | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/utils/uds/atomicDefs.h b/utils/uds/atomicDefs.h
index 0aad609..f468369 100644
--- a/utils/uds/atomicDefs.h
+++ b/utils/uds/atomicDefs.h
@@ -97,6 +97,8 @@
__asm__ __volatile__("bcr 14,0" : : : "memory");
#elif defined __PPC__
__asm__ __volatile__("sync" : : : "memory");
+#elif defined __loongarch64
+ __asm__ __volatile__("dbar 0" : : : "memory");
#else
#error "no fence defined"
#endif
@@ -122,6 +124,8 @@
__asm__ __volatile__("bcr 14,0" : : : "memory");
#elif defined __PPC__
__asm__ __volatile__("lwsync" : : : "memory");
+#elif defined __loongarch64
+ __asm__ __volatile__("dbar 0" : : : "memory");
#else
#error "no fence defined"
#endif
@@ -147,6 +151,8 @@
__asm__ __volatile__("bcr 14,0" : : : "memory");
#elif defined __PPC__
__asm__ __volatile__("lwsync" : : : "memory");
+#elif defined __loongarch64
+ __asm__ __volatile__("dbar 0" : : : "memory");
#else
#error "no fence defined"
#endif
diff --git a/utils/uds/cpu.h b/utils/uds/cpu.h
index 6549f6e..e26d653 100644
--- a/utils/uds/cpu.h
+++ b/utils/uds/cpu.h
@@ -36,7 +36,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(__loongarch64)
#define CACHE_LINE_BYTES 64
#else
#error "unknown cache line size"

View File

@ -1,38 +0,0 @@
From a85f6e9973697f90d11e9beb1eb16206774e4767 Mon Sep 17 00:00:00 2001
From: "Christopher N. Hesse" <raymanfx@gmail.com>
Date: Wed, 3 Apr 2019 22:24:29 +0200
Subject: [PATCH 2/2] Ignore misaligned pointers
Signed-off-by: Christopher N. Hesse <raymanfx@gmail.com>
---
utils/vdo/base/Makefile | 1 +
utils/vdo/user/Makefile | 1 +
2 files changed, 2 insertions(+)
diff --git a/utils/vdo/base/Makefile b/utils/vdo/base/Makefile
index 4f2ed82..6d4c4e8 100644
--- a/utils/vdo/base/Makefile
+++ b/utils/vdo/base/Makefile
@@ -46,6 +46,7 @@ C_WARNS = \
-Wnested-externs \
-Wold-style-definition \
-Wswitch-default \
+ -Wno-address-of-packed-member \
OPT_FLAGS = -O3 -fno-omit-frame-pointer
DEBUG_FLAGS =
diff --git a/utils/vdo/user/Makefile b/utils/vdo/user/Makefile
index b0a60d0..811dd8a 100644
--- a/utils/vdo/user/Makefile
+++ b/utils/vdo/user/Makefile
@@ -48,6 +48,7 @@ C_WARNS = \
-Wnested-externs \
-Wold-style-definition \
-Wswitch-default \
+ -Wno-address-of-packed-member \
OPT_FLAGS = -O3 -fno-omit-frame-pointer
DEBUG_FLAGS =
--
2.21.0

View File

@ -0,0 +1,12 @@
diff -Naur vdo-1cf3a0b44e81d61d4a0ff8193211ad1297fefa69.orig/utils/vdo/Makefile vdo-1cf3a0b44e81d61d4a0ff8193211ad1297fefa69/utils/vdo/Makefile
--- vdo-1cf3a0b44e81d61d4a0ff8193211ad1297fefa69.orig/utils/vdo/Makefile 2021-05-04 08:26:42.000000000 +0000
+++ vdo-1cf3a0b44e81d61d4a0ff8193211ad1297fefa69/utils/vdo/Makefile 2021-06-01 17:05:02.117033793 +0000
@@ -150,7 +150,7 @@
$(CC) $(LDFLAGS) $^ $(LDPRFLAGS) -o $@
vdoformat: LDPRFLAGS += "-lblkid"
-vdodmeventd: LDPRFLAGS += "-ldevmapper-event"
+vdodmeventd: LDPRFLAGS += -ldevmapper -ldevmapper-event
ifneq ($(MAKECMDGOALS),clean)
DEPSOURCES = $(wildcard *.c)

80
0003-RISC-V-support.patch Normal file
View File

@ -0,0 +1,80 @@
diff --git a/utils/uds/atomicDefs.h b/utils/uds/atomicDefs.h
index f468369..673f974 100644
--- a/utils/uds/atomicDefs.h
+++ b/utils/uds/atomicDefs.h
@@ -99,6 +99,8 @@
__asm__ __volatile__("sync" : : : "memory");
#elif defined __loongarch64
__asm__ __volatile__("dbar 0" : : : "memory");
+#elif defined __riscv
+ __asm__ __volatile__("fence rw,rw" : : : "memory");
#else
#error "no fence defined"
#endif
@@ -126,6 +128,8 @@
__asm__ __volatile__("lwsync" : : : "memory");
#elif defined __loongarch64
__asm__ __volatile__("dbar 0" : : : "memory");
+#elif defined __riscv
+ __asm__ __volatile__("fence r,r" : : : "memory");
#else
#error "no fence defined"
#endif
@@ -153,6 +157,8 @@
__asm__ __volatile__("lwsync" : : : "memory");
#elif defined __loongarch64
__asm__ __volatile__("dbar 0" : : : "memory");
+#elif defined __riscv
+ __asm__ __volatile__("fence w,w" : : : "memory");
#else
#error "no fence defined"
#endif
diff --git a/utils/uds/cpu.h b/utils/uds/cpu.h
index e26d653..f3fd61f 100644
--- a/utils/uds/cpu.h
+++ b/utils/uds/cpu.h
@@ -36,7 +36,7 @@
#define CACHE_LINE_BYTES 128
#elif defined(__s390x__)
#define CACHE_LINE_BYTES 256
-#elif defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64)
+#elif defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64) || defined(__riscv)
#define CACHE_LINE_BYTES 64
#else
#error "unknown cache line size"
diff --git a/utils/uds/Makefile b/utils/uds/Makefile
index e33d682..ff6ece0 100644
--- a/utils/uds/Makefile
+++ b/utils/uds/Makefile
@@ -32,8 +32,11 @@
CC=gcc
endif
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
+Wcast-align = -Wcast-align
+endif
WARNS = -Wall \
- -Wcast-align \
+ $(Wcast-align) \
-Werror \
-Wextra \
-Winit-self \
diff --git a/utils/vdo/Makefile b/utils/vdo/Makefile
index fb009a7..26a8e28 100644
--- a/utils/vdo/Makefile
+++ b/utils/vdo/Makefile
@@ -22,10 +22,12 @@
UDS_DIR = ../uds
-
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
+Wcast-align = -Wcast-align
+endif
WARNS = \
-Wall \
- -Wcast-align \
+ $(Wcast-align) \
-Werror \
-Wextra \
-Winit-self \

Binary file not shown.

BIN
8.2.2.2.tar.gz Normal file

Binary file not shown.

View File

@ -1,16 +1,21 @@
Name: vdo Name: vdo
Version: 6.2.6.14 Version: 8.2.2.2
Release: 1 Release: 2
Summary: Management tools for Virtual Data Optimizer Summary: Management tools for Virtual Data Optimizer
License: GPLv2 License: GPLv2
URL: http://github.com/dm-vdo/vdo URL: http://github.com/dm-vdo/vdo
Source0: https://github.com/dm-vdo/vdo/archive/refs/tags/%{version}.tar.gz Source0: https://github.com/dm-vdo/vdo/archive/refs/tags/%{version}.tar.gz
Patch0002: 0002-Ignore-misaligned-pointers.patch Patch0001: 0001-Add-loongarch64-support.patch
Patch0002: 0002-fix_dmeventd_linking.patch
Patch0003: 0003-RISC-V-support.patch
BuildRequires: gcc libuuid-devel device-mapper-devel device-mapper-event-devel BuildRequires: gcc libuuid-devel device-mapper-devel device-mapper-event-devel
BuildRequires: valgrind-devel python3 python3-devel zlib-devel systemd BuildRequires: zlib-devel libblkid-devel
%ifarch "%{valgrind_arches}"
BuildRequires: valgrind-devel
%endif
%{?systemd_requires} %{?systemd_requires}
Requires: lvm2 >= 2.02 python3-PyYAML >= 3.10 libuuid >= 2.23 kmod-kvdo >= 6.2 util-linux >= 2.32.1 Requires: libuuid >= 2.23 kmod-kvdo >= 6.2 util-linux >= 2.32.1
Provides: kvdo-kmod-common = %{version} Provides: kvdo-kmod-common = %{version}
%define __requires_exclude perl %define __requires_exclude perl
@ -30,56 +35,43 @@ This package provides the user-space management tools for VDO.
%install %install
%make_install DESTDIR=%{buildroot} INSTALLOWNER= bindir=%{_bindir} \ %make_install DESTDIR=%{buildroot} INSTALLOWNER= bindir=%{_bindir} \
defaultdocdir=%{_defaultdocdir} name=%{name} \ defaultdocdir=%{_defaultdocdir} name=%{name} mandir=%{_mandir} \
python3_sitelib=%{python3_sitelib} mandir=%{_mandir} \ unitdir=%{_unitdir} presetdir=%{_presetdir} sysconfdir=%{_sysconfdir}
unitdir=%{_unitdir} presetdir=%{_presetdir}
# Fix the python3 shebangs
for file in %{_bindir}/vdo \
%{_bindir}/vdostats
do
pathfix.py -pni "%{__python3}" %{buildroot}${file}
done
%post
%systemd_post vdo.service
%preun
%systemd_preun vdo.service
%postun
%systemd_postun_with_restart vdo.service
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_defaultdocdir}/%{name} %dir %{_defaultdocdir}/%{name}
%doc CONTRIBUTORS.txt README.md %doc CONTRIBUTORS.txt README.md
%dir %{_defaultdocdir}/%{name}/examples
%doc %{_defaultdocdir}/%{name}/examples/* %doc %{_defaultdocdir}/%{name}/examples/*
%license %{_defaultdocdir}/%{name}/COPYING %license %{_defaultdocdir}/%{name}/COPYING
%{_bindir}/* %{_bindir}/*
%dir %{python3_sitelib}/%{name} %dir %{_sysconfdir}/bash_completion.d
%{python3_sitelib}/%{name}/__init__.py %{_sysconfdir}/bash_completion.d/vdostats
%{python3_sitelib}/%{name}/__pycache__/__init__.cpython-*.pyc
%{python3_sitelib}/%{name}/__pycache__/__init__.cpython-*.opt-1.pyc
%dir %{python3_sitelib}/%{name}/vdomgmnt/
%{python3_sitelib}/%{name}/vdomgmnt/*
%dir %{python3_sitelib}/%{name}/statistics/
%{python3_sitelib}/%{name}/statistics/*
%dir %{python3_sitelib}/%{name}/utils/
%{python3_sitelib}/%{name}/utils/*
%{_unitdir}/vdo.service
%{_presetdir}/97-vdo.preset
/bash_completion.d/vdo
/bash_completion.d/vdostats
/etc/udev/rules.d/69-vdo-start-by-dev.rules
/usr/lib/systemd/system/vdo-start-by-dev@.service
/usr/libexec/vdoprepareforlvm
%files help %files help
%defattr(-,root,root) %defattr(-,root,root)
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Sun Apr 28 2024 yinsist <jianhui.oerv@isrc.iscas.ac.cn> - 8.2.2.2-2
- Valgrind does not support certain architectures like RISC-V, Before depending on Valgrind, first check if Valgrind supports the architecture
* Tue Feb 27 2024 liyanan <liyanan61@h-partners.com> - 8.2.2.2-1
- Upgrade to 8.2.2.2
* Wed Aug 16 2023 huxintao <806908118@qq.com> - 6.2.9.7-1
- Upgrade to 6.2.9.7
* Fri Mar 17 2023 laokz <zhangkai@iscas.ac.cn> - 6.2.6.14-3
- Add RISC-V support (Patch by YukariChiba<i@0x7f.cc>)
- Source of fence commands: RISC-V ISA Spec from riscv.org
- Remove -Wcast-align flag, since it causes error in RISC-V gcc
- Remove error-prone patch isolation macro
* Tue Mar 7 2023 doupengda <doupengda@loongson.cn> - 6.2.6.14-2
- Add loongarch64 support
* Fri May 20 2022 houyingchao <houyingchao@h-partners.com> - 6.2.6.14-1 * Fri May 20 2022 houyingchao <houyingchao@h-partners.com> - 6.2.6.14-1
- Upgrade to 6.2.6.14 - Upgrade to 6.2.6.14