From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
Sitsofe Wheeler <sitsofe@yahoo.com>,
Adrian Bunk <bunk@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: nmi - fix incorrect NMI watchdog used by default
Date: Wed, 28 May 2008 23:00:47 +0400 [thread overview]
Message-ID: <20080528190047.GE6910@cvg> (raw)
The commit
commit 4b82b277707a39b97271439c475f186f63ec4692
Author: Cyrill Gorcunov <gorcunov@gmail.com>
Date: Sat May 24 19:36:35 2008 +0400
set nmi_watchdog to NMI_IO_APIC as by default. This causes hangs on some
machines with buggy watchdogs. Fix it - i.e. restore old behaviour.
Thanks to Sitsofe Wheeler and Adrian Bunk for catching the problem
and Maciej W. Rozycki for explanation what is going on there.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
CC: Maciej W. Rozycki <macro@linux-mips.org>
---
The patch is over today tip/x86/nmi
Index: linux-2.6.git/arch/x86/kernel/nmi.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/nmi.c 2008-05-28 22:32:38.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/nmi.c 2008-05-28 22:40:48.000000000 +0400
@@ -84,20 +84,15 @@ static inline unsigned int get_timer_irq
#endif
}
+#ifdef CONFIG_X86_64
/* Run after command line and cpu_init init, but before all other checks */
void nmi_watchdog_default(void)
{
if (nmi_watchdog != NMI_DEFAULT)
return;
-#ifdef CONFIG_X86_64
nmi_watchdog = NMI_NONE;
-#else
- if (lapic_watchdog_ok())
- nmi_watchdog = NMI_LOCAL_APIC;
- else
- nmi_watchdog = NMI_IO_APIC;
-#endif
}
+#endif
#ifdef CONFIG_SMP
/*
@@ -488,8 +483,15 @@ int proc_nmi_enabled(struct ctl_table *t
return -EIO;
}
+#ifdef CONFIG_X86_64
/* if nmi_watchdog is not set yet, then set it */
nmi_watchdog_default();
+#else
+ if (lapic_watchdog_ok())
+ nmi_watchdog = NMI_LOCAL_APIC;
+ else
+ nmi_watchdog = NMI_IO_APIC;
+#endif
if (nmi_watchdog == NMI_LOCAL_APIC) {
if (nmi_watchdog_enabled)
Index: linux-2.6.git/include/asm-x86/nmi.h
====================================================================
--- linux-2.6.git.orig/include/asm-x86/nmi.h 2008-05-28 22:32:41.000000000 +0400
+++ linux-2.6.git/include/asm-x86/nmi.h 2008-05-28 22:39:55.000000000 +0400
@@ -38,9 +38,11 @@ static inline void unset_nmi_pm_callback
#ifdef CONFIG_X86_64
extern void default_do_nmi(struct pt_regs *);
+extern void nmi_watchdog_default(void);
+#else
+#define nmi_watchdog_default(void) do {} while (0)
#endif
-extern void nmi_watchdog_default(void);
extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
extern int check_nmi_watchdog(void);
extern int nmi_watchdog_enabled;
next reply other threads:[~2008-05-28 19:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 19:00 Cyrill Gorcunov [this message]
2008-05-28 19:08 ` [PATCH] x86: nmi - fix incorrect NMI watchdog used by default Ingo Molnar
2008-05-30 12:54 ` Ingo Molnar
2008-05-30 14:44 ` Cyrill Gorcunov
2008-05-30 15:09 ` Ingo Molnar
2008-05-31 7:42 ` Sitsofe Wheeler
2008-05-31 9:15 ` Cyrill Gorcunov
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=20080528190047.GE6910@cvg \
--to=gorcunov@gmail.com \
--cc=bunk@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@elte.hu \
--cc=sitsofe@yahoo.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 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.