MIPS: Loongson64: Fix node_distance()
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Thu, 9 Jan 2020 12:23:30 +0000 (13:23 +0100)
committerPaul Burton <paulburton@kernel.org>
Thu, 9 Jan 2020 17:54:29 +0000 (09:54 -0800)
Local node distance is defined as LOCAL_DISTANCE, which is 10. Use the
define to give back correct local distance.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
arch/mips/loongson64/numa.c

index ef94a227856175fdc782e70567c1e5e8647c91fb..e5b40c5e3296e9057fa9060f4995ad3140bf368b 100644 (file)
@@ -75,7 +75,7 @@ static int __init compute_node_distance(int row, int col)
                                loongson_sysconf.cores_per_package;
 
        if (col == row)
-               return 0;
+               return LOCAL_DISTANCE;
        else if (package_row == package_col)
                return 40;
        else