Skip to contentSkip to conversation

load correct syscall table for s390 and s390x

PATCH Applied Dan Horák 2 participants 3 messages Feb 1, 2014

lore
Share & tools
lore

Dan Horák

author
#0 lore raw

PATCH 1/1 load correct syscall table for s390 and s390x

The actual syscall table for s390/s390x must be loaded depending on the __s390x__ symbol.

building on s390 (32=bit) ends with
...
In file included from /builddir/build/BUILD/trinity-1.3/include/arch.h:27:0,

                 from tables.c:10:
tables.c: In function 'select_syscall_tables':
/builddir/build/BUILD/trinity-1.3/include/arch-s390.h:24:18: error: 'syscalls_s390x' undeclared (first use in this function)
 #define SYSCALLS syscalls_s390x
                  ^
tables.c:347:32: note: in expansion of macro 'SYSCALLS'
  syscalls = copy_syscall_table(SYSCALLS, ARRAY_SIZE(SYSCALLS));
                                ^
/builddir/build/BUILD/trinity-1.3/include/arch-s390.h:24:18: note: each undeclared identifier is reported only once for each function it appears in
 #define SYSCALLS syscalls_s390x
                  ^
tables.c:347:32: note: in expansion of macro 'SYSCALLS'
  syscalls = copy_syscall_table(SYSCALLS, ARRAY_SIZE(SYSCALLS));
                                ^
make: *** [tables.o] Error 1
---
 include/arch-s390.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
include/arch-s390.h +4 -2
index 030b4cf..c322030 100644
@@ -8,6 +8,8 @@
 #define PAGE_SHIFT	12
 #define PTE_FILE_MAX_BITS 59
 
+#define SYSCALLS syscalls_s390x
+
 #else /* __s390x__ */
 
 #define KERNEL_ADDR	0UL
@@ -15,6 +17,8 @@
 #define PAGE_SHIFT	12
 #define PTE_FILE_MAX_BITS 26
 
+#define SYSCALLS syscalls_s390
+
 #endif /* __s390x__ */
 
 #define PAGE_OFFSET		0x0UL
@@ -22,5 +26,3 @@
 #define PTRACE_GETFPREGS	0
 #define PTRACE_SETREGS		0
 #define PTRACE_SETFPREGS	0
-
-#define SYSCALLS syscalls_s390x
Signature · 1 line
1.8.1.4
Applied
#2 lore raw
In reply to Dan Horák
Quoted 3 lines · Dan Horák

The actual syscall table for s390/s390x must be loaded depending on the __s390x__ symbol.

thanks, applied and pushed out.

Dave