From: David Miller <davem@davemloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: Fix for sparc64 cpu hangs.
Date: Fri, 07 Dec 2007 08:59:48 +0000 [thread overview]
Message-ID: <20071207.005948.32645530.davem@davemloft.net> (raw)
In-Reply-To: <20071106.203433.144763156.davem@davemloft.net>
From: Bernd Zeimetz <bernd@bzed.de>
Date: Thu, 06 Dec 2007 13:09:18 +0100
> ERROR(0): Cheetah error trap taken afsr[0000100000000000]
> afar[0000040001c00000] TL1(0)
> ERROR(0): TPC[4351dc] TNPC[4351e0] O7[4353b4] TSTATE[80001606]
> ERROR(0): TPC<interpret_one_decode_reg+0x0/0xfc>
> ERROR(0): M_SYND(0), E_SYND(0)
Please try this patch:
commit 980a9fd582ee9ac6729d6f0ac19ce21ca55aa401
Author: David S. Miller <davem@sunset.davemloft.net>
Date: Fri Dec 7 00:58:55 2007 -0800
[SPARC64]: Fix memory controller register access when non-SMP.
get_cpu() always returns zero on non-SMP builds, but we
really want the physical cpu number in this code in order
to do the right thing.
Based upon a non-SMP kernel boot failure report from Bernd Zeimetz.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c
index 777d345..6d4f02e 100644
--- a/arch/sparc64/kernel/chmc.c
+++ b/arch/sparc64/kernel/chmc.c
@@ -1,7 +1,6 @@
-/* $Id: chmc.c,v 1.4 2002/01/08 16:00:14 davem Exp $
- * memctrlr.c: Driver for UltraSPARC-III memory controller.
+/* memctrlr.c: Driver for UltraSPARC-III memory controller.
*
- * Copyright (C) 2001 David S. Miller (davem@redhat.com)
+ * Copyright (C) 2001, 2007 David S. Miller (davem@davemloft.net)
*/
#include <linux/module.h>
@@ -16,6 +15,7 @@
#include <linux/init.h>
#include <asm/spitfire.h>
#include <asm/chmctrl.h>
+#include <asm/cpudata.h>
#include <asm/oplib.h>
#include <asm/prom.h>
#include <asm/io.h>
@@ -242,8 +242,11 @@ int chmc_getunumber(int syndrome_code,
*/
static u64 read_mcreg(struct mctrl_info *mp, unsigned long offset)
{
- unsigned long ret;
- int this_cpu = get_cpu();
+ unsigned long ret, this_cpu;
+
+ preempt_disable();
+
+ this_cpu = real_hard_smp_processor_id();
if (mp->portid = this_cpu) {
__asm__ __volatile__("ldxa [%1] %2, %0"
@@ -255,7 +258,8 @@ static u64 read_mcreg(struct mctrl_info *mp, unsigned long offset)
: "r" (mp->regs + offset),
"i" (ASI_PHYS_BYPASS_EC_E));
}
- put_cpu();
+
+ preempt_enable();
return ret;
}
next prev parent reply other threads:[~2007-12-07 8:59 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 4:34 Fix for sparc64 cpu hangs David Miller
2007-11-07 4:34 ` David Miller
2007-11-07 5:13 ` David Miller
2007-11-07 5:13 ` David Miller
2007-11-09 20:22 ` Andrew Morton
2007-11-09 20:22 ` Andrew Morton
2007-11-09 22:14 ` David Miller
2007-11-09 22:14 ` David Miller
2007-11-07 14:25 ` Josip Rodin
2007-11-07 14:35 ` Bernd Zeimetz
2007-11-08 0:01 ` David Miller
2007-11-11 6:04 ` David Miller
2007-11-11 6:13 ` David Miller
2007-11-11 6:27 ` Bernd Zeimetz
2007-11-12 13:16 ` Josip Rodin
2007-11-16 21:17 ` Bernd Zeimetz
2007-11-20 6:09 ` David Miller
2007-12-06 8:49 ` David Miller
2007-12-06 10:43 ` Bernd Zeimetz
2007-12-06 11:08 ` David Miller
2007-12-06 12:09 ` Bernd Zeimetz
2007-12-06 13:52 ` David Miller
2007-12-07 8:59 ` David Miller [this message]
2007-12-08 0:14 ` Bernd Zeimetz
2007-12-09 8:38 ` David Miller
2007-12-10 9:16 ` Bernd Zeimetz
2007-12-10 9:18 ` David Miller
2007-12-11 14:19 ` David Miller
2007-12-12 16:05 ` Bernd Zeimetz
2007-12-12 16:23 ` David Miller
2007-12-13 20:54 ` Bernd Zeimetz
2007-12-16 22:41 ` Bernd Zeimetz
2007-12-16 22:48 ` Josip Rodin
2007-12-16 23:30 ` David Miller
2007-12-17 9:40 ` Josip Rodin
2007-12-17 9:57 ` David Miller
2007-12-17 10:10 ` Josip Rodin
2007-12-17 10:21 ` David Miller
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=20071207.005948.32645530.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.