From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Mike Travis <travis@sgi.com>
Cc: Roland Dreier <rdreier@cisco.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH] x86, mce: disable MCE if cpu has no MCE banks
Date: Wed, 28 Oct 2009 13:07:50 +0900 [thread overview]
Message-ID: <4AE7C396.7040109@jp.fujitsu.com> (raw)
In-Reply-To: <4AE75DB9.3040702@sgi.com>
Mike Travis wrote:
>
> Mike Travis wrote:
>> Hi Roland,
>>
>> I've found that I'm getting one of these lines for every cpu:
>>
>> mce: CPU supports 0 MCE banks
I believe my patch at last in this mail will solve this issue.
> A bit more info. THe data above was from our simulator which
> apparently is not simulating mce very well. On a live system
> I get 383 lines (for 383 additional cpus) with what appears to be
> redundant lines...
>
> [ 4.882085] CPU 1 MCA banks SHD:0 SHD:1 CMCI:2 CMCI:3 CMCI:5 SHD:6
> SHD:7 SHD:8 SHD:9 SHD:12 SHD:13 SHD:14 SHD:15 SHD:16 SHD:17 SHD:18
> SHD:19 SHD:20 SHD:21
> [ 4.978893] CPU 2 MCA banks SHD:0 SHD:1 CMCI:2 CMCI:3 CMCI:5 SHD:6
> SHD:7 SHD:8 SHD:9 SHD:12 SHD:13 SHD:14 SHD:15 SHD:16 SHD:17 SHD:18
> SHD:19 SHD:20 SHD:21
> ...
> [ 4.978893] CPU 2 MCA banks SHD:0 SHD:1 CMCI:2 CMCI:3 CMCI:5 SHD:6
> SHD:7 SHD:8 SHD:9 SHD:12 SHD:13 SHD:14 SHD:15 SHD:16 SHD:17 SHD:18
> SHD:19 SHD:20 SHD:21
Hum, I suppose the line for CPU 0 was slightly different from others,
because SHD means "this bank is shared bank and controlled by other".
Maybe:
CPU 0 MCA banks CMCI:0 CMCI:1 CMCI:2 CMCI:3 CMCI:5 ... CMCI:21
But I agree that we could some work for this messages...
Is it better to change the message level to debug from info?
How about changing the format like:
CPU 0 MCA banks map : CCCC PCCC CCPP CCCC CCCC CC
CPU 1 MCA banks map : ssCC PCss ssPP ssss ssss ss
:
If there are no complains, I'll make another patch to do so.
Thanks,
H.Seto
===
Subject: [PATCH] x86, mce: disable MCE if cpu has no MCE banks
If cpu has no MCE banks (e.g. simulated processor on VMs), it is better to
disable MCE support on the system since we cannot handle MCE well.
Reported-by: Mike Travis <travis@sgi.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
arch/x86/kernel/cpu/mcheck/mce.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 8080170..29055ab 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1228,6 +1228,10 @@ static int __cpuinit __mcheck_cpu_cap_init(void)
rdmsrl(MSR_IA32_MCG_CAP, cap);
b = cap & MCG_BANKCNT_MASK;
+ if (!b) {
+ pr_info("MCE: no MCE banks - not enabling MCE support.\n");
+ return -ENODEV;
+ }
if (!banks)
printk(KERN_INFO "mce: CPU supports %d MCE banks\n", b);
--
1.6.5.2
next prev parent reply other threads:[~2009-10-28 4:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 21:21 [PATCH] x86: Don't print number of MCE banks for every CPU Roland Dreier
2009-10-16 7:20 ` Ingo Molnar
2009-10-16 7:22 ` [tip:x86/urgent] " tip-bot for Roland Dreier
2009-10-27 19:42 ` [PATCH] " Mike Travis
2009-10-27 20:53 ` Mike Travis
2009-10-28 4:07 ` Hidetoshi Seto [this message]
2009-10-28 5:24 ` [PATCH] x86, mce: disable MCE if cpu has no MCE banks Andi Kleen
2009-10-28 6:26 ` Hidetoshi Seto
2009-10-28 6:48 ` Andi Kleen
2009-10-28 8:18 ` Hidetoshi Seto
2009-10-28 17:09 ` Mike Travis
2009-10-28 17:12 ` Roland Dreier
2009-10-28 17:37 ` Mike Travis
2009-10-28 18:03 ` Roland Dreier
2009-10-28 12:03 ` Valdis.Kletnieks
2009-10-28 13:44 ` Andi Kleen
2009-10-28 4:26 ` [PATCH] x86: Don't print number of MCE banks for every CPU Roland Dreier
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=4AE7C396.7040109@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdreier@cisco.com \
--cc=tglx@linutronix.de \
--cc=travis@sgi.com \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox