From: "Arnd Bergmann" <arnd@kernel.org>
To: "Daniel Palmer" <daniel@thingy.jp>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-m68k@lists.linux-m68k.org
Subject: Re: [PATCH 2/2] virtio-mmio: Use raw io accessors to avoid arch issues
Date: Sat, 14 Mar 2026 16:06:13 +0100 [thread overview]
Message-ID: <ada73dc9-edf5-458c-8849-9f9db23ff304@app.fastmail.com> (raw)
In-Reply-To: <CAFr9PXmG6=NjscnsS=DHgyiyCsNSh8kaGyO1ujPHOsFySZhjMw@mail.gmail.com>
On Sat, Mar 14, 2026, at 09:32, Daniel Palmer wrote:
> On Sat, 14 Mar 2026 at 16:42, Arnd Bergmann <arnd@kernel.org> wrote:
>> -
>> -#define readb __raw_readb
>> -#define readw __raw_readw
>> -#define readl __raw_readl
>> -#define writeb __raw_writeb
>> -#define writew __raw_writew
>> -#define writel __raw_writel
>> -
>> #endif /* IOMEMBASE */
>>
>> #if defined(CONFIG_PCI)
>>
>> Can you try if this works?
>
> This builds but doesn't boot on my devicetree'd dragonball branch. I
> don't think it's possible to boot the stuff that is in mainline (and
> you wouldn't know if it booted or not due to the lack of a serial
> driver). I think I can fix my stuff so it works with the changes in
> readl() etc but I think there are a few other people that have their
> own 68000 trees for weird custom boards and I guess this might break
> their stuff. Not saying we should force a change onto virtio-mmio
> because of weird hobby projects. Not sure what to do.
I don't think you need to worry about breaking stuff that is not
upstream: it is the expected cost of maintaining custom patches,
and you probably know who those people are so you can warn them.
I tried to find dragonball specific drivers in the source tree
but couldn't find anything that actually uses readl/writel.
Since it didn't boot for you, there is clearly something, but
I wonder if most of that is just your own out-of-tree code that
works around the endianess bug in asm/io.h by having the opposite
bug in the driver, i.e. using readl() or ioread32() to read a
big-endian word where it should have been ioread32_be().
Arnd
prev parent reply other threads:[~2026-03-14 15:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 3:06 [PATCH 0/2] Allow virtio-mmio to work on m68k nommu 68000 Daniel Palmer
2026-03-14 3:06 ` [PATCH 1/2] virtio-mmio: Replace sizeof x with sizeof(x) Daniel Palmer
2026-03-14 3:06 ` [PATCH 2/2] virtio-mmio: Use raw io accessors to avoid arch issues Daniel Palmer
2026-03-14 7:42 ` Arnd Bergmann
2026-03-14 8:32 ` Daniel Palmer
2026-03-14 15:06 ` Arnd Bergmann [this message]
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=ada73dc9-edf5-458c-8849-9f9db23ff304@app.fastmail.com \
--to=arnd@kernel.org \
--cc=daniel@thingy.jp \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox