From: Aristeu Rozanski <aris@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] x86: add config option for the default NMI watchdog
Date: Tue, 3 Nov 2009 12:10:17 -0500 [thread overview]
Message-ID: <20091103171016.GA25437@redhat.com> (raw)
This patch adds config options to allow selecting one of the two NMI watchdog
methods as default. It's still possible to select a different method or even
disable it using the command line mode. This is required for the next patch,
which adds support to "auto" mode.
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
---
arch/x86/kernel/apic/nmi.c | 11 ++++++++++-
lib/Kconfig.debug | 21 +++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
index e82a450..fd176e9 100644
--- a/arch/x86/kernel/apic/nmi.c
+++ b/arch/x86/kernel/apic/nmi.c
@@ -50,7 +50,16 @@ static cpumask_var_t backtrace_mask;
atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */
EXPORT_SYMBOL(nmi_active);
-unsigned int nmi_watchdog = NMI_NONE;
+#ifdef CONFIG_DEBUG_DEFAULT_NMI_NONE
+#define DEFAULT_NMI_WATCHDOG_VALUE NMI_NONE
+#endif
+#ifdef CONFIG_DEBUG_DEFAULT_NMI_IOAPIC
+#define DEFAULT_NMI_WATCHDOG_VALUE NMI_IOAPIC
+#endif
+#ifdef CONFIG_DEBUG_DEFAULT_NMI_LAPIC
+#define DEFAULT_NMI_WATCHDOG_VALUE NMI_LAPIC
+#endif
+unsigned int nmi_watchdog = DEFAULT_NMI_WATCHDOG_VALUE;
EXPORT_SYMBOL(nmi_watchdog);
static int panic_on_timeout;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 2790b4f..0a3622a 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -253,6 +253,27 @@ config DEBUG_NMI_TIMEOUT
This value is the number of seconds the NMI watchdog will tick
before it decides the machine has hung.
+choice
+ prompt "Default NMI watchdog method"
+ default DEBUG_DEFAULT_NMI_NONE
+ depends on X86
+ help
+ This allows to set the default NMI watchdog method to be used. The
+ default can be changed using nmi_watchdog=. Only choose an option
+ different from Disabled if you know the machine supports that method.
+
+config DEBUG_DEFAULT_NMI_NONE
+ bool "Disabled"
+
+config DEBUG_DEFAULT_NMI_IOAPIC
+ bool "IOAPIC"
+
+config DEBUG_DEFAULT_NMI_LAPIC
+ bool "LAPIC"
+
+endchoice
+
+
config TIMER_STATS
bool "Collect kernel timers statistics"
depends on DEBUG_KERNEL && PROC_FS
--
1.5.5.6
reply other threads:[~2009-11-03 17:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20091103171016.GA25437@redhat.com \
--to=aris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox