aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNitin Gupta <nitin.m.gupta@oracle.com>2016-01-05 22:35:35 -0800
committerSasha Levin <sasha.levin@oracle.com>2016-07-12 08:48:24 -0400
commit0396a871c4e3fbbaabb4f2632c1d388a04b68c84 (patch)
treee3e1555dbf6f4bb6d04f2e08699054fcd626c590
parentdf7136e7517600f3cc45e2923dce21341415a1f3 (diff)
downloadlinux-linaro-stable-0396a871c4e3fbbaabb4f2632c1d388a04b68c84.tar.gz
sparc64: Fix numa node distance initialization
[ Upstream commit 36beca6571c941b28b0798667608239731f9bc3a ] Orabug: 22495713 Currently, NUMA node distance matrix is initialized only when a machine descriptor (MD) exists. However, sun4u machines (e.g. Sun Blade 2500) do not have an MD and thus distance values were left uninitialized. The initialization is now moved such that it happens on both sun4u and sun4v. Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Tested-by: Mikael Pettersson <mikpelinux@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r--arch/sparc/mm/init_64.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 2d91c62f7f5f..24e907b1f5f5 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1300,10 +1300,18 @@ static int __init numa_parse_sun4u(void)
static int __init bootmem_init_numa(void)
{
+ int i, j;
int err = -1;
numadbg("bootmem_init_numa()\n");
+ /* Some sane defaults for numa latency values */
+ for (i = 0; i < MAX_NUMNODES; i++) {
+ for (j = 0; j < MAX_NUMNODES; j++)
+ numa_latency[i][j] = (i == j) ?
+ LOCAL_DISTANCE : REMOTE_DISTANCE;
+ }
+
if (numa_enabled) {
if (tlb_type == hypervisor)
err = numa_parse_mdesc();