[PATCH] arm: io.h: Fix io accessors for KVM
Ilias Apalodimas
ilias.apalodimas at linaro.org
Mon Jun 16 20:43:26 CEST 2025
On Mon, 16 Jun 2025 at 19:42, Tom Rini <trini at konsulko.com> wrote:
>
> On Mon, Jun 16, 2025 at 04:11:32PM +0300, Ilias Apalodimas wrote:
> > Hi Jerome,
> >
> > [...]
> >
> > >
> > > If I'm not mistaken, this patch is doing two things that are unrelated:
> > > (1) fix the KVM issue and
> > > (2) get rid of the __arch_*() macros in favor of the __raw_*() macros
> >
> > I can split it, but I don't see much point since we redefine the raw_macros.
>
> For point 2, I'm not sure it's worth splitting, no.
>
> > > IMO this should be two separate patches.
> > >
> > > >
> > > > /*
> > > > * The compiler seems to be incapable of optimising constants
> > > > diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
> > > > index f2393c041f44..545561ad1169 100644
> > > > --- a/drivers/spi/fsl_dspi.c
> > > > +++ b/drivers/spi/fsl_dspi.c
> > > > @@ -123,8 +123,10 @@ static uint dspi_read32(uint flags, uint *addr)
> > > >
> > > > static void dspi_write32(uint flags, uint *addr, uint val)
> > > > {
> > > > - flags & DSPI_FLAG_REGMAP_ENDIAN_BIG ?
> > > > - out_be32(addr, val) : out_le32(addr, val);
> > > > + if (flags & DSPI_FLAG_REGMAP_ENDIAN_BIG)
> > > > + out_be32(addr, val);
> > > > + else
> > > > + out_le32(addr, val);
> > > > }
> > >
> > > Unrelated change
> >
> > Due to the the new do {} while(0) macro this doesn't compile, so it
> > needs to go together.
>
> It can be done first as what the driver does now is valid but
> clever-for-clever-sake, and cleaning this up is valid before the new
> macros.
>
Ok looking at it again, the platforms that need changing are v7 only.
Due to to issues mentioned in the commit message, I decided not to
change v7, so i can drop these completely now.
I'll send a v2 with the IO changes only.
Thanks
/Ilias
> --
> Tom
More information about the U-Boot
mailing list