get rid of duplicate logics in __SC_....[1-6] definitions

All those guys have the same form - "take a list of type/name pairs,
apply some macro to each of them".  Abstract that part away, convert
all __SC_FOO##x(__VA_ARGS__) to __MAP(x,__SC_FOO,__VA_ARGS__).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
teach SYSCALL_DEFINE<n> how to deal with long long/unsigned long long

... and convert a bunch of SYSCALL_DEFINE ones to SYSCALL_DEFINE<n>,
killing the boilerplate crap around them.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
consolidate cond_syscall and SYSCALL_ALIAS declarations

take them to asm/linkage.h, with default in linux/linkage.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
make HAVE_SYSCALL_WRAPPERS unconditional

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
make SYSCALL_DEFINE<n>-generated wrappers do asmlinkage_protect

... and switch i386 to HAVE_SYSCALL_WRAPPERS, killing open-coded
uses of asmlinkage_protect() in a bunch of syscalls.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
switch signalfd{,4}() to COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
convert sendfile{,64} to COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
switch epoll_pwait to COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
switch getrusage() to COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
convert vmsplice to COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
consolidate compat lookup_dcookie()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
merge compat sys_ipc instances

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
get rid of compat_sys_semctl() and friends in case of ARCH_WANT_OLD_COMPAT_IPC

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
x86: sys32_kill and sys32_mprotect are pointless

their argument types are identical to those of sys_kill and sys_mprotect
resp., so we are not doing any kind of argument validation, etc. in those -
they turn into unconditional branches to corresponding syscalls.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
x86: trim sys_ia32.h

remove the externs for functions that don't exist anymore

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
ppc compat wrappers for add_key(2) and request_key(2) are pointless

all argument validation is done by SYSCALL_DEFINE wrappers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
sparc: no need to sign-extend in sync_file_range() wrapper

the first argument will be sign-extended by sys_sync_file_range()
SYSCALL_DEFINE-generate wrapper; the last argument is unsigned int,
so the same wrapper will will truncate it anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
make do_mremap() static

The extern in sys_sparc_64.c was a rudiment of time when do_mremap()
used to exist in MMU case (it doesn't anymore).  As for !MMU one,
nothing uses it outside of mm/nommu.c...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
get rid of union semop in sys_semctl(2) arguments

just have the bugger take unsigned long and deal with SETVAL
case (when we use an int member in the union) explicitly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
syscalls.h: slightly reduce the jungles of macros

a) teach __MAP(num, m, <list of type/name pairs>) to take empty
list (with num being 0, of course)
b) fold types__... and args__... declaration and initialization into
SYSCALL_METADATA(num, ...), making their use conditional on num != 0.
That allows to use the SYSCALL_METADATA instead of its near-duplicate
in SYSCALL_DEFINE0.
c) make SYSCALL_METADATA expand to nothing in case if CONFIG_FTRACE_SYSCALLS
is not defined; that allows to make SYSCALL_DEFINE0 and SYSCALL_DEFINEx
definitions independent from CONFIG_FTRACE_SYSCALLS.
d) kill SYSCALL_DEFINE - no users left (SYSCALL_DEFINE[0-6] is, of course,
still alive and well).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>