aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-07-14 03:59:18 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-07-14 04:02:16 -0400
commit421c175c4d609864350df495b34d3e99f9fb1bdd (patch)
treeea3ade04452a6a6c578ae7895b5451c1bf231bc9 /arch/s390/mm
parent0788fea4d583a3b7d199696819940ff3387d79a3 (diff)
[S390] Add support for memory hot-add.
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/init.c19
1 files changed, 19 insertions, 0 deletions
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
207int 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 */