Skip to content

Commit b4d9d5e

Browse files
committed
opal: add support for s390 and s390x architectures
Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]>
1 parent a737d0f commit b4d9d5e

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

config/opal_config_asm.m4

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,15 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10831083
fi
10841084
OPAL_GCC_INLINE_ASSIGN='"1: li %0,0" : "=&r"(ret)'
10851085
;;
1086-
1086+
# There is no current difference between s390 and s390x
1087+
# But use two different defines in case some come later
1088+
# as s390 is 31bits while s390x is 64bits
1089+
s390-*)
1090+
opal_cv_asm_arch="S390"
1091+
;;
1092+
s390x-*)
1093+
opal_cv_asm_arch="S390X"
1094+
;;
10871095
sparc*-*)
10881096
# SPARC v9 (and above) are the only ones with 64bit support
10891097
# if compiling 32 bit, see if we are v9 (aka v8plus) or

opal/include/opal/sys/architecture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
#define OPAL_MIPS 0070
4343
#define OPAL_ARM 0100
4444
#define OPAL_ARM64 0101
45+
#define OPAL_S390 0110
46+
#define OPAL_S390X 0111
4547
#define OPAL_BUILTIN_SYNC 0200
4648
#define OPAL_BUILTIN_GCC 0202
4749
#define OPAL_BUILTIN_NO 0203

opal/include/opal/sys/cma.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@
8282

8383
#endif
8484

85+
#elif OPAL_ASSEMBLY_ARCH == OPAL_S390
86+
87+
#define __NR_process_vm_readv 340
88+
#define __NR_process_vm_writev 341
89+
90+
#elif OPAL_ASSEMBLY_ARCH == OPAL_S390X
91+
92+
#define __NR_process_vm_readv 340
93+
#define __NR_process_vm_writev 341
94+
8595
#else
8696
#error "Unsupported architecture for process_vm_readv and process_vm_writev syscalls"
8797
#endif

0 commit comments

Comments
 (0)