diff mbox series

s390/numa: set node distance to LOCAL_DISTANCE

Message ID 1598630249-11057-1-git-send-email-agordeev@linux.ibm.com
State New
Headers show
Series s390/numa: set node distance to LOCAL_DISTANCE | expand

Commit Message

Alexander Gordeev Aug. 28, 2020, 3:57 p.m. UTC
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 <hca@linux.ibm.com>
Fixes: 3a368f742da1 ("s390/numa: add core infrastructure")
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
---
 arch/s390/numa/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/s390/numa/numa.c b/arch/s390/numa/numa.c
index d2910fa..8f95db6 100644
--- a/arch/s390/numa/numa.c
+++ b/arch/s390/numa/numa.c
@@ -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);