diff --git a/fio.spec b/fio.spec index 617c6998982d7aaf06449d2d52abfb1668d7e514..c4c0a53c4ca2025b0c89510da0674193592cc5a8 100644 --- a/fio.spec +++ b/fio.spec @@ -1,10 +1,13 @@ Name: fio Version: 3.29 -Release: 1 +Release: 2 Summary: Versatile IO workload generator License: GPLv2 URL: http://git.kernel.dk/?p=fio.git;a=summary Source: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2 +%ifarch sw_64 +Patch1: sw_64.patch +%endif BuildRequires: libaio-devel python3-devel zlib-devel librbd1-devel numactl-devel librdmacm-devel gcc %ifarch x86_64 @@ -32,7 +35,7 @@ pathfix.py -i %{__python3} -pn \ t/steadystate_tests.py %build -./configure --disable-optimizations +./configure --disable-optimizations --disable-nfs export EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %make_build V=1 @@ -50,6 +53,9 @@ export EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %{_mandir}/man1/* %changelog +* Mon Dec 12 2022 guojiancheng - 3.29-2 +- Add sw patch + * Fri Jan 14 2022 caodongxia - 3.29-1 - Upgrade 3.29 diff --git a/sw_64.patch b/sw_64.patch new file mode 100644 index 0000000000000000000000000000000000000000..75772d2a82235b81535d781b0d6182ddeeb71f48 --- /dev/null +++ b/sw_64.patch @@ -0,0 +1,77 @@ +diff -Naru fio-3.29/arch/arch.h fio-3.29-sw/arch/arch.h +--- fio-3.29/arch/arch.h 2021-12-18 14:09:32.000000000 +0000 ++++ fio-3.29-sw/arch/arch.h 2022-09-08 02:04:52.559532884 +0000 +@@ -23,6 +23,7 @@ + arch_hppa, + arch_mips, + arch_aarch64, ++ arch_sw_64, + + arch_generic, + +@@ -81,6 +82,8 @@ + #include "arch-ia64.h" + #elif defined(__alpha__) + #include "arch-alpha.h" ++#elif defined(__sw_64__) ++#include "arch-sw_64.h" + #elif defined(__s390x__) || defined(__s390__) + #include "arch-s390.h" + #elif defined(__sparc__) +@@ -112,7 +115,7 @@ + } + #endif + +-#ifdef __alpha__ ++#if defined(__alpha__) || defined(__sw_64__) + /* + * alpha is the only exception, all other architectures + * have common numbers for new system calls. +@@ -141,3 +144,5 @@ + #define ARCH_HAVE_IOURING + + #endif ++ ++ +diff -Naru fio-3.29/arch/arch-sw_64.h fio-3.29-sw/arch/arch-sw_64.h +--- fio-3.29/arch/arch-sw_64.h 1970-01-01 00:00:00.000000000 +0000 ++++ fio-3.29-sw/arch/arch-sw_64.h 2022-09-07 10:00:24.049532884 +0000 +@@ -0,0 +1,10 @@ ++#ifndef ARCH_SW_64_H ++#define ARCH_SW_64_H ++ ++#define FIO_ARCH (arch_sw_64) ++ ++#define nop do { } while (0) ++#define read_barrier() __asm__ __volatile__("memb": : :"memory") ++#define write_barrier() __asm__ __volatile__("memb": : :"memory") ++ ++#endif +diff -Naru fio-3.29/os/os-linux-syscall.h fio-3.29-sw/os/os-linux-syscall.h +--- fio-3.29/os/os-linux-syscall.h 2021-12-18 14:09:32.000000000 +0000 ++++ fio-3.29-sw/os/os-linux-syscall.h 2022-09-07 09:56:05.509532884 +0000 +@@ -116,6 +116,24 @@ + #define __NR_sys_vmsplice 471 + #endif + ++/* Linux syscalls for sw_64 */ ++#elif defined(ARCH_SW_64_H) ++#ifndef __NR_ioprio_set ++#define __NR_ioprio_set 442 ++#define __NR_ioprio_get 443 ++#endif ++ ++#ifndef __NR_fadvise64 ++#define __NR_fadvise64 413 ++#endif ++ ++#ifndef __NR_sys_splice ++#define __NR_sys_splice 468 ++#define __NR_sys_tee 470 ++#define __NR_sys_vmsplice 471 ++#endif ++ ++ + /* Linux syscalls for s390 */ + #elif defined(ARCH_S390_H) + #ifndef __NR_ioprio_set