hulk inclusion category: feature bugzilla: https://atomgit.com/openeuler/kernel/issues/9840 ------------------ Add support for checking whether the MBM (Memory Bandwidth Monitoring) total bandwidth event is configurable on MPAM-enabled platforms. This mirrors the existing handling for the MBM local bandwidth event by checking the msmon_mbwu_rwbw feature flag on the mbm_total_class's properties. The QOS_L3_MBM_TOTAL_EVENT_ID case was missing from resctrl_arch_is_evt_configurable(), causing the total bandwidth monitoring event to be incorrectly reported as non-configurable even when the underlying hardware supports it. Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/platform/mpam/mpam_resctrl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/mpam/mpam_resctrl.c b/drivers/platform/mpam/mpam_resctrl.c index c279ba142ca3d..5f470d07d1f04 100644 --- a/drivers/platform/mpam/mpam_resctrl.c +++ b/drivers/platform/mpam/mpam_resctrl.c @@ -1086,6 +1086,12 @@ bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt) return false; cprops = &mbm_local_class->props; + return mpam_has_feature(mpam_feat_msmon_mbwu_rwbw, cprops); + case QOS_L3_MBM_TOTAL_EVENT_ID: + if (!mbm_total_class) + return false; + + cprops = &mbm_total_class->props; return mpam_has_feature(mpam_feat_msmon_mbwu_rwbw, cprops); default: return false; -- 2.43.0