[PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"

Arnd Bergmann arnd at arndb.de
Sat Aug 31 23:44:15 AEST 2019


On Sat, Aug 31, 2019 at 10:39 AM Christoph Hellwig <hch at infradead.org> wrote:
>
> 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.

The reason we currently use  __ARCH_WANT_SYS_* for all the other conditional
system calls is that these macros can be put into the uapi file for use by
include/uapi/asm/unistd.h, which is not possible with CONFIG_*
symbols.

This is not a problem for llseek, but it would be slightly inconsistent.

Nitesh is trying to convert include/uapi/asm/unistd.h into syscall.tbl format,
after that is done, we can probably change all the __ARCH_WANT_SYS_*
into config symbols.

       Arnd


More information about the Linuxppc-dev mailing list