[PATCH v2 18/45] arm_mpam: resctrl: Implement resctrl_arch_reset_all_ctrls()

Zeng Heng zengheng4 at huawei.com
Thu Jan 8 19:45:06 PST 2026


> From: James Morse <james.morse at arm.com>
> Date: Fri, 5 Dec 2025 21:58:32 +0000
> Subject: [PATCH v2 18/45] arm_mpam: resctrl: Implement resctrl_arch_reset_all_ctrls()
>
> We already have a helper for resetting an mpam class and component.  Hook
> it up to resctrl_arch_reset_all_ctrls() and the domain offline path.
>
> Signed-off-by: James Morse <james.morse at arm.com>
> Signed-off-by: Ben Horgan <ben.horgan at arm.com>
> ---
>  drivers/resctrl/mpam_devices.c  |  6 +++---
>  drivers/resctrl/mpam_internal.h |  7 +++++++
>  drivers/resctrl/mpam_resctrl.c  | 15 +++++++++++++++
>  3 files changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c
> index bc4f1c80eab..d32e8700245 100644
> --- a/drivers/resctrl/mpam_resctrl.c
> +++ b/drivers/resctrl/mpam_resctrl.c
> @@ -353,6 +366,8 @@ void mpam_resctrl_offline_cpu(unsigned int cpu)
>
>  		ctrl_dom_empty = true;
>  		if (exposed_alloc_capable) {
> +			mpam_reset_component_locked(dom->ctrl_comp);
> +
>  			ctrl_d = &dom->resctrl_ctrl_dom;
>  			ctrl_dom_empty = mpam_resctrl_offline_domain_hdr(cpu, &ctrl_d->hdr);
>  			if (ctrl_dom_empty)

mpam_cpu_offline() already directly calls mpam_reset_ris() to reset the
MPAM MSC that is about to go offline. So why here still need
mpam_resctrl_offline_cpu() to invoke mpam_reset_component_locked(),
which ends up calling mpam_reset_ris() again?

Please point it out if I might have overlooked anything, thank you.


Best Regards,
Zeng Heng



More information about the linux-arm-kernel mailing list