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

Ben Horgan
2026-01-06T11:19:39Z

Hi Jonathan,

On 1/5/26 17:51, Jonathan Cameron wrote:
> On Fri, 19 Dec 2025 18:11:20 +0000
> Ben Horgan <ben.horgan@arm.com> wrote:
>
>> From: James Morse <james.morse@arm.com>
>>
>> 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@arm.com>
>> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
> I left all the context as my one comment on this is I don't see a reason
> to expose mpam_reset_class() Only the _locked() variant ever seems to be
> used outside of mpam_devices.c
>
>> ---

>> diff --git a/drivers/resctrl/mpam_internal.h b/drivers/resctrl/mpam_internal.h
>> index 554e4887ba81..b9a739abb101 100644
>> --- a/drivers/resctrl/mpam_internal.h
>> +++ b/drivers/resctrl/mpam_internal.h
>> @@ -389,6 +389,13 @@ extern u8 mpam_pmg_max;
>> void mpam_enable(struct work_struct *work);
>> void mpam_disable(struct work_struct *work);
>>
>> +/* Reset all the RIS in a class, optionally while holding cpus_read_lock() */
>> +void mpam_reset_class_locked(struct mpam_class *class);
>> +void mpam_reset_class(struct mpam_class *class);
>
> Not clear from this patch why we need to expose mpam_reset_class()

Good spot. That's not required in this series, so I will stop exposing it.

Thanks,

Ben