[PATCH OLK-6.6] arm64/mpam: Add quirk for MPAM MSMON_MBWU monitor NRDY bit

hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAJLCY -------------------------------- Fix the issue where the MSMON_MBWU monitor does not properly update statistics results on certain platforms due to the absence of NRDY bit functionality. On such platforms, when configuring a new partid, the NRDY bit remains 0, causing the monitor to remain 0 or the previous statistics result. For the specified chip vendors, assume the NRDY bit is set on the time configuration update and force the software to re-read the statistics result to ensure accurate data. Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/platform/mpam/mpam_devices.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/platform/mpam/mpam_devices.c b/drivers/platform/mpam/mpam_devices.c index 4da106d1135b..93f8efe9b3ff 100644 --- a/drivers/platform/mpam/mpam_devices.c +++ b/drivers/platform/mpam/mpam_devices.c @@ -937,6 +937,14 @@ bool resctrl_arch_would_mbm_overflow(void) return read_cpuid_implementor() != ARM_CPU_IMP_HISI; } +static bool mpam_ris_has_nrdy_bit(struct mpam_msc_ris *ris) +{ + if (ris->comp->class->type == MPAM_CLASS_MEMORY) + return read_cpuid_implementor() != ARM_CPU_IMP_HISI; + + return true; +} + static void __ris_msmon_read(void *arg) { bool nrdy = false; @@ -1011,6 +1019,9 @@ static void __ris_msmon_read(void *arg) now = FIELD_GET(MSMON___VALUE, now); } + if (config_mismatch && !mpam_ris_has_nrdy_bit(ris)) + nrdy = true; + if (nrdy) break; -- 2.25.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17070 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/R6C... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17070 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/R6C...
participants (2)
-
patchwork bot
-
Zeng Heng