[PATCH 2/3] powerpc/64s/radix: ioremap use ioremap_page_range

Christophe Leroy christophe.leroy at c-s.fr
Mon Aug 5 22:52:00 AEST 2019



Le 24/06/2019 à 05:12, Nicholas Piggin a écrit :
> Christophe Leroy's on June 20, 2019 2:25 am:
>>
>>
>> Le 19/06/2019 à 05:59, Nicholas Piggin a écrit :
>>> Christophe Leroy's on June 11, 2019 4:46 pm:
>>>>
>>>>
>>>> Le 10/06/2019 à 05:08, Nicholas Piggin a écrit :
>>> I would like to remove the early ioremap or make it into its own
>>> function. Re-implement map_kernel_page with ioremap_page_range,
>>> allow page tables that don't use slab to avoid the early check,
>>> unbolt the hptes mapped in early boot, etc.
>>
>> Getting early ioremap out of the picture is a very good idea, it will
>> help making things more common between all platform types. Today we face
>> the fact that PPC32 allocates early io from the top of memory while
>> PPC64 allocates it from the bottom of memory.
>>
>> Any idea on how to proceed ?
> 
> I have to have a bit better look at other arches and our platform
> code. Without having looked closely at all the details, I would hope
> we could use GENERIC_EARLY_IOREMAP without too much pain.
> 

Good idea.

I have looked at it and implemented it for PPC32. In its own it works 
well, now the challenge is to move all early call sites of ioremap() to 
early_ioremap().

I point however is that early_ioremap() expects all maps being released 
by the time we do paging_init(), whereas several of early PPC ioremap() 
users never release the mapped area. I think we have to dig into this in 
more details.

Christophe


More information about the Linuxppc-dev mailing list