[PATCH V4 08/17] riscv: compat: syscall: Add compat_sys_call_table implementation
Arnd Bergmann
arnd at arndb.de
Sun Jan 30 03:32:29 PST 2022
On Sun, Jan 30, 2022 at 6:54 AM Guo Ren <guoren at kernel.org> wrote:
> On Sun, Jan 30, 2022 at 6:41 AM Arnd Bergmann <arnd at arndb.de> wrote:
> >
> > I would make these endian-specific, and reverse them on big-endian
> > architectures. That way it
> > should be possible to share them across all compat architectures
> > without needing the override
> > option.
> I hope it could be another patch. Because it's not clear to
> _LITTLE_ENDIAN definition in archs.
>
> eg: Names could be __ORDER_LITTLE_ENDIAN__ CPU_LITTLE_ENDIAN
> SYS_SUPPORTS_LITTLE_ENDIAN __LITTLE_ENDIAN
>
> riscv is little-endian, but no any LITTLE_ENDIAN definition.
>
> So let's keep them in the patch, first, Thx
The correct way to do it is to check for CONFIG_CPU_BIG_ENDIAN,
which works on all architectures. Since nothing else selects the
__ARCH_WANT_COMPAT_* symbols, there is also no risk for
regressions, so just use this and leave the #ifndef compat_arg_u64
check in place.
Arnd
More information about the linux-riscv
mailing list