Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"
From: Christoph Hellwig <hch@infradead.org>
Date: 2019-08-31 08:39:13
Also in:
linux-arch, linux-arm-kernel
From: Christoph Hellwig <hch@infradead.org>
Date: 2019-08-31 08:39:13
Also in:
linux-arch, linux-arm-kernel
On Fri, Aug 30, 2019 at 09:54:43PM +0200, Arnd Bergmann wrote:
quoted
-#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) +#ifdef __ARCH_WANT_SYS_LLSEEK SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high, unsigned long, offset_low, loff_t __user *, result, unsigned int, whence)However, only reverting the patch will now break all newly added 32-bit architectures that don't define __ARCH_WANT_SYS_LLSEEK: at least nds32 and riscv32 come to mind, not sure if there is another. I think the easiest way however would be to combine the two checks above and make it #if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) || defined(__ARCH_WANT_SYS_LLSEEK) and then only set __ARCH_WANT_SYS_LLSEEK for powerpc.
I'd much rather introduce a CONFIG_SYS_LLSEEK Kconfig symbol, selected by CONFIG_64BIT and CONFIG_COMPAT by default, plus manually by powerpc.