From: Andi Kleen <andi@firstfloor.org>
To: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [2/3] x86: mce: Improve comments in CMCI code
Date: Sat, 11 Jul 2009 09:44:10 +0200 (CEST) [thread overview]
Message-ID: <20090711074410.958AB1D0261@basil.firstfloor.org> (raw)
In-Reply-To: <20090711944.448667020@firstfloor.org>
Improve the comments in the CMCI code in mce_intel.c. This documents
some of the design decisions and adds references to the appropiate
manuals.
No code changes.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
arch/x86/kernel/cpu/mcheck/mce_intel.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Index: linux/arch/x86/kernel/cpu/mcheck/mce_intel.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/mcheck/mce_intel.c
+++ linux/arch/x86/kernel/cpu/mcheck/mce_intel.c
@@ -19,8 +19,16 @@
* the CPU to raise an interrupt when a corrected machine check happened.
* Normally we pick those up using a regular polling timer.
* Also supports reliable discovery of shared banks.
+ *
+ * For reference see the Intel 64 Software Developer's Manual, Volume 3a,
+ * 15.5.2. This code is a relatively faithful implementation of the
+ * recommendations there.
*/
+/*
+ * Ownership of MCE banks per CPU. To avoid duplicated events
+ * for shared banks we assign ownership to specific CPUs.
+ */
static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned);
/*
@@ -29,6 +37,10 @@ static DEFINE_PER_CPU(mce_banks_t, mce_b
*/
static DEFINE_SPINLOCK(cmci_discover_lock);
+/*
+ * CMCI threshold in hardware has some drawbacks. We chose to log every event
+ * and hardcode 1
+ */
#define CMCI_THRESHOLD 1
static int cmci_supported(int *banks)
@@ -163,7 +175,7 @@ void cmci_clear(void)
/*
* After a CPU went down cycle through all the others and rediscover
- * Must run in process context.
+ * bank ownership. Must run in process context.
*/
void cmci_rediscover(int dying)
{
next prev parent reply other threads:[~2009-07-11 7:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 7:44 [PATCH] [0/3] x86: mce: A few more minor cleanups for the x86 mce code Andi Kleen
2009-07-11 7:44 ` [PATCH] [1/3] x86: mce: Move most mce subsystem internal declarations into mce-internal.h Andi Kleen
2009-07-11 7:44 ` Andi Kleen [this message]
2009-07-11 7:44 ` [PATCH] [3/3] x86: mce: Improve comments in mce.c Andi Kleen
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=20090711074410.958AB1D0261@basil.firstfloor.org \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/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
Powered by JetHome