aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpi_memhotplug.c
diff options
context:
space:
mode:
authorKeith Mannthey <kmannth@us.ibm.com>2006-10-01 02:27:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:18 -0400
commit8c2676a5870ab15cbeea9f826266bc946fe3cc26 (patch)
tree0df06fce24312d7f2d1120d984dd7ae258cb40ef /drivers/acpi/acpi_memhotplug.c
parent4942e998b40b8f6080930ec16442444e9930aee5 (diff)
[PATCH] hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup
In cases where the acpi memory-add event does not containe the pxm (node) infomation allow the driver to look up node info based on the address. The acpi_get_node call returns -1 if it can't decode the pxm info, this causes add_memory to panic. acpi_get_node would have to decode the resource from the handle (a lenghty proposition). This seems to be the cleanist point to interject the hook. [kamezawa.hiroyu@jp.fujitsu.com: build fixes] [y-goto@jp.fujitsu.com: build fixes] Signed-off-by: Keith Mannthey <kmannth@us.ibm.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/acpi/acpi_memhotplug.c')
-rw-r--r--drivers/acpi/acpi_memhotplug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 1dda370f402b..98099de59b45 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -238,6 +238,10 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
238 num_enabled++; 238 num_enabled++;
239 continue; 239 continue;
240 } 240 }
241
242 if (node < 0)
243 node = memory_add_physaddr_to_nid(info->start_addr);
244
241 result = add_memory(node, info->start_addr, info->length); 245 result = add_memory(node, info->start_addr, info->length);
242 if (result) 246 if (result)
243 continue; 247 continue;