From 1f01c77ff58df16b75d666a4737d80a09ba61b92 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@hadrons.org>
Date: Wed, 14 Aug 2019 03:22:10 +0200
Subject: [PATCH libaio 05/11] Add PARISC support

Signed-off-by: Guillem Jover <guillem@hadrons.org>
---
 harness/main.c       | 2 ++
 src/libaio.h         | 1 +
 src/syscall-parisc.h | 5 +++++
 src/syscall.h        | 2 ++
 4 files changed, 10 insertions(+)
 create mode 100644 src/syscall-parisc.h

diff --git a/harness/main.c b/harness/main.c
index 33d8e46..01c81aa 100644
--- a/harness/main.c
+++ b/harness/main.c
@@ -16,6 +16,8 @@
 #define KERNEL_RW_POINTER	((void *)0xc0010000)
 #elif defined(__arm__) || 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
diff --git a/src/libaio.h b/src/libaio.h
index 26b07f9..29005d0 100644
--- a/src/libaio.h
+++ b/src/libaio.h
@@ -75,6 +75,7 @@ typedef enum io_iocb_cmd {
 
 /* big endian, 64 bits */
 #elif defined(__powerpc64__) || defined(__s390x__) || \
+      (defined(__hppa__) && defined(__arch64__)) || \
       (defined(__sparc__) && defined(__arch64__)) || \
       (defined(__mips64) && defined(__MIPSEB__)) || \
       (defined(__aarch64__) && defined(__AARCH64EB__)) || \
diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h
new file mode 100644
index 0000000..1738075
--- /dev/null
+++ b/src/syscall-parisc.h
@@ -0,0 +1,5 @@
+#define __NR_io_setup		215
+#define __NR_io_destroy		216
+#define __NR_io_getevents	217
+#define __NR_io_submit		218
+#define __NR_io_cancel		219
diff --git a/src/syscall.h b/src/syscall.h
index db78e28..61c18c6 100644
--- a/src/syscall.h
+++ b/src/syscall.h
@@ -27,6 +27,8 @@
 #include "syscall-arm.h"
 #elif defined(__sparc__)
 #include "syscall-sparc.h"
+#elif defined(__hppa__)
+#include "syscall-parisc.h"
 #elif defined(__mips__)
 #include "syscall-mips.h"
 #elif defined(__aarch64__) || defined(__riscv)
-- 
2.26.0.292.g33ef6b2f38

