[PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros

Linus Walleij linus.walleij at linaro.org
Wed Sep 30 05:34:18 EDT 2020


On Tue, Sep 29, 2020 at 3:22 PM Arnd Bergmann <arnd at arndb.de> wrote:
> On Tue, Sep 29, 2020 at 3:11 PM Linus Walleij <linus.walleij at linaro.org> wrote:
> > On Thu, Sep 17, 2020 at 9:16 AM Arnd Bergmann <arnd at arndb.de> wrote:
> >
> > > If all of the devices in here are now also mapped using of_iomap() or
> > > ioremap(), then the iotables are not strictly needed any more, but most
> > > of them are 1MB section sized, which helps slightly reduce TLB usage
> > > compared to non-section ioremap() mappings, so we might want to
> > > keep them anyway, possibly with the constants moved from the header
> > > into the mm-imx??.c files.
> > >
> > > Adding Linus to Cc for further thoughts, as he was looking at the early
> > > io mappings recently.
> >
> > There is early fixmap which I think should replace the iotables
> > completely if we can, since it is generic kernel code. I was meaning
> > to look into this "at some point".
> >
> > The early fixmap seems to be page (0x1000) based so the iotables
> > might be more efficient if using 1MB sections but I doubt that it is
> > worth it.
>
> As far as I can tell, the 1MB section maps are the only reason
> this exists, as all of them are actually ioremap()ed later on before
> use.
>
> I don't know if it makes a difference to real-world performance.
> Note that there are only 64 TLB entries on ARM926, or 128 on
> ARM1136, so avoiding the lookup/eviction at least theoretically
> should be measurably faster.

Hm someone should benchmark this. If this is the case we are
kind of "punishing" all the all-out device tree platforms. It would
make sense to then support an optional 1MB section mapping
and make some of the crucial remaps (of_iomap_hot_io or
something), such as for the timer and
interrupt controllers, use this by default since they are on the
very-hot path.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list