All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Greg KH <greg@kroah.com>
Cc: Laurent Vivier <laurent@vivier.eu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-rtc@vger.kernel.org,
	Alessandro Zummo <a.zummo@towertech.it>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	John Stultz <john.stultz@linaro.org>,
	"# 3.4.x" <stable@vger.kernel.org>
Subject: Re: [PATCH v12 2/5] tty: goldfish: introduce gf_ioread32()/gf_iowrite32()
Date: Wed, 26 Jan 2022 15:15:23 +0100	[thread overview]
Message-ID: <CAK8P3a32PRo4OJmUPmgnhp_14biz4bfs5BnDXej1itwOfkuvKA@mail.gmail.com> (raw)
In-Reply-To: <YfFPjOEELiTWr2uj@kroah.com>

On Wed, Jan 26, 2022 at 2:41 PM Greg KH <greg@kroah.com> wrote:
>
> On Fri, Jan 21, 2022 at 09:07:35PM +0100, Laurent Vivier wrote:
> > Revert
> > commit da31de35cd2f ("tty: goldfish: use __raw_writel()/__raw_readl()")
>
> Why?
>
> > and define gf_ioread32()/gf_iowrite32() to be able to use accessors
> > defined by the architecture.
>
> What does this do?

The reverted commit was an incorrect workaround for an old qemu bug:

The goldfish devices are apparently defined as "native" endianness,
which in qemu is whatever the architecture maintainers thought it should
be at the time (little-endian on arm, big-endian on powerpc, board
specific on mips, etc.) but independent of what kernel is actually running
on the machine if the CPU supports both.

m68k in qemu picked big-endian here, which is the opposite of what
the kernel driver does, presumably because that is the endianness of
the CPU itself.

Since we can't fix qemu any more, and runtime detection doesn't work
on machines without devicetree, having a sane default (whatever the
driver used to do) and an architecture specific override for those that
got it wrong is probably our best option.

       Arnd

  reply	other threads:[~2022-01-26 14:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 20:07 [PATCH v12 0/5] m68k: Add Virtual M68k Machine Laurent Vivier
2022-01-21 20:07 ` [PATCH v12 1/5] m68k: add asm/config.h Laurent Vivier
2022-01-21 20:07 ` [PATCH v12 2/5] tty: goldfish: introduce gf_ioread32()/gf_iowrite32() Laurent Vivier
2022-01-26 13:41   ` Greg KH
2022-01-26 14:15     ` Arnd Bergmann [this message]
2022-01-26 17:32     ` Laurent Vivier
2022-01-21 20:07 ` [PATCH v12 3/5] rtc: goldfish: use gf_ioread32()/gf_iowrite32() Laurent Vivier
2022-01-21 20:07 ` [PATCH v12 4/5] clocksource/drivers: Add a goldfish-timer clocksource Laurent Vivier
2022-01-26 11:55   ` Daniel Lezcano
2022-01-26 17:14     ` Laurent Vivier
2022-01-26 17:25       ` Daniel Lezcano
2022-01-21 20:07 ` [PATCH v12 5/5] m68k: introduce a virtual m68k machine Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a32PRo4OJmUPmgnhp_14biz4bfs5BnDXej1itwOfkuvKA@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=greg@kroah.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=john.stultz@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.