[PATCH v13 08/25] x86/resctrl: Update special case for Intel Haswell enumeration
From: Tony Luck
Date: Mon Sep 28 2026 - 18:18:09 EST
Certain Intel Haswell CPUs support resctrl L3 cache allocation but do not
enumerate the feature. A quirk probes for support and provides hard-coded
parameters. The quirk sets both the global rdt_alloc_capable and the resource
specific rdt_resource::alloc_capable, only the global is used to signal that
normal enumeration can be skipped.
The global rdt_alloc_capable is redundant since rdt_resource::alloc_capable
already carries the same information.
Stop setting rdt_alloc_capable in the quirk and rely on the resource specific
flag to prepare for removal of this global variable.
No functional change intended.
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
---
v13:
Replaced commit comment with Reinette's improved version.
---
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.55.0