|
5 | 5 | * Copyright (c) 2017 Research Organization for Information Science |
6 | 6 | * and Technology (RIST). All rights reserved. |
7 | 7 | * Copyright (c) 2020 Google, LLC. All rights reserved. |
| 8 | + * Copyright (c) 2022 Amazon.com, Inc. or its affiliates. |
| 9 | + * All Rights reserved. |
8 | 10 | * $COPYRIGHT$ |
9 | 11 | */ |
10 | 12 |
|
|
19 | 21 | #ifndef OPAL_SYS_CMA_H |
20 | 22 | #define OPAL_SYS_CMA_H 1 |
21 | 23 |
|
22 | | -#if !defined(OPAL_ASSEMBLY_ARCH) |
23 | | -/* need opal_config.h for the assembly architecture */ |
24 | | -# include "opal_config.h" |
25 | | -#endif |
26 | | - |
27 | | -#include "opal/sys/architecture.h" |
| 24 | +#include "opal/opal_portable_platform.h" |
28 | 25 |
|
29 | 26 | #ifdef HAVE_SYS_TYPES_H |
30 | 27 | # include <sys/types.h> |
|
34 | 31 | # include <sys/unistd.h> |
35 | 32 | #endif |
36 | 33 |
|
37 | | -#ifdef __linux__ |
| 34 | +#ifdef PLATFORM_OS_LINUX |
38 | 35 |
|
39 | 36 | /* Cross Memory Attach is so far only supported under linux */ |
40 | 37 |
|
41 | | -# if OPAL_ASSEMBLY_ARCH == OPAL_X86_64 |
| 38 | +# if defined(PLATFORM_ARCH_x86_64) |
42 | 39 | # define __NR_process_vm_readv 310 |
43 | 40 | # define __NR_process_vm_writev 311 |
44 | | -# elif OPAL_ASSEMBLY_ARCH == OPAL_IA32 |
| 41 | +# elif defined(PLATFORM_ARCH_X86) |
45 | 42 | # define __NR_process_vm_readv 347 |
46 | 43 | # define __NR_process_vm_writev 348 |
47 | | -# elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC32 |
| 44 | +# elif defined(PLATFORM_ARCH_POWERPC) && defined(PLATFORM_ARCH_32) |
48 | 45 | # define __NR_process_vm_readv 351 |
49 | 46 | # define __NR_process_vm_writev 352 |
50 | | -# elif OPAL_ASSEMBLY_ARCH == OPAL_POWERPC64 |
| 47 | +# elif defined(PLATFORM_ARCH_POWERPC) && defined(PLATFORM_ARCH_64) |
51 | 48 | # define __NR_process_vm_readv 351 |
52 | 49 | # define __NR_process_vm_writev 352 |
53 | | -# elif OPAL_ASSEMBLY_ARCH == OPAL_ARM |
| 50 | +# elif defined(PLATFORM_ARCH_ARM) |
54 | 51 |
|
55 | 52 | # define __NR_process_vm_readv 376 |
56 | 53 | # define __NR_process_vm_writev 377 |
57 | 54 |
|
58 | | -# elif OPAL_ASSEMBLY_ARCH == OPAL_ARM64 |
| 55 | +# elif defined(PLATFORM_ARCH_AARCH64) |
59 | 56 |
|
60 | 57 | /* ARM64 uses the asm-generic syscall numbers */ |
61 | 58 |
|
|
0 commit comments