diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 4 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 6d0d31651f05..5dc8f8028d52 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -313,6 +313,10 @@ config ARCH_SPARSEMEM_DEFAULT | |||
313 | config ARCH_SELECT_MEMORY_MODEL | 313 | config ARCH_SELECT_MEMORY_MODEL |
314 | def_bool y | 314 | def_bool y |
315 | 315 | ||
316 | config ARCH_ENABLE_MEMORY_HOTPLUG | ||
317 | def_bool y | ||
318 | depends on SPARSEMEM | ||
319 | |||
316 | source "mm/Kconfig" | 320 | source "mm/Kconfig" |
317 | 321 | ||
318 | comment "I/O subsystem configuration" | 322 | comment "I/O subsystem configuration" |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 05598649b326..388cc7420055 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -202,3 +202,22 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | #endif | 204 | #endif |
205 | |||
206 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
207 | int arch_add_memory(int nid, u64 start, u64 size) | ||
208 | { | ||
209 | struct pglist_data *pgdat; | ||
210 | struct zone *zone; | ||
211 | int rc; | ||
212 | |||
213 | pgdat = NODE_DATA(nid); | ||
214 | zone = pgdat->node_zones + ZONE_NORMAL; | ||
215 | rc = vmem_add_mapping(start, size); | ||
216 | if (rc) | ||
217 | return rc; | ||
218 | rc = __add_pages(zone, PFN_DOWN(start), PFN_DOWN(size)); | ||
219 | if (rc) | ||
220 | vmem_remove_mapping(start, size); | ||
221 | return rc; | ||
222 | } | ||
223 | #endif /* CONFIG_MEMORY_HOTPLUG */ | ||