lkml.org 
[lkml]   [2022]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 3/4] clocksource/drivers: Add a goldfish-timer clocksource
Le 16/01/2022 à 11:44, Arnd Bergmann a écrit :
> On Sat, Jan 15, 2022 at 8:32 PM Laurent Vivier <laurent@vivier.eu> wrote:
>
>> +
>> +/* goldfish endianness depends on CPU endianness */
>> +#ifdef CONFIG_CPU_BIG_ENDIAN
>> +#define goldfish_ioread32 ioread32be
>> +#define goldfish_iowrite32 iowrite32be
>> +#else
>> +#define goldfish_ioread32 ioread32
>> +#define goldfish_iowrite32 iowrite32
>> +#endif
>
> This is not what I meant here, as you are breaking big-endian support
> for all other
> architectures in the process.
>
> On architectures that support both big-endian and little-endian kernels, devices
> (including emulated ones) can't know which type of kernel you are running, so
> this has to be fixed by architecture. Ideally this macro should be in
> an architecture
> specific header file, but you can also just make this a check for m68k and hope
> that qemu doesn't duplicate this bug on architectures that gain support for this
> driver in the future.
>

Is it OK if I replace "CONFIG_CPU_BIG_ENDIAN" by "CONFIG_M68K" as M68K is the only big-endian
architecture using goldfish?

Thanks,
Laurent

\
 
 \ /
  Last update: 2022-01-16 11:57    [W:1.323 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site