Skip to content

Commit ea2ca36

Browse files
Aravind GopalakrishnanIngo Molnar
authored andcommitted
x86/mce/AMD: Document some functionality
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> [ Shorten comments. ] Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1457021458-2522-6-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 2cd3b5f commit ea2ca36

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

arch/x86/include/asm/amd_nb.h

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,23 @@ struct amd_l3_cache {
2727
};
2828

2929
struct threshold_block {
30-
unsigned int block;
31-
unsigned int bank;
32-
unsigned int cpu;
33-
u32 address;
34-
u16 interrupt_enable;
35-
bool interrupt_capable;
36-
u16 threshold_limit;
37-
struct kobject kobj;
38-
struct list_head miscj;
30+
unsigned int block; /* Number within bank */
31+
unsigned int bank; /* MCA bank the block belongs to */
32+
unsigned int cpu; /* CPU which controls MCA bank */
33+
u32 address; /* MSR address for the block */
34+
u16 interrupt_enable; /* Enable/Disable APIC interrupt */
35+
bool interrupt_capable; /* Bank can generate an interrupt. */
36+
37+
u16 threshold_limit; /*
38+
* Value upon which threshold
39+
* interrupt is generated.
40+
*/
41+
42+
struct kobject kobj; /* sysfs object */
43+
struct list_head miscj; /*
44+
* List of threshold blocks
45+
* within a bank.
46+
*/
3947
};
4048

4149
struct threshold_bank {

arch/x86/kernel/cpu/mcheck/mce_amd.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2005-2015 Advanced Micro Devices, Inc.
2+
* (c) 2005-2016 Advanced Micro Devices, Inc.
33
* Your use of this code is subject to the terms and conditions of the
44
* GNU general public license version 2. See "COPYING" or
55
* http://www.gnu.org/licenses/gpl.html
@@ -201,10 +201,7 @@ static int lvt_off_valid(struct threshold_block *b, int apic, u32 lo, u32 hi)
201201
return 1;
202202
};
203203

204-
/*
205-
* Called via smp_call_function_single(), must be called with correct
206-
* cpu affinity.
207-
*/
204+
/* Reprogram MCx_MISC MSR behind this threshold bank. */
208205
static void threshold_restart_bank(void *_tr)
209206
{
210207
struct thresh_restart *tr = _tr;

0 commit comments

Comments
 (0)