Add sw_64 support
This commit is contained in:
parent
22fc761089
commit
a8e706af3f
46
0100-spdk-uos-add-sw64-support.patch
Normal file
46
0100-spdk-uos-add-sw64-support.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
diff -Naur a/include/spdk/barrier.h b/include/spdk/barrier.h
|
||||||
|
--- a/include/spdk/barrier.h 2024-01-26 23:17:18.000000000 +0800
|
||||||
|
+++ b/include/spdk/barrier.h 2024-12-12 21:12:33.045436865 +0800
|
||||||
|
@@ -95,6 +95,16 @@
|
||||||
|
#define _spdk_smp_mb() __asm volatile("dbar 0" ::: "memory")
|
||||||
|
#define _spdk_ivdt_dcache(pdata)
|
||||||
|
|
||||||
|
+#elif defined(__sw_64)
|
||||||
|
+
|
||||||
|
+#define _spdk_rmb() __asm volatile("memb" ::: "memory")
|
||||||
|
+#define _spdk_wmb() __asm volatile("memb" ::: "memory")
|
||||||
|
+#define _spdk_mb() __asm volatile("memb" ::: "memory")
|
||||||
|
+#define _spdk_smp_rmb() __asm volatile("memb" ::: "memory")
|
||||||
|
+#define _spdk_smp_wmb() __asm volatile("memb" ::: "memory")
|
||||||
|
+#define _spdk_smp_mb() __asm volatile("memb" ::: "memory")
|
||||||
|
+#define _spdk_ivdt_dcache(pdata)
|
||||||
|
+
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define _spdk_rmb()
|
||||||
|
diff -Naur a/lib/nvme/nvme_pcie_common.c b/lib/nvme/nvme_pcie_common.c
|
||||||
|
--- a/lib/nvme/nvme_pcie_common.c 2024-01-26 23:17:18.000000000 +0800
|
||||||
|
+++ b/lib/nvme/nvme_pcie_common.c 2024-12-12 21:15:59.272412493 +0800
|
||||||
|
@@ -898,7 +898,7 @@
|
||||||
|
__builtin_prefetch(&pqpair->tr[next_cpl->cid]);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if defined(__PPC64__) || defined(__riscv) || defined(__loongarch__)
|
||||||
|
+#if defined(__PPC64__) || defined(__riscv) || defined(__loongarch__) || defined(__sw_64)
|
||||||
|
/*
|
||||||
|
* This memory barrier prevents reordering of:
|
||||||
|
* - load after store from/to tr
|
||||||
|
diff -Naur a/mk/spdk.common.mk b/mk/spdk.common.mk
|
||||||
|
--- a/mk/spdk.common.mk 2024-01-26 23:17:18.000000000 +0800
|
||||||
|
+++ b/mk/spdk.common.mk 2024-12-12 21:47:43.964114007 +0800
|
||||||
|
@@ -71,6 +71,10 @@
|
||||||
|
else ifneq ($(filter loongarch%,$(TARGET_MACHINE)),)
|
||||||
|
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
|
||||||
|
COMMON_CFLAGS += -DPAGE_SIZE=$(shell getconf PAGESIZE)
|
||||||
|
+else ifneq ($(filter sw_64%,$(TARGET_MACHINE)),)
|
||||||
|
+# -march=native is not yet supported by GCC on RISC-V. Falling back to default.
|
||||||
|
+#COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
|
||||||
|
+#COMMON_CFLAGS += -DPAGE_SIZE=$(shell getconf PAGESIZE)
|
||||||
|
else
|
||||||
|
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
|
||||||
|
endif
|
||||||
@ -4,13 +4,14 @@
|
|||||||
|
|
||||||
Name: spdk
|
Name: spdk
|
||||||
Version: 24.01
|
Version: 24.01
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: Set of libraries and utilities for high performance user-mode storage
|
Summary: Set of libraries and utilities for high performance user-mode storage
|
||||||
License: BSD and MIT
|
License: BSD and MIT
|
||||||
URL: http://spdk.io
|
URL: http://spdk.io
|
||||||
Source0: https://github.com/spdk/spdk/archive/refs/tags/v%{version}.tar.gz
|
Source0: https://github.com/spdk/spdk/archive/refs/tags/v%{version}.tar.gz
|
||||||
Patch1: 0001-Add-without-ISA-L-option-and-disabled-by-default.patch
|
Patch1: 0001-Add-without-ISA-L-option-and-disabled-by-default.patch
|
||||||
Patch2: 0002-backport-Add-ctrlr_lock-for-cuse-register-and-unregister.patch
|
Patch2: 0002-backport-Add-ctrlr_lock-for-cuse-register-and-unregister.patch
|
||||||
|
Patch3: 0100-spdk-uos-add-sw64-support.patch
|
||||||
|
|
||||||
%define package_version %{version}-%{release}
|
%define package_version %{version}-%{release}
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ Patch2: 0002-backport-Add-ctrlr_lock-for-cuse-register-and-unregister.patch
|
|||||||
%define use_python2 0
|
%define use_python2 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
ExclusiveArch: x86_64 aarch64 loongarch64 ppc64le riscv64
|
ExclusiveArch: x86_64 aarch64 loongarch64 ppc64le riscv64 sw_64
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++ make
|
BuildRequires: gcc gcc-c++ make
|
||||||
BuildRequires: dpdk-devel >= 23.11, numactl-devel, ncurses-devel
|
BuildRequires: dpdk-devel >= 23.11, numactl-devel, ncurses-devel
|
||||||
@ -178,6 +179,9 @@ mv doc/output/html/ %{install_docdir}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 28 2025 zhangshaoning <zhangshaoning@uniontech.com> - 24.01-8
|
||||||
|
- Add sw_64 support
|
||||||
|
|
||||||
* Sat Nov 30 2024 Weifeng Su <suweifeng1@huawei.com> - 24.01-7
|
* Sat Nov 30 2024 Weifeng Su <suweifeng1@huawei.com> - 24.01-7
|
||||||
- Fix build isue for spdk-tools
|
- Fix build isue for spdk-tools
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user