diff options
author | Tejun Heo <tj@kernel.org> | 2011-02-16 06:13:06 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-02-16 06:13:06 -0500 |
commit | a9aec56afac238e4ed3980bd10b22121b83866dd (patch) | |
tree | 77ef26c3361ebb54cbb08897c0ac2763e2c5edbe /arch/x86/mm | |
parent | 940fed2e79a15cf0d006c860d7811adbe5c19882 (diff) |
x86-64, NUMA: Wrap acpi_numa_init() so that failure can be indicated by return value
Because of the way ACPI tables are parsed, the generic
acpi_numa_init() couldn't return failure when error was detected by
arch hooks. Instead, the failure state was recorded and later arch
dependent init hook - acpi_scan_nodes() - would fail.
Wrap acpi_numa_init() with x86_acpi_numa_init() so that failure can be
indicated as return value immediately. This is in preparation for
further NUMA init cleanups.
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>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/srat_64.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 4f9dbf066ca4..56b92635d87c 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -358,6 +358,16 @@ void __init acpi_get_nodes(struct bootnode *physnodes, unsigned long start, | |||
358 | } | 358 | } |
359 | #endif /* CONFIG_NUMA_EMU */ | 359 | #endif /* CONFIG_NUMA_EMU */ |
360 | 360 | ||
361 | int __init x86_acpi_numa_init(void) | ||
362 | { | ||
363 | int ret; | ||
364 | |||
365 | ret = acpi_numa_init(); | ||
366 | if (ret < 0) | ||
367 | return ret; | ||
368 | return srat_disabled() ? -EINVAL : 0; | ||
369 | } | ||
370 | |||
361 | /* Use the information discovered above to actually set up the nodes. */ | 371 | /* Use the information discovered above to actually set up the nodes. */ |
362 | int __init acpi_scan_nodes(void) | 372 | int __init acpi_scan_nodes(void) |
363 | { | 373 | { |