Skip to content

Commit 7b1fb7c

Browse files
Dapeng Miquanxianwang
authored andcommitted
perf/x86/intel: Add PMU support for Clearwater Forest
commit 48d66c89dce1e3687174608a5f5c31d5961a9916 upstream. From the PMU's perspective, Clearwater Forest is similar to the previous generation Sierra Forest. The key differences are the ARCH PEBS feature and the new added 3 fixed counters for topdown L1 metrics events. The ARCH PEBS is supported in the following patches. This patch provides support for basic perfmon features and 3 new added fixed counters. Intel-SIG: commit 48d66c89dce1 perf/x86/intel: Add PMU support for Clearwater Forest. CWF PMU core backporting Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/20250415114428.341182-3-dapeng1.mi@linux.intel.com [ Quanxian Wang: amend commit log ] Signed-off-by: Quanxian Wang <quanxian.wang@intel.com>
1 parent 0157486 commit 7b1fb7c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

arch/x86/events/intel/core.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,6 +2209,18 @@ static struct extra_reg intel_cmt_extra_regs[] __read_mostly = {
22092209
EVENT_EXTRA_END
22102210
};
22112211

2212+
EVENT_ATTR_STR(topdown-fe-bound, td_fe_bound_skt, "event=0x9c,umask=0x01");
2213+
EVENT_ATTR_STR(topdown-retiring, td_retiring_skt, "event=0xc2,umask=0x02");
2214+
EVENT_ATTR_STR(topdown-be-bound, td_be_bound_skt, "event=0xa4,umask=0x02");
2215+
2216+
static struct attribute *skt_events_attrs[] = {
2217+
EVENT_PTR(td_fe_bound_skt),
2218+
EVENT_PTR(td_retiring_skt),
2219+
EVENT_PTR(td_bad_spec_cmt),
2220+
EVENT_PTR(td_be_bound_skt),
2221+
NULL,
2222+
};
2223+
22122224
#define KNL_OT_L2_HITE BIT_ULL(19) /* Other Tile L2 Hit */
22132225
#define KNL_OT_L2_HITF BIT_ULL(20) /* Other Tile L2 Hit */
22142226
#define KNL_MCDRAM_LOCAL BIT_ULL(21)
@@ -6331,6 +6343,18 @@ __init int intel_pmu_init(void)
63316343
name = "crestmont";
63326344
break;
63336345

6346+
case INTEL_ATOM_DARKMONT_X:
6347+
intel_pmu_init_skt(NULL);
6348+
intel_pmu_pebs_data_source_cmt();
6349+
x86_pmu.pebs_latency_data = cmt_latency_data;
6350+
x86_pmu.get_event_constraints = cmt_get_event_constraints;
6351+
td_attr = skt_events_attrs;
6352+
mem_attr = grt_mem_attrs;
6353+
extra_attr = cmt_format_attr;
6354+
pr_cont("Darkmont events, ");
6355+
name = "darkmont";
6356+
break;
6357+
63346358
case INTEL_WESTMERE:
63356359
case INTEL_WESTMERE_EP:
63366360
case INTEL_WESTMERE_EX:

0 commit comments

Comments
 (0)