Re: [PATCH v6 27/40] arm_mpam: resctrl: Add monitor initialisation and domain boilerplate
From: Gavin Shan
Date: Mon Mar 23 2026 - 23:41:57 EST
On 3/14/26 12:46 AM, Ben Horgan wrote:
Add the boilerplate that tells resctrl about the mpam monitors that are
available. resctrl expects all (non-telemetry) monitors to be on the L3 and
so advertise them there and invent an L3 resctrl resource if required. The
L3 cache itself has to exist as the cache ids are used as the domain
ids.
Bring the resctrl monitor domains online and offline based on the cpus
they contain.
Support for specific monitor types is left to later.
Tested-by: Punit Agrawal <punit.agrawal@xxxxxxxxxxxxxxxx>
Reviewed-by: Zeng Heng <zengheng4@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
New patch but mostly moved from the existing patches to
separate the monitors from the controls and the boilerplate
from the specific counters.
Use l3->mon_capable in resctrl_arch_mon_capable() as
resctrl_enable_mon_event() now returns a bool.
Changes since v5:
Use r->mon_capable instead of resctrl_arch_mon_capable() as specific
to the resource
Comment line wrap
Include offline_ctrl_domain cleanup from controls boilerplate patch
Include any_mon_comp finding and
Halve num_rmid when cdp_enabled
Move mpam_resctrl_get_mon_domain_from_cpu() from boilerplate patch
---
drivers/resctrl/mpam_internal.h | 15 +++
drivers/resctrl/mpam_resctrl.c | 231 ++++++++++++++++++++++++++++++--
2 files changed, 235 insertions(+), 11 deletions(-)
Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>