diff --git a/0006-add-sw64-support.patch b/0006-add-sw64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..c786f32ad21b837684c6f2ca1f3596570acd2d44 --- /dev/null +++ b/0006-add-sw64-support.patch @@ -0,0 +1,85 @@ +From 9964a9526594a4b007bef997bbcf4b0dca1ddfb1 Mon Sep 17 00:00:00 2001 +From: maqi +Date: Fri, 28 Feb 2025 13:39:33 +0800 +Subject: [PATCH] add sw64 support + +--- + utils/uds/Makefile | 2 +- + utils/uds/atomicDefs.h | 6 ++++++ + utils/uds/cpu.h | 2 +- + utils/vdo/Makefile | 2 +- + 4 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/utils/uds/Makefile b/utils/uds/Makefile +index c258d55..335223c 100644 +--- a/utils/uds/Makefile ++++ b/utils/uds/Makefile +@@ -26,7 +26,7 @@ ifeq ($(origin CC), default) + CC=gcc + endif + +-ifeq ($(filter riscv64%,$(MAKE_HOST)),) ++ifeq ($(filter riscv64% sw_64%,$(MAKE_HOST)),) + Wcast-align = -Wcast-align + endif + WARNS = -Wall \ +diff --git a/utils/uds/atomicDefs.h b/utils/uds/atomicDefs.h +index d0ef248..9b86adb 100644 +--- a/utils/uds/atomicDefs.h ++++ b/utils/uds/atomicDefs.h +@@ -97,6 +97,8 @@ static INLINE void smp_mb(void) + __asm__ __volatile__("sync" : : : "memory"); + #elif defined __loongarch64 + __asm__ __volatile__("dbar 0" : : : "memory"); ++#elif defined __sw_64 ++ __asm__ __volatile__("memb" : : : "memory"); + #elif defined __riscv + __asm__ __volatile__("fence rw,rw" : : : "memory"); + #else +@@ -126,6 +128,8 @@ static INLINE void smp_rmb(void) + __asm__ __volatile__("lwsync" : : : "memory"); + #elif defined __loongarch64 + __asm__ __volatile__("dbar 0" : : : "memory"); ++#elif defined __sw_64 ++ __asm__ __volatile__("memb" : : : "memory"); + #elif defined __riscv + __asm__ __volatile__("fence r,r" : : : "memory"); + #else +@@ -155,6 +159,8 @@ static INLINE void smp_wmb(void) + __asm__ __volatile__("lwsync" : : : "memory"); + #elif defined __loongarch64 + __asm__ __volatile__("dbar 0" : : : "memory"); ++#elif defined __sw_64 ++ __asm__ __volatile__("memb" : : : "memory"); + #elif defined __riscv + __asm__ __volatile__("fence w,w" : : : "memory"); + #else +diff --git a/utils/uds/cpu.h b/utils/uds/cpu.h +index c635ea3..d7e80db 100644 +--- a/utils/uds/cpu.h ++++ b/utils/uds/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(__loongarch64) || defined(__riscv) ++#elif defined(__x86_64__) || defined(__aarch64__) || defined(__loongarch64) || defined(__riscv) || defined(__sw_64__) + #define CACHE_LINE_BYTES 64 + #else + #error "unknown cache line size" +diff --git a/utils/vdo/Makefile b/utils/vdo/Makefile +index d8b32ce..44adc58 100644 +--- a/utils/vdo/Makefile ++++ b/utils/vdo/Makefile +@@ -22,7 +22,7 @@ VDO_VERSION = 8.2.2.2 + + UDS_DIR = ../uds + +-ifeq ($(filter riscv64%,$(MAKE_HOST)),) ++ifeq ($(filter riscv64% sw_64%,$(MAKE_HOST)),) + Wcast-align = -Wcast-align + endif + WARNS = \ +-- +2.39.3 + diff --git a/vdo.spec b/vdo.spec index bb7464dc57d3975ef7dd7a372878379c9881b811..2d20e5abfcb1f3f6d0ef68fe7d8c5d17c008bc94 100644 --- a/vdo.spec +++ b/vdo.spec @@ -1,6 +1,6 @@ Name: vdo Version: 8.2.2.2 -Release: 4 +Release: 5 Summary: Management tools for Virtual Data Optimizer License: GPLv2 URL: http://github.com/dm-vdo/vdo @@ -10,6 +10,7 @@ Patch0002: 0002-fix_dmeventd_linking.patch Patch0003: 0003-RISC-V-support.patch Patch0004: 0004-fix-vdostats-output-error.patch Patch0005: 0005-clang-support.patch +Patch0006: 0006-add-sw64-support.patch BuildRequires: gcc libuuid-devel device-mapper-devel device-mapper-event-devel BuildRequires: zlib-devel libblkid-devel @@ -56,6 +57,9 @@ This package provides the user-space management tools for VDO. %{_mandir}/man8/* %changelog +* Fri Oct 31 2025 weishuaihao - 8.2.2.2-5 +- Add support sw_64 + * Thu Oct 23 2025 weishuaihao - 8.2.2.2-4 - Fix add if else to support clang