Merge branch 'github-issue-947' of https://github.com/vincentkfu/fio
[fio.git] / arch / arch.h
index 00d247c4ca44216a096f9a5f292b488093ab6378..30c0d2056d3eaa7abcffd5cd703f698d99790edd 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef ARCH_H
 #define ARCH_H
 
+#include "../lib/types.h"
+
 enum {
        arch_x86_64 = 1,
        arch_x86,
@@ -32,6 +34,7 @@ extern unsigned long arch_flags;
 
 #define ARCH_CPU_CLOCK_WRAPS
 
+/* IWYU pragma: begin_exports */
 #if defined(__i386__)
 #include "arch-x86.h"
 #elif defined(__x86_64__)
@@ -64,6 +67,7 @@ extern unsigned long arch_flags;
 #endif
 
 #include "../lib/ffz.h"
+/* IWYU pragma: end_exports */
 
 #ifndef ARCH_HAVE_INIT
 static inline int arch_init(char *envp[])
@@ -72,4 +76,32 @@ static inline int arch_init(char *envp[])
 }
 #endif
 
+#ifdef __alpha__
+/*
+ * alpha is the only exception, all other architectures
+ * have common numbers for new system calls.
+ */
+# ifndef __NR_io_uring_setup
+#  define __NR_io_uring_setup          535
+# endif
+# ifndef __NR_io_uring_enter
+#  define __NR_io_uring_enter          536
+# endif
+# ifndef __NR_io_uring_register
+#  define __NR_io_uring_register       537
+# endif
+#else /* !__alpha__ */
+# ifndef __NR_io_uring_setup
+#  define __NR_io_uring_setup          425
+# endif
+# ifndef __NR_io_uring_enter
+#  define __NR_io_uring_enter          426
+# endif
+# ifndef __NR_io_uring_register
+#  define __NR_io_uring_register       427
+# endif
+#endif
+
+#define ARCH_HAVE_IOURING
+
 #endif