summaryrefslogtreecommitdiff
path: root/arch/x86/events/intel/uncore_discovery.h
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2024-06-14 16:46:29 +0300
committerPeter Zijlstra <peterz@infradead.org>2024-06-17 18:57:58 +0300
commitf76a8420444beb1c3968504c8176a67d2d5fe18f (patch)
treed48dc01e96f2d091bdb96e96388e3d155a5fa372 /arch/x86/events/intel/uncore_discovery.h
parentb1d9ea2e1ca44987c8409cc628dfb0c84e93dce9 (diff)
downloadlinux-f76a8420444beb1c3968504c8176a67d2d5fe18f.tar.xz
perf/x86/uncore: Apply the unit control RB tree to PCI uncore units
The unit control RB tree has the unit control and unit ID information for all the PCI units. Use them to replace the box_ctls/pci_offsets to get an accurate unit control address for PCI uncore units. The UPI/M3UPI units in the discovery table are ignored. Please see the commit 65248a9a9ee1 ("perf/x86/uncore: Add a quirk for UPI on SPR"). Manually allocate a unit control RB tree for UPI/M3UPI. Add cleanup_extra_boxes to release such manual allocation. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Yunying Sun <yunying.sun@intel.com> Link: https://lore.kernel.org/r/20240614134631.1092359-7-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/events/intel/uncore_discovery.h')
-rw-r--r--arch/x86/events/intel/uncore_discovery.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/events/intel/uncore_discovery.h b/arch/x86/events/intel/uncore_discovery.h
index 4a7a7c819d6f..0acf9b681f3b 100644
--- a/arch/x86/events/intel/uncore_discovery.h
+++ b/arch/x86/events/intel/uncore_discovery.h
@@ -171,3 +171,5 @@ int intel_uncore_find_discovery_unit_id(struct rb_root *units, int die,
unsigned int pmu_idx);
bool intel_generic_uncore_assign_hw_event(struct perf_event *event,
struct intel_uncore_box *box);
+void uncore_find_add_unit(struct intel_uncore_discovery_unit *node,
+ struct rb_root *root, u16 *num_units);