Skip to content

Commit

Permalink
perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D
Browse files Browse the repository at this point in the history
commit efe0627 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexander Antonov authored and gregkh committed Jan 12, 2023
1 parent df06e77 commit ca77ac2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/events/intel/uncore.h
Expand Up @@ -2,6 +2,7 @@
#include <linux/slab.h>
#include <linux/pci.h>
#include <asm/apicdef.h>
#include <asm/intel-family.h>
#include <linux/io-64-nonatomic-lo-hi.h>

#include <linux/perf_event.h>
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/events/intel/uncore_snbep.c
Expand Up @@ -5144,6 +5144,11 @@ static int icx_iio_get_topology(struct intel_uncore_type *type)

static int icx_iio_set_mapping(struct intel_uncore_type *type)
{
/* Detect ICX-D system. This case is not supported */
if (boot_cpu_data.x86_model == INTEL_FAM6_ICELAKE_D) {
pmu_clear_mapping_attr(type->attr_update, &icx_iio_mapping_group);
return -EPERM;
}
return pmu_iio_set_mapping(type, &icx_iio_mapping_group);
}

Expand Down

0 comments on commit ca77ac2

Please sign in to comment.