[PATCH libaio 03/11] harness: Add KERNEL_RW_POINTER for various 32-bit architectures
authorGuillem Jover <guillem@hadrons.org>
Wed, 14 Aug 2019 01:30:09 +0000 (03:30 +0200)
committerGuillem Jover <guillem@debian.org>
Thu, 11 Nov 2021 03:56:01 +0000 (03:56 +0000)
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0003-harness-Add-KERNEL_RW_POINTER-for-various-32-bit-arc.patch

harness/main.c

index 82e9c6905916842abfad9263a2102c28f68815ac..0eed7bdac551916550dcd1f07f89ee9fcb42372e 100644 (file)
 #include <libaio.h>
 
 #if __LP64__ == 0
+#if defined(__i386__) || defined(__powerpc__)
 #define KERNEL_RW_POINTER      ((void *)0xc0010000)
+#elif defined(__arm__) || defined(__s390__)
+#define KERNEL_RW_POINTER      ((void *)0x00010000)
+#elif defined(__sparc__)
+#define KERNEL_RW_POINTER      ((void *)0xf0010000)
+#else
+#warning Not really sure where kernel memory is.  Guessing.
+#define KERNEL_RW_POINTER      ((void *)0xc0010000)
+#endif
 #else
 //#warning Not really sure where kernel memory is.  Guessing.
 #define KERNEL_RW_POINTER      ((void *)0xffffffff81000000)