Thread (23 messages) 23 messages, 3 authors, 2020-09-30

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

flat view

From: Linus Walleij <hidden>
Date: 2020-09-30 09:35:54

On Tue, Sep 29, 2020 at 3:22 PM Arnd Bergmann [off-list ref] wrote:
On Tue, Sep 29, 2020 at 3:11 PM Linus Walleij [off-list ref] wrote:
quoted
On Thu, Sep 17, 2020 at 9:16 AM Arnd Bergmann [off-list ref] wrote:
quoted
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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help