@@ -197,6 +197,7 @@ extern int mmu_vmemmap_psize;
extern int mmu_io_psize;
/* MMU initialization */
+void update_cpu_features(void);
void mmu_early_init_devtree(void);
void hash__early_init_devtree(void);
void radix__early_init_devtree(void);
@@ -401,6 +401,7 @@ extern void early_init_mmu(void);
extern void early_init_mmu_secondary(void);
extern void setup_initial_memory_limit(phys_addr_t first_memblock_base,
phys_addr_t first_memblock_size);
+static inline void update_cpu_features(void) { }
static inline void mmu_early_init_devtree(void) { }
static inline void pkey_early_init_devtree(void) {}
@@ -380,6 +380,8 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
check_cpu_pa_features(node);
}
+ /* Update cpu features based on kernel command line */
+ update_cpu_features();
identical_pvr_fixup(node);
init_mmu_slb_size(node);
@@ -437,12 +437,15 @@ static void __init early_check_vec5(void)
}
}
-void __init mmu_early_init_devtree(void)
+void __init update_cpu_features(void)
{
/* Disable radix mode based on kernel command line. */
if (disable_radix)
cur_cpu_spec->mmu_features &= ~MMU_FTR_TYPE_RADIX;
+}
+void __init mmu_early_init_devtree(void)
+{
/*
* Check /chosen/ibm,architecture-vec-5 if running as a guest.
* When running bare-metal, we can use radix if we like