From 0a4fc1af90bfc42bb2ff594204efb823c71991f0 Mon Sep 17 00:00:00 2001 From: zhuhongbo Date: Fri, 21 Mar 2025 16:05:12 +0800 Subject: [PATCH] rdma-core uos add sw64 support --- 0004-rdma-core-uos-add-sw64-support.patch | 43 +++++++++++++++++++++++ rdma-core.spec | 9 ++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 0004-rdma-core-uos-add-sw64-support.patch diff --git a/0004-rdma-core-uos-add-sw64-support.patch b/0004-rdma-core-uos-add-sw64-support.patch new file mode 100644 index 0000000..0271567 --- /dev/null +++ b/0004-rdma-core-uos-add-sw64-support.patch @@ -0,0 +1,43 @@ +From 7698f9a168f2c964f3d1f7cc54a6e8015896597c Mon Sep 17 00:00:00 2001 +From: zhuhongbo +Date: Fri, 21 Mar 2025 16:02:08 +0800 +Subject: [PATCH] rdma-core uos add sw64 support + +--- + util/udma_barrier.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/util/udma_barrier.h b/util/udma_barrier.h +index 0a1f8a4..f9ee4dd 100644 +--- a/util/udma_barrier.h ++++ b/util/udma_barrier.h +@@ -92,6 +92,8 @@ + #define udma_to_device_barrier() asm volatile("mf" ::: "memory") + #elif defined(__sparc_v9__) + #define udma_to_device_barrier() asm volatile("membar #StoreStore" ::: "memory") ++#elif defined(__sw_64__) ++#define udma_to_device_barrier() asm volatile("memb" ::: "memory") + #elif defined(__aarch64__) + #define udma_to_device_barrier() asm volatile("dsb st" ::: "memory"); + #elif defined(__sparc__) || defined(__s390x__) +@@ -130,6 +132,8 @@ + #define udma_from_device_barrier() asm volatile("mf" ::: "memory") + #elif defined(__sparc_v9__) + #define udma_from_device_barrier() asm volatile("membar #LoadLoad" ::: "memory") ++#elif defined(__sw_64__) ++#define udma_from_device_barrier() asm volatile("memb" ::: "memory") + #elif defined(__aarch64__) + #define udma_from_device_barrier() asm volatile("dsb ld" ::: "memory"); + #elif defined(__sparc__) || defined(__s390x__) +@@ -200,6 +204,8 @@ + #define mmio_flush_writes() asm volatile("fwb" ::: "memory") + #elif defined(__sparc_v9__) + #define mmio_flush_writes() asm volatile("membar #StoreStore" ::: "memory") ++#elif defined(__sw_64__) ++#define mmio_flush_writes() asm volatile("memb" ::: "memory") + #elif defined(__aarch64__) + #define mmio_flush_writes() asm volatile("dsb st" ::: "memory"); + #elif defined(__sparc__) +-- +2.39.3 + diff --git a/rdma-core.spec b/rdma-core.spec index e1aab1b..833e812 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -1,4 +1,4 @@ -%define anolis_release 4 +%define anolis_release 5 %bcond_with pandoc %bcond_with static %bcond_without pyverbs @@ -15,6 +15,7 @@ Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz Patch1: 0001-util-fix-overflow-in-remap_node_name.patch Patch2: 0002-infiniband-diags-drop-unnecessary-nodedesc-local-cop.patch Patch3: 0003-libibnetdisc-fix-printing-a-possibly-non-NUL-termina.patch +Patch4: 0004-rdma-core-uos-add-sw64-support.patch BuildRequires: binutils cmake >= 2.8.11 gcc ninja-build BuildRequires: /usr/bin/rst2man perl-generators python3-docutils @@ -35,6 +36,9 @@ Obsoletes: rdma < %{EVR} Obsoletes: rdma-core < %{EVR} Conflicts: infiniband-diags <= 1.6.7 +#%ifnarch loongarch64 sw_64 +#BuildRequires: pandoc +#%endif %description This is the userspace components for the Linux Kernel's drivers/infiniband subsystem. Specifically this contains the userspace libraries for the following device nodes: @@ -625,6 +629,9 @@ fi %endif %changelog +* Fri Mar 21 2025 zhuhongbo - 44.0-5 +- rdma-core uos add sw64 support + * Mon Mar 11 2024 Zhao Hang - 44.0-4 - Rebuild with python3.11 -- Gitee