public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] correctly report NR_BANKS in mce_64.c
@ 2008-06-06  7:42 Pavel Machek
  2008-06-18  8:31 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2008-06-06  7:42 UTC (permalink / raw)
  To: kernel list, Ingo Molnar, Daniel.Rahn

From: Daniel Rahn <Daniel.Rahn@novell.com>

attached is a no-brainer that makes kernel correctly report
NR_BANKS for MCE. We are right now limited to NR_BANKS==6, but the
error message will use the available number of banks instead of the
defined maximum.

For a Nehalem based system it will print:

"MCE: warning: using only 9 banks"

while the correct message would be

"MCE: warning: using only 6 banks"

Signed-off-by: Pavel Machek <pavel@suse.cz>


diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index e07e8c0..2fb868e 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -445,8 +445,8 @@ static void mce_init(void *dummy)
 	rdmsrl(MSR_IA32_MCG_CAP, cap);
 	banks = cap & 0xff;
 	if (banks > NR_BANKS) {
-		printk(KERN_INFO "MCE: warning: using only %d banks\n", banks);
 		banks = NR_BANKS;
+		printk(KERN_INFO "MCE: warning: using only %d banks\n", banks);
 	}
 	/* Use accurate RIP reporting if available. */
 	if ((cap & (1<<9)) && ((cap >> 16) & 0xff) >= 9)

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] correctly report NR_BANKS in mce_64.c
  2008-06-06  7:42 [patch] correctly report NR_BANKS in mce_64.c Pavel Machek
@ 2008-06-18  8:31 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-06-18  8:31 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, Daniel.Rahn, the arch/x86 maintainers


* Pavel Machek <pavel@suse.cz> wrote:

> From: Daniel Rahn <Daniel.Rahn@novell.com>
> 
> attached is a no-brainer that makes kernel correctly report
> NR_BANKS for MCE. We are right now limited to NR_BANKS==6, but the
> error message will use the available number of banks instead of the
> defined maximum.
> 
> For a Nehalem based system it will print:
> 
> "MCE: warning: using only 9 banks"
> 
> while the correct message would be
> 
> "MCE: warning: using only 6 banks"
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>

applied to tip/x86/mce, thanks Pavel.

[ There was a recent crossing commit that made your patch not apply 
  cleanly (8edc5cc5ec8 from May 12), i fixed up the impact manually. ]

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-18  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-06  7:42 [patch] correctly report NR_BANKS in mce_64.c Pavel Machek
2008-06-18  8:31 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox