Skip to content

Commit e324234

Browse files
Alexander AntonovPeter Zijlstra
authored andcommitted
perf/x86/intel/uncore: Fix filter_tid mask for CHA events on Skylake Server
According Uncore Reference Manual: any of the CHA events may be filtered by Thread/Core-ID by using tid modifier in CHA Filter 0 Register. Update skx_cha_hw_config() to follow Uncore Guide. Fixes: cd34cd9 ("perf/x86/intel/uncore: Add Skylake server uncore support") Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Link: https://lore.kernel.org/r/20211115090334.3789-2-alexander.antonov@linux.intel.com
1 parent fa55b7d commit e324234

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/events/intel/uncore_snbep.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3608,6 +3608,9 @@ static int skx_cha_hw_config(struct intel_uncore_box *box, struct perf_event *ev
36083608
struct hw_perf_event_extra *reg1 = &event->hw.extra_reg;
36093609
struct extra_reg *er;
36103610
int idx = 0;
3611+
/* Any of the CHA events may be filtered by Thread/Core-ID.*/
3612+
if (event->hw.config & SNBEP_CBO_PMON_CTL_TID_EN)
3613+
idx = SKX_CHA_MSR_PMON_BOX_FILTER_TID;
36113614

36123615
for (er = skx_uncore_cha_extra_regs; er->msr; er++) {
36133616
if (er->event != (event->hw.config & er->config_mask))

0 commit comments

Comments
 (0)