Re: [PATCH v6 15/40] arm_mpam: resctrl: Pick the caches we will use as resctrl resources

From: Gavin Shan

Date: Mon Mar 23 2026 - 02:38:12 EST


On 3/14/26 12:45 AM, Ben Horgan wrote:
From: James Morse <james.morse@xxxxxxx>

Systems with MPAM support may have a variety of control types at any point
of their system layout. We can only expose certain types of control, and
only if they exist at particular locations.

Start with the well-known caches. These have to be depth 2 or 3 and support
MPAM's cache portion bitmap controls, with a number of portions fewer than
resctrl's limit.

Tested-by: Gavin Shan <gshan@xxxxxxxxxx>
Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Tested-by: Peter Newman <peternewman@xxxxxxxxxx>
Tested-by: Zeng Heng <zengheng4@xxxxxxxxxx>
Tested-by: Punit Agrawal <punit.agrawal@xxxxxxxxxxxxxxxx>
Reviewed-by: Zeng Heng <zengheng4@xxxxxxxxxx>
Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
Signed-off-by: James Morse <james.morse@xxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
Changes since rfc:
Jonathan:
Remove brackets
Compress debug message
Use temp var, r

Changes since v2:
Return -EINVAL in mpam_resctrl_control_init() for unknown rid

Changes since v4:
Set alloc_capable after other settings (Reinette)

Changes since v5:
Missing 'have' in comment
Set cdp_capable to true for L2 and L3
---
drivers/resctrl/mpam_resctrl.c | 91 +++++++++++++++++++++++++++++++++-
1 file changed, 89 insertions(+), 2 deletions(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>