Commit cee4eebd authored by Alexander Antonov's avatar Alexander Antonov Committed by Peter Zijlstra
Browse files

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: default avatarAlexander Antonov <alexander.antonov@linux.intel.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20221117122833.3103580-3-alexander.antonov@linux.intel.com
parent 4d13be8a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;
	};
};

+3 −1
Original line number Diff line number Diff line
@@ -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)