[PATCH] s390/numa: set node distance to LOCAL_DISTANCE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
Fixes: 3a368f742da1 ("s390/numa: add core infrastructure")
Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
---
 arch/s390/numa/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 
-- 
1.8.3.1




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux