Update has_smi_counter() to include case 0x66: /* INTEL_FAM6_CANNONLAKE_L, Palm Cove */ case 0x6A: /* INTEL_FAM6_ICELAKE_X */ case 0x96: /* INTEL_FAM6_ATOM_TREMONT Elkhart Lake */ case 0x86: /* INTEL_FAM6_ATOM_TREMONT_D, Jacobsville */ This function is based on probe_nhm_msrs() in file turbostat.c in the linux kernel. This update also reorders the model numbers to more closely match the order in probe_nhm_msrs, and adds comments to match symbolic names for the model numbers. Reported-by: Bart Wensley <bwensley@xxxxxxxxxx> Signed-off-by: John Kacur <jkacur@xxxxxxxxxx> --- src/cyclictest/cyclictest.c | 50 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index c9ed9e08f6e1..a4979ad81f21 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -440,31 +440,35 @@ static int has_smi_counter(void) case 0x2C: /* Westmere EP - Gulftown */ case 0x2E: /* Nehalem-EX Xeon - Beckton */ case 0x2F: /* Westmere-EX Xeon - Eagleton */ - case 0x2A: /* SNB */ - case 0x2D: /* SNB Xeon */ - case 0x3A: /* IVB */ - case 0x3E: /* IVB Xeon */ - case 0x3C: /* HSW */ - case 0x3F: /* HSX */ - case 0x45: /* HSW */ - case 0x46: /* HSW */ - case 0x3D: /* BDW */ - case 0x47: /* BDW */ - case 0x4F: /* BDX */ - case 0x56: /* BDX-DE */ - case 0x4E: /* SKL */ - case 0x5E: /* SKL */ + case 0x2A: /* INTEL_FAM6_SANDYBRIDGE, SNB */ + case 0x2D: /* INTEL_FAM6_SANDYBRIDGE_X, SNB Xeon */ + case 0x3A: /* INTEL_FAM6_IVYBRIDGE, IVB */ + case 0x3E: /* INTEL_FAM6_IVYBRIDGE_X, IVB Xeon */ + case 0x3C: /* INTEL_FAM6_HASWELL, HSW */ + case 0x46: /* INTEL_FAM6_HASWELL_G, HSW */ + case 0x3F: /* INTEL_FAM6_HASWELL_X, HSX */ + case 0x45: /* INTEL_FAM6_HASWELL_L, HSW */ + case 0x3D: /* INTEL_FAM6_BROADWELL, BDW */ + case 0x47: /* INTEL_FAM6_BROADWELL_G, BDW */ + case 0x4F: /* INTEL_FAM6_BROADWELL_X, BDX */ + case 0x56: /* INTEL_FAM6_BROADWELL_D, BDX-DE */ + case 0x4E: /* INTEL_FAM6_SKYLAKE_L SKL */ + case 0x66: /* INTEL_FAM6_CANNONLAKE_L, Palm Cove */ + case 0x55: /* INTEL_FAM6_SKYLAKE_X, SKX */ + case 0x6A: /* INTEL_FAM6_ICELAKE_X */ + case 0x5E: /* INTEL_FAM6_SKYLAKE, SKL */ case 0x8E: /* KBL */ case 0x9E: /* KBL */ - case 0x55: /* SKX */ - case 0x37: /* BYT */ - case 0x4D: /* AVN */ - case 0x4C: /* AMT */ - case 0x57: /* PHI */ - case 0x5C: /* BXT */ - case 0x5F: /* DNV */ - case 0x7A: /* Gemini Lake */ - case 0x85: /* Knights Mill */ + case 0x37: /* INTEL_FAM6_ATOM_SILVERMONT, BYT */ + case 0x4D: /* INTEL_FAM6_ATOM_SILVERMONT_D, AVN */ + case 0x4C: /* INTEL_FAM6_ATOM_AIRMONT, AMT */ + case 0x57: /* INTEL_FAM6_XEON_PHI_KNL, PHI */ + case 0x5C: /* INTEL_FAM6_ATOM_GOLDMONT, BXT, Apollo Lake */ + case 0x7A: /* INTEL_FAM6_ATOM_GOLDMONT_PLUS, Gemini Lake */ + case 0x5F: /* INTEL_FAM6_ATOM_GOLDMONT_D, DNV, Denverton */ + case 0x96: /* INTEL_FAM6_ATOM_TREMONT Elkhart Lake */ + case 0x86: /* INTEL_FAM6_ATOM_TREMONT_D, Jacobsville */ + case 0x85: /* INTEL_FAM6_XEON_PHI_KNM, Knights Mill */ break; default: return 0; -- 2.35.1