On Sat, Mar 14, 2026, at 09:32, Daniel Palmer wrote:
> On Sat, 14 Mar 2026 at 16:42, Arnd Bergmann <[email protected]> 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

Reply via email to