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 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 | |||
80 | int 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 | |||
88 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); | ||
89 | #endif | ||
72 | #endif | 90 | #endif |
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index e759109abb36..71ecbb3f3262 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) | |||
498 | { | 498 | { |
499 | return 0; | 499 | return 0; |
500 | } | 500 | } |
501 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); | ||
501 | #endif | 502 | #endif |
502 | 503 | ||
503 | #else /* CONFIG_MEMORY_HOTPLUG */ | 504 | #else /* CONFIG_MEMORY_HOTPLUG */ |
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index 8491300ef909..3cc0544e25f5 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) | |||
477 | 477 | ||
478 | return ret; | 478 | return ret; |
479 | } | 479 | } |
480 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); | ||
481 | |||