[PATCH v6 23/40] arm_mpam: resctrl: Add rmid index helpers
Gavin Shan
gshan at redhat.com
Mon Mar 23 15:50:11 PDT 2026
On 3/14/26 12:46 AM, Ben Horgan wrote:
> Because MPAM's pmg aren't identical to RDT's rmid, resctrl handles some
> data structures by index. This allows x86 to map indexes to RMID, and MPAM
> to map them to partid-and-pmg.
>
> Add the helpers to do this.
>
> Tested-by: Gavin Shan <gshan at redhat.com>
> Tested-by: Shaopeng Tan <tan.shaopeng at jp.fujitsu.com>
> Tested-by: Peter Newman <peternewman at google.com>
> Tested-by: Zeng Heng <zengheng4 at huawei.com>
> Tested-by: Punit Agrawal <punit.agrawal at oss.qualcomm.com>
> Reviewed-by: Zeng Heng <zengheng4 at huawei.com>
> Reviewed-by: Shaopeng Tan <tan.shaopeng at jp.fujitsu.com>
> Suggested-by: James Morse <james.morse at arm.com>
> Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> ---
> Changes since rfc:
> Use ~0U instead of ~0 in lhs of left shift
>
> Changes since v2:
> Drop changes signed-off-by as reworked patch
> Use multiply and add rather than shift to avoid holes
> ---
> drivers/resctrl/mpam_resctrl.c | 16 ++++++++++++++++
> include/linux/arm_mpam.h | 3 +++
> 2 files changed, 19 insertions(+)
>
Reviewed-by: Gavin Shan <gshan at redhat.com>
More information about the linux-arm-kernel
mailing list