From: Thomas Gleixner <tglx@linutronix.de>
To: Chen Gong <gong.chen@linux.intel.com>
Cc: Borislav Petkov <bp@amd64.org>,
LKML <linux-kernel@vger.kernel.org>,
tony.luck@intel.com, x86@kernel.org,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [patch 2/2] x86: mce: Implement cmci poll mode for intel machines
Date: Fri, 25 May 2012 14:17:22 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1205251413310.3231@ionos> (raw)
In-Reply-To: <alpine.LFD.2.02.1205251119390.3231@ionos>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2988 bytes --]
On Fri, 25 May 2012, Thomas Gleixner wrote:
> On Fri, 25 May 2012, Chen Gong wrote:
>
> > 于 2012/5/25 14:24, Borislav Petkov 写道:
> > > On Thu, May 24, 2012 at 05:54:52PM +0000, Thomas Gleixner wrote:
> > >> Intentionally left blank to be filled out by someone who wants
> > >> that and can explain the reason for this better than me.
> > >
> > > That'll be Intel folk :)
> > >
> > >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > >
> > > Looks good to me too, thanks Thomas for doing this!
> > >
> > > I'll run it next week just in case.
> > >
> > > Acked-by: Borislav Petkov <borislav.petkov@amd.com>
> > >
> >
> > Oh, Oh, wait. First I need to thank Thomas to improve it. I don't
> > reply you at the first time because I have some thoughts and now
> > I'm testing it. The basic test shows it hangs the system after
> > sb_edac is removed and when error count increases to the threshold
> > it hangs again, and when trying to reboot the system no hang happnes
> > (not reach the threshold) the system oops. I need to time to debug
> > and give the valid feedback. Please be patient :-). Of course,
>
> As I said it's completely untested. I just made sure it compiles :)
I just had a quick look again and noticed that nothing is polling the
cmci part in case of the storm mode.
Delta fix below.
Thanks,
tglx
Index: linux-2.6/arch/x86/kernel/cpu/mcheck/mce-internal.h
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/mcheck/mce-internal.h
+++ linux-2.6/arch/x86/kernel/cpu/mcheck/mce-internal.h
@@ -30,8 +30,10 @@ extern struct mce_bank *mce_banks;
#ifdef CONFIG_X86_MCE_INTEL
unsigned long mce_intel_adjust_timer(unsigned long interval);
+void mce_intel_cmci_poll(void);
#else
# define mce_intel_adjust_timer mce_adjust_timer_default
+static inline void mce_intel_cmci_poll(void) { }
#endif
void mce_timer_kick(unsigned long interval);
Index: linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/mcheck/mce.c
+++ linux-2.6/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1260,6 +1260,7 @@ static void mce_timer_fn(unsigned long d
if (mce_available(__this_cpu_ptr(&cpu_info))) {
machine_check_poll(MCP_TIMESTAMP,
&__get_cpu_var(mce_poll_banks));
+ mce_intel_cmci_poll();
}
/*
Index: linux-2.6/arch/x86/kernel/cpu/mcheck/mce_intel.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/mcheck/mce_intel.c
+++ linux-2.6/arch/x86/kernel/cpu/mcheck/mce_intel.c
@@ -70,6 +70,13 @@ static int cmci_supported(int *banks)
return !!(cap & MCG_CMCI_P);
}
+void mce_intel_cmci_poll(void)
+{
+ if (__this_cpu_read(cmci_storm_state) == CMCI_STORM_NONE)
+ return;
+ machine_check_poll(MCP_TIMESTAMP, &__get_cpu_var(mce_banks_owned));
+}
+
unsigned long mce_intel_adjust_timer(unsigned long interval)
{
if (interval < CMCI_POLL_INTERVAL)
next prev parent reply other threads:[~2012-05-25 12:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 17:54 [patch 0/2] x86: mce: Implement poll mode for CMCI Thomas Gleixner
2012-05-24 17:54 ` [patch 1/2] x86: mce Cleanup timer mess Thomas Gleixner
2012-05-25 6:16 ` Borislav Petkov
2012-06-04 2:22 ` Chen Gong
2012-06-04 18:14 ` Luck, Tony
2012-06-04 19:57 ` Thomas Gleixner
2012-06-04 22:18 ` Borislav Petkov
2012-05-24 17:54 ` [patch 2/2] x86: mce: Implement cmci poll mode for intel machines Thomas Gleixner
2012-05-25 6:24 ` Borislav Petkov
2012-05-25 7:31 ` Chen Gong
2012-05-25 9:20 ` Thomas Gleixner
2012-05-25 12:17 ` Thomas Gleixner [this message]
2012-05-28 9:47 ` Chen Gong
2012-05-28 9:52 ` Chen Gong
2012-06-04 2:37 ` Chen Gong
2012-06-04 20:01 ` Thomas Gleixner
2012-06-05 11:47 ` Chen Gong
2012-06-05 12:57 ` Borislav Petkov
2012-06-06 1:36 ` Chen Gong
2012-06-06 9:04 ` Borislav Petkov
2012-06-05 13:35 ` Thomas Gleixner
2012-06-06 7:21 ` Chen Gong
2012-06-06 9:18 ` Thomas Gleixner
2012-06-06 10:23 ` Thomas Gleixner
2012-06-06 12:24 ` Chen Gong
2012-06-06 12:27 ` Peter Zijlstra
2012-06-06 14:15 ` Thomas Gleixner
2012-06-06 14:46 ` Thomas Gleixner
2012-06-07 3:32 ` Chen Gong
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=alpine.LFD.2.02.1205251413310.3231@ionos \
--to=tglx@linutronix.de \
--cc=bp@amd64.org \
--cc=gong.chen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).