Skip to content

Commit

Permalink
linux: add hardwired fallback for syscall numbers on aarch64
Browse files Browse the repository at this point in the history
aarch64 uses generic syscall numbers.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Apr 16, 2018
1 parent a9182ed commit 2742199
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hwloc/topology-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ struct hwloc_linux_backend_data_s {
# define __NR_mbind 259
# elif defined(__sparc__)
# define __NR_mbind 353
# elif defined(__aarch64__)
# define __NR_mbind 235
# endif
#endif
static __hwloc_inline long hwloc_mbind(void *addr __hwloc_attribute_unused,
Expand Down Expand Up @@ -208,6 +210,8 @@ static __hwloc_inline long hwloc_mbind(void *addr __hwloc_attribute_unused,
# define __NR_set_mempolicy 261
# elif defined(__sparc__)
# define __NR_set_mempolicy 305
# elif defined(__aarch64__)
# define __NR_set_mempolicy 237
# endif
#endif
static __hwloc_inline long hwloc_set_mempolicy(int mode __hwloc_attribute_unused,
Expand All @@ -234,6 +238,8 @@ static __hwloc_inline long hwloc_set_mempolicy(int mode __hwloc_attribute_unused
# define __NR_get_mempolicy 260
# elif defined(__sparc__)
# define __NR_get_mempolicy 304
# elif defined(__aarch64__)
# define __NR_get_mempolicy 236
# endif
#endif
static __hwloc_inline long hwloc_get_mempolicy(int *mode __hwloc_attribute_unused,
Expand Down Expand Up @@ -262,6 +268,8 @@ static __hwloc_inline long hwloc_get_mempolicy(int *mode __hwloc_attribute_unuse
# define __NR_migrate_pages 258
# elif defined(__sparc__)
# define __NR_migrate_pages 302
# elif defined(__aarch64__)
# define __NR_migrate_pages 238
# endif
#endif
static __hwloc_inline long hwloc_migrate_pages(int pid __hwloc_attribute_unused,
Expand Down Expand Up @@ -289,6 +297,8 @@ static __hwloc_inline long hwloc_migrate_pages(int pid __hwloc_attribute_unused,
# define __NR_move_pages 301
# elif defined(__sparc__)
# define __NR_move_pages 307
# elif defined(__aarch64__)
# define __NR_move_pages 239
# endif
#endif
static __hwloc_inline long hwloc_move_pages(int pid __hwloc_attribute_unused,
Expand Down

0 comments on commit 2742199

Please sign in to comment.