Skip to content

Commit

Permalink
ICX: perf/x86/intel: Add more Icelake CPUIDs
Browse files Browse the repository at this point in the history
commit faaeff9 upstream.

Add new model number for Icelake desktop and server to perf.

The data source encoding for Icelake server is the same as Skylake
server.

Signed-off-by: Kan Liang <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Acked-by: Joseph Qi <[email protected]>
  • Loading branch information
Kan Liang authored and casparant committed Nov 20, 2019
1 parent 1de9c7c commit e4ed6f5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions arch/x86/events/intel/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4110,6 +4110,7 @@ __init int intel_pmu_init(void)
struct event_constraint *c;
unsigned int unused;
struct extra_reg *er;
bool pmem = false;
int version, i;
char *name;

Expand Down Expand Up @@ -4521,9 +4522,10 @@ __init int intel_pmu_init(void)
name = "knights-landing";
break;

case INTEL_FAM6_SKYLAKE_X:
pmem = true;
case INTEL_FAM6_SKYLAKE_MOBILE:
case INTEL_FAM6_SKYLAKE_DESKTOP:
case INTEL_FAM6_SKYLAKE_X:
case INTEL_FAM6_KABYLAKE_MOBILE:
case INTEL_FAM6_KABYLAKE_DESKTOP:
x86_pmu.late_ack = true;
Expand Down Expand Up @@ -4553,8 +4555,7 @@ __init int intel_pmu_init(void)
extra_attr = merge_attr(extra_attr, skl_format_attr);
to_free = extra_attr;
x86_pmu.cpu_events = get_hsw_events_attrs();
intel_pmu_pebs_data_source_skl(
boot_cpu_data.x86_model == INTEL_FAM6_SKYLAKE_X);
intel_pmu_pebs_data_source_skl(pmem);

if (boot_cpu_has(X86_FEATURE_TSX_FORCE_ABORT)) {
x86_pmu.flags |= PMU_FL_TFA;
Expand All @@ -4568,7 +4569,11 @@ __init int intel_pmu_init(void)
name = "skylake";
break;

case INTEL_FAM6_ICELAKE_X:
case INTEL_FAM6_ICELAKE_XEON_D:
pmem = true;
case INTEL_FAM6_ICELAKE_MOBILE:
case INTEL_FAM6_ICELAKE_DESKTOP:
x86_pmu.late_ack = true;
memcpy(hw_cache_event_ids, skl_hw_cache_event_ids, sizeof(hw_cache_event_ids));
memcpy(hw_cache_extra_regs, skl_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
Expand All @@ -4591,7 +4596,7 @@ __init int intel_pmu_init(void)
x86_pmu.cpu_events = get_icl_events_attrs();
x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02);
x86_pmu.lbr_pt_coexist = true;
intel_pmu_pebs_data_source_skl(false);
intel_pmu_pebs_data_source_skl(pmem);
pr_cont("Icelake events, ");
name = "icelake";
break;
Expand Down

0 comments on commit e4ed6f5

Please sign in to comment.