
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICO2ME -------------------------------- After CDP mode is enabled, MPAM uses different PartIDs to track CPU instruction-port and data-port memory-access requests. If these PartIDs are configured in reverse, the root directory group’s isolation settings for data and instruction ports will not behave as expected. Fixes: b4280653f60d ("arm_mpam: resctrl: Add CDP emulation") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/platform/mpam/mpam_resctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/mpam/mpam_resctrl.c b/drivers/platform/mpam/mpam_resctrl.c index c3f9f0c2a94c..428afe27fda2 100644 --- a/drivers/platform/mpam/mpam_resctrl.c +++ b/drivers/platform/mpam/mpam_resctrl.c @@ -111,8 +111,8 @@ int resctrl_arch_set_cdp_enabled(enum resctrl_res_level ignored, bool enable) partid = RESCTRL_RESERVED_CLOSID; if (enable) { - partid_d = resctrl_get_config_index(partid, CDP_CODE); - partid_i = resctrl_get_config_index(partid, CDP_DATA); + partid_d = resctrl_get_config_index(partid, CDP_DATA); + partid_i = resctrl_get_config_index(partid, CDP_CODE); regval = FIELD_PREP(MPAM_SYSREG_PARTID_D, partid_d) | FIELD_PREP(MPAM_SYSREG_PARTID_I, partid_i); -- 2.25.1