From: Cyrill Gorcunov <gorcunov@gmail.com>
To: hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com,
linux-kernel@vger.kernel.org
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Subject: [patch 03/11] x86: nmi_64.c - move do_nmi(), stop_nmi() and restart_nmi() implementation to traps_64.c
Date: Sat, 24 May 2008 19:36:33 +0400 [thread overview]
Message-ID: <4838373e.1438560a.6987.3a12@mx.google.com> (raw)
In-Reply-To: 20080524153630.669797039@gmail.com
[-- Attachment #1: nmi-64-move-spec-func-to-traps --]
[-- Type: text/plain, Size: 2225 bytes --]
traps_32.c already holds these functions so do the same for traps_64.c
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/nmi_64.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/nmi_64.c 2008-05-24 12:25:57.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/nmi_64.c 2008-05-24 12:38:09.000000000 +0400
@@ -30,7 +30,6 @@
int unknown_nmi_panic;
int nmi_watchdog_enabled;
-int panic_on_unrecovered_nmi;
static cpumask_t backtrace_mask = CPU_MASK_NONE;
@@ -383,30 +382,6 @@ nmi_watchdog_tick(struct pt_regs *regs,
return rc;
}
-static unsigned ignore_nmis;
-
-asmlinkage notrace __kprobes void
-do_nmi(struct pt_regs *regs, long error_code)
-{
- nmi_enter();
- add_pda(__nmi_count,1);
- if (!ignore_nmis)
- default_do_nmi(regs);
- nmi_exit();
-}
-
-void stop_nmi(void)
-{
- acpi_nmi_disable();
- ignore_nmis++;
-}
-
-void restart_nmi(void)
-{
- ignore_nmis--;
- acpi_nmi_enable();
-}
-
#ifdef CONFIG_SYSCTL
static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
Index: linux-2.6.git/arch/x86/kernel/traps_64.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/traps_64.c 2008-05-24 12:25:11.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/traps_64.c 2008-05-24 12:39:18.000000000 +0400
@@ -76,7 +76,9 @@ asmlinkage void alignment_check(void);
asmlinkage void machine_check(void);
asmlinkage void spurious_interrupt_bug(void);
+int panic_on_unrecovered_nmi;
static unsigned int code_bytes = 64;
+static unsigned ignore_nmis;
static inline void conditional_sti(struct pt_regs *regs)
{
@@ -867,6 +869,28 @@ asmlinkage notrace __kprobes void defau
io_check_error(reason, regs);
}
+asmlinkage notrace __kprobes void
+do_nmi(struct pt_regs *regs, long error_code)
+{
+ nmi_enter();
+ add_pda(__nmi_count, 1);
+ if (!ignore_nmis)
+ default_do_nmi(regs);
+ nmi_exit();
+}
+
+void stop_nmi(void)
+{
+ acpi_nmi_disable();
+ ignore_nmis++;
+}
+
+void restart_nmi(void)
+{
+ ignore_nmis--;
+ acpi_nmi_enable();
+}
+
/* runs on IST stack. */
asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
{
--
next prev parent reply other threads:[~2008-05-24 15:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080524153630.669797039@gmail.com>
2008-05-24 15:36 ` [patch 01/11] x86: nmi - unify die_nmi() interface Cyrill Gorcunov
2008-05-24 15:36 ` [patch 02/11] x86: nmi - die_nmi() output message unification Cyrill Gorcunov
2008-05-24 15:36 ` Cyrill Gorcunov [this message]
2008-05-24 15:36 ` [patch 04/11] x86: nmi_32.c - add "panic" option Cyrill Gorcunov
2008-05-24 15:36 ` [patch 05/11] x86: nmi_32.c - add nmi_watchdog_default helper Cyrill Gorcunov
2008-05-24 15:36 ` [patch 06/11] x86: nmi_32/64.c - use apic_write_around instead of apic_write Cyrill Gorcunov
2008-05-28 15:35 ` Maciej W. Rozycki
2008-05-28 16:04 ` Cyrill Gorcunov
2008-05-28 16:13 ` Maciej W. Rozycki
2008-05-28 16:25 ` Cyrill Gorcunov
2008-05-28 17:09 ` Maciej W. Rozycki
2008-05-28 17:16 ` Cyrill Gorcunov
2008-05-28 17:47 ` Maciej W. Rozycki
2008-05-28 18:32 ` Cyrill Gorcunov
2008-05-24 15:36 ` [patch 07/11] x86: nmi_32.c - unknown_nmi_panic_callback should always panic on being called Cyrill Gorcunov
2008-05-24 15:36 ` [patch 08/11] x86: nmi_64.c - use for_each_possible_cpu helper instead of for statement Cyrill Gorcunov
2008-05-24 15:36 ` [patch 09/11] x86: nmi_32.c cleanup - use for_each_online_cpu helper Cyrill Gorcunov
2008-05-24 15:36 ` [patch 10/11] x86: nmi_32/64.c - add helper functions to hide mode-specific data Cyrill Gorcunov
2008-05-24 15:36 ` [patch 11/11] x86: nmi_32/64.c - merge down nmi_32.c and nmi_64.c to nmi.c 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=4838373e.1438560a.6987.3a12@mx.google.com \
--to=gorcunov@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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