summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/setup.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-12-08 18:22:09 +1100
committerPaul Mackerras <paulus@samba.org>2006-12-09 11:39:06 +1100
commita223535425eb28082a0925b0ce2f02f962936cf4 (patch)
tree37e8ccf0d904fb0836d40fd0f64c35013f41c0d7 /arch/powerpc/platforms/pseries/setup.c
parent5773bbcdec54b7258cb9e2aa6f3459b4cbfd9dc5 (diff)
[POWERPC] dont allow pSeries_probe to succeed without initialising MMU
pSeries_probe can decide that we are a pseries but then fail to initialise the MMU. If an rtas node doesnt exist, we continually fall out of pSeries_probe_hypertas early and never get to the MMU init code. While pseries without RTAS is an illegal combination, the way we currently fail is a pain to track down, and can happen if your flattened device tree code has issues (like mine did :). With the following patch we init the MMU, come up and print some warnings about RTAS not existing, instead of looping on 0x400 exceptions. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r--arch/powerpc/platforms/pseries/setup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 3e2f7467057..042ecae107a 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -422,11 +422,6 @@ static int __init pSeries_probe_hypertas(unsigned long node,
if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL)
powerpc_firmware_features |= FW_FEATURE_LPAR;
- if (firmware_has_feature(FW_FEATURE_LPAR))
- hpte_init_lpar();
- else
- hpte_init_native();
-
return 1;
}
@@ -452,6 +447,11 @@ static int __init pSeries_probe(void)
/* Now try to figure out if we are running on LPAR */
of_scan_flat_dt(pSeries_probe_hypertas, NULL);
+ if (firmware_has_feature(FW_FEATURE_LPAR))
+ hpte_init_lpar();
+ else
+ hpte_init_native();
+
DBG("Machine is%s LPAR !\n",
(powerpc_firmware_features & FW_FEATURE_LPAR) ? "" : " not");