Re: [PATCH 17/33] arm_mpam: Merge supported features during mpam_enable() into mpam_class

From: Gavin Shan

Date: Sun Nov 09 2025 - 16:59:58 EST


On 11/7/25 10:34 PM, Ben Horgan wrote:
From: James Morse <james.morse@xxxxxxx>

To make a decision about whether to expose an mpam class as
a resctrl resource we need to know its overall supported
features and properties.

Once we've probed all the resources, we can walk the tree
and produce overall values by merging the bitmaps. This
eliminates features that are only supported by some MSC
that make up a component or class.

If bitmap properties are mismatched within a component we
cannot support the mismatched feature.

Care has to be taken as vMSC may hold mismatched RIS.

Signed-off-by: James Morse <james.morse@xxxxxxx>
Reviewed-by: Ben Horgan <ben.horgan@xxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
Reviewed-by: Fenghua Yu <fenghuay@xxxxxxxxxx>
Tested-by: Fenghua Yu <fenghuay@xxxxxxxxxx>
Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Tested-by: Peter Newman <peternewman@xxxxxxxxxx>
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
---
drivers/resctrl/mpam_devices.c | 214 ++++++++++++++++++++++++++++++++
drivers/resctrl/mpam_internal.h | 3 +
2 files changed, 217 insertions(+)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>