Re: [RFC][PATCH 3/6] x86/topo: Add __num_nodes_per_package
From: Peter Zijlstra
Date: Fri Feb 27 2026 - 07:02:17 EST
On Thu, Feb 26, 2026 at 11:46:15AM -0600, Kyle Meyer wrote:
> > --- a/arch/x86/kernel/cpu/topology.c
> > +++ b/arch/x86/kernel/cpu/topology.c
> > @@ -497,11 +497,18 @@ void __init topology_init_possible_cpus(
> > set_nr_cpu_ids(allowed);
> >
> > cnta = domain_weight(TOPO_PKG_DOMAIN);
> > + cntb = domain_weight(TOPO_NUMA_DOMAIN);
>
> We'll need to check CONFIG_NUMA here.
>
> TOPO_NUMA_DOMAIN is undeclared when CONFIG_NUMA is not set.
Indeed.