aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
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 /arch/ia64
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 'arch/ia64')
-rw-r--r--arch/ia64/mm/numa.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
index 64e4c21f311c..7807fc5c0422 100644
--- a/arch/ia64/mm/numa.c
+++ b/arch/ia64/mm/numa.c
@@ -16,6 +16,7 @@
16#include <linux/node.h> 16#include <linux/node.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/bootmem.h> 18#include <linux/bootmem.h>
19#include <linux/module.h>
19#include <asm/mmzone.h> 20#include <asm/mmzone.h>
20#include <asm/numa.h> 21#include <asm/numa.h>
21 22
@@ -69,4 +70,21 @@ int early_pfn_to_nid(unsigned long pfn)
69 70
70 return 0; 71 return 0;
71} 72}
73
74#ifdef CONFIG_MEMORY_HOTPLUG
75/*
76 * SRAT information is stored in node_memblk[], then we can use SRAT
77 * information at memory-hot-add if necessary.
78 */
79
80int memory_add_physaddr_to_nid(u64 addr)
81{
82 int nid = paddr_to_nid(addr);
83 if (nid < 0)
84 return 0;
85 return nid;
86}
87
88EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
89#endif
72#endif 90#endif