x86/numa: Correct assumption that each NUMA node has memory
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 19 Jul 2012 14:46:51 +0000 (15:46 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 19 Jul 2012 14:46:51 +0000 (15:46 +0100)
commitd6644aa7b8340d7a9189829e59b9ad887f316255
tree420f51a4296d1fdbbffe42a5ccaf186447481816
parentd4619ab51e267a7b7587369b6593062349ecde9c
x86/numa: Correct assumption that each NUMA node has memory

It is now quite easy to buy servers with incorrectly populated DIMMs,
especially with AMD Magny-Cours and Interlagos systems which have two
NUMA nodes per socket.

Currently, Xen will assign all CPUs on nodes without memory to node 0,
which leads to interestingly wrong NUMA information, causing numa
aware functionality such as alloc_domheap_pages() to get things very
wrong.

This patch splits the current logic to accept NUMA nodes without
memory, which corrects the accounting of CPUs to online NUMA nodes.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/setup.c
xen/arch/x86/srat.c