aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2012-10-19 13:46:44 -0400
committerChris Zankel <chris@zankel.net>2012-10-19 13:46:44 -0400
commit7216cabfff5149670445cd65d415ed5db21314b4 (patch)
tree5474d3c4722254163f7960b618cdf30b9a9887ce
parent39070cb8a39a84f3379dd8d1dab489e06f3a50a7 (diff)
xtensa: add missing system calls to the syscall table
Add the following system calls to the syscall table: fallocate sendmmsg umount2 syncfs epoll_create1 inotify_init1 signalfd4 dup3 pipe2 timerfd_create timerfd_settime timerfd_gettime eventfd2 preadv pwritev fanotify_init fanotify_mark process_vm_readv process_vm_writev name_to_handle_at open_by_handle_at sync_file_range perf_event_open rt_tgsigqueueinfo clock_adjtime prlimit64 kcmp Note that we have to use the 'sys_sync_file_range2' version, so that the 64-bit arguments are aligned correctly to the argument registers. Signed-off-by: Chris Zankel <chris@zankel.net>
-rw-r--r--arch/xtensa/include/uapi/asm/unistd.h98
1 files changed, 78 insertions, 20 deletions
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h
index a842ed519215..479abaea5aae 100644
--- a/arch/xtensa/include/uapi/asm/unistd.h
+++ b/arch/xtensa/include/uapi/asm/unistd.h
@@ -5,9 +5,12 @@
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details. 6 * for more details.
7 * 7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc. 8 * Copyright (C) 2001 - 2012 Tensilica Inc.
9 */ 9 */
10 10
11#ifndef _UAPI_XTENSA_UNISTD_H
12#define _UAPI_XTENSA_UNISTD_H
13
11#ifndef __SYSCALL 14#ifndef __SYSCALL
12# define __SYSCALL(nr,func,nargs) 15# define __SYSCALL(nr,func,nargs)
13#endif 16#endif
@@ -145,8 +148,8 @@ __SYSCALL( 59, sys_getdents, 3)
145__SYSCALL( 60, sys_getdents64, 3) 148__SYSCALL( 60, sys_getdents64, 3)
146#define __NR_fcntl64 61 149#define __NR_fcntl64 61
147__SYSCALL( 61, sys_fcntl64, 3) 150__SYSCALL( 61, sys_fcntl64, 3)
148#define __NR_available62 62 151#define __NR_fallocate 62
149__SYSCALL( 62, sys_ni_syscall, 0) 152__SYSCALL( 62, sys_fallocate, 6)
150#define __NR_fadvise64_64 63 153#define __NR_fadvise64_64 63
151__SYSCALL( 63, xtensa_fadvise64_64, 6) 154__SYSCALL( 63, xtensa_fadvise64_64, 6)
152#define __NR_utime 64 /* glibc 2.3.3 ?? */ 155#define __NR_utime 64 /* glibc 2.3.3 ?? */
@@ -261,8 +264,8 @@ __SYSCALL(112, sys_socketpair, 4)
261__SYSCALL(113, sys_sendfile, 4) 264__SYSCALL(113, sys_sendfile, 4)
262#define __NR_sendfile64 114 265#define __NR_sendfile64 114
263__SYSCALL(114, sys_sendfile64, 4) 266__SYSCALL(114, sys_sendfile64, 4)
264#define __NR_available115 115 267#define __NR_sendmmsg 115
265__SYSCALL(115, sys_ni_syscall, 0) 268__SYSCALL(115, sys_sendmmsg, 4)
266 269
267/* Process Operations */ 270/* Process Operations */
268 271
@@ -377,11 +380,11 @@ __SYSCALL(168, sys_msgrcv, 4)
377__SYSCALL(169, sys_msgctl, 4) 380__SYSCALL(169, sys_msgctl, 4)
378#define __NR_available170 170 381#define __NR_available170 170
379__SYSCALL(170, sys_ni_syscall, 0) 382__SYSCALL(170, sys_ni_syscall, 0)
380#define __NR_available171 171
381__SYSCALL(171, sys_ni_syscall, 0)
382 383
383/* File System */ 384/* File System */
384 385
386#define __NR_umount2 171
387__SYSCALL(171, sys_umount, 2)
385#define __NR_mount 172 388#define __NR_mount 172
386__SYSCALL(172, sys_mount, 5) 389__SYSCALL(172, sys_mount, 5)
387#define __NR_swapon 173 390#define __NR_swapon 173
@@ -396,8 +399,8 @@ __SYSCALL(176, sys_umount, 2)
396__SYSCALL(177, sys_swapoff, 1) 399__SYSCALL(177, sys_swapoff, 1)
397#define __NR_sync 178 400#define __NR_sync 178
398__SYSCALL(178, sys_sync, 0) 401__SYSCALL(178, sys_sync, 0)
399#define __NR_available179 179 402#define __NR_syncfs 179
400__SYSCALL(179, sys_ni_syscall, 0) 403__SYSCALL(179, sys_syncfs, 1)
401#define __NR_setfsuid 180 404#define __NR_setfsuid 180
402__SYSCALL(180, sys_setfsuid, 1) 405__SYSCALL(180, sys_setfsuid, 1)
403#define __NR_setfsgid 181 406#define __NR_setfsgid 181
@@ -452,7 +455,7 @@ __SYSCALL(203, sys_reboot, 3)
452#define __NR_quotactl 204 455#define __NR_quotactl 204
453__SYSCALL(204, sys_quotactl, 4) 456__SYSCALL(204, sys_quotactl, 4)
454#define __NR_nfsservctl 205 457#define __NR_nfsservctl 205
455__SYSCALL(205, sys_ni_syscall, 0) 458__SYSCALL(205, sys_ni_syscall, 0) /* old nfsservctl */
456#define __NR__sysctl 206 459#define __NR__sysctl 206
457__SYSCALL(206, sys_sysctl, 1) 460__SYSCALL(206, sys_sysctl, 1)
458#define __NR_bdflush 207 461#define __NR_bdflush 207
@@ -559,7 +562,7 @@ __SYSCALL(252, sys_timer_getoverrun, 1)
559 562
560/* System */ 563/* System */
561 564
562#define __NR_reserved244 253 565#define __NR_reserved253 253
563__SYSCALL(253, sys_ni_syscall, 0) 566__SYSCALL(253, sys_ni_syscall, 0)
564#define __NR_lookup_dcookie 254 567#define __NR_lookup_dcookie 254
565__SYSCALL(254, sys_lookup_dcookie, 4) 568__SYSCALL(254, sys_lookup_dcookie, 4)
@@ -606,8 +609,8 @@ __SYSCALL(272, sys_pselect6, 0)
606__SYSCALL(273, sys_ppoll, 0) 609__SYSCALL(273, sys_ppoll, 0)
607#define __NR_epoll_pwait 274 610#define __NR_epoll_pwait 274
608__SYSCALL(274, sys_epoll_pwait, 0) 611__SYSCALL(274, sys_epoll_pwait, 0)
609#define __NR_available275 275 612#define __NR_epoll_create1 275
610__SYSCALL(275, sys_ni_syscall, 0) 613__SYSCALL(275, sys_epoll_create1, 1)
611 614
612#define __NR_inotify_init 276 615#define __NR_inotify_init 276
613__SYSCALL(276, sys_inotify_init, 0) 616__SYSCALL(276, sys_inotify_init, 0)
@@ -615,8 +618,8 @@ __SYSCALL(276, sys_inotify_init, 0)
615__SYSCALL(277, sys_inotify_add_watch, 3) 618__SYSCALL(277, sys_inotify_add_watch, 3)
616#define __NR_inotify_rm_watch 278 619#define __NR_inotify_rm_watch 278
617__SYSCALL(278, sys_inotify_rm_watch, 2) 620__SYSCALL(278, sys_inotify_rm_watch, 2)
618#define __NR_available279 279 621#define __NR_inotify_init1 279
619__SYSCALL(279, sys_ni_syscall, 0) 622__SYSCALL(279, sys_inotify_init1, 1)
620 623
621#define __NR_getcpu 280 624#define __NR_getcpu 280
622__SYSCALL(280, sys_getcpu, 0) 625__SYSCALL(280, sys_getcpu, 0)
@@ -632,10 +635,10 @@ __SYSCALL(283, sys_ioprio_get, 3)
632__SYSCALL(284, sys_set_robust_list, 3) 635__SYSCALL(284, sys_set_robust_list, 3)
633#define __NR_get_robust_list 285 636#define __NR_get_robust_list 285
634__SYSCALL(285, sys_get_robust_list, 3) 637__SYSCALL(285, sys_get_robust_list, 3)
635#define __NR_reserved286 286 /* sync_file_rangeX */ 638#define __NR_available286 286
636__SYSCALL(286, sys_ni_syscall, 3) 639__SYSCALL(286, sys_ni_syscall, 0)
637#define __NR_available287 287 640#define __NR_available287 287
638__SYSCALL(287, sys_faccessat, 0) 641__SYSCALL(287, sys_ni_syscall, 0)
639 642
640/* Relative File Operations */ 643/* Relative File Operations */
641 644
@@ -680,10 +683,63 @@ __SYSCALL(305, sys_ni_syscall, 0)
680__SYSCALL(306, sys_eventfd, 1) 683__SYSCALL(306, sys_eventfd, 1)
681#define __NR_recvmmsg 307 684#define __NR_recvmmsg 307
682__SYSCALL(307, sys_recvmmsg, 5) 685__SYSCALL(307, sys_recvmmsg, 5)
686
683#define __NR_setns 308 687#define __NR_setns 308
684__SYSCALL(308, sys_setns, 2) 688__SYSCALL(308, sys_setns, 2)
685 689#define __NR_signalfd4 309
686#define __NR_syscall_count 309 690__SYSCALL(309, sys_signalfd4, 4)
691#define __NR_dup3 310
692__SYSCALL(310, sys_dup3, 3)
693#define __NR_pipe2 311
694__SYSCALL(311, sys_pipe2, 2)
695
696#define __NR_timerfd_create 312
697__SYSCALL(312, sys_timerfd_create, 2)
698#define __NR_timerfd_settime 313
699__SYSCALL(313, sys_timerfd_settime, 4)
700#define __NR_timerfd_gettime 314
701__SYSCALL(314, sys_timerfd_gettime, 2)
702#define __NR_available315 315
703__SYSCALL(315, sys_ni_syscall, 0)
704
705#define __NR_eventfd2 316
706__SYSCALL(316, sys_eventfd2, 2)
707#define __NR_preadv 317
708__SYSCALL(317, sys_preadv, 5)
709#define __NR_pwritev 318
710__SYSCALL(318, sys_pwritev, 5)
711#define __NR_available319 319
712__SYSCALL(319, sys_ni_syscall, 0)
713
714#define __NR_fanotify_init 320
715__SYSCALL(320, sys_fanotify_init, 2)
716#define __NR_fanotify_mark 321
717__SYSCALL(321, sys_fanotify_mark, 6)
718#define __NR_process_vm_readv 322
719__SYSCALL(322, sys_process_vm_readv, 6)
720#define __NR_process_vm_writev 323
721__SYSCALL(323, sys_process_vm_writev, 6)
722
723#define __NR_name_to_handle_at 324
724__SYSCALL(324, sys_name_to_handle_at, 5)
725#define __NR_open_by_handle_at 325
726__SYSCALL(325, sys_open_by_handle_at, 3)
727#define __NR_sync_file_range 326
728__SYSCALL(326, sys_sync_file_range2, 6)
729#define __NR_perf_event_open 327
730__SYSCALL(327, sys_perf_event_open, 5)
731
732#define __NR_rt_tgsigqueueinfo 328
733__SYSCALL(328, sys_rt_tgsigqueueinfo, 4)
734#define __NR_clock_adjtime 329
735__SYSCALL(329, sys_clock_adjtime, 2)
736#define __NR_prlimit64 330
737__SYSCALL(330, sys_prlimit64, 4)
738#define __NR_kcmp 331
739__SYSCALL(331, sys_kcmp, 5)
740
741
742#define __NR_syscall_count 332
687 743
688/* 744/*
689 * sysxtensa syscall handler 745 * sysxtensa syscall handler
@@ -702,3 +758,5 @@ __SYSCALL(308, sys_setns, 2)
702#define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */ 758#define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */
703 759
704#define SYS_XTENSA_COUNT 5 /* count */ 760#define SYS_XTENSA_COUNT 5 /* count */
761
762#endif /* _UAPI_XTENSA_UNISTD_H */