hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9ARW6
-----------------------------
Not only monitor groups should follow rdtgrp's partid, but also the control group should adopt the rdtgrp's partid.
Fixes: 08127bbfcfae ("mpam: update monitor rmid and group configuration") Signed-off-by: Zeng Heng zengheng4@huawei.com --- arch/arm64/kernel/mpam/mpam_ctrlmon.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/arch/arm64/kernel/mpam/mpam_ctrlmon.c b/arch/arm64/kernel/mpam/mpam_ctrlmon.c index 0aab9f8c9a96..12e188f0b788 100644 --- a/arch/arm64/kernel/mpam/mpam_ctrlmon.c +++ b/arch/arm64/kernel/mpam/mpam_ctrlmon.c @@ -216,11 +216,9 @@ static void resctrl_group_resync_domain_ctrls(struct rdtgroup *rdtgrp,
for (i = staged_start; i <= staged_end; i++) { cdp_both_ctrl = cfg[i].cdp_both_ctrl; - /* - * for ctrl group configuration, hw_closid of cfg[i] equals - * to rdtgrp->closid.intpartid. - */ - closid.intpartid = hw_closid_val(cfg[i].hw_closid); + + resctrl_cdp_mpamid_map_val(rdtgrp->closid.intpartid, + cfg[i].conf_type, closid.intpartid); resctrl_cdp_mpamid_map_val(rdtgrp->closid.reqpartid, cfg[i].conf_type, closid.reqpartid); resctrl_dom_ctrl_config(cdp_both_ctrl, r, dom, ¶); @@ -229,8 +227,6 @@ static void resctrl_group_resync_domain_ctrls(struct rdtgroup *rdtgrp, * we should synchronize all child mon groups' * configuration from this ctrl rdtgrp */ - resctrl_cdp_mpamid_map_val(rdtgrp->closid.intpartid, - cfg[i].conf_type, closid.intpartid); head = &rdtgrp->mon.crdtgrp_list; list_for_each_entry(entry, head, mon.crdtgrp_list) { resctrl_cdp_mpamid_map_val(entry->closid.reqpartid, @@ -260,11 +256,9 @@ static void resctrl_group_update_domain_ctrls(struct rdtgroup *rdtgrp, continue; update_on = false; cdp_both_ctrl = cfg[i].cdp_both_ctrl; - /* - * for ctrl group configuration, hw_closid of cfg[i] equals - * to rdtgrp->closid.intpartid. - */ - closid.intpartid = hw_closid_val(cfg[i].hw_closid); + + resctrl_cdp_mpamid_map_val(rdtgrp->closid.intpartid, + cfg[i].conf_type, closid.intpartid); for_each_ctrl_type(type) { /* if ctrl group's config has changed, refresh it first. */ if (dom->ctrl_val[type][closid.intpartid] != cfg[i].new_ctrl[type] && @@ -279,6 +273,7 @@ static void resctrl_group_update_domain_ctrls(struct rdtgroup *rdtgrp, dom->ctrl_val[type][closid.intpartid] = cfg[i].new_ctrl[type]; dom->have_new_ctrl = true; + cfg[i].ctrl_updated[type] = false; update_on = true; } } @@ -289,8 +284,6 @@ static void resctrl_group_update_domain_ctrls(struct rdtgroup *rdtgrp, * we should synchronize all child mon groups' * configuration from this ctrl rdtgrp */ - resctrl_cdp_mpamid_map_val(rdtgrp->closid.intpartid, - cfg[i].conf_type, closid.intpartid); head = &rdtgrp->mon.crdtgrp_list; list_for_each_entry(entry, head, mon.crdtgrp_list) { resctrl_cdp_mpamid_map_val(entry->closid.reqpartid,