public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Don Zickus <dzickus@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	a.p.zijlstra@chello.nl, rja@sgi.com, minyard@acm.org,
	tglx@linutronix.de, dannf@hp.com, mingo@elte.hu,
	dzickus@redhat.com
Subject: [tip:perf/core] x86: Convert some devices to use DIE_NMIUNKNOWN
Date: Fri, 7 Jan 2011 15:34:03 GMT	[thread overview]
Message-ID: <tip-673a6092ce5f5bec45619b7a7f89cfcf8bcf3c41@git.kernel.org> (raw)
In-Reply-To: <1294348732-15030-3-git-send-email-dzickus@redhat.com>

Commit-ID:  673a6092ce5f5bec45619b7a7f89cfcf8bcf3c41
Gitweb:     http://git.kernel.org/tip/673a6092ce5f5bec45619b7a7f89cfcf8bcf3c41
Author:     Don Zickus <dzickus@redhat.com>
AuthorDate: Thu, 6 Jan 2011 16:18:48 -0500
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 7 Jan 2011 15:08:52 +0100

x86: Convert some devices to use DIE_NMIUNKNOWN

They are a handful of places in the code that register a die_notifier
as a catch all in case no claims the NMI.  Unfortunately, they trigger
on events like DIE_NMI and DIE_NMI_IPI, which depending on when they
registered may collide with other handlers that have the ability to
determine if the NMI is theirs or not.

The function unknown_nmi_error() makes one last effort to walk the
die_chain when no one else has claimed the NMI before spitting out
messages that the NMI is unknown.

This is a better spot for these devices to execute any code without
colliding with the other handlers.

The two drivers modified are only compiled on x86 arches I believe, so
they shouldn't be affected by other arches that may not have
DIE_NMIUNKNOWN defined.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Russ Anderson <rja@sgi.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: openipmi-developer@lists.sourceforge.net
Cc: dann frazier <dannf@hp.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1294348732-15030-3-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/apic/x2apic_uv_x.c |    2 +-
 drivers/char/ipmi/ipmi_watchdog.c  |    2 +-
 drivers/watchdog/hpwdt.c           |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index c1c52c3..927902d 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -639,7 +639,7 @@ void __cpuinit uv_cpu_init(void)
  */
 int uv_handle_nmi(struct notifier_block *self, unsigned long reason, void *data)
 {
-	if (reason != DIE_NMI_IPI)
+	if (reason != DIE_NMIUNKNOWN)
 		return NOTIFY_OK;
 
 	if (in_crash_kexec)
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index f4d334f..320668f 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -1081,7 +1081,7 @@ ipmi_nmi(struct notifier_block *self, unsigned long val, void *data)
 {
 	struct die_args *args = data;
 
-	if (val != DIE_NMI)
+	if (val != DIE_NMIUNKNOWN)
 		return NOTIFY_OK;
 
 	/* Hack, if it's a memory or I/O error, ignore it. */
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index dea7b5b..24b966d 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -469,7 +469,7 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason,
 	unsigned long rom_pl;
 	static int die_nmi_called;
 
-	if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI)
+	if (ulReason != DIE_NMIUNKNOWN)
 		goto out;
 
 	if (!hpwdt_nmi_decoding)

  reply	other threads:[~2011-01-07 15:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 21:18 [PATCH 0/6] x86, NMI: die_notifier and default_do_nmi cleanups Don Zickus
2011-01-06 21:18 ` [PATCH 1/6] x86, NMI: Add NMI symbol constants and rename memory parity to PCI SERR Don Zickus
2011-01-07 15:33   ` [tip:perf/core] " tip-bot for Huang Ying
2011-01-06 21:18 ` [PATCH 2/6] x86: Convert some devices to use DIE_NMIUNKNOWN Don Zickus
2011-01-07 15:34   ` tip-bot for Don Zickus [this message]
2011-01-06 21:18 ` [PATCH 3/6] x86, NMI: Add priorities to handlers Don Zickus
2011-01-07 13:09   ` Peter Zijlstra
2011-01-07 14:43     ` Don Zickus
2011-01-07 14:50       ` Peter Zijlstra
2011-01-07 17:48         ` Don Zickus
2011-01-07 15:34   ` [tip:perf/core] " tip-bot for Don Zickus
2011-01-06 21:18 ` [PATCH 4/6] x86, NMI: Remove DIE_NMI_IPI Don Zickus
2011-01-07 15:34   ` [tip:perf/core] " tip-bot for Don Zickus
2011-01-06 21:18 ` [PATCH 5/6] x86, NMI: Allow NMI reason io port (0x61) to be processed on any CPU Don Zickus
2011-01-07 15:34   ` [tip:perf/core] " tip-bot for Don Zickus
2011-02-23  2:39   ` [PATCH 5/6] " Maciej W. Rozycki
2011-02-25 21:45     ` Don Zickus
2011-02-26  8:02     ` Cyrill Gorcunov
2011-02-26 11:19       ` huang ying
2011-02-26 12:34         ` Cyrill Gorcunov
2011-02-26 14:07           ` huang ying
2011-02-26 15:09             ` Cyrill Gorcunov
2011-02-27  1:01               ` huang ying
2011-02-27 11:19                 ` Cyrill Gorcunov
2011-02-28 18:37                   ` Don Zickus
2011-02-28 18:48                     ` Cyrill Gorcunov
2011-01-06 21:18 ` [PATCH 6/6] x86, NMI: Clean-up default_do_nmi() Don Zickus
2011-01-07 15:35   ` [tip:perf/core] " tip-bot for Don Zickus
2011-01-07  9:53 ` [PATCH 0/6] x86, NMI: die_notifier and default_do_nmi cleanups Cyrill Gorcunov
2011-01-07  9:55 ` Peter Zijlstra

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=tip-673a6092ce5f5bec45619b7a7f89cfcf8bcf3c41@git.kernel.org \
    --to=dzickus@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dannf@hp.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=minyard@acm.org \
    --cc=rja@sgi.com \
    --cc=tglx@linutronix.de \
    /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