aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-01-19 05:42:49 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-19 05:42:49 -0500
commit2d7d5f05111a9d913131a2764d8b20157f8f758d (patch)
tree792deb7a3b9f72894d16affff1569a15b35e428b /include
parentf7111ceb5266750db2a1d193b98fb6a3d9b5a56a (diff)
[SPARC]: Add support for *at(), ppoll, and pselect syscalls.
This also includes by necessity _TIF_RESTORE_SIGMASK support, which actually resulted in a lot of cleanups. The sparc signal handling code is quite a mess and I should clean it up some day. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc/thread_info.h5
-rw-r--r--include/asm-sparc/unistd.h22
-rw-r--r--include/asm-sparc64/thread_info.h6
-rw-r--r--include/asm-sparc64/unistd.h23
4 files changed, 45 insertions, 11 deletions
diff --git a/include/asm-sparc/thread_info.h b/include/asm-sparc/thread_info.h
index 65f060b040ab..91b9f5888c85 100644
--- a/include/asm-sparc/thread_info.h
+++ b/include/asm-sparc/thread_info.h
@@ -128,9 +128,10 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
128 * thread information flag bit numbers 128 * thread information flag bit numbers
129 */ 129 */
130#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 130#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
131#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ 131/* flag bit 1 is available */
132#define TIF_SIGPENDING 2 /* signal pending */ 132#define TIF_SIGPENDING 2 /* signal pending */
133#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 133#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
134#define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */
134#define TIF_USEDFPU 8 /* FPU was used by this task 135#define TIF_USEDFPU 8 /* FPU was used by this task
135 * this quantum (SMP) */ 136 * this quantum (SMP) */
136#define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling 137#define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling
@@ -139,9 +140,9 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
139 140
140/* as above, but as bit values */ 141/* as above, but as bit values */
141#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 142#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
142#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
143#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 143#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
144#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 144#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
145#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
145#define _TIF_USEDFPU (1<<TIF_USEDFPU) 146#define _TIF_USEDFPU (1<<TIF_USEDFPU)
146#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 147#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
147 148
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index 58dba518239e..2ac64e65e336 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -300,11 +300,26 @@
300#define __NR_add_key 281 300#define __NR_add_key 281
301#define __NR_request_key 282 301#define __NR_request_key 282
302#define __NR_keyctl 283 302#define __NR_keyctl 283
303#define __NR_openat 284
304#define __NR_mkdirat 285
305#define __NR_mknodat 286
306#define __NR_fchownat 287
307#define __NR_futimesat 288
308#define __NR_newfstatat 289
309#define __NR_unlinkat 290
310#define __NR_renameat 291
311#define __NR_linkat 292
312#define __NR_symlinkat 293
313#define __NR_readlinkat 294
314#define __NR_fchmodat 295
315#define __NR_faccessat 296
316#define __NR_pselect6 297
317#define __NR_ppoll 298
303 318
304/* WARNING: You MAY NOT add syscall numbers larger than 283, since 319/* WARNING: You MAY NOT add syscall numbers larger than 298, since
305 * all of the syscall tables in the Sparc kernel are 320 * all of the syscall tables in the Sparc kernel are
306 * sized to have 283 entries (starting at zero). Therefore 321 * sized to have 298 entries (starting at zero). Therefore
307 * find a free slot in the 0-282 range. 322 * find a free slot in the 0-298 range.
308 */ 323 */
309 324
310#define _syscall0(type,name) \ 325#define _syscall0(type,name) \
@@ -458,6 +473,7 @@ return -1; \
458#define __ARCH_WANT_SYS_OLDUMOUNT 473#define __ARCH_WANT_SYS_OLDUMOUNT
459#define __ARCH_WANT_SYS_SIGPENDING 474#define __ARCH_WANT_SYS_SIGPENDING
460#define __ARCH_WANT_SYS_SIGPROCMASK 475#define __ARCH_WANT_SYS_SIGPROCMASK
476#define __ARCH_WANT_SYS_RT_SIGSUSPEND
461#endif 477#endif
462 478
463#ifdef __KERNEL_SYSCALLS__ 479#ifdef __KERNEL_SYSCALLS__
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h
index c94d8b3991bd..ac9d068aab4f 100644
--- a/include/asm-sparc64/thread_info.h
+++ b/include/asm-sparc64/thread_info.h
@@ -221,7 +221,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
221 * nop 221 * nop
222 */ 222 */
223#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 223#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
224#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ 224#define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */
225#define TIF_SIGPENDING 2 /* signal pending */ 225#define TIF_SIGPENDING 2 /* signal pending */
226#define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 226#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
227#define TIF_PERFCTR 4 /* performance counters active */ 227#define TIF_PERFCTR 4 /* performance counters active */
@@ -241,7 +241,6 @@ register struct thread_info *current_thread_info_reg asm("g6");
241#define TIF_POLLING_NRFLAG 14 241#define TIF_POLLING_NRFLAG 14
242 242
243#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 243#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
244#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
245#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 244#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
246#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 245#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
247#define _TIF_PERFCTR (1<<TIF_PERFCTR) 246#define _TIF_PERFCTR (1<<TIF_PERFCTR)
@@ -250,11 +249,12 @@ register struct thread_info *current_thread_info_reg asm("g6");
250#define _TIF_32BIT (1<<TIF_32BIT) 249#define _TIF_32BIT (1<<TIF_32BIT)
251#define _TIF_SECCOMP (1<<TIF_SECCOMP) 250#define _TIF_SECCOMP (1<<TIF_SECCOMP)
252#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 251#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
252#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
253#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) 253#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
254#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 254#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
255 255
256#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ 256#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
257 (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ 257 (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | \
258 _TIF_NEED_RESCHED | _TIF_PERFCTR)) 258 _TIF_NEED_RESCHED | _TIF_PERFCTR))
259 259
260#endif /* __KERNEL__ */ 260#endif /* __KERNEL__ */
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index 51ec2879b881..84ac2bdb0902 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -302,11 +302,26 @@
302#define __NR_add_key 281 302#define __NR_add_key 281
303#define __NR_request_key 282 303#define __NR_request_key 282
304#define __NR_keyctl 283 304#define __NR_keyctl 283
305#define __NR_openat 284
306#define __NR_mkdirat 285
307#define __NR_mknodat 286
308#define __NR_fchownat 287
309#define __NR_futimesat 288
310#define __NR_newfstatat 289
311#define __NR_unlinkat 290
312#define __NR_renameat 291
313#define __NR_linkat 292
314#define __NR_symlinkat 293
315#define __NR_readlinkat 294
316#define __NR_fchmodat 295
317#define __NR_faccessat 296
318#define __NR_pselect6 297
319#define __NR_ppoll 298
305 320
306/* WARNING: You MAY NOT add syscall numbers larger than 283, since 321/* WARNING: You MAY NOT add syscall numbers larger than 298, since
307 * all of the syscall tables in the Sparc kernel are 322 * all of the syscall tables in the Sparc kernel are
308 * sized to have 283 entries (starting at zero). Therefore 323 * sized to have 298 entries (starting at zero). Therefore
309 * find a free slot in the 0-282 range. 324 * find a free slot in the 0-298 range.
310 */ 325 */
311 326
312#define _syscall0(type,name) \ 327#define _syscall0(type,name) \
@@ -501,6 +516,8 @@ asmlinkage long sys_rt_sigaction(int sig,
501#define __ARCH_WANT_SYS_OLDUMOUNT 516#define __ARCH_WANT_SYS_OLDUMOUNT
502#define __ARCH_WANT_SYS_SIGPENDING 517#define __ARCH_WANT_SYS_SIGPENDING
503#define __ARCH_WANT_SYS_SIGPROCMASK 518#define __ARCH_WANT_SYS_SIGPROCMASK
519#define __ARCH_WANT_SYS_RT_SIGSUSPEND
520#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
504#endif 521#endif
505 522
506/* 523/*