Skip to content

Commit

Permalink
powerpc/mm: Do radix device tree scanning earlier
Browse files Browse the repository at this point in the history
Like we just did for hash, split the device tree scanning parts out and
call them from mmu_early_init_devtree().

Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
mpe committed Aug 1, 2016
1 parent bacf9cf commit 2537b09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/book3s/64/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ extern int mmu_io_psize;
/* MMU initialization */
void mmu_early_init_devtree(void);
void hash__early_init_devtree(void);
void radix__early_init_devtree(void);
extern void radix_init_native(void);
extern void hash__early_init_mmu(void);
extern void radix__early_init_mmu(void);
Expand Down
4 changes: 3 additions & 1 deletion arch/powerpc/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ void __init mmu_early_init_devtree(void)
if (disable_radix)
cur_cpu_spec->mmu_features &= ~MMU_FTR_RADIX;

if (!radix_enabled())
if (radix_enabled())
radix__early_init_devtree();
else
hash__early_init_devtree();
}
#endif /* CONFIG_PPC_STD_MMU_64 */
3 changes: 1 addition & 2 deletions arch/powerpc/mm/pgtable-radix.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static int __init radix_dt_scan_page_sizes(unsigned long node,
return 1;
}

static void __init radix_init_page_sizes(void)
void __init radix__early_init_devtree(void)
{
int rc;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2537b09

Please sign in to comment.