diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2012-03-28 04:10:05 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2012-03-28 04:10:05 -0400 |
| commit | 8bf6e1bcf49dfef23d3a4187be7d9c6bdbfd8210 (patch) | |
| tree | 60d958e4dfc02276974c2efb1800ea10df3eba10 /arch/sh/include/asm | |
| parent | 4eb80146f8ccd4e01d1320e42611b31cde7f06e7 (diff) | |
sh: Consolidate duplicate _32/_64 unistd definitions.
This does some more tidying and converging of the header split, following
the x86 example.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm')
| -rw-r--r-- | arch/sh/include/asm/unistd.h | 37 | ||||
| -rw-r--r-- | arch/sh/include/asm/unistd_32.h | 45 | ||||
| -rw-r--r-- | arch/sh/include/asm/unistd_64.h | 38 |
3 files changed, 40 insertions, 80 deletions
diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h index 65be656ead7d..a42a5610a36a 100644 --- a/arch/sh/include/asm/unistd.h +++ b/arch/sh/include/asm/unistd.h | |||
| @@ -1,9 +1,46 @@ | |||
| 1 | #ifdef __KERNEL__ | 1 | #ifdef __KERNEL__ |
| 2 | # ifdef CONFIG_SUPERH32 | 2 | # ifdef CONFIG_SUPERH32 |
| 3 | |||
| 3 | # include "unistd_32.h" | 4 | # include "unistd_32.h" |
| 5 | # define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
| 6 | |||
| 4 | # else | 7 | # else |
| 5 | # include "unistd_64.h" | 8 | # include "unistd_64.h" |
| 6 | # endif | 9 | # endif |
| 10 | |||
| 11 | # define __ARCH_WANT_IPC_PARSE_VERSION | ||
| 12 | # define __ARCH_WANT_OLD_READDIR | ||
| 13 | # define __ARCH_WANT_OLD_STAT | ||
| 14 | # define __ARCH_WANT_STAT64 | ||
| 15 | # define __ARCH_WANT_SYS_ALARM | ||
| 16 | # define __ARCH_WANT_SYS_GETHOSTNAME | ||
| 17 | # define __ARCH_WANT_SYS_IPC | ||
| 18 | # define __ARCH_WANT_SYS_PAUSE | ||
| 19 | # define __ARCH_WANT_SYS_SGETMASK | ||
| 20 | # define __ARCH_WANT_SYS_SIGNAL | ||
| 21 | # define __ARCH_WANT_SYS_TIME | ||
| 22 | # define __ARCH_WANT_SYS_UTIME | ||
| 23 | # define __ARCH_WANT_SYS_WAITPID | ||
| 24 | # define __ARCH_WANT_SYS_SOCKETCALL | ||
| 25 | # define __ARCH_WANT_SYS_FADVISE64 | ||
| 26 | # define __ARCH_WANT_SYS_GETPGRP | ||
| 27 | # define __ARCH_WANT_SYS_LLSEEK | ||
| 28 | # define __ARCH_WANT_SYS_NICE | ||
| 29 | # define __ARCH_WANT_SYS_OLD_GETRLIMIT | ||
| 30 | # define __ARCH_WANT_SYS_OLD_UNAME | ||
| 31 | # define __ARCH_WANT_SYS_OLDUMOUNT | ||
| 32 | # define __ARCH_WANT_SYS_SIGPENDING | ||
| 33 | # define __ARCH_WANT_SYS_SIGPROCMASK | ||
| 34 | # define __ARCH_WANT_SYS_RT_SIGACTION | ||
| 35 | |||
| 36 | /* | ||
| 37 | * "Conditional" syscalls | ||
| 38 | * | ||
| 39 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 40 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 41 | */ | ||
| 42 | # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
| 43 | |||
| 7 | #else | 44 | #else |
| 8 | # ifdef __SH5__ | 45 | # ifdef __SH5__ |
| 9 | # include "unistd_64.h" | 46 | # include "unistd_64.h" |
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h index 2b83a4980667..72fd1e061006 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/asm/unistd_32.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef __ASM_SH_UNISTD_H | 1 | #ifndef __ASM_SH_UNISTD_32_H |
| 2 | #define __ASM_SH_UNISTD_H | 2 | #define __ASM_SH_UNISTD_32_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * Copyright (C) 1999 Niibe Yutaka | 5 | * Copyright (C) 1999 Niibe Yutaka |
| @@ -381,43 +381,4 @@ | |||
| 381 | 381 | ||
| 382 | #define NR_syscalls 367 | 382 | #define NR_syscalls 367 |
| 383 | 383 | ||
| 384 | #ifdef __KERNEL__ | 384 | #endif /* __ASM_SH_UNISTD_32_H */ |
| 385 | |||
| 386 | #define __ARCH_WANT_IPC_PARSE_VERSION | ||
| 387 | #define __ARCH_WANT_OLD_READDIR | ||
| 388 | #define __ARCH_WANT_OLD_STAT | ||
| 389 | #define __ARCH_WANT_STAT64 | ||
| 390 | #define __ARCH_WANT_SYS_ALARM | ||
| 391 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
| 392 | #define __ARCH_WANT_SYS_IPC | ||
| 393 | #define __ARCH_WANT_SYS_PAUSE | ||
| 394 | #define __ARCH_WANT_SYS_SGETMASK | ||
| 395 | #define __ARCH_WANT_SYS_SIGNAL | ||
| 396 | #define __ARCH_WANT_SYS_TIME | ||
| 397 | #define __ARCH_WANT_SYS_UTIME | ||
| 398 | #define __ARCH_WANT_SYS_WAITPID | ||
| 399 | #define __ARCH_WANT_SYS_SOCKETCALL | ||
| 400 | #define __ARCH_WANT_SYS_FADVISE64 | ||
| 401 | #define __ARCH_WANT_SYS_GETPGRP | ||
| 402 | #define __ARCH_WANT_SYS_LLSEEK | ||
| 403 | #define __ARCH_WANT_SYS_NICE | ||
| 404 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | ||
| 405 | #define __ARCH_WANT_SYS_OLD_UNAME | ||
| 406 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
| 407 | #define __ARCH_WANT_SYS_SIGPENDING | ||
| 408 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
| 409 | #define __ARCH_WANT_SYS_RT_SIGACTION | ||
| 410 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
| 411 | |||
| 412 | /* | ||
| 413 | * "Conditional" syscalls | ||
| 414 | * | ||
| 415 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 416 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 417 | */ | ||
| 418 | #ifndef cond_syscall | ||
| 419 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
| 420 | #endif | ||
| 421 | |||
| 422 | #endif /* __KERNEL__ */ | ||
| 423 | #endif /* __ASM_SH_UNISTD_H */ | ||
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h index d6ef1afa3f0e..a28edc329692 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/asm/unistd_64.h | |||
| @@ -399,44 +399,6 @@ | |||
| 399 | #define __NR_process_vm_readv 376 | 399 | #define __NR_process_vm_readv 376 |
| 400 | #define __NR_process_vm_writev 377 | 400 | #define __NR_process_vm_writev 377 |
| 401 | 401 | ||
| 402 | #ifdef __KERNEL__ | ||
| 403 | |||
| 404 | #define NR_syscalls 378 | 402 | #define NR_syscalls 378 |
| 405 | 403 | ||
| 406 | #define __ARCH_WANT_IPC_PARSE_VERSION | ||
| 407 | #define __ARCH_WANT_OLD_READDIR | ||
| 408 | #define __ARCH_WANT_OLD_STAT | ||
| 409 | #define __ARCH_WANT_STAT64 | ||
| 410 | #define __ARCH_WANT_SYS_ALARM | ||
| 411 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
| 412 | #define __ARCH_WANT_SYS_IPC | ||
| 413 | #define __ARCH_WANT_SYS_PAUSE | ||
| 414 | #define __ARCH_WANT_SYS_SGETMASK | ||
| 415 | #define __ARCH_WANT_SYS_SIGNAL | ||
| 416 | #define __ARCH_WANT_SYS_TIME | ||
| 417 | #define __ARCH_WANT_SYS_UTIME | ||
| 418 | #define __ARCH_WANT_SYS_WAITPID | ||
| 419 | #define __ARCH_WANT_SYS_SOCKETCALL | ||
| 420 | #define __ARCH_WANT_SYS_FADVISE64 | ||
| 421 | #define __ARCH_WANT_SYS_GETPGRP | ||
| 422 | #define __ARCH_WANT_SYS_LLSEEK | ||
| 423 | #define __ARCH_WANT_SYS_NICE | ||
| 424 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | ||
| 425 | #define __ARCH_WANT_SYS_OLD_UNAME | ||
| 426 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
| 427 | #define __ARCH_WANT_SYS_SIGPENDING | ||
| 428 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
| 429 | #define __ARCH_WANT_SYS_RT_SIGACTION | ||
| 430 | |||
| 431 | /* | ||
| 432 | * "Conditional" syscalls | ||
| 433 | * | ||
| 434 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 435 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 436 | */ | ||
| 437 | #ifndef cond_syscall | ||
| 438 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
| 439 | #endif | ||
| 440 | |||
| 441 | #endif /* __KERNEL__ */ | ||
| 442 | #endif /* __ASM_SH_UNISTD_64_H */ | 404 | #endif /* __ASM_SH_UNISTD_64_H */ |
