arm_mpam: Add control partition identifier to mpam_config
Currently, MPAM PARTIDs are assigned 1:1 to resctrl control groups.
This means that an MSC that implements PARTID Narrowing can simply
program the PARTID value for intPARTID where needed.
In order to enable multiple PARTIDs to be assigned to a single
control group in a flexible manner, the PARTID value cannot be used
directly for the intPARTID, so in the mpam_devices backend,
Narrowing MSCs need an explicit identifier for the control /
resource regulation group.
Add a field cpartid to struct mpam_config to hold this identifier,
and wire up the resctrl glue code to pass a suitable value.
In common with the handling of other parameters, make programming
of MPAMCFG_INTPARTID unconditional when applying control updates.
When no cpartid is supplied, e.g., during driver startup, intPARTID
is programmed with 0. (There is no architectural reset value for
MPAMCFG_INTPARTID even for PARTID 0, but the architecture can be
interpreted as suggesting intPARTID 0 as the default, so this is as
good a choice as any.) Control updates through resctrl will always
supply a cpartid, identifying the affected resctrl control
partition.
Signed-off-by:
Dave Martin <Dave.Martin@arm.com>
Loading
Please register or sign in to comment