diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2019-05-20 13:14:56 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-05-20 06:33:43 -0600 |
commit | 375bed76ba7292122f828fbf49c2b530506fdce8 (patch) | |
tree | a6b98e5b2672a1f914e906f91c321215b3d55f61 | |
parent | 329ba3d4b5bd210e8dada2ada323d3f417d8927d (diff) |
syscall: add support of non-x86 architectures
Fortunately, all architectures except alpha have common numbers
for new system calls nowadays, so support of non-alpha architectures
is as simple as support of x86.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | src/syscall.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/syscall.c b/src/syscall.c index 51cfb0f..2904153 100644 --- a/src/syscall.c +++ b/src/syscall.c @@ -8,18 +8,30 @@ #include "compat.h" #include "io_uring.h" -#if defined(__x86_64) || defined(__i386__) -#ifndef __NR_io_uring_setup -#define __NR_io_uring_setup 425 -#endif -#ifndef __NR_io_uring_enter -#define __NR_io_uring_enter 426 -#endif -#ifndef __NR_io_uring_register -#define __NR_io_uring_register 427 -#endif -#else -#error "Arch not supported yet" +#ifdef __alpha__ +/* + * alpha is the only exception, all other architectures + * have common numbers for new system calls. + */ +# ifndef __NR_io_uring_setup +# define __NR_io_uring_setup 535 +# endif +# ifndef __NR_io_uring_enter +# define __NR_io_uring_enter 536 +# endif +# ifndef __NR_io_uring_register +# define __NR_io_uring_register 537 +# endif +#else /* !__alpha__ */ +# ifndef __NR_io_uring_setup +# define __NR_io_uring_setup 425 +# endif +# ifndef __NR_io_uring_enter +# define __NR_io_uring_enter 426 +# endif +# ifndef __NR_io_uring_register +# define __NR_io_uring_register 427 +# endif #endif int io_uring_register(int fd, unsigned int opcode, void *arg, |