[RFC PATCH v2 04/19] x86/resctrl: Use the resource-agnostic monitor event names
Jinjie Ruan
ruanjinjie at huawei.com
Thu Oct 29 05:35:56 PDT 2026
The monitor event IDs no longer carry L3 in their names. Switch x86 over
to the new names. The values are unchanged, so this does not change what
is written to IA32_QM_EVTSEL.
Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>
---
arch/x86/kernel/cpu/resctrl/core.c | 10 +++++-----
arch/x86/kernel/cpu/resctrl/internal.h | 2 +-
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index 55214d6fdc49..8842e3406ca5 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -887,9 +887,9 @@ bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt)
return false;
switch (evt) {
- case QOS_L3_MBM_TOTAL_EVENT_ID:
+ case QOS_MBM_TOTAL_EVENT_ID:
return rdt_cpu_has(X86_FEATURE_CQM_MBM_TOTAL);
- case QOS_L3_MBM_LOCAL_EVENT_ID:
+ case QOS_MBM_LOCAL_EVENT_ID:
return rdt_cpu_has(X86_FEATURE_CQM_MBM_LOCAL);
default:
return false;
@@ -969,15 +969,15 @@ static __init bool get_rdt_mon_resources(void)
bool ret = false;
if (rdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC)) {
- resctrl_enable_mon_event(QOS_L3_OCCUP_EVENT_ID, false, 0, NULL);
+ resctrl_enable_mon_event(QOS_OCCUP_EVENT_ID, false, 0, NULL);
ret = true;
}
if (rdt_cpu_has(X86_FEATURE_CQM_MBM_TOTAL)) {
- resctrl_enable_mon_event(QOS_L3_MBM_TOTAL_EVENT_ID, false, 0, NULL);
+ resctrl_enable_mon_event(QOS_MBM_TOTAL_EVENT_ID, false, 0, NULL);
ret = true;
}
if (rdt_cpu_has(X86_FEATURE_CQM_MBM_LOCAL)) {
- resctrl_enable_mon_event(QOS_L3_MBM_LOCAL_EVENT_ID, false, 0, NULL);
+ resctrl_enable_mon_event(QOS_MBM_LOCAL_EVENT_ID, false, 0, NULL);
ret = true;
}
if (rdt_cpu_has(X86_FEATURE_ABMC))
diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index e3cfa0c10e92..1abb4b6d01e4 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -77,7 +77,7 @@ struct rdt_hw_ctrl_domain {
*/
struct rdt_hw_l3_mon_domain {
struct rdt_l3_mon_domain d_resctrl;
- struct arch_mbm_state *arch_mbm_states[QOS_NUM_L3_MBM_EVENTS];
+ struct arch_mbm_state *arch_mbm_states[QOS_NUM_MBM_EVENTS];
};
static inline struct rdt_hw_ctrl_domain *resctrl_to_arch_ctrl_dom(struct rdt_ctrl_domain *r)
diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index 5ffa39fa86fa..825d71b14b4f 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -68,16 +68,16 @@ void resctrl_arch_sync_cpu_closid_rmid(void *info)
* configurable event
* @evtid: event id.
*
- * Return: 0 for evtid == QOS_L3_MBM_TOTAL_EVENT_ID
- * 1 for evtid == QOS_L3_MBM_LOCAL_EVENT_ID
+ * Return: 0 for evtid == QOS_MBM_TOTAL_EVENT_ID
+ * 1 for evtid == QOS_MBM_LOCAL_EVENT_ID
* INVALID_CONFIG_INDEX for invalid evtid
*/
static inline unsigned int mon_event_config_index_get(u32 evtid)
{
switch (evtid) {
- case QOS_L3_MBM_TOTAL_EVENT_ID:
+ case QOS_MBM_TOTAL_EVENT_ID:
return 0;
- case QOS_L3_MBM_LOCAL_EVENT_ID:
+ case QOS_MBM_LOCAL_EVENT_ID:
return 1;
default:
/* Should never reach here */
--
2.34.1
More information about the linux-arm-kernel
mailing list