Commit 9a1b62fe authored by Minoru Usui's avatar Minoru Usui Committed by Ingo Molnar

x86: fix NUMA emulation on 64-bit

I found a small bug of NUMA emulation code for x86_64. (CONFIG_NUMA_EMU)
If machine is non-NUMA, find_node_by_addr() should return
NUMA_NO_NODE, but current implementation code returns existent maximum
NUMA node number + 1.
This is not existent NUMA node number.

However, this behaviour does not affect NUMA emulation fortunately, because
acpi_fake_nodes() that is caller of find_node_by_addr() gets pxm
(proximity domain) by node_to_pxm() from non-existent NUMA node number
that was returned by find_node_by_addr().
node_to_pxm() returns PXM_INVAL that means illegal or non-existent
NUMA node number.
Signed-off-by: default avatarMinoru Usui <usui@mxm.nes.nec.co.jp>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 53391fa2
...@@ -416,7 +416,7 @@ static int __init find_node_by_addr(unsigned long addr) ...@@ -416,7 +416,7 @@ static int __init find_node_by_addr(unsigned long addr)
break; break;
} }
} }
return i; return ret;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment