lkml.org 
[lkml]   [2024]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 23/74] x86/cpu/vfm: Update arch/x86/kernel/cpu/mce/severity.c
    Date
    New CPU #defines encode vendor and family as well as model.

    Signed-off-by: Tony Luck <tony.luck@intel.com>
    ---
    arch/x86/kernel/cpu/mce/severity.c | 9 +++++----
    1 file changed, 5 insertions(+), 4 deletions(-)

    diff --git a/arch/x86/kernel/cpu/mce/severity.c b/arch/x86/kernel/cpu/mce/severity.c
    index ee85fe2ccf65..85f5de718725 100644
    --- a/arch/x86/kernel/cpu/mce/severity.c
    +++ b/arch/x86/kernel/cpu/mce/severity.c
    @@ -12,6 +12,7 @@
    #include <linux/uaccess.h>

    #include <asm/mce.h>
    +#include <asm/cpu_device_id.h>
    #include <asm/intel-family.h>
    #include <asm/traps.h>
    #include <asm/insn.h>
    @@ -45,14 +46,14 @@ static struct severity {
    unsigned char context;
    unsigned char excp;
    unsigned char covered;
    - unsigned char cpu_model;
    + unsigned int cpu_vfm;
    unsigned char cpu_minstepping;
    unsigned char bank_lo, bank_hi;
    char *msg;
    } severities[] = {
    #define MCESEV(s, m, c...) { .sev = MCE_ ## s ## _SEVERITY, .msg = m, ## c }
    #define BANK_RANGE(l, h) .bank_lo = l, .bank_hi = h
    -#define MODEL_STEPPING(m, s) .cpu_model = m, .cpu_minstepping = s
    +#define VFM_STEPPING(m, s) .cpu_vfm = m, .cpu_minstepping = s
    #define KERNEL .context = IN_KERNEL
    #define USER .context = IN_USER
    #define KERNEL_RECOV .context = IN_KERNEL_RECOV
    @@ -128,7 +129,7 @@ static struct severity {
    MCESEV(
    AO, "Uncorrected Patrol Scrub Error",
    SER, MASK(MCI_STATUS_UC|MCI_ADDR|0xffffeff0, MCI_ADDR|0x001000c0),
    - MODEL_STEPPING(INTEL_FAM6_SKYLAKE_X, 4), BANK_RANGE(13, 18)
    + VFM_STEPPING(INTEL_SKYLAKE_X, 4), BANK_RANGE(13, 18)
    ),

    /* ignore OVER for UCNA */
    @@ -397,7 +398,7 @@ static noinstr int mce_severity_intel(struct mce *m, struct pt_regs *regs, char
    continue;
    if (s->excp && excp != s->excp)
    continue;
    - if (s->cpu_model && boot_cpu_data.x86_model != s->cpu_model)
    + if (s->cpu_vfm && boot_cpu_data.x86_model != s->cpu_vfm)
    continue;
    if (s->cpu_minstepping && boot_cpu_data.x86_stepping < s->cpu_minstepping)
    continue;
    --
    2.44.0

    \
     
     \ /
      Last update: 2024-04-16 23:24    [W:6.802 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site