perf/x86/uncore: Apply the unit control RB tree to MSR uncore units
authorKan Liang <kan.liang@linux.intel.com>
Fri, 14 Jun 2024 13:46:28 +0000 (06:46 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 17 Jun 2024 15:57:57 +0000 (17:57 +0200)
commitb1d9ea2e1ca44987c8409cc628dfb0c84e93dce9
tree5d0209b337f5d3a8e09bc5fb66464a11da395438
parent80580dae65b941eb681bd79f31f64f91b58232b4
perf/x86/uncore: Apply the unit control RB tree to MSR uncore units

The unit control RB tree has the unit control and unit ID information
for all the MSR units. Use them to replace the box_ctl and
uncore_msr_box_ctl() to get an accurate unit control address for MSR
uncore units.

Add intel_generic_uncore_assign_hw_event(), which utilizes the accurate
unit control address from the unit control RB tree to calculate the
config_base and event_base.

The unit id related information should be retrieved from the unit
control RB tree as well.

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-6-kan.liang@linux.intel.com
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore_discovery.c
arch/x86/events/intel/uncore_discovery.h
arch/x86/events/intel/uncore_snbep.c