lkml.org 
[lkml]   [2016]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V3 5/5] x86/mce/AMD: Add comments for easier understanding
    Date
    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
    \
     
     \ /
      Last update: 2016-03-03 17:41    [W:2.281 / U:1.900 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site