[tip: x86/cache] fs/resctrl: Drop unnecessary is_mba_linear() helper

From: tip-bot2 for Reinette Chatre

Date: Mon Nov 09 2026 - 16:31:23 EST


The following commit has been merged into the x86/cache branch of tip:

Commit-ID: 79d147bbc7e3e4d99fc3e460fbb671c87a0453e1
Gitweb: https://git.kernel.org/tip/79d147bbc7e3e4d99fc3e460fbb671c87a0453e1
Author: Reinette Chatre <reinette.chatre@xxxxxxxxx>
AuthorDate: Wed, 04 Nov 2026 16:13:32 -08:00
Committer: Borislav Petkov (AMD) <bp@xxxxxxxxx>
CommitterDate: Sun, 08 Nov 2026 18:55:42 -08:00

fs/resctrl: Drop unnecessary is_mba_linear() helper

is_mba_linear() assumes it operates on the MBA resource and returns whether
the resource's delay values are linear. There is only one caller that
separately makes the same assumption.

Avoid duplicating the resource assumptions and let the only caller access
the needed property directly.

Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
Reviewed-by: Chen Yu <yu.c.chen@xxxxxxxxx>
Reviewed-by: Ben Horgan <ben.horgan@xxxxxxx>
Reviewed-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>
Link: https://patch.msgid.link/493995284247554d05dc3813722168fb053d5d10.1793834224.git.reinette.chatre@xxxxxxxxx
---
fs/resctrl/rdtgroup.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
index 57ab090..443b41a 100644
--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -2577,11 +2577,6 @@ out_destroy:
return ret;
}

-static inline bool is_mba_linear(void)
-{
- return resctrl_arch_get_resource(RDT_RESOURCE_MBA)->membw.delay_linear;
-}
-
static int mba_sc_domain_allocate(struct rdt_resource *r, struct rdt_ctrl_domain *d)
{
u32 num_closid = resctrl_arch_get_num_closid(r);
@@ -2621,7 +2616,7 @@ static bool supports_mba_mbps(void)
struct rdt_resource *r = resctrl_arch_get_resource(RDT_RESOURCE_MBA);

return (resctrl_is_mbm_enabled() &&
- r->alloc_capable && is_mba_linear() &&
+ r->alloc_capable && r->membw.delay_linear &&
r->ctrl_scope == rmbm->mon_scope &&
!rmbm->mon.mbm_cntr_assignable);
}