Machine specific static mappings iotable_init(), are they required ?

From: Suniel Mahesh
Date: Tue Aug 06 2019 - 09:20:00 EST


Hi,

I am trying to port a machine based on arm926 with MMU, having 64MB of RAM.

I am trying to understand the difference between:

machine specific static I/O mappings which are done via iotable_init()
(done via callback .map_io in DT_MACHINE_START) and
dynamic I/O mappings done via ioremap()

In the kernel docs/mailing list, I have encountered a statement which states:

"with machine specific static I/O mappings which are done via iotable_init(),
registers can be mapped at the upper end of vmalloc area so that one can use as
little of the VA space as possible so vmalloc and friends have a better chance of
getting memory"

I am writing board initialization C file and got stuck at .map_io callback function,
whether to define it or not. If yes, under what scenario should I do it

now-a-days I think less boards are using iotable_init(). (is this defunct) ?
I might be wrong here

Can't I use ioremap and do dynamic mappings when ever required via device tree ?
If I do so will I encounter any problems with vmalloc area.


Thanks & Regards
--
Suniel Mahesh