Re: [PATCH v2 2/6] x86/resctrl: Parse ACPI CMRC table

From: Chen, Yu C

Date: Fri Jun 05 2026 - 08:19:56 EST


On 6/5/2026 12:57 AM, Thomas Gleixner wrote:
On Fri, Jun 05 2026 at 00:11, Chen Yu wrote:

The CMRC (Cache Monitoring Registers for CPU Agents Description)
sub-table of ERDT describes the MMIO registers used to read
cache monitoring counters (e.g. LLC occupancy) for an RMD.

Parse each CMRC sub-table, ioremap its register window, and save
the CMRC pointer in the corresponding ERDT domain entry so that
later monitoring code can read the counters via MMIO.

Suggested-by: Tony Luck <tony.luck@xxxxxxxxx>
Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
---
arch/x86/kernel/cpu/resctrl/erdt.c | 40 ++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

diff --git a/arch/x86/kernel/cpu/resctrl/erdt.c b/arch/x86/kernel/cpu/resctrl/erdt.c
index 3f309a4b15c8..d1eca4594f09 100644
--- a/arch/x86/kernel/cpu/resctrl/erdt.c
+++ b/arch/x86/kernel/cpu/resctrl/erdt.c
@@ -38,6 +38,7 @@ static bool erdt_available;
static DEFINE_XARRAY(erdt_domain_xa); /* Indexed by L3 cache ID */
#define ERDT_VALID_VERSION 1
+#define CMRC_VALID_INDEX_FUNC_VERSION 1

Please make this tabular so it's easy to parse

#define ERDT_VALID_VERSION 1
#define CMRC_VALID_INDEX_FUNC_VERSION 1


OK, fixed.

thanks,
Chenyu