[PATCH] asm-generic: compat: fix compat_arg_u64 and compat_arg_u64_dual

Arnd Bergmann arnd at arndb.de
Thu Nov 3 19:48:17 AEDT 2022


On Thu, Nov 3, 2022, at 09:20, Christophe Leroy wrote:
>>   
>>   #ifndef compat_arg_u64
>> -#ifdef CONFIG_CPU_BIG_ENDIAN
>> +#ifndef CONFIG_CPU_BIG_ENDIAN
>
> Could be CONFIG_CPU_LITTLE_ENDIAN then ?

I don't think that symbol exists on all architectures, unlike
CONFIG_CPU_BIG_ENDIAN. Checkig "#ifdef __LITTLE_ENDIAN" would
work, that is the traditional way though it is a bit confusing
because it is used differently in userland, which requires
writing "#if __BYTE_ORDER == __LITTLE_ENDIAN".

       Arnd


More information about the Linuxppc-dev mailing list