From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro" Date: Sat, 31 Aug 2019 01:38:49 -0700 Message-ID: <20190831083849.GA24644@infradead.org> References: <20190830194651.31043-1-msuchanek@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Arnd Bergmann Cc: Rich Felker , Linux-sh list , Benjamin Herrenschmidt , Heiko Carstens , Linux Kernel Mailing List , "James E.J. Bottomley" , Max Filippov , Guo Ren , "H. Peter Anvin" , sparclinux , Vincenzo Frascino , Will Deacon , linux-arch , linux-s390 , Yoshinori Sato , Michael Ellerman , Helge Deller , the arch/x86 maintainers , Russell King , Christian Borntraeger , Ingo Molnar , Geert List-Id: linux-arch.vger.kernel.org On Fri, Aug 30, 2019 at 09:54:43PM +0200, Arnd Bergmann wrote: > > -#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.