lkml.org 
[lkml]   [2024]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 33/71] x86/mce: Switch to new Intel CPU model defines
    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/intel.c | 21 ++++++++++-----------
    1 file changed, 10 insertions(+), 11 deletions(-)

    diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c
    index 399b62e223d2..f6103e6bf69a 100644
    --- a/arch/x86/kernel/cpu/mce/intel.c
    +++ b/arch/x86/kernel/cpu/mce/intel.c
    @@ -13,7 +13,7 @@
    #include <linux/cpumask.h>
    #include <asm/apic.h>
    #include <asm/cpufeature.h>
    -#include <asm/intel-family.h>
    +#include <asm/cpu_device_id.h>
    #include <asm/processor.h>
    #include <asm/msr.h>
    #include <asm/mce.h>
    @@ -455,10 +455,10 @@ static void intel_imc_init(struct cpuinfo_x86 *c)
    {
    u64 error_control;

    - switch (c->x86_model) {
    - case INTEL_FAM6_SANDYBRIDGE_X:
    - case INTEL_FAM6_IVYBRIDGE_X:
    - case INTEL_FAM6_HASWELL_X:
    + switch (c->x86_vfm) {
    + case INTEL_SANDYBRIDGE_X:
    + case INTEL_IVYBRIDGE_X:
    + case INTEL_HASWELL_X:
    if (rdmsrl_safe(MSR_ERROR_CONTROL, &error_control))
    return;
    error_control |= 2;
    @@ -484,12 +484,11 @@ bool intel_filter_mce(struct mce *m)
    struct cpuinfo_x86 *c = &boot_cpu_data;

    /* MCE errata HSD131, HSM142, HSW131, BDM48, HSM142 and SKX37 */
    - if ((c->x86 == 6) &&
    - ((c->x86_model == INTEL_FAM6_HASWELL) ||
    - (c->x86_model == INTEL_FAM6_HASWELL_L) ||
    - (c->x86_model == INTEL_FAM6_BROADWELL) ||
    - (c->x86_model == INTEL_FAM6_HASWELL_G) ||
    - (c->x86_model == INTEL_FAM6_SKYLAKE_X)) &&
    + if ((c->x86_vfm == INTEL_HASWELL ||
    + c->x86_vfm == INTEL_HASWELL_L ||
    + c->x86_vfm == INTEL_BROADWELL ||
    + c->x86_vfm == INTEL_HASWELL_G ||
    + c->x86_vfm == INTEL_SKYLAKE_X) &&
    (m->bank == 0) &&
    ((m->status & 0xa0000000ffffffff) == 0x80000000000f0005))
    return true;
    --
    2.44.0

    \
     
     \ /
      Last update: 2024-05-27 18:01    [W:3.457 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site