diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/mm/numa.c | 18 | ||||
-rw-r--r-- | arch/x86_64/mm/init.c | 1 | ||||
-rw-r--r-- | arch/x86_64/mm/srat.c | 2 |
3 files changed, 21 insertions, 0 deletions
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c index 64e4c21..7807fc5 100644 --- a/arch/ia64/mm/numa.c +++ b/arch/ia64/mm/numa.c @@ -16,6 +16,7 @@ #include <linux/node.h> #include <linux/init.h> #include <linux/bootmem.h> +#include <linux/module.h> #include <asm/mmzone.h> #include <asm/numa.h> @@ -69,4 +70,21 @@ int early_pfn_to_nid(unsigned long pfn) return 0; } + +#ifdef CONFIG_MEMORY_HOTPLUG +/* + * SRAT information is stored in node_memblk[], then we can use SRAT + * information at memory-hot-add if necessary. + */ + +int memory_add_physaddr_to_nid(u64 addr) +{ + int nid = paddr_to_nid(addr); + if (nid < 0) + return 0; + return nid; +} + +EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); +#endif #endif diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index e759109..71ecbb3 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -498,6 +498,7 @@ int memory_add_physaddr_to_nid(u64 start) { return 0; } +EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); #endif #else /* CONFIG_MEMORY_HOTPLUG */ diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index 8491300..3cc0544 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c @@ -477,3 +477,5 @@ int memory_add_physaddr_to_nid(u64 start) return ret; } +EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); + |