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

From: Xi Ruoyao

Date: Fri Aug 21 2026 - 01:02:31 EST



在 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