[PATCH v3 04/21] powerpc/mm: Do radix device tree scanning earlier

Balbir Singh bsingharora at gmail.com
Thu Jul 28 21:55:58 AEST 2016


On Thu, Jul 28, 2016 at 06:11:18PM +1000, Michael Ellerman wrote:
> Balbir Singh <bsingharora at gmail.com> writes:
> 
> > On 28/07/16 00:18, Michael Ellerman wrote:
> >> diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c
> >> index 003ff48a11b6..f34ccdbe0fbd 100644
> >> --- a/arch/powerpc/mm/pgtable-radix.c
> >> +++ b/arch/powerpc/mm/pgtable-radix.c
> >> @@ -343,7 +343,6 @@ void __init radix__early_init_mmu(void)
> >>  	__pte_frag_nr = H_PTE_FRAG_NR;
> >>  	__pte_frag_size_shift = H_PTE_FRAG_SIZE_SHIFT;
> >>  
> >> -	radix_init_page_sizes();
> >>  	if (!firmware_has_feature(FW_FEATURE_LPAR)) {
> >>  		radix_init_native();
> >>  		lpcr = mfspr(SPRN_LPCR);
> >>
> >
> > If I am reading this correctly, radix_init_page_sizes() has become
> > radix__early_init_devtree() where as hash__early_init_devtree() initializes
> > both segment and page sizes? I would still like to keep
> >
> > mmu_early_init_devtree()
> > 	-> radix__early_init_devtree()
> > 		-> radix__init_page_sizes()
> 
> But then radix__early_init_devtree() would just be:
> 
> void radix__early_init_devtree(void)
> {
>     radix__init_page_sizes();
> }
> 
> Which seems silly.
>

But for a person parsing both hpte and radix bits, the code seems
saner and the compiler will do the right thing
 
> I'm doing a new version which splits the htab scanning from the page
> init more, as Ben suggested.
>

Sounds good

Balbir 


More information about the Linuxppc-dev mailing list