Skip to contentSkip to conversation

s390/numa: set node distance to LOCAL_DISTANCE

PATCH New Alexander Gordeev 1 participant 1 message Aug 28, 2020

Subsystems (2)
lore
Share & tools
lore

Alexander Gordeev

author maintainer
#0 lore raw

PATCH 1/1 s390/numa: set node distance to LOCAL_DISTANCE

commit 535e4fc623fab2e09a0653fc3a3e17f382ad0251 upstream.

The original upstream commit applies only to 5.7 and 5.8 stable trees. This is backport to 4.4, 4.9, 4.14, 4.19 and 5.4 trees.

The node distance is hardcoded to 0, which causes a trouble for some user-level applications. In particular, "libnuma" expects the distance of a node to itself as LOCAL_DISTANCE. This update removes the offending node distance override.

Cc Heiko Carstens <[email protected]>
Fixes 3a368f742da1 ("s390/numa: add core infrastructure")
---
 arch/s390/numa/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/numa/numa.c +1 -1
index d2910fa..8f95db6 100644
@@ -51,7 +51,7 @@ void numa_update_cpu_topology(void)
 
 int __node_distance(int a, int b)
 {
-	return mode->distance ? mode->distance(a, b) : 0;
+	return mode->distance ? mode->distance(a, b) : LOCAL_DISTANCE;
 }
 EXPORT_SYMBOL(__node_distance);
 
Signature · 1 line
1.8.3.1