[PATCH 0/2] RAPL driver fixes for AMD CPUs

From: Dhananjay Ugwekar
Date: Fri Jul 19 2024 - 05:26:28 EST


After commit ("x86/cpu/topology: Add support for the AMD 0x80000026 leaf"),
AMD CPUs with 0x80000026 leaf have become CCD(Core Complex Die)-aware and
this CCD info is reported by the _die_ macros, which earlier used to return
package info.

e.g: Earlier topology_logical_die_id() and topology_logical_package_id()
used to return the same value for all the CPUs even on a multi-die/multi-CCD
system. But after the above mentioned commit, topology_logical_die_id()
returns the CCD id and topology_logical_package_id() returns the
package/socket id.

Hence, the RAPL energy-pkg event which uses _die_ macros has to be
fixed, in light of above change.

Dhananjay Ugwekar (2):
perf/x86/rapl: Fix the energy-pkg event for AMD CPUs
powercap/intel_rapl: Fix the energy-pkg event for AMD CPUs

arch/x86/events/rapl.c | 44 ++++++++++++++++++++++++----
drivers/powercap/intel_rapl_common.c | 20 +++++++++++--
2 files changed, 56 insertions(+), 8 deletions(-)

--
2.34.1