Skip to content

Commit

Permalink
deps,uv : try to fix armv8 syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
Shigeki Ohtsu committed Mar 25, 2015
1 parent 4e9bf93 commit c60d978
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions deps/uv/src/unix/linux-syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
# define __NR_accept4 288
# elif defined(__i386__)
/* Nothing. Handled through socketcall(). */
# elif defined(__aarch64__)
# define __NR_accept4 242
# elif defined(__arm__)
# define __NR_accept4 (UV_SYSCALL_BASE + 366)
# endif
Expand All @@ -55,6 +57,8 @@
# define __NR_eventfd 284
# elif defined(__i386__)
# define __NR_eventfd 323
# elif defined(__aarch64__)
# define __NR_eventfd 1044
# elif defined(__arm__)
# define __NR_eventfd (UV_SYSCALL_BASE + 351)
# endif
Expand All @@ -65,6 +69,8 @@
# define __NR_eventfd2 290
# elif defined(__i386__)
# define __NR_eventfd2 328
# elif defined(__aarch64__)
# define __NR_eventfd2 19
# elif defined(__arm__)
# define __NR_eventfd2 (UV_SYSCALL_BASE + 356)
# endif
Expand All @@ -75,6 +81,8 @@
# define __NR_epoll_create 213
# elif defined(__i386__)
# define __NR_epoll_create 254
# elif defined(__aarch64__)
/* __NR_epoll_create 1042 */
# elif defined(__arm__)
# define __NR_epoll_create (UV_SYSCALL_BASE + 250)
# endif
Expand All @@ -85,6 +93,8 @@
# define __NR_epoll_create1 291
# elif defined(__i386__)
# define __NR_epoll_create1 329
# elif defined(__aarch64__)
# define __NR_epoll_create1 20
# elif defined(__arm__)
# define __NR_epoll_create1 (UV_SYSCALL_BASE + 357)
# endif
Expand All @@ -95,6 +105,8 @@
# define __NR_epoll_ctl 233 /* used to be 214 */
# elif defined(__i386__)
# define __NR_epoll_ctl 255
# elif defined(__aarch64__)
# define __NR_epoll_ctl 21
# elif defined(__arm__)
# define __NR_epoll_ctl (UV_SYSCALL_BASE + 251)
# endif
Expand All @@ -103,6 +115,8 @@
#ifndef __NR_epoll_wait
# if defined(__x86_64__)
# define __NR_epoll_wait 232 /* used to be 215 */
# elif defined(__aarch64__)
/* deprecated */
# elif defined(__i386__)
# define __NR_epoll_wait 256
# elif defined(__arm__)
Expand All @@ -115,6 +129,8 @@
# define __NR_epoll_pwait 281
# elif defined(__i386__)
# define __NR_epoll_pwait 319
# elif defined(__aarch64__)
# define __NR_epoll_pwait 22
# elif defined(__arm__)
# define __NR_epoll_pwait (UV_SYSCALL_BASE + 346)
# endif
Expand All @@ -125,6 +141,8 @@
# define __NR_inotify_init 253
# elif defined(__i386__)
# define __NR_inotify_init 291
# elif defined(__aarch64__)
/* define __NR_inotify_init 1043 */
# elif defined(__arm__)
# define __NR_inotify_init (UV_SYSCALL_BASE + 316)
# endif
Expand All @@ -135,6 +153,8 @@
# define __NR_inotify_init1 294
# elif defined(__i386__)
# define __NR_inotify_init1 332
# elif defined(__aarch64__)
# define __NR_inotify_init1 26
# elif defined(__arm__)
# define __NR_inotify_init1 (UV_SYSCALL_BASE + 360)
# endif
Expand All @@ -145,6 +165,8 @@
# define __NR_inotify_add_watch 254
# elif defined(__i386__)
# define __NR_inotify_add_watch 292
# elif defined(__aarch64__)
# define __NR_inotify_add_watch 27
# elif defined(__arm__)
# define __NR_inotify_add_watch (UV_SYSCALL_BASE + 317)
# endif
Expand All @@ -155,6 +177,8 @@
# define __NR_inotify_rm_watch 255
# elif defined(__i386__)
# define __NR_inotify_rm_watch 293
# elif defined(__aarch64__)
# define __NR_inotify_rm_watch 28
# elif defined(__arm__)
# define __NR_inotify_rm_watch (UV_SYSCALL_BASE + 318)
# endif
Expand All @@ -165,6 +189,8 @@
# define __NR_pipe2 293
# elif defined(__i386__)
# define __NR_pipe2 331
# elif defined(__aarch64__)
# define __NR_pipe2 59
# elif defined(__arm__)
# define __NR_pipe2 (UV_SYSCALL_BASE + 359)
# endif
Expand All @@ -175,6 +201,8 @@
# define __NR_recvmmsg 299
# elif defined(__i386__)
# define __NR_recvmmsg 337
# elif defined(__aarch64__)
# define __NR_recvmmsg 212
# elif defined(__arm__)
# define __NR_recvmmsg (UV_SYSCALL_BASE + 365)
# endif
Expand All @@ -185,6 +213,8 @@
# define __NR_sendmmsg 307
# elif defined(__i386__)
# define __NR_sendmmsg 345
# elif defined(__aarch64__)
# define __NR_sendmmsg 211
# elif defined(__arm__)
# define __NR_sendmmsg (UV_SYSCALL_BASE + 374)
# endif
Expand All @@ -195,6 +225,8 @@
# define __NR_utimensat 280
# elif defined(__i386__)
# define __NR_utimensat 320
# elif defined(__aarch64__)
# define __NR_utimensat 88
# elif defined(__arm__)
# define __NR_utimensat (UV_SYSCALL_BASE + 348)
# endif
Expand All @@ -205,6 +237,8 @@
# define __NR_preadv 295
# elif defined(__i386__)
# define __NR_preadv 333
# elif defined(__aarch64__)
# define __NR_preadv 69
# elif defined(__arm__)
# define __NR_preadv (UV_SYSCALL_BASE + 361)
# endif
Expand All @@ -215,6 +249,8 @@
# define __NR_pwritev 296
# elif defined(__i386__)
# define __NR_pwritev 334
# elif defined(__aarch64__)
# define __NR_pwritev 70
# elif defined(__arm__)
# define __NR_pwritev (UV_SYSCALL_BASE + 362)
# endif
Expand All @@ -225,6 +261,8 @@
# define __NR_dup3 292
# elif defined(__i386__)
# define __NR_dup3 330
# elif defined(__aarch64__)
# define __NR_dup3 24
# elif defined(__arm__)
# define __NR_dup3 (UV_SYSCALL_BASE + 358)
# endif
Expand Down Expand Up @@ -281,6 +319,8 @@ int uv__eventfd2(unsigned int count, int flags) {
int uv__epoll_create(int size) {
#if defined(__NR_epoll_create)
return syscall(__NR_epoll_create, size);
#elif defined(__NR_epoll_create1)
return (syscall(__NR_epoll_create1, 0));

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis Mar 25, 2015

I would just let libuv handle the ENOSYS.

This comment has been minimized.

Copy link
@shigeki

shigeki Mar 25, 2015

Owner

These are only tentative fixes for me to look for what's wrong with armv8 tests since I don't have an armv8 host and just tested on an emulated host under qemu. I agree ENOSYS is better and probably this fix should be made in linux-core.c. Do you have an armv8 host to work this?

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis Mar 25, 2015

No, I just use the CI. I've noticed that the armv8 bot isn't in the libuv matrix, only the io.js one.

This comment has been minimized.

Copy link
@shigeki

shigeki Mar 25, 2015

Owner

Okay, I'm waiting @rvagg 's reply.

This comment has been minimized.

Copy link
@rvagg

rvagg Mar 26, 2015

it's in there now, along with some other new options, it'd be nice if the libuv folk could focus on improving test pass quality!

This comment has been minimized.

Copy link
@shigeki

shigeki Mar 26, 2015

Owner

@rvagg Wow, great! Thanks. But build of libuv on armv8 was failed due to errors of missing to find automake and libtoolize. Could you take care of it?

[iojs-armv8-ubuntu1404] $ /bin/sh -xe /tmp/hudson156495996794917064.sh
+ PYTHON=python sh autogen.sh
autogen.sh: 1: autogen.sh: automake: not found
autogen.sh: 33: test: Illegal number: 
autogen.sh: 34: test: Illegal number: 
+ libtoolize
autogen.sh: 43: autogen.sh: libtoolize: not found
Build step 'Conditional steps (multiple)' marked build as failure
Finished: FAILURE
#else
return errno = ENOSYS, -1;
#endif
Expand Down Expand Up @@ -311,6 +351,8 @@ int uv__epoll_wait(int epfd,
int timeout) {
#if defined(__NR_epoll_wait)
return syscall(__NR_epoll_wait, epfd, events, nevents, timeout);
#elif defined(__NR_epoll_pwait)
return (syscall(__NR_epoll_pwait, epfd, events, nevents, timeout, NULL, 0));

This comment has been minimized.

Copy link
@bnoordhuis

bnoordhuis Mar 25, 2015

Ditto.

#else
return errno = ENOSYS, -1;
#endif
Expand Down

0 comments on commit c60d978

Please sign in to comment.