]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
x86: fix nodemap_size according to nodeid bits
authorYinghai Lu <Yinghai.Lu@Sun.COM>
Wed, 30 Jan 2008 12:34:12 +0000 (13:34 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:34:12 +0000 (13:34 +0100)
memnode.map is s16 array because of nodeid is 16 bit now.

so need to increase the nodemap_size according to that bits.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/mm/numa_64.c

index f0e5cabe49d888542f389953b8ac598bb27123ec..dc3b1f7e1451ba46221524860aa0cf54c7e564bb 100644 (file)
@@ -92,7 +92,7 @@ static int __init allocate_cachealigned_memnodemap(void)
 
        pad = L1_CACHE_BYTES - 1;
        pad_addr = 0x8000;
-       nodemap_size = pad + memnodemapsize;
+       nodemap_size = pad + sizeof(s16) * memnodemapsize;
        nodemap_addr = find_e820_area(pad_addr, end_pfn<<PAGE_SHIFT,
                                      nodemap_size);
        if (nodemap_addr == -1UL) {