Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Woodhouse and committed by
David Woodhouse
56142536 34c278d3

+76 -86
+4 -3
include/asm-alpha/unistd.h
··· 383 383 #define __NR_inotify_add_watch 445 384 384 #define __NR_inotify_rm_watch 446 385 385 386 + #ifdef __KERNEL__ 387 + 386 388 #define NR_SYSCALLS 447 387 389 388 390 #if defined(__GNUC__) ··· 567 565 _syscall_return(type); \ 568 566 } 569 567 570 - #endif /* __LIBRARY__ && __GNUC__ */ 568 + #endif /* __GNUC__ */ 571 569 572 - #ifdef __KERNEL__ 573 570 #define __ARCH_WANT_IPC_PARSE_VERSION 574 571 #define __ARCH_WANT_OLD_READDIR 575 572 #define __ARCH_WANT_STAT64 ··· 579 578 #define __ARCH_WANT_SYS_OLD_GETRLIMIT 580 579 #define __ARCH_WANT_SYS_OLDUMOUNT 581 580 #define __ARCH_WANT_SYS_SIGPENDING 582 - #endif 583 581 584 582 #ifdef __KERNEL_SYSCALLS__ 585 583 ··· 661 661 662 662 #define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") 663 663 664 + #endif /* __KERNEL__ */ 664 665 #endif /* _ALPHA_UNISTD_H */
+5 -5
include/asm-arm/unistd.h
··· 13 13 #ifndef __ASM_ARM_UNISTD_H 14 14 #define __ASM_ARM_UNISTD_H 15 15 16 - #include <linux/linkage.h> 17 - 18 16 #define __NR_OABI_SYSCALL_BASE 0x900000 19 17 20 18 #if defined(__thumb__) || defined(__ARM_EABI__) ··· 376 378 #undef __NR_ipc 377 379 #endif 378 380 381 + #ifdef __KERNEL__ 382 + #include <linux/linkage.h> 383 + 379 384 #define __sys2(x) #x 380 385 #define __sys1(x) __sys2(x) 381 386 ··· 520 519 __syscall_return(type,__res); \ 521 520 } 522 521 523 - #ifdef __KERNEL__ 524 522 #define __ARCH_WANT_IPC_PARSE_VERSION 525 523 #define __ARCH_WANT_STAT64 526 524 #define __ARCH_WANT_SYS_GETHOSTNAME ··· 539 539 #define __ARCH_WANT_SYS_OLD_GETRLIMIT 540 540 #define __ARCH_WANT_OLD_READDIR 541 541 #define __ARCH_WANT_SYS_SOCKETCALL 542 - #endif 543 542 #endif 544 543 545 544 #ifdef __KERNEL_SYSCALLS__ ··· 563 564 struct sigaction __user *oact, 564 565 size_t sigsetsize); 565 566 566 - #endif 567 + #endif /* __KERNEL_SYSCALLS__ */ 567 568 568 569 /* 569 570 * "Conditional" syscalls ··· 573 574 */ 574 575 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 575 576 577 + #endif /* __KERNEL__ */ 576 578 #endif /* __ASM_ARM_UNISTD_H */
+5 -5
include/asm-arm26/unistd.h
··· 14 14 #ifndef __ASM_ARM_UNISTD_H 15 15 #define __ASM_ARM_UNISTD_H 16 16 17 - #include <linux/linkage.h> 18 - 19 17 #define __NR_SYSCALL_BASE 0x900000 20 18 21 19 /* ··· 310 312 #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) 311 313 #define __ARM_NR_usr26 (__ARM_NR_BASE+3) 312 314 315 + #ifdef __KERNEL__ 316 + #include <linux/linkage.h> 317 + 313 318 #define __sys2(x) #x 314 319 #define __sys1(x) __sys2(x) 315 320 ··· 444 443 __syscall_return(type,__res); \ 445 444 } 446 445 447 - #ifdef __KERNEL__ 448 446 #define __ARCH_WANT_IPC_PARSE_VERSION 449 447 #define __ARCH_WANT_OLD_READDIR 450 448 #define __ARCH_WANT_STAT64 ··· 462 462 #define __ARCH_WANT_SYS_SIGPENDING 463 463 #define __ARCH_WANT_SYS_SIGPROCMASK 464 464 #define __ARCH_WANT_SYS_RT_SIGACTION 465 - #endif 466 465 467 466 #ifdef __KERNEL_SYSCALLS__ 468 467 ··· 485 486 struct sigaction __user *oact, 486 487 size_t sigsetsize); 487 488 488 - #endif 489 + #endif /* __KERNEL_SYSCALLS__ */ 489 490 490 491 /* 491 492 * "Conditional" syscalls ··· 495 496 */ 496 497 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 497 498 499 + #endif /* __KERNEL__ */ 498 500 #endif /* __ASM_ARM_UNISTD_H */
+4 -5
include/asm-cris/unistd.h
··· 295 295 #define __NR_request_key 287 296 296 #define __NR_keyctl 288 297 297 298 + #ifdef __KERNEL__ 299 + 298 300 #define NR_syscalls 289 299 301 300 302 301 - 302 - #ifdef __KERNEL__ 303 303 #define __ARCH_WANT_IPC_PARSE_VERSION 304 304 #define __ARCH_WANT_OLD_READDIR 305 305 #define __ARCH_WANT_OLD_STAT ··· 379 379 * complaints. We don't want to use -fno-builtin, so just use a 380 380 * different name when in the kernel. 381 381 */ 382 - #ifdef __KERNEL__ 383 382 #define _exit kernel_syscall_exit 384 - #endif 385 383 static inline _syscall1(int,_exit,int,exitcode) 386 384 static 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 /* ··· 393 395 */ 394 396 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 395 397 398 + #endif /* __KERNEL__ */ 396 399 #endif /* _ASM_CRIS_UNISTD_H_ */
+4 -3
include/asm-frv/unistd.h
··· 317 317 #define __NR_pselect6 308 318 318 #define __NR_ppoll 309 319 319 320 + #ifdef __KERNEL__ 321 + 320 322 #define NR_syscalls 310 321 323 322 324 /* ··· 479 477 return waitpid(-1,wait_stat,0); 480 478 } 481 479 482 - #endif 480 + #endif /* __KERNEL_SYSCALLS__ */ 483 481 484 - #ifdef __KERNEL__ 485 482 #define __ARCH_WANT_IPC_PARSE_VERSION 486 483 /* #define __ARCH_WANT_OLD_READDIR */ 487 484 #define __ARCH_WANT_OLD_STAT ··· 504 503 #define __ARCH_WANT_SYS_SIGPROCMASK 505 504 #define __ARCH_WANT_SYS_RT_SIGACTION 506 505 #define __ARCH_WANT_SYS_RT_SIGSUSPEND 507 - #endif 508 506 509 507 /* 510 508 * "Conditional" syscalls ··· 515 515 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 516 516 #endif 517 517 518 + #endif /* __KERNEL__ */ 518 519 #endif /* _ASM_UNISTD_H_ */
+4 -3
include/asm-h8300/unistd.h
··· 292 292 #define __NR_request_key 287 293 293 #define __NR_keyctl 288 294 294 295 + #ifdef __KERNEL__ 296 + 295 297 #define NR_syscalls 289 296 298 297 299 ··· 462 460 __syscall_return(type, __res); \ 463 461 } 464 462 465 - #ifdef __KERNEL__ 466 463 #define __ARCH_WANT_IPC_PARSE_VERSION 467 464 #define __ARCH_WANT_OLD_READDIR 468 465 #define __ARCH_WANT_OLD_STAT ··· 484 483 #define __ARCH_WANT_SYS_SIGPENDING 485 484 #define __ARCH_WANT_SYS_SIGPROCMASK 486 485 #define __ARCH_WANT_SYS_RT_SIGACTION 487 - #endif 488 486 489 487 #ifdef __KERNEL_SYSCALLS__ 490 488 ··· 534 534 struct sigaction __user *oact, 535 535 size_t sigsetsize); 536 536 537 - #endif 537 + #endif /* __KERNEL_SYSCALLS__ */ 538 538 539 539 /* 540 540 * "Conditional" syscalls ··· 543 543 asm (".weak\t_" #name "\n" \ 544 544 ".set\t_" #name ",_sys_ni_syscall"); 545 545 546 + #endif /* __KERNEL__ */ 546 547 #endif /* _ASM_H8300_UNISTD_H_ */
+4 -3
include/asm-i386/unistd.h
··· 323 323 #define __NR_tee 315 324 324 #define __NR_vmsplice 316 325 325 326 + #ifdef __KERNEL__ 327 + 326 328 #define NR_syscalls 317 327 329 328 330 /* ··· 424 422 __syscall_return(type,__res); \ 425 423 } 426 424 427 - #ifdef __KERNEL__ 428 425 #define __ARCH_WANT_IPC_PARSE_VERSION 429 426 #define __ARCH_WANT_OLD_READDIR 430 427 #define __ARCH_WANT_OLD_STAT ··· 447 446 #define __ARCH_WANT_SYS_SIGPROCMASK 448 447 #define __ARCH_WANT_SYS_RT_SIGACTION 449 448 #define __ARCH_WANT_SYS_RT_SIGSUSPEND 450 - #endif 451 449 452 450 #ifdef __KERNEL_SYSCALLS__ 453 451 ··· 485 485 struct sigaction __user *oact, 486 486 size_t sigsetsize); 487 487 488 - #endif 488 + #endif /* __KERNEL_SYSCALLS__ */ 489 489 490 490 /* 491 491 * "Conditional" syscalls ··· 497 497 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 498 498 #endif 499 499 500 + #endif /* __KERNEL__ */ 500 501 #endif /* _ASM_I386_UNISTD_H_ */
+3 -2
include/asm-m32r/unistd.h
··· 295 295 #define __NR_kexec_load 283 296 296 #define __NR_waitid 284 297 297 298 + #ifdef __KERNEL__ 299 + 298 300 #define NR_syscalls 285 299 301 300 302 /* user-visible error numbers are in the range -1 - -124: see ··· 407 405 __syscall_return(type,__res); \ 408 406 } 409 407 410 - #ifdef __KERNEL__ 411 408 #define __ARCH_WANT_IPC_PARSE_VERSION 412 409 #define __ARCH_WANT_STAT64 413 410 #define __ARCH_WANT_SYS_ALARM ··· 422 421 #define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/ 423 422 #define __ARCH_WANT_SYS_OLDUMOUNT 424 423 #define __ARCH_WANT_SYS_RT_SIGACTION 425 - #endif 426 424 427 425 #ifdef __KERNEL_SYSCALLS__ 428 426 ··· 470 470 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 471 471 #endif 472 472 473 + #endif /* __KERNEL__ */ 473 474 #endif /* _ASM_M32R_UNISTD_H */
+4 -3
include/asm-m68k/unistd.h
··· 285 285 #define __NR_request_key 280 286 286 #define __NR_keyctl 281 287 287 288 + #ifdef __KERNEL__ 289 + 288 290 #define NR_syscalls 282 289 291 290 292 /* user-visible error numbers are in the range -1 - -124: see ··· 385 383 __syscall_return(type,__res); \ 386 384 } 387 385 388 - #ifdef __KERNEL__ 389 386 #define __ARCH_WANT_IPC_PARSE_VERSION 390 387 #define __ARCH_WANT_OLD_READDIR 391 388 #define __ARCH_WANT_OLD_STAT ··· 407 406 #define __ARCH_WANT_SYS_SIGPENDING 408 407 #define __ARCH_WANT_SYS_SIGPROCMASK 409 408 #define __ARCH_WANT_SYS_RT_SIGACTION 410 - #endif 411 409 412 410 #ifdef __KERNEL_SYSCALLS__ 413 411 ··· 451 451 struct sigaction __user *oact, 452 452 size_t sigsetsize); 453 453 454 - #endif 454 + #endif /* __KERNEL_SYSCALLS__ */ 455 455 456 456 /* 457 457 * "Conditional" syscalls ··· 461 461 */ 462 462 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 463 463 464 + #endif /* __KERNEL__ */ 464 465 #endif /* _ASM_M68K_UNISTD_H_ */
+4 -3
include/asm-m68knommu/unistd.h
··· 286 286 #define __NR_request_key 280 287 287 #define __NR_keyctl 281 288 288 289 + #ifdef __KERNEL__ 290 + 289 291 #define NR_syscalls 282 290 292 291 293 /* user-visible error numbers are in the range -1 - -122: see ··· 439 437 return (type)__res; \ 440 438 } 441 439 442 - #ifdef __KERNEL__ 443 440 #define __ARCH_WANT_IPC_PARSE_VERSION 444 441 #define __ARCH_WANT_OLD_READDIR 445 442 #define __ARCH_WANT_OLD_STAT ··· 461 460 #define __ARCH_WANT_SYS_SIGPENDING 462 461 #define __ARCH_WANT_SYS_SIGPROCMASK 463 462 #define __ARCH_WANT_SYS_RT_SIGACTION 464 - #endif 465 463 466 464 #ifdef __KERNEL_SYSCALLS__ 467 465 ··· 515 515 struct sigaction __user *oact, 516 516 size_t sigsetsize); 517 517 518 - #endif 518 + #endif /* __KERNEL_SYSCALLS__ */ 519 519 520 520 /* 521 521 * "Conditional" syscalls ··· 525 525 */ 526 526 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 527 527 528 + #endif /* __KERNEL__ */ 528 529 #endif /* _ASM_M68K_UNISTD_H_ */
+3 -3
include/asm-mips/unistd.h
··· 905 905 #define __NR_N32_Linux 6000 906 906 #define __NR_N32_Linux_syscalls 268 907 907 908 + #ifdef __KERNEL__ 909 + 908 910 #ifndef __ASSEMBLY__ 909 911 910 912 /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ ··· 1170 1168 1171 1169 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ 1172 1170 1173 - #ifdef __KERNEL__ 1174 - 1175 1171 1176 1172 #define __ARCH_WANT_IPC_PARSE_VERSION 1177 1173 #define __ARCH_WANT_OLD_READDIR ··· 1196 1196 # ifdef CONFIG_MIPS32_O32 1197 1197 # define __ARCH_WANT_COMPAT_SYS_TIME 1198 1198 # endif 1199 - #endif 1200 1199 1201 1200 #ifdef __KERNEL_SYSCALLS__ 1202 1201 ··· 1246 1247 */ 1247 1248 #define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall") 1248 1249 1250 + #endif /* __KERNEL__ */ 1249 1251 #endif /* _ASM_UNISTD_H */
+2 -2
include/asm-parisc/unistd.h
··· 792 792 #define HPUX_GATEWAY_ADDR 0xC0000004 793 793 #define LINUX_GATEWAY_ADDR 0x100 794 794 795 + #ifdef __KERNEL__ 795 796 #ifndef __ASSEMBLY__ 796 797 797 798 #define SYS_ify(syscall_name) __NR_##syscall_name ··· 935 934 return K_INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \ 936 935 } 937 936 938 - #ifdef __KERNEL__ 939 937 #define __ARCH_WANT_OLD_READDIR 940 938 #define __ARCH_WANT_STAT64 941 939 #define __ARCH_WANT_SYS_ALARM ··· 956 956 #define __ARCH_WANT_SYS_SIGPENDING 957 957 #define __ARCH_WANT_SYS_SIGPROCMASK 958 958 #define __ARCH_WANT_SYS_RT_SIGACTION 959 - #endif 960 959 961 960 /* mmap & mmap2 take 6 arguments */ 962 961 #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ ··· 1055 1056 */ 1056 1057 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 1057 1058 1059 + #endif /* __KERNEL__ */ 1058 1060 #endif /* _ASM_PARISC_UNISTD_H_ */
+3 -4
include/asm-powerpc/unistd.h
··· 305 305 #define __NR_tee 284 306 306 #define __NR_vmsplice 285 307 307 308 + #ifdef __KERNEL__ 309 + 308 310 #define __NR_syscalls 286 309 311 310 - #ifdef __KERNEL__ 311 312 #define __NR__exit __NR_exit 312 313 #define NR_syscalls __NR_syscalls 313 - #endif 314 314 315 315 #ifndef __ASSEMBLY__ 316 316 ··· 422 422 __syscall_nr(6, type, name, arg1, arg2, arg3, arg4, arg5, arg6); \ 423 423 } 424 424 425 - #ifdef __KERNEL__ 426 425 427 426 #include <linux/types.h> 428 427 #include <linux/compiler.h> ··· 477 478 #define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall") 478 479 #endif 479 480 480 - #endif /* __KERNEL__ */ 481 481 482 482 #endif /* __ASSEMBLY__ */ 483 + #endif /* __KERNEL__ */ 483 484 484 485 #endif /* _ASM_PPC_UNISTD_H_ */
+4 -3
include/asm-s390/unistd.h
··· 386 386 387 387 #endif 388 388 389 + #ifdef __KERNEL__ 390 + 389 391 /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */ 390 392 391 393 #define __syscall_return(type, res) \ ··· 542 540 __syscall_return(type,__res); \ 543 541 } 544 542 545 - #ifdef __KERNEL__ 546 543 #define __ARCH_WANT_IPC_PARSE_VERSION 547 544 #define __ARCH_WANT_OLD_READDIR 548 545 #define __ARCH_WANT_SYS_ALARM ··· 568 567 # define __ARCH_WANT_COMPAT_SYS_TIME 569 568 # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 570 569 # endif 571 - #endif 572 570 573 571 #ifdef __KERNEL_SYSCALLS__ 574 572 ··· 618 618 struct sigaction __user *oact, 619 619 size_t sigsetsize); 620 620 621 - #endif 621 + #endif /* __KERNEL_SYSCALLS__ */ 622 622 623 623 /* 624 624 * "Conditional" syscalls ··· 628 628 */ 629 629 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 630 630 631 + #endif /* __KERNEL__ */ 631 632 #endif /* _ASM_S390_UNISTD_H_ */
+4 -3
include/asm-sh/unistd.h
··· 304 304 305 305 #define NR_syscalls 293 306 306 307 + #ifdef __KERNEL__ 308 + 307 309 /* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */ 308 310 309 311 #define __syscall_return(type, res) \ ··· 422 420 __syscall_return(type,__sc0); \ 423 421 } 424 422 425 - #ifdef __KERNEL__ 426 423 #define __ARCH_WANT_IPC_PARSE_VERSION 427 424 #define __ARCH_WANT_OLD_READDIR 428 425 #define __ARCH_WANT_OLD_STAT ··· 444 443 #define __ARCH_WANT_SYS_SIGPENDING 445 444 #define __ARCH_WANT_SYS_SIGPROCMASK 446 445 #define __ARCH_WANT_SYS_RT_SIGACTION 447 - #endif 448 446 449 447 #ifdef __KERNEL_SYSCALLS__ 450 448 ··· 513 513 struct sigaction __user *oact, 514 514 size_t sigsetsize); 515 515 516 - #endif 516 + #endif /* __KERNEL_SYSCALLS__ */ 517 517 518 518 /* 519 519 * "Conditional" syscalls ··· 525 525 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 526 526 #endif 527 527 528 + #endif /* __KERNEL__ */ 528 529 #endif /* __ASM_SH_UNISTD_H */
+4 -3
include/asm-sh64/unistd.h
··· 344 344 #define __NR_inotify_add_watch 319 345 345 #define __NR_inotify_rm_watch 320 346 346 347 + #ifdef __KERNEL__ 348 + 347 349 #define NR_syscalls 321 348 350 349 351 /* user-visible error numbers are in the range -1 - -125: see <asm-sh64/errno.h> */ ··· 488 486 __syscall_return(type,__sc0); \ 489 487 } 490 488 491 - #ifdef __KERNEL__ 492 489 #define __ARCH_WANT_IPC_PARSE_VERSION 493 490 #define __ARCH_WANT_OLD_READDIR 494 491 #define __ARCH_WANT_OLD_STAT ··· 510 509 #define __ARCH_WANT_SYS_SIGPENDING 511 510 #define __ARCH_WANT_SYS_SIGPROCMASK 512 511 #define __ARCH_WANT_SYS_RT_SIGACTION 513 - #endif 514 512 515 513 #ifdef __KERNEL_SYSCALLS__ 516 514 ··· 550 550 { 551 551 return waitpid(-1,wait_stat,0); 552 552 } 553 - #endif 553 + #endif /* __KERNEL_SYSCALLS__ */ 554 554 555 555 /* 556 556 * "Conditional" syscalls ··· 562 562 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 563 563 #endif 564 564 565 + #endif /* __KERNEL__ */ 565 566 #endif /* __ASM_SH64_UNISTD_H */
+2 -2
include/asm-sparc/unistd.h
··· 317 317 #define __NR_ppoll 298 318 318 #define __NR_unshare 299 319 319 320 + #ifdef __KERNEL__ 320 321 /* WARNING: You MAY NOT add syscall numbers larger than 299, since 321 322 * all of the syscall tables in the Sparc kernel are 322 323 * sized to have 299 entries (starting at zero). Therefore ··· 454 453 return -1; \ 455 454 } 456 455 457 - #ifdef __KERNEL__ 458 456 #define __ARCH_WANT_IPC_PARSE_VERSION 459 457 #define __ARCH_WANT_OLD_READDIR 460 458 #define __ARCH_WANT_STAT64 ··· 475 475 #define __ARCH_WANT_SYS_SIGPENDING 476 476 #define __ARCH_WANT_SYS_SIGPROCMASK 477 477 #define __ARCH_WANT_SYS_RT_SIGSUSPEND 478 - #endif 479 478 480 479 #ifdef __KERNEL_SYSCALLS__ 481 480 ··· 531 532 */ 532 533 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 533 534 535 + #endif /* __KERNEL__ */ 534 536 #endif /* _SPARC_UNISTD_H */
+2 -2
include/asm-sparc64/unistd.h
··· 319 319 #define __NR_ppoll 298 320 320 #define __NR_unshare 299 321 321 322 + #ifdef __KERNEL__ 322 323 /* WARNING: You MAY NOT add syscall numbers larger than 299, since 323 324 * all of the syscall tables in the Sparc kernel are 324 325 * sized to have 299 entries (starting at zero). Therefore ··· 486 485 487 486 #endif /* __KERNEL_SYSCALLS__ */ 488 487 489 - #ifdef __KERNEL__ 490 488 /* sysconf options, for SunOS compatibility */ 491 489 #define _SC_ARG_MAX 1 492 490 #define _SC_CHILD_MAX 2 ··· 519 519 #define __ARCH_WANT_SYS_SIGPROCMASK 520 520 #define __ARCH_WANT_SYS_RT_SIGSUSPEND 521 521 #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 522 - #endif 523 522 524 523 /* 525 524 * "Conditional" syscalls ··· 528 529 */ 529 530 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 530 531 532 + #endif /* __KERNEL__ */ 531 533 #endif /* _SPARC64_UNISTD_H */
+4 -8
include/asm-v850/unistd.h
··· 14 14 #ifndef __V850_UNISTD_H__ 15 15 #define __V850_UNISTD_H__ 16 16 17 - #include <asm/clinkage.h> 18 - 19 17 #define __NR_restart_syscall 0 20 18 #define __NR_exit 1 21 19 #define __NR_fork 2 ··· 235 237 except the syscall number (r12). */ 236 238 #define SYSCALL_SHORT_CLOBBERS SYSCALL_CLOBBERS, "r13", "r14" 237 239 240 + #ifdef __KERNEL__ 238 241 239 - /* User programs sometimes end up including this header file 240 - (indirectly, via uClibc header files), so I'm a bit nervous just 241 - including <linux/compiler.h>. */ 242 + #include <asm/clinkage.h> 242 243 243 244 #define __syscall_return(type, res) \ 244 245 do { \ ··· 365 368 } 366 369 367 370 368 - #ifdef __KERNEL__ 369 371 #define __ARCH_WANT_IPC_PARSE_VERSION 370 372 #define __ARCH_WANT_OLD_READDIR 371 373 #define __ARCH_WANT_STAT64 ··· 385 389 #define __ARCH_WANT_SYS_SIGPENDING 386 390 #define __ARCH_WANT_SYS_SIGPROCMASK 387 391 #define __ARCH_WANT_SYS_RT_SIGACTION 388 - #endif 389 392 390 393 #ifdef __KERNEL_SYSCALLS__ 391 394 ··· 435 440 struct sigaction __user *oact, 436 441 size_t sigsetsize); 437 442 438 - #endif 443 + #endif /* __KERNEL_SYSCALLS__ */ 439 444 440 445 /* 441 446 * "Conditional" syscalls ··· 450 455 void name (void) __attribute__ ((weak, alias ("sys_ni_syscall"))); 451 456 #endif 452 457 458 + #endif /* __KERNEL__ */ 453 459 #endif /* __V850_UNISTD_H__ */
+4 -3
include/asm-x86_64/unistd.h
··· 618 618 #define __NR_vmsplice 278 619 619 __SYSCALL(__NR_vmsplice, sys_vmsplice) 620 620 621 + #ifdef __KERNEL__ 622 + 621 623 #define __NR_syscall_max __NR_vmsplice 622 624 623 625 #ifndef __NO_STUBS ··· 637 635 return (type) (res); \ 638 636 } while (0) 639 637 640 - #ifdef __KERNEL__ 641 638 #define __ARCH_WANT_OLD_READDIR 642 639 #define __ARCH_WANT_OLD_STAT 643 640 #define __ARCH_WANT_SYS_ALARM ··· 658 657 #define __ARCH_WANT_SYS_RT_SIGACTION 659 658 #define __ARCH_WANT_SYS_TIME 660 659 #define __ARCH_WANT_COMPAT_SYS_TIME 661 - #endif 662 660 663 661 #ifndef __KERNEL_SYSCALLS__ 664 662 ··· 821 821 822 822 #endif /* __KERNEL_SYSCALLS__ */ 823 823 824 - #if !defined(__ASSEMBLY__) && defined(__KERNEL__) 824 + #ifndef __ASSEMBLY__ 825 825 826 826 #include <linux/linkage.h> 827 827 #include <linux/compiler.h> ··· 848 848 */ 849 849 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 850 850 851 + #endif /* __KERNEL__ */ 851 852 #endif
+3 -18
include/asm-xtensa/unistd.h
··· 11 11 #ifndef _XTENSA_UNISTD_H 12 12 #define _XTENSA_UNISTD_H 13 13 14 - #include <linux/linkage.h> 15 - 16 14 #define __NR_spill 0 17 15 #define __NR_exit 1 18 16 #define __NR_read 3 ··· 219 221 #define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/ 220 222 221 223 #ifdef __KERNEL__ 222 - #define __syscall_return(type, res) return ((type)(res)) 223 - #else 224 - #define __syscall_return(type, res) \ 225 - do { \ 226 - if ((unsigned long)(res) >= (unsigned long)(-125)) { \ 227 - /* Avoid using "res" which is declared to be in register r2; \ 228 - * errno might expand to a function call and clobber it. */ \ 229 - int __err = -(res); \ 230 - errno = __err; \ 231 - res = -1; \ 232 - } \ 233 - return (type) (res); \ 234 - } while (0) 235 - #endif 224 + #include <linux/linkage.h> 236 225 226 + #define __syscall_return(type, res) return ((type)(res)) 237 227 238 228 /* Tensilica's xt-xcc compiler is much more agressive at code 239 229 * optimization than gcc. Multiple __asm__ statements are ··· 415 429 */ 416 430 #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); 417 431 418 - #ifdef __KERNEL__ 419 432 #define __ARCH_WANT_STAT64 420 433 #define __ARCH_WANT_SYS_UTIME 421 434 #define __ARCH_WANT_SYS_LLSEEK 422 435 #define __ARCH_WANT_SYS_RT_SIGACTION 423 - #endif 436 + #endif /* __KERNEL__ */ 424 437 425 438 #endif /* _XTENSA_UNISTD_H */