Recent changes (master)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit 5cedafafeeb9dde862455342cd24c860d84f4f07:

  ci: fix ups for 32-bit GitHub Actions Linux builds (2023-05-18 14:29:10 -0400)

are available in the Git repository at:

  git://git.kernel.dk/fio.git master

for you to fetch changes up to 870ea00243b1290541334bec2a56428c9f68dba6:

  io_ur: make sure that sync errors are noticed upfront (2023-05-19 19:30:38 -0600)

----------------------------------------------------------------
Jens Axboe (2):
      Merge branch 'master' of https://github.com/huajingyun01/fio
      io_ur: make sure that sync errors are noticed upfront

Jingyun Hua (1):
      Add LoongArch64 support

 arch/arch-loongarch64.h | 10 ++++++++++
 arch/arch.h             |  3 +++
 configure               |  4 +++-
 io_u.c                  |  3 +++
 libfio.c                |  1 +
 os/os-linux-syscall.h   | 16 ++++++++++++++++
 6 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 arch/arch-loongarch64.h

---

Diff of recent changes:

diff --git a/arch/arch-loongarch64.h b/arch/arch-loongarch64.h
new file mode 100644
index 00000000..43ea83b4
--- /dev/null
+++ b/arch/arch-loongarch64.h
@@ -0,0 +1,10 @@
+#ifndef ARCH_LOONGARCH64_H
+#define ARCH_LOONGARCH64_H
+
+#define FIO_ARCH	(arch_loongarch64)
+
+#define read_barrier()		__asm__ __volatile__("dbar 0": : :"memory")
+#define write_barrier()		__asm__ __volatile__("dbar 0": : :"memory")
+#define nop			__asm__ __volatile__("dbar 0": : :"memory")
+
+#endif
diff --git a/arch/arch.h b/arch/arch.h
index fca003be..6e476701 100644
--- a/arch/arch.h
+++ b/arch/arch.h
@@ -23,6 +23,7 @@ enum {
 	arch_hppa,
 	arch_mips,
 	arch_aarch64,
+	arch_loongarch64,
 
 	arch_generic,
 
@@ -97,6 +98,8 @@ extern unsigned long arch_flags;
 #include "arch-hppa.h"
 #elif defined(__aarch64__)
 #include "arch-aarch64.h"
+#elif defined(__loongarch64)
+#include "arch-loongarch64.h"
 #else
 #warning "Unknown architecture, attempting to use generic model."
 #include "arch-generic.h"
diff --git a/configure b/configure
index ca03350b..74416fd4 100755
--- a/configure
+++ b/configure
@@ -499,13 +499,15 @@ elif check_define __aarch64__ ; then
   cpu="aarch64"
 elif check_define __hppa__ ; then
   cpu="hppa"
+elif check_define __loongarch64 ; then
+  cpu="loongarch64"
 else
   cpu=`uname -m`
 fi
 
 # Normalise host CPU name and set ARCH.
 case "$cpu" in
-  ia64|ppc|ppc64|s390|s390x|sparc64)
+  ia64|ppc|ppc64|s390|s390x|sparc64|loongarch64)
     cpu="$cpu"
   ;;
   i386|i486|i586|i686|i86pc|BePC)
diff --git a/io_u.c b/io_u.c
index 30265cfb..6f5fc94d 100644
--- a/io_u.c
+++ b/io_u.c
@@ -2027,6 +2027,8 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,
 	}
 
 	if (ddir_sync(ddir)) {
+		if (io_u->error)
+			goto error;
 		td->last_was_sync = true;
 		if (f) {
 			f->first_write = -1ULL;
@@ -2082,6 +2084,7 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,
 				icd->error = ret;
 		}
 	} else if (io_u->error) {
+error:
 		icd->error = io_u->error;
 		io_u_log_error(td, io_u);
 	}
diff --git a/libfio.c b/libfio.c
index ddd49cd7..5e3fd30b 100644
--- a/libfio.c
+++ b/libfio.c
@@ -74,6 +74,7 @@ static const char *fio_arch_strings[arch_nr] = {
 	"hppa",
 	"mips",
 	"aarch64",
+	"loongarch64",
 	"generic"
 };
 
diff --git a/os/os-linux-syscall.h b/os/os-linux-syscall.h
index c399b2fa..67ee4d91 100644
--- a/os/os-linux-syscall.h
+++ b/os/os-linux-syscall.h
@@ -270,6 +270,22 @@
 #define __NR_ioprio_get		31
 #endif
 
+/* Linux syscalls for loongarch64 */
+#elif defined(ARCH_LOONGARCH64_H)
+#ifndef __NR_ioprio_set
+#define __NR_ioprio_set         30
+#define __NR_ioprio_get         31
+#endif
+
+#ifndef __NR_fadvise64
+#define __NR_fadvise64          223
+#endif
+
+#ifndef __NR_sys_splice
+#define __NR_sys_splice         76
+#define __NR_sys_tee          	77
+#define __NR_sys_vmsplice       75
+#endif
 #else
 #warning "Unknown architecture"
 #endif



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux