[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-f2fd43954abc058586e95d4eb91e7a5477070704@git.kernel.org>
Date: Fri, 7 Jan 2011 15:35:18 GMT
From: tip-bot for Don Zickus <dzickus@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, ying.huang@...el.com, tglx@...utronix.de,
dzickus@...hat.com, mingo@...e.hu
Subject: [tip:perf/core] x86, NMI: Clean-up default_do_nmi()
Commit-ID: f2fd43954abc058586e95d4eb91e7a5477070704
Gitweb: http://git.kernel.org/tip/f2fd43954abc058586e95d4eb91e7a5477070704
Author: Don Zickus <dzickus@...hat.com>
AuthorDate: Thu, 6 Jan 2011 16:18:52 -0500
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 7 Jan 2011 15:08:53 +0100
x86, NMI: Clean-up default_do_nmi()
Just re-arrange the code a bit to make it easier to follow what is
going on. Basically un-negating the if-statement and swapping the code
inside the if-statement with code outside.
No functional changes.
Originally-by: Huang Ying <ying.huang@...el.com>
Signed-off-by: Don Zickus <dzickus@...hat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
LKML-Reference: <1294348732-15030-7-git-send-email-dzickus@...hat.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/kernel/traps.c | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 613b3d2..b9b6716 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -410,26 +410,24 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
raw_spin_lock(&nmi_reason_lock);
reason = get_nmi_reason();
- if (!(reason & NMI_REASON_MASK)) {
+ if (reason & NMI_REASON_MASK) {
+ if (reason & NMI_REASON_SERR)
+ pci_serr_error(reason, regs);
+ else if (reason & NMI_REASON_IOCHK)
+ io_check_error(reason, regs);
+#ifdef CONFIG_X86_32
+ /*
+ * Reassert NMI in case it became active
+ * meanwhile as it's edge-triggered:
+ */
+ reassert_nmi();
+#endif
raw_spin_unlock(&nmi_reason_lock);
- unknown_nmi_error(reason, regs);
-
return;
}
-
- /* AK: following checks seem to be broken on modern chipsets. FIXME */
- if (reason & NMI_REASON_SERR)
- pci_serr_error(reason, regs);
- if (reason & NMI_REASON_IOCHK)
- io_check_error(reason, regs);
-#ifdef CONFIG_X86_32
- /*
- * Reassert NMI in case it became active meanwhile
- * as it's edge-triggered:
- */
- reassert_nmi();
-#endif
raw_spin_unlock(&nmi_reason_lock);
+
+ unknown_nmi_error(reason, regs);
}
dotraplinkage notrace __kprobes void
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists