arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL
PATCH 1/1 arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL
From: Ben Horgan <[email protected]>
commit 197a7a41e6e006916fe68c952e96d768933104fe upstream
In mpam_save_mbwu_state() the monitor values are read using __ris_msmon_read_locked() which checks if the configuration provided matches that in the hardware and if not then resets the monitor. To avoid resetting the monitor before reading the value that needs saving only clear the configuration after the monitor is read.
---
Hi,
this is the backport version of this patch for v7.3, as discussed on the list before. This avoids backporting two lengthy patches that do not make any sense for v7.3 (introduction of error return checks only used in v7.4-rc1 code).
Applies on top of stable-rc/linux-7.3.y (commit "Linux 7.3.6-rc1").
Please apply for v7.3.6!
Cheers,
Andre
drivers/resctrl/mpam_devices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/resctrl/mpam_devices.c +2 -1
@@ -1716,7 +1716,6 @@ static int mpam_save_mbwu_state(void *arg) cur_flt =mpam_read_monsel_reg (msc,CFG_MBWU_FLT ); cur_ctl =mpam_read_monsel_reg (msc,CFG_MBWU_CTL ); -mpam_write_monsel_reg (msc,CFG_MBWU_CTL ,0 ); cfg->mon = i; cfg->pmg =FIELD_GET (MSMON_CFG_x_FLT_PMG, cur_flt);
@@ -1748,6 +1747,8 @@ static int mpam_save_mbwu_state(void *arg) mbwu_state->correction = val; } +mpam_write_monsel_reg (msc,CFG_MBWU_CTL ,0 ); +mpam_mon_sel_unlock (msc); }
base-commit: 62eba995b019cddac60e54392601f157010821e9
Signature · 1 line
2.43.0
Quoted 2 lines
this is the backport version of this patch for v7.3, as discussed on the list before.
Queued for 7.3, thanks.
Signature · 2 lines
Thanks, Sasha