Re: [PATCH v2 05/12] arm_mpam: Ensure MBWU counters are reset on restore

From: Gavin Shan

Date: Tue Sep 22 2026 - 01:45:14 EST


On 9/18/26 12:56 AM, Ben Horgan wrote:
When an MSC becomes inaccessible due to cpu offline CFG_MBWU_CTL is set to
zero in mpam_save_mbwu_state(). This is very likely to mean that the config
will mismatch when restoring and so the monitor will be reset. However, the
state may have been lost and so there are no guarantees. Ensure the reset
happens by setting the reset_on_next_read and remove the unnecessary writes
from mpam_save_mbwu_state().

Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management")
Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
Tested-by: Gavin Shan <gshan@xxxxxxxxxx>
---
Changes since v1:
Use local variable mbwu_state consistently (Shaopeng)
Only access ris->mbwu_state when have the mon_sel_lock
---
drivers/resctrl/mpam_devices.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>