LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: paulus@samba.org
Cc: ppc-dev <linuxppc-dev@ozlabs.org>
Subject: [PATCH] powerpc: iSeries needs slb_initialize to be called
Date: Sun, 2 Apr 2006 02:18:40 +1000	[thread overview]
Message-ID: <20060402021840.4640dab7.sfr@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]

Since the "ppc64: support 64k pages" patch
(3c726f8dee6f55e96475574e9f645327e461884c) went in, systems that have SLBs
(like Power4 iSeries) needed to have slb_initialize called to set up some
variables for the SLB miss handler.  This was not being called on the boot
processor on iSeries, so on single cpu iSeries machines, we would get
apparent memory curruption as soon as we entered user mode.

This patch fixes that by calling slb_initialize on the boot cpu if the
processor has an SLB.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---

 arch/powerpc/kernel/setup_64.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

Please check I haven't missed anything, as I don't really understand the
SLB miss handler.

This has been booted on a 2 cpu Power4 iSeries partition with and without
maxcpus=1.  This needs to go into 2.6.17 and probably into 2.6.16.x

git bisect rocks! :-)
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

b116f2eae79ee837fa5e5e55bf1d59329ecd7c93
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index f96c49b..abd758f 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -256,12 +256,10 @@ void __init early_setup(unsigned long dt
 	/*
 	 * Initialize stab / SLB management except on iSeries
 	 */
-	if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
-		if (cpu_has_feature(CPU_FTR_SLB))
-			slb_initialize();
-		else
-			stab_initialize(lpaca->stab_real);
-	}
+	if (cpu_has_feature(CPU_FTR_SLB))
+		slb_initialize();
+	else if (!firmware_has_feature(FW_FEATURE_ISERIES))
+		stab_initialize(lpaca->stab_real);
 
 	DBG(" <- early_setup()\n");
 }
-- 
1.2.4


[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

             reply	other threads:[~2006-04-01 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-01 16:18 Stephen Rothwell [this message]
2006-04-01 16:45 ` [PATCH] powerpc: iSeries needs slb_initialize to be called 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=20060402021840.4640dab7.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --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