[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1H6-sd_+FqnOq0Zhj=L51EWuW5VCcYeTENcp3+PkTC4Q@mail.gmail.com>
Date: Fri, 14 Jan 2022 07:57:27 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Laurent Vivier <laurent@...ier.eu>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
linux-m68k <linux-m68k@...ts.linux-m68k.org>,
John Stultz <john.stultz@...aro.org>,
linux-rtc@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Stephen Boyd <sboyd@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>
Subject: Re: [PATCH v6 2/4] rtc: goldfish: use __raw_writel()/__raw_readl()
On Thu, Jan 13, 2022 at 9:19 PM Laurent Vivier <laurent@...ier.eu> wrote:
>
> As android implementation defines the endianness of the device is the one
> of the architecture replace all writel()/readl() by
> __raw_writel()/__raw_readl()
>
> https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/timer/goldfish_timer.c#177
>
> The same change has been done for goldfish-tty:
>
> commit da31de35cd2f ("tty: goldfish: use __raw_writel()/__raw_readl()")
>
> Signed-off-by: Laurent Vivier <laurent@...ier.eu>
__raw_readl() isn't really the correct interface though, this is not
well-defined to have
a particular meaning at all, and doesn't guarantee atomicity or a
particular endianess
across architectures.
I'd suggest defining a set of goldfish specific accessors per
architecture that turn
into either readl() or swabl(readl()), to allow future architectures
to define this
properly in qemu.
Arnd
Powered by blists - more mailing lists