x86-64, NUMA: Restructure initmem_init()
commitffe77a4605fb2588f8666850ad3e3b196241658f
authorTejun Heo <tj@kernel.org>
Wed, 16 Feb 2011 11:13:06 +0000 (16 12:13 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 16 Feb 2011 11:13:06 +0000 (16 12:13 +0100)
tree7f4218d2658a84180e9e11d67636db27d6881f83
parentd8fc3afc49bb226c20e37f48a4ddd493cd092837
x86-64, NUMA: Restructure initmem_init()

Reorganize initmem_init() such that,

* Different NUMA init methods are iterated in a consistent way.

* Each iteration re-initializes all the parameters and different
  method can be tried after a failure.

* Dummy init is handled the same as other methods.

Apart from how retry after failure, this patch doesn't change the
behavior.  The call sequences are kept equivalent across the
conversion.

After the change, bad_srat() doesn't need to clear apic to node
mapping or worry about numa_off.  Simplified accordingly.

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
arch/x86/mm/srat_64.c