From: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
To: <bp@alien8.de>, <tony.luck@intel.com>, <hpa@zytor.com>,
<mingo@redhat.com>, <tglx@linutronix.de>,
<dougthompson@xmission.com>, <mchehab@osg.samsung.com>
Cc: <x86@kernel.org>, <linux-edac@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <ashok.raj@intel.com>,
<gong.chen@linux.intel.com>, <len.brown@intel.com>,
<peterz@infradead.org>, <ak@linux.intel.com>,
<alexander.shishkin@linux.intel.com>, <Yazen.Ghannam@amd.com>
Subject: [PATCH V3 5/5] x86/mce/AMD: Add comments for easier understanding
Date: Thu, 3 Mar 2016 10:10:58 -0600 [thread overview]
Message-ID: <1457021458-2522-6-git-send-email-Aravind.Gopalakrishnan@amd.com> (raw)
In-Reply-To: <1457021458-2522-1-git-send-email-Aravind.Gopalakrishnan@amd.com>
In an attempt to aid in understanding of what the threshold_block
structure holds, provide comments to describe the members here.
Also, trim comments around threshold_restart_bank()
and update copyright info.
No functional change is introduced.
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
---
arch/x86/include/asm/amd_nb.h | 18 +++++++++---------
arch/x86/kernel/cpu/mcheck/mce_amd.c | 7 ++-----
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
index 3c56ef1..bc01c0a 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -27,15 +27,15 @@ struct amd_l3_cache {
};
struct threshold_block {
- unsigned int block;
- unsigned int bank;
- unsigned int cpu;
- u32 address;
- u16 interrupt_enable;
- bool interrupt_capable;
- u16 threshold_limit;
- struct kobject kobj;
- struct list_head miscj;
+ unsigned int block; /* Threshold block number within bank */
+ unsigned int bank; /* MCA bank the block belongs to */
+ unsigned int cpu; /* CPU which controls the MCA bank */
+ u32 address; /* MSR address for the block */
+ u16 interrupt_enable; /* Enable/ Disable APIC interrupt upon threshold error */
+ bool interrupt_capable; /* Specifies if interrupt is possible from the block */
+ u16 threshold_limit; /* Value upon which threshold interrupt is generated */
+ struct kobject kobj; /* sysfs object */
+ struct list_head miscj; /* Add multiple threshold blocks within a bank to the list */
};
struct threshold_bank {
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index 879c20f..f5b4b80 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -1,5 +1,5 @@
/*
- * (c) 2005-2015 Advanced Micro Devices, Inc.
+ * (c) 2005-2016 Advanced Micro Devices, Inc.
* Your use of this code is subject to the terms and conditions of the
* GNU general public license version 2. See "COPYING" or
* http://www.gnu.org/licenses/gpl.html
@@ -202,10 +202,7 @@ static int lvt_off_valid(struct threshold_block *b, int apic, u32 lo, u32 hi)
return 1;
};
-/*
- * Called via smp_call_function_single(), must be called with correct
- * cpu affinity.
- */
+/* Reprogram MCx_MISC MSR behind this threshold bank */
static void threshold_restart_bank(void *_tr)
{
struct thresh_restart *tr = _tr;
--
2.7.0
next prev parent reply other threads:[~2016-03-03 15:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 16:10 [PATCH V3 0/5] Updates to EDAC and AMD MCE driver Aravind Gopalakrishnan
2016-03-03 16:10 ` [PATCH V3 1/5] x86/mce: Move MCx_CONFIG MSR definition Aravind Gopalakrishnan
2016-03-03 16:10 ` [PATCH V3 2/5] EDAC, MCE, AMD: Enable error decoding of Scalable MCA errors Aravind Gopalakrishnan
2016-03-08 13:13 ` [tip:ras/core] x86/mce/AMD, EDAC: " tip-bot for Aravind Gopalakrishnan
2016-03-03 16:10 ` [PATCH V3 3/5] x86/mce/AMD: Fix logic to obtain block address Aravind Gopalakrishnan
2016-03-08 13:13 ` [tip:ras/core] " tip-bot for Aravind Gopalakrishnan
2016-03-03 16:10 ` [PATCH V3 4/5] x86/mce: Clarify comments regarding deferred error Aravind Gopalakrishnan
2016-03-08 13:14 ` [tip:ras/core] " tip-bot for Aravind Gopalakrishnan
2016-03-03 16:10 ` Aravind Gopalakrishnan [this message]
2016-03-08 13:14 ` [tip:ras/core] x86/mce/AMD: Document some functionality tip-bot for Aravind Gopalakrishnan
2016-03-03 18:45 ` [PATCH V3 0/5] Updates to EDAC and AMD MCE driver Borislav Petkov
2016-03-04 3:30 ` Aravind Gopalakrishnan
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=1457021458-2522-6-git-send-email-Aravind.Gopalakrishnan@amd.com \
--to=aravind.gopalakrishnan@amd.com \
--cc=Yazen.Ghannam@amd.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=bp@alien8.de \
--cc=dougthompson@xmission.com \
--cc=gong.chen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--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