diff --git a/config/opal_config_asm.m4 b/config/opal_config_asm.m4 index 930c85823c8..293a915e33f 100644 --- a/config/opal_config_asm.m4 +++ b/config/opal_config_asm.m4 @@ -1083,7 +1083,15 @@ AC_DEFUN([OPAL_CONFIG_ASM],[ fi OPAL_GCC_INLINE_ASSIGN='"1: li %0,0" : "=&r"(ret)' ;; - + # There is no current difference between s390 and s390x + # But use two different defines in case some come later + # as s390 is 31bits while s390x is 64bits + s390-*) + opal_cv_asm_arch="S390" + ;; + s390x-*) + opal_cv_asm_arch="S390X" + ;; sparc*-*) # SPARC v9 (and above) are the only ones with 64bit support # if compiling 32 bit, see if we are v9 (aka v8plus) or diff --git a/opal/include/opal/sys/architecture.h b/opal/include/opal/sys/architecture.h index efb38945b74..ee9aa96901d 100644 --- a/opal/include/opal/sys/architecture.h +++ b/opal/include/opal/sys/architecture.h @@ -42,6 +42,8 @@ #define OPAL_MIPS 0070 #define OPAL_ARM 0100 #define OPAL_ARM64 0101 +#define OPAL_S390 0110 +#define OPAL_S390X 0111 #define OPAL_BUILTIN_SYNC 0200 #define OPAL_BUILTIN_GCC 0202 #define OPAL_BUILTIN_NO 0203 diff --git a/opal/include/opal/sys/cma.h b/opal/include/opal/sys/cma.h index 6304e749505..4211013a328 100644 --- a/opal/include/opal/sys/cma.h +++ b/opal/include/opal/sys/cma.h @@ -82,6 +82,16 @@ #endif +#elif OPAL_ASSEMBLY_ARCH == OPAL_S390 + +#define __NR_process_vm_readv 340 +#define __NR_process_vm_writev 341 + +#elif OPAL_ASSEMBLY_ARCH == OPAL_S390X + +#define __NR_process_vm_readv 340 +#define __NR_process_vm_writev 341 + #else #error "Unsupported architecture for process_vm_readv and process_vm_writev syscalls" #endif