arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set
PATCH 1/1 arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set
If CONFIG_X86_64 is not set the function __node_distance is not declared in <asm/topology.h>. This results in the following sparse noise.
warning: symbol '__node_distance' was not declared. Should it be static?
Fix this by putting an #ifdef around the function.
---
arch/x86/mm/numa.c +2 -0
@@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance) numa_distance[from * numa_distance_cnt + to] = distance; } +#ifdef CONFIG_X86_64 int __node_distance (int from,int to) {if (from >= numa_distance_cnt || to >= numa_distance_cnt)
@@ -462,6 +463,7 @@ int __node_distance(int from, int to) return numa_distance[from * numa_distance_cnt + to]; }EXPORT_SYMBOL (__node_distance); +#endif /* * Sanity check to catch more bad NUMA configurations (they are amazingly
Quoted 14 lines · H Hartley Sweeten
arch/x86/mm/numa.c +1
-0@@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance) numa_distance[from * numa_distance_cnt + to] = distance; } +#ifdef CONFIG_X86_64 int __node_distance (int from,int to) {if (from >= numa_distance_cnt || to >= numa_distance_cnt)
arch/x86/mm/numa.c int __node_distance(int from, int to) · line 469
Quoted 7 lines
arch/x86/mm/numa.c +1
-0@@ -462,6 +463,7 @@ int __node_distance(int from, int to) return numa_distance[from * numa_distance_cnt + to]; }EXPORT_SYMBOL (__node_distance); +#endif /* * Sanity check to catch more bad NUMA configurations (they are amazingly
What is 64-bit specific about this function? Shouldn't we be defining it to be node_distance for all of x86?
Hello,
Quoted 20 lines · David Rientjes
Quoted 18 lines · H Hartley Sweeten
arch/x86/mm/numa.c +2
-0@@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance) numa_distance[from * numa_distance_cnt + to] = distance; } +#ifdef CONFIG_X86_64 int __node_distance (int from,int to) {if (from >= numa_distance_cnt || to >= numa_distance_cnt)@@ -462,6 +463,7 @@ int __node_distance(int from, int to) return numa_distance[from * numa_distance_cnt + to]; }EXPORT_SYMBOL (__node_distance); +#endif
Quoted 6 lines
arch/x86/mm/numa.c int __node_distance(int from, int to) · line 469
Quoted 3 lines
arch/x86/mm/numa.c +0
-0/* * Sanity check to catch more bad NUMA configurations (they are amazingly What is 64-bit specific about this function? Shouldn't we be defining it to be
node_distancefor all of x86?
Yeap, that's a remnant of the old separate code paths, which wasn't discovered because asm-generic/topology.h defines fallback node_distance() automatically. We should drop #ifdef from arch/x86/include/asm/topology.h::node_distance(). Hartley, can you please send a patch to do that?
Thanks.
Signature · 1 line
tejun
Quoted 30 lines · Tejun Heo
Hello,
Quoted 20 lines · David Rientjes
Quoted 18 lines · H Hartley Sweeten
arch/x86/mm/numa.c +2
-0@@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance) numa_distance[from * numa_distance_cnt + to] = distance; } +#ifdef CONFIG_X86_64 int __node_distance (int from,int to) {if (from >= numa_distance_cnt || to >= numa_distance_cnt)@@ -462,6 +463,7 @@ int __node_distance(int from, int to) return numa_distance[from * numa_distance_cnt + to]; }EXPORT_SYMBOL (__node_distance); +#endif Quoted 6 lines
arch/x86/mm/numa.c int __node_distance(int from, int to) · line 469
Quoted 3 lines
arch/x86/mm/numa.c +0
-0/* * Sanity check to catch more bad NUMA configurations (they are amazingly What is 64-bit specific about this function? Shouldn't we be defining it to be
node_distancefor all of x86?
Quoted 5 lines
Yeap, that's a remnant of the old separate code paths, which wasn't discovered because
asm-generic/topology.hdefines fallbacknode_distance()automatically. We should drop #ifdef from arch/x86/include/asm/topology.h::node_distance(). Hartley, can you please send a patch to do that?
Tejun,
I just posted the new patch, "x86: use the same node distance for 32 and 64-bit".
Thanks,
Hartley