diff options
author | Gerald Schaefer <gerald.schaefer@de.ibm.com> | 2008-08-01 16:39:16 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-08-01 16:39:33 +0200 |
commit | 7e9238fbc10373effc2c3b0b516b0bdc8fefc27b (patch) | |
tree | ba4fb9266e73e35037a4f79ad68d51be4e5f463d /arch | |
parent | 519620cc3d723d41522191ebd150fba4a3790296 (diff) |
[S390] Add support for memory hot-remove.
This patch enables memory hot-remove on s390.
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/Kconfig | 3 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 2ed88122be9..8d41908e251 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -317,6 +317,9 @@ config ARCH_ENABLE_MEMORY_HOTPLUG def_bool y depends on SPARSEMEM +config ARCH_ENABLE_MEMORY_HOTREMOVE + def_bool y + source "mm/Kconfig" comment "I/O subsystem configuration" diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 4993b0f594e..1169130a97e 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -179,7 +179,7 @@ int arch_add_memory(int nid, u64 start, u64 size) int rc; pgdat = NODE_DATA(nid); - zone = pgdat->node_zones + ZONE_NORMAL; + zone = pgdat->node_zones + ZONE_MOVABLE; rc = vmem_add_mapping(start, size); if (rc) return rc; @@ -189,3 +189,14 @@ int arch_add_memory(int nid, u64 start, u64 size) return rc; } #endif /* CONFIG_MEMORY_HOTPLUG */ + +#ifdef CONFIG_MEMORY_HOTREMOVE +int remove_memory(u64 start, u64 size) +{ + unsigned long start_pfn, end_pfn; + + start_pfn = PFN_DOWN(start); + end_pfn = start_pfn + PFN_DOWN(size); + return offline_pages(start_pfn, end_pfn, 120 * HZ); +} +#endif /* CONFIG_MEMORY_HOTREMOVE */ |