On 2020-10-05 14:35, Claudio Imbrenda wrote:
On Mon, 5 Oct 2020 13:54:42 +0200
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:
[...]
While doing a page allocator, the topology is not the only
characteristic we may need to specify.
Specific page characteristics like rights, access flags, cache
behavior may be useful when testing I/O for some architectures.
This obviously will need some connection to the MMU handling.
Wouldn't it be interesting to use a bitmap flag as argument to
page_alloc() to define separate regions, even if the connection with
the MMU is done in a future series?
the physical allocator is only concerned with the physical pages. if
you need special MMU flags to be set, then you should enable the MMU
and fiddle with the flags and settings yourself.
AFAIU the page_allocator() works on virtual addresses if the MMU has
been initialized.
Considering that more and more tests will enable the MMU by default,
eventually with a simple logical mapping, it seems to me that having the
possibility to give the page allocator more information about the page
access configuration could be interesting.
I find that using two different interfaces, both related to memory
handling, to have a proper memory configuration for an I/O page may be
complicated without some way to link page allocator and MMU tables together.
--
Pierre Morel
IBM Lab Boeblingen