hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IDA88U -------------------------------- For the MBWU bandwidth monitor, after a monitor group is deleted, the mbwu_state needs to clear before creating another new monitor group. Otherwise, that would affect the initial values of the newly created monitor group. Therefore, in resctrl_arch_reset_rmid(), all events except for the occupancy event-ids need to call mpam_msmon_reset_mbwu(). Fixes: 006d3b5b7aeb ("arm_mpam: resctrl: Add resctrl_arch_rmid_read() and resctrl_arch_reset_rmid()") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/platform/mpam/mpam_resctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/mpam/mpam_resctrl.c b/drivers/platform/mpam/mpam_resctrl.c index 7c386ce7b80f..8ee0857f9a93 100644 --- a/drivers/platform/mpam/mpam_resctrl.c +++ b/drivers/platform/mpam/mpam_resctrl.c @@ -439,7 +439,8 @@ void resctrl_arch_reset_rmid(struct rdt_resource *r, struct rdt_domain *d, struct mpam_resctrl_dom *dom; struct mpam_resctrl_res *res; - if (eventid != QOS_L3_MBM_LOCAL_EVENT_ID) + if (eventid == QOS_L3_OCCUP_EVENT_ID || + eventid == QOS_L2_OCCUP_EVENT_ID) return; res = container_of(r, struct mpam_resctrl_res, resctrl_res); -- 2.25.1