aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Antonov <[email protected]>2022-11-17 12:28:24 +0000
committerPeter Zijlstra <[email protected]>2022-11-24 11:09:20 +0100
commitcee4eebd9158d9eb3f8c1708c297b219e8ea861f (patch)
tree8e91a0219ee3238c81213bc5c11bb539ef822bd6
parent4d13be8ab5d4aa6106331baa9674632a75b884b0 (diff)
perf/x86/intel/uncore: Introduce UPI topology type
This patch introduces new 'uncore_upi_topology' topology type to support UPI topology discovery. Signed-off-by: Alexander Antonov <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Kan Liang <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--arch/x86/events/intel/uncore.h7
-rw-r--r--arch/x86/events/intel/uncore_snbep.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h
index 917cff1e7815..ef1414957623 100644
--- a/arch/x86/events/intel/uncore.h
+++ b/arch/x86/events/intel/uncore.h
@@ -183,11 +183,18 @@ struct uncore_iio_topology {
int segment;
};
+struct uncore_upi_topology {
+ int die_to;
+ int pmu_idx_to;
+ int enabled;
+};
+
struct intel_uncore_topology {
int pmu_idx;
union {
void *untyped;
struct uncore_iio_topology *iio;
+ struct uncore_upi_topology *upi;
};
};
diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
index 469ff889ea08..d3323f13c304 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -3774,11 +3774,13 @@ static int die_to_cpu(int die)
enum {
IIO_TOPOLOGY_TYPE,
+ UPI_TOPOLOGY_TYPE,
TOPOLOGY_MAX
};
static const size_t topology_size[TOPOLOGY_MAX] = {
- sizeof(*((struct intel_uncore_topology *)NULL)->iio)
+ sizeof(*((struct intel_uncore_topology *)NULL)->iio),
+ sizeof(*((struct intel_uncore_topology *)NULL)->upi)
};
static int pmu_alloc_topology(struct intel_uncore_type *type, int topology_type)