* [RFC:PATCH(002/003)] Memory add to onlined node.(For ia64)
@ 2006-02-06 13:37 Yasunori Goto
0 siblings, 0 replies; only message in thread
From: Yasunori Goto @ 2006-02-06 13:37 UTC (permalink / raw)
To: Andi Kleen, Luck, Tony, Tolentino, Matthew E, Brown, Len, naveen.b.s
Cc: Linux Kernel ML, ACPI-ML, linux-ia64, x86-64 Discuss
This is for ia64 to add memory which belongs onlined node.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Index: node_add2/arch/ia64/mm/init.c
===================================================================
--- node_add2.orig/arch/ia64/mm/init.c 2006-02-03 20:51:48.000000000 +0900
+++ node_add2/arch/ia64/mm/init.c 2006-02-03 21:39:21.000000000 +0900
@@ -20,6 +20,7 @@
#include <linux/swap.h>
#include <linux/proc_fs.h>
#include <linux/bitops.h>
+#include <linux/acpi.h>
#include <asm/a.out.h>
#include <asm/dma.h>
@@ -652,9 +653,15 @@ int add_memory(u64 start, u64 size)
struct zone *zone;
unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long nr_pages = size >> PAGE_SHIFT;
- int ret;
+ int ret, node;
- pgdat = NODE_DATA(0);
+ node = acpi_paddr_to_node(start, size);
+
+ if (node >= 0 && node_online(node))
+ pgdat = NODE_DATA(node);
+ else
+ /* New node's memory will be added to Node 0 temporally. */
+ pgdat = NODE_DATA(0);
zone = pgdat->node_zones + ZONE_NORMAL;
ret = __add_pages(zone, start_pfn, nr_pages);
--
Yasunori Goto
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-06 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06 13:37 [RFC:PATCH(002/003)] Memory add to onlined node.(For ia64) Yasunori Goto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®