diff options
author | Yasunori Goto <y-goto@jp.fujitsu.com> | 2006-06-27 09:53:31 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 00:32:36 (GMT) |
commit | 1e3590e2e4a38e8390fdac5bda23330bf2801838 (patch) | |
tree | 528591e9db601af913756b11d37e451202584cd2 /drivers/acpi/numa.c | |
parent | bc02af93dd2bbddce1b55e0a493f833a1b7cf140 (diff) | |
download | linux-fsl-qoriq-1e3590e2e4a38e8390fdac5bda23330bf2801838.tar.xz |
[PATCH] pgdat allocation for new node add (get node id by acpi)
This is to find node id from acpi's handle of memory_device in DSDT. _PXM for
the new node can be found by acpi_get_pxm() by using new memory's handle. So,
node id can be found by pxm_to_nid_map[].
This patch becomes simpler than v2 of node hot-add patch.
Because old add_memory() function doesn't have node id parameter.
So, kernel must find its handle by physical address via DSDT again.
But, v3 just give node id to add_memory() now.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/acpi/numa.c')
-rw-r--r-- | drivers/acpi/numa.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index e2c1a16..13d6d5b 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -254,5 +254,18 @@ int acpi_get_pxm(acpi_handle h) } while (ACPI_SUCCESS(status)); return -1; } - EXPORT_SYMBOL(acpi_get_pxm); + +int acpi_get_node(acpi_handle *handle) +{ + int pxm, node = -1; + + ACPI_FUNCTION_TRACE("acpi_get_node"); + + pxm = acpi_get_pxm(handle); + if (pxm >= 0) + node = acpi_map_pxm_to_node(pxm); + + return_VALUE(node); +} +EXPORT_SYMBOL(acpi_get_node); |