Skip to content

Commit efe0627

Browse files
Alexander AntonovPeter Zijlstra
authored andcommitted
perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D
Current implementation of I/O stacks to PMU mapping doesn't support ICX-D. Detect ICX-D system to disable mapping. Fixes: 10337e9 ("perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX") 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> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20221117122833.3103580-5-alexander.antonov@linux.intel.com
1 parent 6532783 commit efe0627

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

arch/x86/events/intel/uncore.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <linux/slab.h>
33
#include <linux/pci.h>
44
#include <asm/apicdef.h>
5+
#include <asm/intel-family.h>
56
#include <linux/io-64-nonatomic-lo-hi.h>
67

78
#include <linux/perf_event.h>

arch/x86/events/intel/uncore_snbep.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5226,6 +5226,11 @@ static int icx_iio_get_topology(struct intel_uncore_type *type)
52265226

52275227
static int icx_iio_set_mapping(struct intel_uncore_type *type)
52285228
{
5229+
/* Detect ICX-D system. This case is not supported */
5230+
if (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_D) {
5231+
pmu_clear_mapping_attr(type->attr_update, &icx_iio_mapping_group);
5232+
return -EPERM;
5233+
}
52295234
return pmu_iio_set_mapping(type, &icx_iio_mapping_group);
52305235
}
52315236

0 commit comments

Comments
 (0)