From: Mao Minkai maominkai@wxiat.com
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56TYY
--------------------------------
Switch to arch node_distance to read distance from node distance table to get a more accurate node distance.
Signed-off-by: Mao Minkai maominkai@wxiat.com
Signed-off-by: Gu Zitao guzitao@wxiat.com --- arch/sw_64/include/asm/topology.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/sw_64/include/asm/topology.h b/arch/sw_64/include/asm/topology.h index 9f45b550abca..f8242d00290b 100644 --- a/arch/sw_64/include/asm/topology.h +++ b/arch/sw_64/include/asm/topology.h @@ -45,6 +45,8 @@ extern const struct cpumask *cpumask_of_node(int node); extern void numa_add_cpu(unsigned int cpu); extern void numa_remove_cpu(unsigned int cpu); extern void numa_store_cpu_info(unsigned int cpu); +extern int __node_distance(int from, int to); +#define node_distance(a, b) __node_distance(a, b) #define parent_node(node) (node) #define cpumask_of_pcibus(bus) (cpu_online_mask) #else /* !CONFIG_NUMA */