aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2006-04-28 20:51:47 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-04-28 20:51:47 -0400
commit56142536868a2be34f261ed8fdca1610f8a73fbd (patch)
tree0bd66166b318d8403b1881285f6813ece2acced1 /include
parent34c278d3913a15b64943e8c40a16b4f732cc7c59 (diff)
Remove unneeded _syscallX macros from user view in asm-*/unistd.h
These aren't needed by glibc or klibc, and they're broken in some cases anyway. The uClibc folks are apparently switching over to stop using them too (now that we agreed that they should be dropped, at least). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/unistd.h7
-rw-r--r--include/asm-arm/unistd.h10
-rw-r--r--include/asm-arm26/unistd.h10
-rw-r--r--include/asm-cris/unistd.h9
-rw-r--r--include/asm-frv/unistd.h7
-rw-r--r--include/asm-h8300/unistd.h7
-rw-r--r--include/asm-i386/unistd.h7
-rw-r--r--include/asm-m32r/unistd.h5
-rw-r--r--include/asm-m68k/unistd.h7
-rw-r--r--include/asm-m68knommu/unistd.h7
-rw-r--r--include/asm-mips/unistd.h6
-rw-r--r--include/asm-parisc/unistd.h4
-rw-r--r--include/asm-powerpc/unistd.h7
-rw-r--r--include/asm-s390/unistd.h7
-rw-r--r--include/asm-sh/unistd.h7
-rw-r--r--include/asm-sh64/unistd.h7
-rw-r--r--include/asm-sparc/unistd.h4
-rw-r--r--include/asm-sparc64/unistd.h4
-rw-r--r--include/asm-v850/unistd.h12
-rw-r--r--include/asm-x86_64/unistd.h7
-rw-r--r--include/asm-xtensa/unistd.h21
21 files changed, 76 insertions, 86 deletions
diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h
index ef25b6585119..bc6e6a9259dc 100644
--- a/include/asm-alpha/unistd.h
+++ b/include/asm-alpha/unistd.h
@@ -383,6 +383,8 @@
383#define __NR_inotify_add_watch 445 383#define __NR_inotify_add_watch 445
384#define __NR_inotify_rm_watch 446 384#define __NR_inotify_rm_watch 446
385 385
386#ifdef __KERNEL__
387
386#define NR_SYSCALLS 447 388#define NR_SYSCALLS 447
387 389
388#if defined(__GNUC__) 390#if defined(__GNUC__)
@@ -565,9 +567,8 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6)\
565 _syscall_return(type); \ 567 _syscall_return(type); \
566} 568}
567 569
568#endif /* __LIBRARY__ && __GNUC__ */ 570#endif /* __GNUC__ */
569 571
570#ifdef __KERNEL__
571#define __ARCH_WANT_IPC_PARSE_VERSION 572#define __ARCH_WANT_IPC_PARSE_VERSION
572#define __ARCH_WANT_OLD_READDIR 573#define __ARCH_WANT_OLD_READDIR
573#define __ARCH_WANT_STAT64 574#define __ARCH_WANT_STAT64
@@ -578,7 +579,6 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6)\
578#define __ARCH_WANT_SYS_OLD_GETRLIMIT 579#define __ARCH_WANT_SYS_OLD_GETRLIMIT
579#define __ARCH_WANT_SYS_OLDUMOUNT 580#define __ARCH_WANT_SYS_OLDUMOUNT
580#define __ARCH_WANT_SYS_SIGPENDING 581#define __ARCH_WANT_SYS_SIGPENDING
581#endif
582 582
583#ifdef __KERNEL_SYSCALLS__ 583#ifdef __KERNEL_SYSCALLS__
584 584
@@ -661,4 +661,5 @@ asmlinkage long sys_rt_sigaction(int sig,
661 661
662#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") 662#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall")
663 663
664#endif /* __KERNEL__ */
664#endif /* _ALPHA_UNISTD_H */ 665#endif /* _ALPHA_UNISTD_H */
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index ee8dfea549bc..a5896d94e1ad 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -13,8 +13,6 @@
13#ifndef __ASM_ARM_UNISTD_H 13#ifndef __ASM_ARM_UNISTD_H
14#define __ASM_ARM_UNISTD_H 14#define __ASM_ARM_UNISTD_H
15 15
16#include <linux/linkage.h>
17
18#define __NR_OABI_SYSCALL_BASE 0x900000 16#define __NR_OABI_SYSCALL_BASE 0x900000
19 17
20#if defined(__thumb__) || defined(__ARM_EABI__) 18#if defined(__thumb__) || defined(__ARM_EABI__)
@@ -378,6 +376,9 @@
378#undef __NR_ipc 376#undef __NR_ipc
379#endif 377#endif
380 378
379#ifdef __KERNEL__
380#include <linux/linkage.h>
381
381#define __sys2(x) #x 382#define __sys2(x) #x
382#define __sys1(x) __sys2(x) 383#define __sys1(x) __sys2(x)
383 384
@@ -519,7 +520,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
519 __syscall_return(type,__res); \ 520 __syscall_return(type,__res); \
520} 521}
521 522
522#ifdef __KERNEL__
523#define __ARCH_WANT_IPC_PARSE_VERSION 523#define __ARCH_WANT_IPC_PARSE_VERSION
524#define __ARCH_WANT_STAT64 524#define __ARCH_WANT_STAT64
525#define __ARCH_WANT_SYS_GETHOSTNAME 525#define __ARCH_WANT_SYS_GETHOSTNAME
@@ -540,7 +540,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
540#define __ARCH_WANT_OLD_READDIR 540#define __ARCH_WANT_OLD_READDIR
541#define __ARCH_WANT_SYS_SOCKETCALL 541#define __ARCH_WANT_SYS_SOCKETCALL
542#endif 542#endif
543#endif
544 543
545#ifdef __KERNEL_SYSCALLS__ 544#ifdef __KERNEL_SYSCALLS__
546 545
@@ -564,7 +563,7 @@ asmlinkage long sys_rt_sigaction(int sig,
564 struct sigaction __user *oact, 563 struct sigaction __user *oact,
565 size_t sigsetsize); 564 size_t sigsetsize);
566 565
567#endif 566#endif /* __KERNEL_SYSCALLS__ */
568 567
569/* 568/*
570 * "Conditional" syscalls 569 * "Conditional" syscalls
@@ -574,4 +573,5 @@ asmlinkage long sys_rt_sigaction(int sig,
574 */ 573 */
575#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 574#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
576 575
576#endif /* __KERNEL__ */
577#endif /* __ASM_ARM_UNISTD_H */ 577#endif /* __ASM_ARM_UNISTD_H */
diff --git a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h
index be4c2fb9c049..70eb6d91cfd0 100644
--- a/include/asm-arm26/unistd.h
+++ b/include/asm-arm26/unistd.h
@@ -14,8 +14,6 @@
14#ifndef __ASM_ARM_UNISTD_H 14#ifndef __ASM_ARM_UNISTD_H
15#define __ASM_ARM_UNISTD_H 15#define __ASM_ARM_UNISTD_H
16 16
17#include <linux/linkage.h>
18
19#define __NR_SYSCALL_BASE 0x900000 17#define __NR_SYSCALL_BASE 0x900000
20 18
21/* 19/*
@@ -312,6 +310,9 @@
312#define __ARM_NR_cacheflush (__ARM_NR_BASE+2) 310#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
313#define __ARM_NR_usr26 (__ARM_NR_BASE+3) 311#define __ARM_NR_usr26 (__ARM_NR_BASE+3)
314 312
313#ifdef __KERNEL__
314#include <linux/linkage.h>
315
315#define __sys2(x) #x 316#define __sys2(x) #x
316#define __sys1(x) __sys2(x) 317#define __sys1(x) __sys2(x)
317 318
@@ -443,7 +444,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
443 __syscall_return(type,__res); \ 444 __syscall_return(type,__res); \
444} 445}
445 446
446#ifdef __KERNEL__
447#define __ARCH_WANT_IPC_PARSE_VERSION 447#define __ARCH_WANT_IPC_PARSE_VERSION
448#define __ARCH_WANT_OLD_READDIR 448#define __ARCH_WANT_OLD_READDIR
449#define __ARCH_WANT_STAT64 449#define __ARCH_WANT_STAT64
@@ -462,7 +462,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
462#define __ARCH_WANT_SYS_SIGPENDING 462#define __ARCH_WANT_SYS_SIGPENDING
463#define __ARCH_WANT_SYS_SIGPROCMASK 463#define __ARCH_WANT_SYS_SIGPROCMASK
464#define __ARCH_WANT_SYS_RT_SIGACTION 464#define __ARCH_WANT_SYS_RT_SIGACTION
465#endif
466 465
467#ifdef __KERNEL_SYSCALLS__ 466#ifdef __KERNEL_SYSCALLS__
468 467
@@ -486,7 +485,7 @@ asmlinkage long sys_rt_sigaction(int sig,
486 struct sigaction __user *oact, 485 struct sigaction __user *oact,
487 size_t sigsetsize); 486 size_t sigsetsize);
488 487
489#endif 488#endif /* __KERNEL_SYSCALLS__ */
490 489
491/* 490/*
492 * "Conditional" syscalls 491 * "Conditional" syscalls
@@ -496,4 +495,5 @@ asmlinkage long sys_rt_sigaction(int sig,
496 */ 495 */
497#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 496#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
498 497
498#endif /* __KERNEL__ */
499#endif /* __ASM_ARM_UNISTD_H */ 499#endif /* __ASM_ARM_UNISTD_H */
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index bb2dfe480213..c2954e90aa24 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -295,11 +295,11 @@
295#define __NR_request_key 287 295#define __NR_request_key 287
296#define __NR_keyctl 288 296#define __NR_keyctl 288
297 297
298#define NR_syscalls 289 298#ifdef __KERNEL__
299 299
300#define NR_syscalls 289
300 301
301 302
302#ifdef __KERNEL__
303#define __ARCH_WANT_IPC_PARSE_VERSION 303#define __ARCH_WANT_IPC_PARSE_VERSION
304#define __ARCH_WANT_OLD_READDIR 304#define __ARCH_WANT_OLD_READDIR
305#define __ARCH_WANT_OLD_STAT 305#define __ARCH_WANT_OLD_STAT
@@ -379,12 +379,10 @@ asmlinkage long sys_rt_sigaction(int sig,
379 * complaints. We don't want to use -fno-builtin, so just use a 379 * complaints. We don't want to use -fno-builtin, so just use a
380 * different name when in the kernel. 380 * different name when in the kernel.
381 */ 381 */
382#ifdef __KERNEL__
383#define _exit kernel_syscall_exit 382#define _exit kernel_syscall_exit
384#endif
385static inline _syscall1(int,_exit,int,exitcode) 383static inline _syscall1(int,_exit,int,exitcode)
386static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) 384static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
387#endif 385#endif /* __KERNEL_SYSCALLS__ */
388 386
389 387
390/* 388/*
@@ -395,4 +393,5 @@ static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
395 */ 393 */
396#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 394#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
397 395
396#endif /* __KERNEL__ */
398#endif /* _ASM_CRIS_UNISTD_H_ */ 397#endif /* _ASM_CRIS_UNISTD_H_ */
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
index 2662a3e12dc4..7c2e712c3b73 100644
--- a/include/asm-frv/unistd.h
+++ b/include/asm-frv/unistd.h
@@ -317,6 +317,8 @@
317#define __NR_pselect6 308 317#define __NR_pselect6 308
318#define __NR_ppoll 309 318#define __NR_ppoll 309
319 319
320#ifdef __KERNEL__
321
320#define NR_syscalls 310 322#define NR_syscalls 310
321 323
322/* 324/*
@@ -477,9 +479,8 @@ static inline pid_t wait(int * wait_stat)
477 return waitpid(-1,wait_stat,0); 479 return waitpid(-1,wait_stat,0);
478} 480}
479 481
480#endif 482#endif /* __KERNEL_SYSCALLS__ */
481 483
482#ifdef __KERNEL__
483#define __ARCH_WANT_IPC_PARSE_VERSION 484#define __ARCH_WANT_IPC_PARSE_VERSION
484/* #define __ARCH_WANT_OLD_READDIR */ 485/* #define __ARCH_WANT_OLD_READDIR */
485#define __ARCH_WANT_OLD_STAT 486#define __ARCH_WANT_OLD_STAT
@@ -503,7 +504,6 @@ static inline pid_t wait(int * wait_stat)
503#define __ARCH_WANT_SYS_SIGPROCMASK 504#define __ARCH_WANT_SYS_SIGPROCMASK
504#define __ARCH_WANT_SYS_RT_SIGACTION 505#define __ARCH_WANT_SYS_RT_SIGACTION
505#define __ARCH_WANT_SYS_RT_SIGSUSPEND 506#define __ARCH_WANT_SYS_RT_SIGSUSPEND
506#endif
507 507
508/* 508/*
509 * "Conditional" syscalls 509 * "Conditional" syscalls
@@ -515,4 +515,5 @@ static inline pid_t wait(int * wait_stat)
515#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 515#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
516#endif 516#endif
517 517
518#endif /* __KERNEL__ */
518#endif /* _ASM_UNISTD_H_ */ 519#endif /* _ASM_UNISTD_H_ */
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h
index adb05159379b..226dd596c2da 100644
--- a/include/asm-h8300/unistd.h
+++ b/include/asm-h8300/unistd.h
@@ -292,6 +292,8 @@
292#define __NR_request_key 287 292#define __NR_request_key 287
293#define __NR_keyctl 288 293#define __NR_keyctl 288
294 294
295#ifdef __KERNEL__
296
295#define NR_syscalls 289 297#define NR_syscalls 289
296 298
297 299
@@ -460,7 +462,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \
460 __syscall_return(type, __res); \ 462 __syscall_return(type, __res); \
461} 463}
462 464
463#ifdef __KERNEL__
464#define __ARCH_WANT_IPC_PARSE_VERSION 465#define __ARCH_WANT_IPC_PARSE_VERSION
465#define __ARCH_WANT_OLD_READDIR 466#define __ARCH_WANT_OLD_READDIR
466#define __ARCH_WANT_OLD_STAT 467#define __ARCH_WANT_OLD_STAT
@@ -483,7 +484,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \
483#define __ARCH_WANT_SYS_SIGPENDING 484#define __ARCH_WANT_SYS_SIGPENDING
484#define __ARCH_WANT_SYS_SIGPROCMASK 485#define __ARCH_WANT_SYS_SIGPROCMASK
485#define __ARCH_WANT_SYS_RT_SIGACTION 486#define __ARCH_WANT_SYS_RT_SIGACTION
486#endif
487 487
488#ifdef __KERNEL_SYSCALLS__ 488#ifdef __KERNEL_SYSCALLS__
489 489
@@ -534,7 +534,7 @@ asmlinkage long sys_rt_sigaction(int sig,
534 struct sigaction __user *oact, 534 struct sigaction __user *oact,
535 size_t sigsetsize); 535 size_t sigsetsize);
536 536
537#endif 537#endif /* __KERNEL_SYSCALLS__ */
538 538
539/* 539/*
540 * "Conditional" syscalls 540 * "Conditional" syscalls
@@ -543,4 +543,5 @@ asmlinkage long sys_rt_sigaction(int sig,
543 asm (".weak\t_" #name "\n" \ 543 asm (".weak\t_" #name "\n" \
544 ".set\t_" #name ",_sys_ni_syscall"); 544 ".set\t_" #name ",_sys_ni_syscall");
545 545
546#endif /* __KERNEL__ */
546#endif /* _ASM_H8300_UNISTD_H_ */ 547#endif /* _ASM_H8300_UNISTD_H_ */
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index eb4b152c82fc..de2ccc149e34 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -323,6 +323,8 @@
323#define __NR_tee 315 323#define __NR_tee 315
324#define __NR_vmsplice 316 324#define __NR_vmsplice 316
325 325
326#ifdef __KERNEL__
327
326#define NR_syscalls 317 328#define NR_syscalls 317
327 329
328/* 330/*
@@ -422,7 +424,6 @@ __asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \
422__syscall_return(type,__res); \ 424__syscall_return(type,__res); \
423} 425}
424 426
425#ifdef __KERNEL__
426#define __ARCH_WANT_IPC_PARSE_VERSION 427#define __ARCH_WANT_IPC_PARSE_VERSION
427#define __ARCH_WANT_OLD_READDIR 428#define __ARCH_WANT_OLD_READDIR
428#define __ARCH_WANT_OLD_STAT 429#define __ARCH_WANT_OLD_STAT
@@ -446,7 +447,6 @@ __syscall_return(type,__res); \
446#define __ARCH_WANT_SYS_SIGPROCMASK 447#define __ARCH_WANT_SYS_SIGPROCMASK
447#define __ARCH_WANT_SYS_RT_SIGACTION 448#define __ARCH_WANT_SYS_RT_SIGACTION
448#define __ARCH_WANT_SYS_RT_SIGSUSPEND 449#define __ARCH_WANT_SYS_RT_SIGSUSPEND
449#endif
450 450
451#ifdef __KERNEL_SYSCALLS__ 451#ifdef __KERNEL_SYSCALLS__
452 452
@@ -485,7 +485,7 @@ asmlinkage long sys_rt_sigaction(int sig,
485 struct sigaction __user *oact, 485 struct sigaction __user *oact,
486 size_t sigsetsize); 486 size_t sigsetsize);
487 487
488#endif 488#endif /* __KERNEL_SYSCALLS__ */
489 489
490/* 490/*
491 * "Conditional" syscalls 491 * "Conditional" syscalls
@@ -497,4 +497,5 @@ asmlinkage long sys_rt_sigaction(int sig,
497#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 497#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
498#endif 498#endif
499 499
500#endif /* __KERNEL__ */
500#endif /* _ASM_I386_UNISTD_H_ */ 501#endif /* _ASM_I386_UNISTD_H_ */
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h
index be0eb014c3b0..cc31790d8077 100644
--- a/include/asm-m32r/unistd.h
+++ b/include/asm-m32r/unistd.h
@@ -295,6 +295,8 @@
295#define __NR_kexec_load 283 295#define __NR_kexec_load 283
296#define __NR_waitid 284 296#define __NR_waitid 284
297 297
298#ifdef __KERNEL__
299
298#define NR_syscalls 285 300#define NR_syscalls 285
299 301
300/* user-visible error numbers are in the range -1 - -124: see 302/* user-visible error numbers are in the range -1 - -124: see
@@ -405,7 +407,6 @@ __asm__ __volatile__ (\
405__syscall_return(type,__res); \ 407__syscall_return(type,__res); \
406} 408}
407 409
408#ifdef __KERNEL__
409#define __ARCH_WANT_IPC_PARSE_VERSION 410#define __ARCH_WANT_IPC_PARSE_VERSION
410#define __ARCH_WANT_STAT64 411#define __ARCH_WANT_STAT64
411#define __ARCH_WANT_SYS_ALARM 412#define __ARCH_WANT_SYS_ALARM
@@ -421,7 +422,6 @@ __syscall_return(type,__res); \
421#define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/ 422#define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/
422#define __ARCH_WANT_SYS_OLDUMOUNT 423#define __ARCH_WANT_SYS_OLDUMOUNT
423#define __ARCH_WANT_SYS_RT_SIGACTION 424#define __ARCH_WANT_SYS_RT_SIGACTION
424#endif
425 425
426#ifdef __KERNEL_SYSCALLS__ 426#ifdef __KERNEL_SYSCALLS__
427 427
@@ -470,4 +470,5 @@ asmlinkage long sys_rt_sigaction(int sig,
470#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 470#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
471#endif 471#endif
472 472
473#endif /* __KERNEL__ */
473#endif /* _ASM_M32R_UNISTD_H */ 474#endif /* _ASM_M32R_UNISTD_H */
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index c2554bcd1747..f236fe92156f 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -285,6 +285,8 @@
285#define __NR_request_key 280 285#define __NR_request_key 280
286#define __NR_keyctl 281 286#define __NR_keyctl 281
287 287
288#ifdef __KERNEL__
289
288#define NR_syscalls 282 290#define NR_syscalls 282
289 291
290/* user-visible error numbers are in the range -1 - -124: see 292/* user-visible error numbers are in the range -1 - -124: see
@@ -383,7 +385,6 @@ __asm__ __volatile__ ("trap #0" \
383__syscall_return(type,__res); \ 385__syscall_return(type,__res); \
384} 386}
385 387
386#ifdef __KERNEL__
387#define __ARCH_WANT_IPC_PARSE_VERSION 388#define __ARCH_WANT_IPC_PARSE_VERSION
388#define __ARCH_WANT_OLD_READDIR 389#define __ARCH_WANT_OLD_READDIR
389#define __ARCH_WANT_OLD_STAT 390#define __ARCH_WANT_OLD_STAT
@@ -406,7 +407,6 @@ __syscall_return(type,__res); \
406#define __ARCH_WANT_SYS_SIGPENDING 407#define __ARCH_WANT_SYS_SIGPENDING
407#define __ARCH_WANT_SYS_SIGPROCMASK 408#define __ARCH_WANT_SYS_SIGPROCMASK
408#define __ARCH_WANT_SYS_RT_SIGACTION 409#define __ARCH_WANT_SYS_RT_SIGACTION
409#endif
410 410
411#ifdef __KERNEL_SYSCALLS__ 411#ifdef __KERNEL_SYSCALLS__
412 412
@@ -451,7 +451,7 @@ asmlinkage long sys_rt_sigaction(int sig,
451 struct sigaction __user *oact, 451 struct sigaction __user *oact,
452 size_t sigsetsize); 452 size_t sigsetsize);
453 453
454#endif 454#endif /* __KERNEL_SYSCALLS__ */
455 455
456/* 456/*
457 * "Conditional" syscalls 457 * "Conditional" syscalls
@@ -461,4 +461,5 @@ asmlinkage long sys_rt_sigaction(int sig,
461 */ 461 */
462#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 462#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
463 463
464#endif /* __KERNEL__ */
464#endif /* _ASM_M68K_UNISTD_H_ */ 465#endif /* _ASM_M68K_UNISTD_H_ */
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h
index 5373988a7e51..1b2abdf281e1 100644
--- a/include/asm-m68knommu/unistd.h
+++ b/include/asm-m68knommu/unistd.h
@@ -286,6 +286,8 @@
286#define __NR_request_key 280 286#define __NR_request_key 280
287#define __NR_keyctl 281 287#define __NR_keyctl 281
288 288
289#ifdef __KERNEL__
290
289#define NR_syscalls 282 291#define NR_syscalls 282
290 292
291/* user-visible error numbers are in the range -1 - -122: see 293/* user-visible error numbers are in the range -1 - -122: see
@@ -437,7 +439,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \
437 return (type)__res; \ 439 return (type)__res; \
438} 440}
439 441
440#ifdef __KERNEL__
441#define __ARCH_WANT_IPC_PARSE_VERSION 442#define __ARCH_WANT_IPC_PARSE_VERSION
442#define __ARCH_WANT_OLD_READDIR 443#define __ARCH_WANT_OLD_READDIR
443#define __ARCH_WANT_OLD_STAT 444#define __ARCH_WANT_OLD_STAT
@@ -460,7 +461,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \
460#define __ARCH_WANT_SYS_SIGPENDING 461#define __ARCH_WANT_SYS_SIGPENDING
461#define __ARCH_WANT_SYS_SIGPROCMASK 462#define __ARCH_WANT_SYS_SIGPROCMASK
462#define __ARCH_WANT_SYS_RT_SIGACTION 463#define __ARCH_WANT_SYS_RT_SIGACTION
463#endif
464 464
465#ifdef __KERNEL_SYSCALLS__ 465#ifdef __KERNEL_SYSCALLS__
466 466
@@ -515,7 +515,7 @@ asmlinkage long sys_rt_sigaction(int sig,
515 struct sigaction __user *oact, 515 struct sigaction __user *oact,
516 size_t sigsetsize); 516 size_t sigsetsize);
517 517
518#endif 518#endif /* __KERNEL_SYSCALLS__ */
519 519
520/* 520/*
521 * "Conditional" syscalls 521 * "Conditional" syscalls
@@ -525,4 +525,5 @@ asmlinkage long sys_rt_sigaction(int sig,
525 */ 525 */
526#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 526#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
527 527
528#endif /* __KERNEL__ */
528#endif /* _ASM_M68K_UNISTD_H_ */ 529#endif /* _ASM_M68K_UNISTD_H_ */
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index e71f161a4896..8bb0bb9b2e68 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -905,6 +905,8 @@
905#define __NR_N32_Linux 6000 905#define __NR_N32_Linux 6000
906#define __NR_N32_Linux_syscalls 268 906#define __NR_N32_Linux_syscalls 268
907 907
908#ifdef __KERNEL__
909
908#ifndef __ASSEMBLY__ 910#ifndef __ASSEMBLY__
909 911
910/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ 912/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
@@ -1168,8 +1170,6 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \
1168 1170
1169#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ 1171#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
1170 1172
1171#ifdef __KERNEL__
1172
1173 1173
1174#define __ARCH_WANT_IPC_PARSE_VERSION 1174#define __ARCH_WANT_IPC_PARSE_VERSION
1175#define __ARCH_WANT_OLD_READDIR 1175#define __ARCH_WANT_OLD_READDIR
@@ -1196,7 +1196,6 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \
1196# ifdef CONFIG_MIPS32_O32 1196# ifdef CONFIG_MIPS32_O32
1197# define __ARCH_WANT_COMPAT_SYS_TIME 1197# define __ARCH_WANT_COMPAT_SYS_TIME
1198# endif 1198# endif
1199#endif
1200 1199
1201#ifdef __KERNEL_SYSCALLS__ 1200#ifdef __KERNEL_SYSCALLS__
1202 1201
@@ -1247,4 +1246,5 @@ asmlinkage long sys_rt_sigaction(int sig,
1247 */ 1246 */
1248#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall") 1247#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall")
1249 1248
1249#endif /* __KERNEL__ */
1250#endif /* _ASM_UNISTD_H */ 1250#endif /* _ASM_UNISTD_H */
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h
index 0e1a30be2e30..12b867238a47 100644
--- a/include/asm-parisc/unistd.h
+++ b/include/asm-parisc/unistd.h
@@ -792,6 +792,7 @@
792#define HPUX_GATEWAY_ADDR 0xC0000004 792#define HPUX_GATEWAY_ADDR 0xC0000004
793#define LINUX_GATEWAY_ADDR 0x100 793#define LINUX_GATEWAY_ADDR 0x100
794 794
795#ifdef __KERNEL__
795#ifndef __ASSEMBLY__ 796#ifndef __ASSEMBLY__
796 797
797#define SYS_ify(syscall_name) __NR_##syscall_name 798#define SYS_ify(syscall_name) __NR_##syscall_name
@@ -934,7 +935,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
934 return K_INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \ 935 return K_INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \
935} 936}
936 937
937#ifdef __KERNEL__
938#define __ARCH_WANT_OLD_READDIR 938#define __ARCH_WANT_OLD_READDIR
939#define __ARCH_WANT_STAT64 939#define __ARCH_WANT_STAT64
940#define __ARCH_WANT_SYS_ALARM 940#define __ARCH_WANT_SYS_ALARM
@@ -956,7 +956,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
956#define __ARCH_WANT_SYS_SIGPENDING 956#define __ARCH_WANT_SYS_SIGPENDING
957#define __ARCH_WANT_SYS_SIGPROCMASK 957#define __ARCH_WANT_SYS_SIGPROCMASK
958#define __ARCH_WANT_SYS_RT_SIGACTION 958#define __ARCH_WANT_SYS_RT_SIGACTION
959#endif
960 959
961/* mmap & mmap2 take 6 arguments */ 960/* mmap & mmap2 take 6 arguments */
962#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ 961#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
@@ -1056,4 +1055,5 @@ asmlinkage long sys_rt_sigaction(int sig,
1056 */ 1055 */
1057#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 1056#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
1058 1057
1058#endif /* __KERNEL__ */
1059#endif /* _ASM_PARISC_UNISTD_H_ */ 1059#endif /* _ASM_PARISC_UNISTD_H_ */
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index ef932f1cddc3..bd3c6b6cc50e 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -305,12 +305,12 @@
305#define __NR_tee 284 305#define __NR_tee 284
306#define __NR_vmsplice 285 306#define __NR_vmsplice 285
307 307
308#ifdef __KERNEL__
309
308#define __NR_syscalls 286 310#define __NR_syscalls 286
309 311
310#ifdef __KERNEL__
311#define __NR__exit __NR_exit 312#define __NR__exit __NR_exit
312#define NR_syscalls __NR_syscalls 313#define NR_syscalls __NR_syscalls
313#endif
314 314
315#ifndef __ASSEMBLY__ 315#ifndef __ASSEMBLY__
316 316
@@ -422,7 +422,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
422 __syscall_nr(6, type, name, arg1, arg2, arg3, arg4, arg5, arg6); \ 422 __syscall_nr(6, type, name, arg1, arg2, arg3, arg4, arg5, arg6); \
423} 423}
424 424
425#ifdef __KERNEL__
426 425
427#include <linux/types.h> 426#include <linux/types.h>
428#include <linux/compiler.h> 427#include <linux/compiler.h>
@@ -478,8 +477,8 @@ extern int execve(const char *file, char **argv, char **envp);
478#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall") 477#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall")
479#endif 478#endif
480 479
481#endif /* __KERNEL__ */
482 480
483#endif /* __ASSEMBLY__ */ 481#endif /* __ASSEMBLY__ */
482#endif /* __KERNEL__ */
484 483
485#endif /* _ASM_PPC_UNISTD_H_ */ 484#endif /* _ASM_PPC_UNISTD_H_ */
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index ac790bf44559..40efbe84221d 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -386,6 +386,8 @@
386 386
387#endif 387#endif
388 388
389#ifdef __KERNEL__
390
389/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */ 391/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
390 392
391#define __syscall_return(type, res) \ 393#define __syscall_return(type, res) \
@@ -540,7 +542,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
540 __syscall_return(type,__res); \ 542 __syscall_return(type,__res); \
541} 543}
542 544
543#ifdef __KERNEL__
544#define __ARCH_WANT_IPC_PARSE_VERSION 545#define __ARCH_WANT_IPC_PARSE_VERSION
545#define __ARCH_WANT_OLD_READDIR 546#define __ARCH_WANT_OLD_READDIR
546#define __ARCH_WANT_SYS_ALARM 547#define __ARCH_WANT_SYS_ALARM
@@ -567,7 +568,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
567# define __ARCH_WANT_COMPAT_SYS_TIME 568# define __ARCH_WANT_COMPAT_SYS_TIME
568# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 569# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
569# endif 570# endif
570#endif
571 571
572#ifdef __KERNEL_SYSCALLS__ 572#ifdef __KERNEL_SYSCALLS__
573 573
@@ -618,7 +618,7 @@ asmlinkage long sys_rt_sigaction(int sig,
618 struct sigaction __user *oact, 618 struct sigaction __user *oact,
619 size_t sigsetsize); 619 size_t sigsetsize);
620 620
621#endif 621#endif /* __KERNEL_SYSCALLS__ */
622 622
623/* 623/*
624 * "Conditional" syscalls 624 * "Conditional" syscalls
@@ -628,4 +628,5 @@ asmlinkage long sys_rt_sigaction(int sig,
628 */ 628 */
629#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 629#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
630 630
631#endif /* __KERNEL__ */
631#endif /* _ASM_S390_UNISTD_H_ */ 632#endif /* _ASM_S390_UNISTD_H_ */
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index 05520cebda12..76b5430cb458 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -304,6 +304,8 @@
304 304
305#define NR_syscalls 293 305#define NR_syscalls 293
306 306
307#ifdef __KERNEL__
308
307/* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */ 309/* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */
308 310
309#define __syscall_return(type, res) \ 311#define __syscall_return(type, res) \
@@ -420,7 +422,6 @@ __asm__ __volatile__ ("trapa #0x16" \
420__syscall_return(type,__sc0); \ 422__syscall_return(type,__sc0); \
421} 423}
422 424
423#ifdef __KERNEL__
424#define __ARCH_WANT_IPC_PARSE_VERSION 425#define __ARCH_WANT_IPC_PARSE_VERSION
425#define __ARCH_WANT_OLD_READDIR 426#define __ARCH_WANT_OLD_READDIR
426#define __ARCH_WANT_OLD_STAT 427#define __ARCH_WANT_OLD_STAT
@@ -443,7 +444,6 @@ __syscall_return(type,__sc0); \
443#define __ARCH_WANT_SYS_SIGPENDING 444#define __ARCH_WANT_SYS_SIGPENDING
444#define __ARCH_WANT_SYS_SIGPROCMASK 445#define __ARCH_WANT_SYS_SIGPROCMASK
445#define __ARCH_WANT_SYS_RT_SIGACTION 446#define __ARCH_WANT_SYS_RT_SIGACTION
446#endif
447 447
448#ifdef __KERNEL_SYSCALLS__ 448#ifdef __KERNEL_SYSCALLS__
449 449
@@ -513,7 +513,7 @@ asmlinkage long sys_rt_sigaction(int sig,
513 struct sigaction __user *oact, 513 struct sigaction __user *oact,
514 size_t sigsetsize); 514 size_t sigsetsize);
515 515
516#endif 516#endif /* __KERNEL_SYSCALLS__ */
517 517
518/* 518/*
519 * "Conditional" syscalls 519 * "Conditional" syscalls
@@ -525,4 +525,5 @@ asmlinkage long sys_rt_sigaction(int sig,
525#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 525#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
526#endif 526#endif
527 527
528#endif /* __KERNEL__ */
528#endif /* __ASM_SH_UNISTD_H */ 529#endif /* __ASM_SH_UNISTD_H */
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h
index 1f8f394ae371..9a1590fffc15 100644
--- a/include/asm-sh64/unistd.h
+++ b/include/asm-sh64/unistd.h
@@ -344,6 +344,8 @@
344#define __NR_inotify_add_watch 319 344#define __NR_inotify_add_watch 319
345#define __NR_inotify_rm_watch 320 345#define __NR_inotify_rm_watch 320
346 346
347#ifdef __KERNEL__
348
347#define NR_syscalls 321 349#define NR_syscalls 321
348 350
349/* user-visible error numbers are in the range -1 - -125: see <asm-sh64/errno.h> */ 351/* user-visible error numbers are in the range -1 - -125: see <asm-sh64/errno.h> */
@@ -486,7 +488,6 @@ __asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4 %5 %6" \
486__syscall_return(type,__sc0); \ 488__syscall_return(type,__sc0); \
487} 489}
488 490
489#ifdef __KERNEL__
490#define __ARCH_WANT_IPC_PARSE_VERSION 491#define __ARCH_WANT_IPC_PARSE_VERSION
491#define __ARCH_WANT_OLD_READDIR 492#define __ARCH_WANT_OLD_READDIR
492#define __ARCH_WANT_OLD_STAT 493#define __ARCH_WANT_OLD_STAT
@@ -509,7 +510,6 @@ __syscall_return(type,__sc0); \
509#define __ARCH_WANT_SYS_SIGPENDING 510#define __ARCH_WANT_SYS_SIGPENDING
510#define __ARCH_WANT_SYS_SIGPROCMASK 511#define __ARCH_WANT_SYS_SIGPROCMASK
511#define __ARCH_WANT_SYS_RT_SIGACTION 512#define __ARCH_WANT_SYS_RT_SIGACTION
512#endif
513 513
514#ifdef __KERNEL_SYSCALLS__ 514#ifdef __KERNEL_SYSCALLS__
515 515
@@ -550,7 +550,7 @@ static inline pid_t wait(int * wait_stat)
550{ 550{
551 return waitpid(-1,wait_stat,0); 551 return waitpid(-1,wait_stat,0);
552} 552}
553#endif 553#endif /* __KERNEL_SYSCALLS__ */
554 554
555/* 555/*
556 * "Conditional" syscalls 556 * "Conditional" syscalls
@@ -562,4 +562,5 @@ static inline pid_t wait(int * wait_stat)
562#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 562#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
563#endif 563#endif
564 564
565#endif /* __KERNEL__ */
565#endif /* __ASM_SH64_UNISTD_H */ 566#endif /* __ASM_SH64_UNISTD_H */
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index 32a48f623e2b..7bd5a7dd6781 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -317,6 +317,7 @@
317#define __NR_ppoll 298 317#define __NR_ppoll 298
318#define __NR_unshare 299 318#define __NR_unshare 299
319 319
320#ifdef __KERNEL__
320/* WARNING: You MAY NOT add syscall numbers larger than 299, since 321/* WARNING: You MAY NOT add syscall numbers larger than 299, since
321 * all of the syscall tables in the Sparc kernel are 322 * all of the syscall tables in the Sparc kernel are
322 * sized to have 299 entries (starting at zero). Therefore 323 * sized to have 299 entries (starting at zero). Therefore
@@ -453,7 +454,6 @@ errno = -__res; \
453return -1; \ 454return -1; \
454} 455}
455 456
456#ifdef __KERNEL__
457#define __ARCH_WANT_IPC_PARSE_VERSION 457#define __ARCH_WANT_IPC_PARSE_VERSION
458#define __ARCH_WANT_OLD_READDIR 458#define __ARCH_WANT_OLD_READDIR
459#define __ARCH_WANT_STAT64 459#define __ARCH_WANT_STAT64
@@ -475,7 +475,6 @@ return -1; \
475#define __ARCH_WANT_SYS_SIGPENDING 475#define __ARCH_WANT_SYS_SIGPENDING
476#define __ARCH_WANT_SYS_SIGPROCMASK 476#define __ARCH_WANT_SYS_SIGPROCMASK
477#define __ARCH_WANT_SYS_RT_SIGSUSPEND 477#define __ARCH_WANT_SYS_RT_SIGSUSPEND
478#endif
479 478
480#ifdef __KERNEL_SYSCALLS__ 479#ifdef __KERNEL_SYSCALLS__
481 480
@@ -532,4 +531,5 @@ asmlinkage long sys_rt_sigaction(int sig,
532 */ 531 */
533#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 532#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
534 533
534#endif /* __KERNEL__ */
535#endif /* _SPARC_UNISTD_H */ 535#endif /* _SPARC_UNISTD_H */
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index ca80e8aca128..18f7b1a2517c 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -319,6 +319,7 @@
319#define __NR_ppoll 298 319#define __NR_ppoll 298
320#define __NR_unshare 299 320#define __NR_unshare 299
321 321
322#ifdef __KERNEL__
322/* WARNING: You MAY NOT add syscall numbers larger than 299, since 323/* WARNING: You MAY NOT add syscall numbers larger than 299, since
323 * all of the syscall tables in the Sparc kernel are 324 * all of the syscall tables in the Sparc kernel are
324 * sized to have 299 entries (starting at zero). Therefore 325 * sized to have 299 entries (starting at zero). Therefore
@@ -485,7 +486,6 @@ asmlinkage long sys_rt_sigaction(int sig,
485 486
486#endif /* __KERNEL_SYSCALLS__ */ 487#endif /* __KERNEL_SYSCALLS__ */
487 488
488#ifdef __KERNEL__
489/* sysconf options, for SunOS compatibility */ 489/* sysconf options, for SunOS compatibility */
490#define _SC_ARG_MAX 1 490#define _SC_ARG_MAX 1
491#define _SC_CHILD_MAX 2 491#define _SC_CHILD_MAX 2
@@ -519,7 +519,6 @@ asmlinkage long sys_rt_sigaction(int sig,
519#define __ARCH_WANT_SYS_SIGPROCMASK 519#define __ARCH_WANT_SYS_SIGPROCMASK
520#define __ARCH_WANT_SYS_RT_SIGSUSPEND 520#define __ARCH_WANT_SYS_RT_SIGSUSPEND
521#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 521#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
522#endif
523 522
524/* 523/*
525 * "Conditional" syscalls 524 * "Conditional" syscalls
@@ -529,4 +528,5 @@ asmlinkage long sys_rt_sigaction(int sig,
529 */ 528 */
530#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 529#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
531 530
531#endif /* __KERNEL__ */
532#endif /* _SPARC64_UNISTD_H */ 532#endif /* _SPARC64_UNISTD_H */
diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h
index 82460a7bb233..bcb44bfe577a 100644
--- a/include/asm-v850/unistd.h
+++ b/include/asm-v850/unistd.h
@@ -14,8 +14,6 @@
14#ifndef __V850_UNISTD_H__ 14#ifndef __V850_UNISTD_H__
15#define __V850_UNISTD_H__ 15#define __V850_UNISTD_H__
16 16
17#include <asm/clinkage.h>
18
19#define __NR_restart_syscall 0 17#define __NR_restart_syscall 0
20#define __NR_exit 1 18#define __NR_exit 1
21#define __NR_fork 2 19#define __NR_fork 2
@@ -237,10 +235,9 @@
237 except the syscall number (r12). */ 235 except the syscall number (r12). */
238#define SYSCALL_SHORT_CLOBBERS SYSCALL_CLOBBERS, "r13", "r14" 236#define SYSCALL_SHORT_CLOBBERS SYSCALL_CLOBBERS, "r13", "r14"
239 237
238#ifdef __KERNEL__
240 239
241/* User programs sometimes end up including this header file 240#include <asm/clinkage.h>
242 (indirectly, via uClibc header files), so I'm a bit nervous just
243 including <linux/compiler.h>. */
244 241
245#define __syscall_return(type, res) \ 242#define __syscall_return(type, res) \
246 do { \ 243 do { \
@@ -368,7 +365,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
368} 365}
369 366
370 367
371#ifdef __KERNEL__
372#define __ARCH_WANT_IPC_PARSE_VERSION 368#define __ARCH_WANT_IPC_PARSE_VERSION
373#define __ARCH_WANT_OLD_READDIR 369#define __ARCH_WANT_OLD_READDIR
374#define __ARCH_WANT_STAT64 370#define __ARCH_WANT_STAT64
@@ -389,7 +385,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \
389#define __ARCH_WANT_SYS_SIGPENDING 385#define __ARCH_WANT_SYS_SIGPENDING
390#define __ARCH_WANT_SYS_SIGPROCMASK 386#define __ARCH_WANT_SYS_SIGPROCMASK
391#define __ARCH_WANT_SYS_RT_SIGACTION 387#define __ARCH_WANT_SYS_RT_SIGACTION
392#endif
393 388
394#ifdef __KERNEL_SYSCALLS__ 389#ifdef __KERNEL_SYSCALLS__
395 390
@@ -440,7 +435,7 @@ asmlinkage long sys_rt_sigaction(int sig,
440 struct sigaction __user *oact, 435 struct sigaction __user *oact,
441 size_t sigsetsize); 436 size_t sigsetsize);
442 437
443#endif 438#endif /* __KERNEL_SYSCALLS__ */
444 439
445/* 440/*
446 * "Conditional" syscalls 441 * "Conditional" syscalls
@@ -455,4 +450,5 @@ asmlinkage long sys_rt_sigaction(int sig,
455 void name (void) __attribute__ ((weak, alias ("sys_ni_syscall"))); 450 void name (void) __attribute__ ((weak, alias ("sys_ni_syscall")));
456#endif 451#endif
457 452
453#endif /* __KERNEL__ */
458#endif /* __V850_UNISTD_H__ */ 454#endif /* __V850_UNISTD_H__ */
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index feb77cb8c044..0aff22bdbb21 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -618,6 +618,8 @@ __SYSCALL(__NR_sync_file_range, sys_sync_file_range)
618#define __NR_vmsplice 278 618#define __NR_vmsplice 278
619__SYSCALL(__NR_vmsplice, sys_vmsplice) 619__SYSCALL(__NR_vmsplice, sys_vmsplice)
620 620
621#ifdef __KERNEL__
622
621#define __NR_syscall_max __NR_vmsplice 623#define __NR_syscall_max __NR_vmsplice
622 624
623#ifndef __NO_STUBS 625#ifndef __NO_STUBS
@@ -635,7 +637,6 @@ do { \
635 return (type) (res); \ 637 return (type) (res); \
636} while (0) 638} while (0)
637 639
638#ifdef __KERNEL__
639#define __ARCH_WANT_OLD_READDIR 640#define __ARCH_WANT_OLD_READDIR
640#define __ARCH_WANT_OLD_STAT 641#define __ARCH_WANT_OLD_STAT
641#define __ARCH_WANT_SYS_ALARM 642#define __ARCH_WANT_SYS_ALARM
@@ -657,7 +658,6 @@ do { \
657#define __ARCH_WANT_SYS_RT_SIGACTION 658#define __ARCH_WANT_SYS_RT_SIGACTION
658#define __ARCH_WANT_SYS_TIME 659#define __ARCH_WANT_SYS_TIME
659#define __ARCH_WANT_COMPAT_SYS_TIME 660#define __ARCH_WANT_COMPAT_SYS_TIME
660#endif
661 661
662#ifndef __KERNEL_SYSCALLS__ 662#ifndef __KERNEL_SYSCALLS__
663 663
@@ -821,7 +821,7 @@ asmlinkage long sys_pipe(int *fildes);
821 821
822#endif /* __KERNEL_SYSCALLS__ */ 822#endif /* __KERNEL_SYSCALLS__ */
823 823
824#if !defined(__ASSEMBLY__) && defined(__KERNEL__) 824#ifndef __ASSEMBLY__
825 825
826#include <linux/linkage.h> 826#include <linux/linkage.h>
827#include <linux/compiler.h> 827#include <linux/compiler.h>
@@ -848,4 +848,5 @@ asmlinkage long sys_rt_sigaction(int sig,
848 */ 848 */
849#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 849#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
850 850
851#endif /* __KERNEL__ */
851#endif 852#endif
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h
index 6b39d6609d9c..5e1b99dc4ab3 100644
--- a/include/asm-xtensa/unistd.h
+++ b/include/asm-xtensa/unistd.h
@@ -11,8 +11,6 @@
11#ifndef _XTENSA_UNISTD_H 11#ifndef _XTENSA_UNISTD_H
12#define _XTENSA_UNISTD_H 12#define _XTENSA_UNISTD_H
13 13
14#include <linux/linkage.h>
15
16#define __NR_spill 0 14#define __NR_spill 0
17#define __NR_exit 1 15#define __NR_exit 1
18#define __NR_read 3 16#define __NR_read 3
@@ -221,21 +219,9 @@
221#define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/ 219#define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/
222 220
223#ifdef __KERNEL__ 221#ifdef __KERNEL__
224#define __syscall_return(type, res) return ((type)(res)) 222#include <linux/linkage.h>
225#else
226#define __syscall_return(type, res) \
227do { \
228 if ((unsigned long)(res) >= (unsigned long)(-125)) { \
229 /* Avoid using "res" which is declared to be in register r2; \
230 * errno might expand to a function call and clobber it. */ \
231 int __err = -(res); \
232 errno = __err; \
233 res = -1; \
234 } \
235 return (type) (res); \
236} while (0)
237#endif
238 223
224#define __syscall_return(type, res) return ((type)(res))
239 225
240/* Tensilica's xt-xcc compiler is much more agressive at code 226/* Tensilica's xt-xcc compiler is much more agressive at code
241 * optimization than gcc. Multiple __asm__ statements are 227 * optimization than gcc. Multiple __asm__ statements are
@@ -429,11 +415,10 @@ static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp)
429 */ 415 */
430#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); 416#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
431 417
432#ifdef __KERNEL__
433#define __ARCH_WANT_STAT64 418#define __ARCH_WANT_STAT64
434#define __ARCH_WANT_SYS_UTIME 419#define __ARCH_WANT_SYS_UTIME
435#define __ARCH_WANT_SYS_LLSEEK 420#define __ARCH_WANT_SYS_LLSEEK
436#define __ARCH_WANT_SYS_RT_SIGACTION 421#define __ARCH_WANT_SYS_RT_SIGACTION
437#endif 422#endif /* __KERNEL__ */
438 423
439#endif /* _XTENSA_UNISTD_H */ 424#endif /* _XTENSA_UNISTD_H */