[PATCH v6 30/40] arm_mpam: resctrl: Add resctrl_arch_rmid_read()

Gavin Shan gshan at redhat.com
Mon Mar 23 20:41:32 PDT 2026


On 3/14/26 12:46 AM, Ben Horgan wrote:
> From: James Morse <james.morse at arm.com>
> 
> resctrl uses resctrl_arch_rmid_read() to read counters. CDP emulation means
> the counter may need reading in three different ways.
> 
> The helpers behind the resctrl_arch_ functions will be re-used for the ABMC
> equivalent functions.
> 
> Add the rounding helper for checking monitor values while we're here.
> 
> 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>
> Reviewed-by: Shaopeng Tan <tan.shaopeng at jp.fujitsu.com>
> Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>
> Signed-off-by: James Morse <james.morse at arm.com>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> ---
> Changes since rfc:
> cfg initialisation style
> code flow at end of read_mon_cdp_safe()
> 
> Changes since v2:
> Whitespace changes
> 
> Changes since v3:
> Update function signatures
> Remove abmc check
> 
> Changes since v5:
> don't read mbwu
> remove reset code as only needed for mbwu
> ---
>   drivers/resctrl/mpam_resctrl.c | 82 ++++++++++++++++++++++++++++++++++
>   include/linux/arm_mpam.h       |  5 +++
>   2 files changed, 87 insertions(+)
> 
Reviewed-by: Gavin Shan <gshan at redhat.com>




More information about the linux-arm-kernel mailing list