Skip to content
Commit e5fccca6 authored by Dave Martin's avatar Dave Martin
Browse files

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: default avatarDave Martin <Dave.Martin@arm.com>

---

Changes since RFCv2

 * [bugfix] Default intpartid to be the same as the partid when
   cfg->cpartid is not supplied.  (cfg->cpartid may always be
   supplied anyway, though).
parent b06f80da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment