linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: linuxppc-dev@ozlabs.org
Cc: paulus@samba.org
Subject: [PATCH] dont allow pSeries_probe to succeed without initialising MMU
Date: Fri, 8 Dec 2006 18:22:09 +1100	[thread overview]
Message-ID: <20061208072208.GD29167@krispykreme> (raw)
In-Reply-To: <20061208070837.GC29167@krispykreme>


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>
---

Index: kernel/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- kernel.orig/arch/powerpc/platforms/pseries/setup.c	2006-10-24 10:26:59.494464648 -0500
+++ kernel/arch/powerpc/platforms/pseries/setup.c	2006-10-24 10:27:39.714227044 -0500
@@ -492,11 +492,6 @@ static int __init pSeries_probe_hypertas
 	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;
 }
 
@@ -522,6 +517,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");
 

  reply	other threads:[~2006-12-08  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08  7:08 [PATCH] micro optimise pSeries_probe Anton Blanchard
2006-12-08  7:22 ` Anton Blanchard [this message]
2006-12-09  5:47   ` [PATCH] dont allow pSeries_probe to succeed without initialising MMU Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061208072208.GD29167@krispykreme \
    --to=anton@samba.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).