Skip to content

Commit cee4eeb

Browse files
Alexander AntonovPeter Zijlstra
authored andcommitted
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 <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/20221117122833.3103580-3-alexander.antonov@linux.intel.com
1 parent 4d13be8 commit cee4eeb

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

arch/x86/events/intel/uncore.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,18 @@ struct uncore_iio_topology {
183183
int segment;
184184
};
185185

186+
struct uncore_upi_topology {
187+
int die_to;
188+
int pmu_idx_to;
189+
int enabled;
190+
};
191+
186192
struct intel_uncore_topology {
187193
int pmu_idx;
188194
union {
189195
void *untyped;
190196
struct uncore_iio_topology *iio;
197+
struct uncore_upi_topology *upi;
191198
};
192199
};
193200

arch/x86/events/intel/uncore_snbep.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3774,11 +3774,13 @@ static int die_to_cpu(int die)
37743774

37753775
enum {
37763776
IIO_TOPOLOGY_TYPE,
3777+
UPI_TOPOLOGY_TYPE,
37773778
TOPOLOGY_MAX
37783779
};
37793780

37803781
static const size_t topology_size[TOPOLOGY_MAX] = {
3781-
sizeof(*((struct intel_uncore_topology *)NULL)->iio)
3782+
sizeof(*((struct intel_uncore_topology *)NULL)->iio),
3783+
sizeof(*((struct intel_uncore_topology *)NULL)->upi)
37823784
};
37833785

37843786
static int pmu_alloc_topology(struct intel_uncore_type *type, int topology_type)

0 commit comments

Comments
 (0)