]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
s390/numa: set node distance to LOCAL_DISTANCE
authorSasha Levin <sashal@kernel.org>
Fri, 28 Aug 2020 18:20:57 +0000 (14:20 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:26:50 +0000 (11:26 +0200)
[ Upstream commit 535e4fc623fab2e09a0653fc3a3e17f382ad0251 ]

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: <stable@vger.kernel.org> # 4.4
Fixes: 3a368f742da1 ("s390/numa: add core infrastructure")
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/include/asm/numa.h
arch/s390/include/asm/topology.h
arch/s390/numa/numa.c

index 35f8cbe7e5bb052ffbac5cba3420c162fc631838..c759dcffa9eaf3d1ff97ffd5aead396c1b28a6e0 100644 (file)
@@ -17,7 +17,6 @@
 
 void numa_setup(void);
 int numa_pfn_to_nid(unsigned long pfn);
-int __node_distance(int a, int b);
 void numa_update_cpu_topology(void);
 
 extern cpumask_t node_to_cpumask_map[MAX_NUMNODES];
index cca406fdbe51fcf9985320c10988a02025b099bc..ef9dd253dfad06ed26024840cefcbacd93ee5baf 100644 (file)
@@ -83,8 +83,6 @@ static inline const struct cpumask *cpumask_of_node(int node)
 
 #define pcibus_to_node(bus) __pcibus_to_node(bus)
 
-#define node_distance(a, b) __node_distance(a, b)
-
 #else /* !CONFIG_NUMA */
 
 #define numa_node_id numa_node_id
index d2910fa834c8a2e56d77b7233df6d922a60f77c3..8386c58fdb3a0f21811b529350eab812ab49d624 100644 (file)
@@ -49,12 +49,6 @@ void numa_update_cpu_topology(void)
                mode->update_cpu_topology();
 }
 
-int __node_distance(int a, int b)
-{
-       return mode->distance ? mode->distance(a, b) : 0;
-}
-EXPORT_SYMBOL(__node_distance);
-
 int numa_debug_enabled;
 
 /*