[PATCH v2 1/4] resctrl: Add kmode arch stubs for ARM MPAM

From: Qinyun Tan

Date: Thu Jun 11 2026 - 07:34:17 EST


fs/resctrl/rdtgroup.c calls resctrl_arch_get_kmode_support() and
resctrl_arch_configure_kmode() which are only implemented under
arch/x86/. ARM MPAM enables CONFIG_RESCTRL_FS but has no PLZA
hardware, causing link failures on aarch64:

undefined reference to `resctrl_arch_configure_kmode'
undefined reference to `resctrl_arch_get_kmode_support'

Add empty stubs in drivers/resctrl/mpam_resctrl.c, following the
same pattern used for resctrl_arch_io_alloc_enable().

Signed-off-by: Qinyun Tan <qinyuntan@xxxxxxxxxxxxxxxxx>
Reviewed-by: Xunlei Pang <xlpang@xxxxxxxxxxxxxxxxx>
---
v2: Drop the "hide info/kernel_mode on non-PLZA platforms" change that
v1 folded in. Babu clarified that exposing info/kernel_mode on all
architectures (showing the default inherit_ctrl_and_mon) is intended,
as also suggested by Reinette [1]. This patch therefore only adds the
ARM MPAM arch stubs, i.e. the aarch64 link-failure fix.

[1] https://lore.kernel.org/lkml/2ab556af-095b-422b-9396-f845c6fd0342@xxxxxxxxx/

drivers/resctrl/mpam_resctrl.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c
index 1dd3bbd0772cd..fc2b3f508c039 100644
--- a/drivers/resctrl/mpam_resctrl.c
+++ b/drivers/resctrl/mpam_resctrl.c
@@ -161,6 +161,15 @@ bool resctrl_arch_get_io_alloc_enabled(struct rdt_resource *r)
return false;
}

+void resctrl_arch_get_kmode_support(struct resctrl_kmode_cfg *kcfg)
+{
+}
+
+void resctrl_arch_configure_kmode(const struct cpumask *cpu_mask, u32 closid,
+ u32 rmid, bool enable)
+{
+}
+
void resctrl_arch_pre_mount(void)
{
}
--
2.43.7