hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I96YK9 CVE: NA
-----------------------------
It's fine that the associated msc is not found when the CPU comes online. For example, the device platform does not support L3 cache and there is no any L3 cache msc indeed.
Signed-off-by: Zeng Heng zengheng4@huawei.com --- arch/arm64/kernel/mpam/mpam_setup.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kernel/mpam/mpam_setup.c b/arch/arm64/kernel/mpam/mpam_setup.c index 4d0ec0052133..eb7110c4ec0c 100644 --- a/arch/arm64/kernel/mpam/mpam_setup.c +++ b/arch/arm64/kernel/mpam/mpam_setup.c @@ -71,6 +71,7 @@ static int mpam_resctrl_setup_domain(unsigned int cpu, num_partid = mpam_sysprops_num_partid();
comp = NULL; + list_for_each_entry(comp_iter, &class->components, class_list) { if (cpumask_test_cpu(cpu, &comp_iter->fw_affinity)) { comp = comp_iter; @@ -78,9 +79,11 @@ static int mpam_resctrl_setup_domain(unsigned int cpu, } }
- /* cpu with unknown exported component? */ - if (WARN_ON_ONCE(!comp)) + if (!comp) { + pr_info("There is no msc corresponding to CPU%d.\n", cpu); return 0; + } +
dom = kzalloc_node(sizeof(*dom), GFP_KERNEL, cpu_to_node(cpu)); if (!dom) @@ -168,8 +171,8 @@ int mpam_resctrl_cpu_offline(unsigned int cpu) for_each_supported_resctrl_exports(res) { d = resctrl_get_domain_from_cpu(cpu, &res->resctrl_res);
- /* cpu with unknown exported component? */ - if (WARN_ON_ONCE(!d)) + /* There is no msc corresponding to the CPU */ + if (!d) continue;
cpumask_clear_cpu(cpu, &d->cpu_mask);
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,转换为PR失败! 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/K... 失败原因:应用补丁/补丁集失败,Patch failed at 0001 arm64/mpam: Remove warning about no msc corresponding to the online cpu 建议解决方法:请查看失败原因, 确认补丁是否可以应用在当前期望分支的最新代码上
FeedBack: The patch(es) which you have sent to kernel@openeuler.org has been converted to PR failed! Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/K... Failed Reason: apply patch(es) failed, Patch failed at 0001 arm64/mpam: Remove warning about no msc corresponding to the online cpu Suggest Solution: please checkout if the failed patch(es) can work on the newest codes in expected branch