代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/fio 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 602997d492f2338b337a25d9b738d2bb3053f6ce Mon Sep 17 00:00:00 2001
From: doupengda <doupengda@loongson.cn>
Date: Wed, 5 Jul 2023 02:30:53 +0000
Subject: [PATCH] Add support for loongarch64
---
arch/arch-loongarch64.h | 10 ++++++++++
arch/arch.h | 3 +++
configure | 3 +++
libfio.c | 3 ++-
os/os-linux-syscall.h | 7 +++++++
5 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 arch/arch-loongarch64.h
diff --git a/arch/arch-loongarch64.h b/arch/arch-loongarch64.h
new file mode 100644
index 0000000..43ea83b
--- /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 fca003b..2c11c0f 100644
--- a/arch/arch.h
+++ b/arch/arch.h
@@ -27,6 +27,7 @@ enum {
arch_generic,
arch_nr,
+ arch_loongarch64,
};
enum {
@@ -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 45d10a3..46d6d9a 100755
--- a/configure
+++ b/configure
@@ -523,6 +523,9 @@ case "$cpu" in
mips*)
cpu="mips"
;;
+ loongarch64)
+ cpu="loongarch64"
+ ;;
sparc|sun4[cdmuv])
cpu="sparc"
;;
diff --git a/libfio.c b/libfio.c
index a52014c..d2227f4 100644
--- a/libfio.c
+++ b/libfio.c
@@ -74,7 +74,8 @@ static const char *fio_arch_strings[arch_nr] = {
"hppa",
"mips",
"aarch64",
- "generic"
+ "generic",
+ "loongarch64"
};
static void reset_io_counters(struct thread_data *td, int all)
diff --git a/os/os-linux-syscall.h b/os/os-linux-syscall.h
index c399b2f..3524966 100644
--- a/os/os-linux-syscall.h
+++ b/os/os-linux-syscall.h
@@ -270,6 +270,13 @@
#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
+
#else
#warning "Unknown architecture"
#endif
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。