asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro
The sys_llseek sytem call is needed on all 32-bit architectures and none of the 64-bit ones, so we can remove the __ARCH_WANT_SYS_LLSEEK guard and simplify the include/asm-generic/unistd.h header further. Since 32-bit tasks can run either natively or in compat mode on 64-bit architectures, we have to check for both !CONFIG_64BIT and CONFIG_COMPAT. There are a few 64-bit architectures that also reference sys_llseek in their 64-bit ABI (e.g. sparc), but I verified that those all select CONFIG_COMPAT, so the #if check is still correct here. It's a bit odd to include it in the syscall table though, as it's the same as sys_lseek() on 64-bit, but with strange calling conventions. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Родитель
fb37397594
Коммит
caf6f9c8a3
|
@ -21,7 +21,6 @@
|
||||||
#define __ARCH_WANT_SYS_GETHOSTNAME
|
#define __ARCH_WANT_SYS_GETHOSTNAME
|
||||||
#define __ARCH_WANT_SYS_PAUSE
|
#define __ARCH_WANT_SYS_PAUSE
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_SIGPENDING
|
#define __ARCH_WANT_SYS_SIGPENDING
|
||||||
#define __ARCH_WANT_SYS_SIGPROCMASK
|
#define __ARCH_WANT_SYS_SIGPROCMASK
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#define __ARCH_WANT_SYS_GETHOSTNAME
|
#define __ARCH_WANT_SYS_GETHOSTNAME
|
||||||
#define __ARCH_WANT_SYS_PAUSE
|
#define __ARCH_WANT_SYS_PAUSE
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_SIGPENDING
|
#define __ARCH_WANT_SYS_SIGPENDING
|
||||||
#define __ARCH_WANT_SYS_SIGPROCMASK
|
#define __ARCH_WANT_SYS_SIGPROCMASK
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#define __ARCH_WANT_SYS_SOCKETCALL
|
#define __ARCH_WANT_SYS_SOCKETCALL
|
||||||
#define __ARCH_WANT_SYS_FADVISE64
|
#define __ARCH_WANT_SYS_FADVISE64
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
||||||
#define __ARCH_WANT_SYS_OLD_MMAP
|
#define __ARCH_WANT_SYS_OLD_MMAP
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#define __ARCH_WANT_SYS_SOCKETCALL
|
#define __ARCH_WANT_SYS_SOCKETCALL
|
||||||
#define __ARCH_WANT_SYS_FADVISE64
|
#define __ARCH_WANT_SYS_FADVISE64
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
/* #define __ARCH_WANT_SYS_OLD_GETRLIMIT */
|
/* #define __ARCH_WANT_SYS_OLD_GETRLIMIT */
|
||||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#define __ARCH_WANT_SYS_WAITPID
|
#define __ARCH_WANT_SYS_WAITPID
|
||||||
#define __ARCH_WANT_SYS_SOCKETCALL
|
#define __ARCH_WANT_SYS_SOCKETCALL
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_OLD_UNAME
|
#define __ARCH_WANT_SYS_OLD_UNAME
|
||||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||||
|
|
|
@ -156,7 +156,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
|
||||||
#define __ARCH_WANT_SYS_SOCKETCALL
|
#define __ARCH_WANT_SYS_SOCKETCALL
|
||||||
#define __ARCH_WANT_SYS_FADVISE64
|
#define __ARCH_WANT_SYS_FADVISE64
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||||
#define __ARCH_WANT_SYS_SIGPENDING
|
#define __ARCH_WANT_SYS_SIGPENDING
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#define __ARCH_WANT_SYS_SOCKETCALL
|
#define __ARCH_WANT_SYS_SOCKETCALL
|
||||||
#define __ARCH_WANT_SYS_FADVISE64
|
#define __ARCH_WANT_SYS_FADVISE64
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
||||||
#define __ARCH_WANT_SYS_OLD_UNAME
|
#define __ARCH_WANT_SYS_OLD_UNAME
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#define __ARCH_WANT_SYS_IPC
|
#define __ARCH_WANT_SYS_IPC
|
||||||
#define __ARCH_WANT_SYS_FADVISE64
|
#define __ARCH_WANT_SYS_FADVISE64
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
||||||
#define __ARCH_WANT_SYS_OLD_MMAP
|
#define __ARCH_WANT_SYS_OLD_MMAP
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
# define __ARCH_WANT_SYS_SOCKETCALL
|
# define __ARCH_WANT_SYS_SOCKETCALL
|
||||||
# define __ARCH_WANT_SYS_FADVISE64
|
# define __ARCH_WANT_SYS_FADVISE64
|
||||||
# define __ARCH_WANT_SYS_GETPGRP
|
# define __ARCH_WANT_SYS_GETPGRP
|
||||||
# define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
# define __ARCH_WANT_SYS_NICE
|
# define __ARCH_WANT_SYS_NICE
|
||||||
# define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
# define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
||||||
# define __ARCH_WANT_SYS_OLD_UNAME
|
# define __ARCH_WANT_SYS_OLD_UNAME
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#define __ARCH_WANT_SYS_SOCKETCALL
|
#define __ARCH_WANT_SYS_SOCKETCALL
|
||||||
#define __ARCH_WANT_SYS_FADVISE64
|
#define __ARCH_WANT_SYS_FADVISE64
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_NICE
|
#define __ARCH_WANT_SYS_NICE
|
||||||
#define __ARCH_WANT_SYS_OLDUMOUNT
|
#define __ARCH_WANT_SYS_OLDUMOUNT
|
||||||
#define __ARCH_WANT_SYS_SIGPENDING
|
#define __ARCH_WANT_SYS_SIGPENDING
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
# define __ARCH_WANT_SYS_FADVISE64
|
# define __ARCH_WANT_SYS_FADVISE64
|
||||||
# define __ARCH_WANT_SYS_GETHOSTNAME
|
# define __ARCH_WANT_SYS_GETHOSTNAME
|
||||||
# define __ARCH_WANT_SYS_GETPGRP
|
# define __ARCH_WANT_SYS_GETPGRP
|
||||||
# define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
# define __ARCH_WANT_SYS_NICE
|
# define __ARCH_WANT_SYS_NICE
|
||||||
# define __ARCH_WANT_SYS_OLDUMOUNT
|
# define __ARCH_WANT_SYS_OLDUMOUNT
|
||||||
# define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
# define __ARCH_WANT_SYS_OLD_GETRLIMIT
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#define __ARCH_WANT_NEW_STAT
|
#define __ARCH_WANT_NEW_STAT
|
||||||
#define __ARCH_WANT_STAT64
|
#define __ARCH_WANT_STAT64
|
||||||
#define __ARCH_WANT_SYS_UTIME
|
#define __ARCH_WANT_SYS_UTIME
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#define __ARCH_WANT_SYS_GETPGRP
|
#define __ARCH_WANT_SYS_GETPGRP
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -331,7 +331,7 @@ COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned i
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __ARCH_WANT_SYS_LLSEEK
|
#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
|
||||||
SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
|
SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
|
||||||
unsigned long, offset_low, loff_t __user *, result,
|
unsigned long, offset_low, loff_t __user *, result,
|
||||||
unsigned int, whence)
|
unsigned int, whence)
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#include <uapi/asm-generic/unistd.h>
|
#include <uapi/asm-generic/unistd.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* These are required system calls, we should
|
|
||||||
* invert the logic eventually and let them
|
|
||||||
* be selected by default.
|
|
||||||
*/
|
|
||||||
#if __BITS_PER_LONG == 32
|
|
||||||
#define __ARCH_WANT_SYS_LLSEEK
|
|
||||||
#endif
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче