[PATCH v14 07/24] x86/resctrl: Update special case for Intel Haswell enumeration
From: Tony Luck
Date: Mon Oct 19 2026 - 16:56:09 EST
Certain Intel Haswell CPUs support L3 cache allocation but do not enumerate the
feature. A quirk probes for support and provides hard-coded parameters. The
quirk sets both the L3 resource and the global rdt_alloc_capable, but only
the global is used to signal that normal enumeration can be skipped.
Setting the global in the quirk is redundant. The quirk runs before
allocation enumeration and is the only code that can mark a resource as
allocation capable that early, so finding any allocation capable resource
at the start of enumeration already identifies the quirk case.
Stop setting rdt_alloc_capable in the quirk and skip allocation enumeration
when resctrl_alloc_capable() reports a resource is already allocation
capable, in preparation for removing the global.
No functional change intended.
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
---
v14:
Updated commit comment in context, problem, solution form.
---
arch/x86/kernel/cpu/resctrl/core.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index f0cfb37482d3..f2bf160d01c1 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -177,8 +177,6 @@ static inline void cache_alloc_hsw_probe(void)
r->cache.min_cbm_bits = 2;
r->cache.arch_has_sparse_bitmasks = false;
r->alloc_capable = true;
-
- rdt_alloc_capable = true;
}
/*
@@ -930,7 +928,11 @@ static __init bool get_rdt_alloc_resources(void)
struct rdt_resource *r;
bool ret = false;
- if (rdt_alloc_capable)
+ /*
+ * On Haswell systems cache_alloc_hsw_probe() already marked
+ * RDT_RESOURCE_L3 as alloc_capable. No further enumeration is needed.
+ */
+ if (resctrl_alloc_capable())
return true;
if (!boot_cpu_has(X86_FEATURE_RDT_A))
--
2.56.0