Re: [PATCH 3/5] cpufreq: loongson3: Replace per-package mutex with per-node

Xi Ruoyao <[email protected]>
Newsgroups dev.linux.lists.loongarch,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm,org.kernel.vger.stable
Message-ID <[email protected]>
在 2026/8/20 20:35, Zhongqiu Han 写道:
>>> -    unsigned int package = cpu_data[cpu].package;
>>> +    unsigned int nid = cpu_to_node(cpu);
>
> What if NUMA is disabled?

include/asm-generic/topology.h has a fallback:

#ifndef CONFIG_NUMA

/* Other architectures wishing to use this simple topology API should fill
   in the below functions as appropriate in their own <asm/topology.h> 
file. */
#ifndef cpu_to_node
#define cpu_to_node(cpu)        ((void)(cpu),0)
#endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.