Commit afadcd78 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: fix nodemap_size according to nodeid bits

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: default avatarYinghai Lu <yinghai.lu@sun.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 91987157
...@@ -92,7 +92,7 @@ static int __init allocate_cachealigned_memnodemap(void) ...@@ -92,7 +92,7 @@ static int __init allocate_cachealigned_memnodemap(void)
pad = L1_CACHE_BYTES - 1; pad = L1_CACHE_BYTES - 1;
pad_addr = 0x8000; 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_addr = find_e820_area(pad_addr, end_pfn<<PAGE_SHIFT,
nodemap_size); nodemap_size);
if (nodemap_addr == -1UL) { if (nodemap_addr == -1UL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment