Add/fix support for m68k, mips, paris, sparc
authorGuillem Jover <guillem@debian.org>
Tue, 26 Feb 2019 04:26:21 +0000 (04:26 +0000)
committerGuillem Jover <guillem@debian.org>
Tue, 26 Feb 2019 04:26:21 +0000 (04:26 +0000)
Origin: vendor
Forwarded: no
Last-Update: 2014-10-09

Gbp-Pq: Name 00_arches.patch

harness/main.c
src/libaio.h
src/syscall-m68k.h [new file with mode: 0644]
src/syscall-mips.h [new file with mode: 0644]
src/syscall-parisc.h [new file with mode: 0644]
src/syscall.h

index 9ecd5da8d2e00eba951ee3b5ec2d8719b2f2ecbd..280ef5626a4b774fb89f72d9dd7b27c665bcffc5 100644 (file)
 #include <libaio.h>
 
 #if __LP64__ == 0
+#if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
 #define KERNEL_RW_POINTER      ((void *)0xc0010000)
+#elif defined(__arm__) || defined(__m68k__) || defined(__s390__)
+#define KERNEL_RW_POINTER      ((void *)0x00010000)
+#elif defined(__hppa__)
+#define KERNEL_RW_POINTER      ((void *)0x10100000)
+#elif defined(__sparc__)
+#define KERNEL_RW_POINTER      ((void *)0xf0010000)
+#else
+#error Unknown kernel memory address.
+#endif
 #else
 //#warning Not really sure where kernel memory is.  Guessing.
 #define KERNEL_RW_POINTER      ((void *)0xffffffff81000000)
index 2bc24e089ecf34c63d24618caa50a317e8b2cb4d..eecd53ae7e2a09c4e17d32f9f96aed8630cb23ab 100644 (file)
@@ -72,6 +72,7 @@ typedef enum io_iocb_cmd {
 
 /* big endian, 64 bits */
 #elif defined(__powerpc64__) || defined(__s390x__) || \
+      (defined(__hppa__) && defined(__arch64__)) || \
       (defined(__sparc__) && defined(__arch64__)) || \
       (defined(__aarch64__) && defined(__AARCH64EB__)) || \
       (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
diff --git a/src/syscall-m68k.h b/src/syscall-m68k.h
new file mode 100644 (file)
index 0000000..2dd4a9b
--- /dev/null
@@ -0,0 +1,5 @@
+#define __NR_io_setup          241
+#define __NR_io_destroy                242
+#define __NR_io_getevents      243
+#define __NR_io_submit         244
+#define __NR_io_cancel         245
diff --git a/src/syscall-mips.h b/src/syscall-mips.h
new file mode 100644 (file)
index 0000000..2c4245e
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
+ */
+
+#ifndef _MIPS_SIM_ABI32
+#define _MIPS_SIM_ABI32                        1
+#define _MIPS_SIM_NABI32               2
+#define _MIPS_SIM_ABI64                        3
+#endif
+
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+
+/*
+ * Linux o32 style syscalls are in the range from 4000 to 4999.
+ */
+#define __NR_Linux                     4000
+#define __NR_io_setup                  (__NR_Linux + 241)
+#define __NR_io_destroy                        (__NR_Linux + 242)
+#define __NR_io_getevents              (__NR_Linux + 243)
+#define __NR_io_submit                 (__NR_Linux + 244)
+#define __NR_io_cancel                 (__NR_Linux + 245)
+
+#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
+
+#if _MIPS_SIM == _MIPS_SIM_ABI64
+
+/*
+ * Linux 64-bit syscalls are in the range from 5000 to 5999.
+ */
+#define __NR_Linux                     5000
+#define __NR_io_setup                  (__NR_Linux + 200)
+#define __NR_io_destroy                        (__NR_Linux + 201)
+#define __NR_io_getevents              (__NR_Linux + 202)
+#define __NR_io_submit                 (__NR_Linux + 203)
+#define __NR_io_cancel                 (__NR_Linux + 204)
+#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
+
+#if _MIPS_SIM == _MIPS_SIM_NABI32
+
+/*
+ * Linux N32 syscalls are in the range from 6000 to 6999.
+ */
+#define __NR_Linux                     6000
+#define __NR_io_setup                  (__NR_Linux + 200)
+#define __NR_io_destroy                        (__NR_Linux + 201)
+#define __NR_io_getevents              (__NR_Linux + 202)
+#define __NR_io_submit                 (__NR_Linux + 203)
+#define __NR_io_cancel                 (__NR_Linux + 204)
+#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h
new file mode 100644 (file)
index 0000000..252dccb
--- /dev/null
@@ -0,0 +1,6 @@
+#define __NR_Linux                0
+#define __NR_io_setup           (__NR_Linux + 215)
+#define __NR_io_destroy         (__NR_Linux + 216)
+#define __NR_io_getevents       (__NR_Linux + 217)
+#define __NR_io_submit          (__NR_Linux + 218)
+#define __NR_io_cancel          (__NR_Linux + 219)
index b53da4c226fff5e92e7da6b184dfd438ce050549..a88876f4b4b81381dba46b8aabbc5e08c7e4d116 100644 (file)
 #include "syscall-arm.h"
 #elif defined(__sparc__)
 #include "syscall-sparc.h"
+#elif defined(__m68k__)
+#include "syscall-m68k.h"
+#elif defined(__hppa__)
+#include "syscall-parisc.h"
+#elif defined(__mips__)
+#include "syscall-mips.h"
 #elif defined(__aarch64__) || defined(__riscv)
 #include "syscall-generic.h"
 #else