[PATCH v5 0/8] Add virtio-mmio support to m68k virt machine

Daniel Palmer daniel at thingy.jp
Tue May 5 04:11:24 CEST 2026


Hi Tom,

On Tue, 5 May 2026 at 07:10, Tom Rini <trini at konsulko.com> wrote:
>
> On Thu, Apr 16, 2026 at 06:39:19PM +0900, Daniel Palmer wrote:
>
> > Lets start making the m68k virt machine support useful.
> >
> > First we need to fix some m68k endian issues.
> >
> > Then allow virtio mmio driver instances to be created with
> > platform data and fix a minor endian issue.
> >
> > Finally, add the code for the board to create the instances.
>
> We get this in CI:
> drivers/virtio/virtio_mmio.c:359:15: warning: cast to 'void *' from
>  smaller integer type 'phys_addr_t' (aka 'unsigned int') [-Wint-to-void-pointer-cast]
>   359 |         priv->base = (void __iomem *)plat->base;
>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~                                      1 warning generated.
>
> With clang, please fix.

That seems to be a 64bit cpu that has 32bit phys_addr_t
(CONFIG_PHYS_64BIT=n)? Would this be acceptable:
priv->base = (void __iomem *)(uintptr_t)plat->base

That would extend plat->base up to 64bits where needed and I guess
that is ok because if you have a 64bit cpu but a 32bit phys_addr_t you
don't have anything above 4GB that you want to access?

Cheers,

Daniel


More information about the U-Boot mailing list