Skip to content

Commit c4082af

Browse files
authored
Merge pull request #3466 from nmorey/devel/3.x-s390-support
v3.x: opal: add support for s390 and s390x architectures
2 parents 66e4bcc + a74321d commit c4082af

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
@@ -1091,7 +1091,15 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10911091
fi
10921092
OPAL_GCC_INLINE_ASSIGN='"1: li %0,0" : "=&r"(ret)'
10931093
;;
1094-
1094+
# There is no current difference between s390 and s390x
1095+
# But use two different defines in case some come later
1096+
# as s390 is 31bits while s390x is 64bits
1097+
s390-*)
1098+
opal_cv_asm_arch="S390"
1099+
;;
1100+
s390x-*)
1101+
opal_cv_asm_arch="S390X"
1102+
;;
10951103
sparc*-*)
10961104
# SPARC v9 (and above) are the only ones with 64bit support
10971105
# 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_OSX 0201
4749
#define OPAL_BUILTIN_GCC 0202

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)