[PATCH 2/7] ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers

Arnd Bergmann arnd at kernel.org
Tue Nov 17 09:39:37 EST 2020


On Tue, Nov 17, 2020 at 3:19 PM Geert Uytterhoeven <geert at linux-m68k.org> wrote:
>
> Hi Arnd,
>
> On Tue, Nov 17, 2020 at 1:25 PM Arnd Bergmann <arnd at kernel.org> wrote:
> > On Tue, Nov 17, 2020 at 11:30 AM Geert Uytterhoeven
> > <geert+renesas at glider.be> wrote:
> > > Replace using the legacy IOMEM() macro to map various registers related
> > > to INTC2 configuration by ioremap().
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
> >
> > The patch looks good, but since you are already touching these __raw_writel(),
> > could you turn them into normal writel() to have a chance that this works
> > on big-endian? It could be either a follow-up or merged into the same patch.
>
> (Do you want us to support big-endian on these old platforms? ;-)
>
> At your service. Seems to work well.

In general, my preference is that code is written in a portable way, to make
it at least plausible that it works. I don't expect anyone to actually run
big-endian code on it, but if you can confirm that it boots all the way
to not finding a compatible /sbin/init, that would be awesome.

I guess since the initialization writes (mostly) '1' bits into the irq
controller registers, it would (mostly) work even if endianness is
wrong ;-)

        Arnd



More information about the linux-arm-kernel mailing list