x86-64, NUMA: Build and use direct emulated nid -> phys nid mapping
authorTejun Heo <tj@kernel.org>
Wed, 16 Feb 2011 16:11:10 +0000 (17:11 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 16 Feb 2011 16:11:10 +0000 (17:11 +0100)
commit9d073caeb372940af02a768d2b7e845ac732bda0
tree7d46006e3f0fc1fb0c13924735d9afea6ac9c3eb
parentd9c515eacb3bde73f7a5ecb7e35ea6e660ad421d
x86-64, NUMA: Build and use direct emulated nid -> phys nid mapping

NUMA emulation copied physical NUMA configuration into physnodes[] and
used it to reverse-map emulated nodes to physical nodes, which is
unnecessarily convoluted.  Build emu_nid_to_phys[] array to map
emulated nids directly to the matching physical nids and use it in
numa_add_cpu().

physnodes[] will be removed with further patches.

- v2: Build failure when CONFIG_DEBUG_PER_CPU_MAPS due to missing
  local variable definition fixed.  Reported by Ingo.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Shaohui Zheng <shaohui.zheng@intel.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/mm/numa_64.c