diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-05 15:03:51 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-21 18:56:38 +1000 |
commit | 166dd7d3fbf2df183926f0e4b4855f6cbd8da945 (patch) | |
tree | 5f13de87384d672c1ceeaba5ac7dc07d5eca6205 /arch/powerpc/platforms/ps3 | |
parent | 91b6fad5cf16c5fcf0ab2a08fcdbd1483d871d43 (diff) | |
download | linux-166dd7d3fbf2df183926f0e4b4855f6cbd8da945.tar.bz2 |
powerpc/64: Move MMU backend selection out of platform code
We move it into early_mmu_init() based on firmware features. For PS3,
we have to move the setting of these into early_init_devtree().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/ps3')
-rw-r--r-- | arch/powerpc/platforms/ps3/setup.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 486ecd017535..b7fdf88474e8 100644 --- a/arch/powerpc/platforms/ps3/setup.c +++ b/arch/powerpc/platforms/ps3/setup.c @@ -226,9 +226,17 @@ static void __init ps3_progress(char *s, unsigned short hex) printk("*** %04x : %s\n", hex, s ? s : ""); } -static int __init ps3_probe(void) +void __init ps3_early_mm_init(void) { unsigned long htab_size; + + ps3_mm_init(); + ps3_mm_vas_create(&htab_size); + ps3_hpte_init(htab_size); +} + +static int __init ps3_probe(void) +{ unsigned long dt_root; DBG(" -> %s:%d\n", __func__, __LINE__); @@ -237,12 +245,7 @@ static int __init ps3_probe(void) if (!of_flat_dt_is_compatible(dt_root, "sony,ps3")) return 0; - powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE; - ps3_os_area_save_params(); - ps3_mm_init(); - ps3_mm_vas_create(&htab_size); - ps3_hpte_init(htab_size); pm_power_off = ps3_power_off; DBG(" <- %s:%d\n", __func__, __LINE__); |