From: Borislav Petkov <borislav.petkov@amd.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: bluesmoke-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 17/63] edac_mce: Add an interface driver to report mce errors via edac
Date: Fri, 25 Sep 2009 11:48:55 +0200 [thread overview]
Message-ID: <20090925094855.GA29551@aftab> (raw)
In-Reply-To: <20090924192727.212ce46f@pedra.chehab.org>
Mauro,
On Thu, Sep 24, 2009 at 07:27:27PM -0300, Mauro Carvalho Chehab wrote:
> edac_mce module is an interface module that gets mcelog data and
> forwards to any registered edac module that expects to receive data via
> mce.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 12 ++++++++
> drivers/edac/Kconfig | 8 ++++-
> drivers/edac/Makefile | 3 +-
> drivers/edac/edac_mce.c | 58 ++++++++++++++++++++++++++++++++++++++
> include/linux/edac_mce.h | 31 ++++++++++++++++++++
> 5 files changed, 110 insertions(+), 2 deletions(-)
> create mode 100644 drivers/edac/edac_mce.c
> create mode 100644 include/linux/edac_mce.h
>
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 2f5aab2..fefbb7c 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -35,6 +35,7 @@
> #include <linux/fs.h>
> #include <linux/mm.h>
> #include <linux/debugfs.h>
> +#include <linux/edac_mce.h>
>
> #include <asm/processor.h>
> #include <asm/hw_irq.h>
> @@ -135,6 +136,15 @@ void mce_log(struct mce *mce)
> entry = rcu_dereference(mcelog.next);
> for (;;) {
> /*
> + * If edac_mce is enabled, it will check the error type
> + * and will process it, if it is a known error.
> + * Otherwise, the error will be sent through mcelog
> + * interface
> + */
> + if (edac_mce_parse(mce))
> + return;
for the third time (!): this may run in NMI context and as such does not
obey to normal kernel locking rules and you cannot safely use almost any
kernel resources involving locking. This way, your hook calls into a
module, which is a very bad idea. Please remove that hook and put in the
polling routine or somewhere more appropriate.
> +
> + /*
> * When the buffer fills up discard new entries.
> * Assume that the earlier errors are the more
> * interesting ones:
> @@ -193,6 +203,8 @@ static void print_mce(struct mce *m)
> m->cpuvendor, m->cpuid, m->time, m->socketid,
> m->apicid);
>
> + edac_mce_parse(m);
> +
> decode_mce(m);
> }
--
Regards/Gruss,
Boris.
Operating | Advanced Micro Devices GmbH
System | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
Research | Geschäftsführer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
(OSRC) | Registergericht München, HRB Nr. 43632
next prev parent reply other threads:[~2009-09-25 9:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-24 22:27 [PATCH 17/63] edac_mce: Add an interface driver to report mce errors via edac Mauro Carvalho Chehab
2009-09-25 9:48 ` Borislav Petkov [this message]
2009-09-25 12:11 ` Mauro Carvalho Chehab
2009-09-25 12:47 ` Arjan van de Ven
2009-09-25 14:54 ` Mauro Carvalho Chehab
2009-09-25 13:56 ` Borislav Petkov
2009-09-25 14:05 ` Arjan van de Ven
2009-09-25 14:40 ` Borislav Petkov
2009-09-25 15:00 ` Arjan van de Ven
2009-09-25 14:46 ` Mauro Carvalho Chehab
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=20090925094855.GA29551@aftab \
--to=borislav.petkov@amd.com \
--cc=bluesmoke-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=mingo@elte.hu \
/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.