Commit b28ec89e authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Richard Henderson

[PATCH] numa fixes

As Jeff pointed out, reserve_bootmem() in core_irongate.c
breaks build of generic discontiguous memory kernels because
this function doesn't exist in such kernels.
Ditto free_bootmem().
Also, here's fixes for NUMA+initrd and memory info printk.

Ivan.
parent c6145e49
......@@ -236,14 +236,15 @@ albacore_init_arch(void)
unsigned long size;
size = initrd_end - initrd_start;
free_bootmem(__pa(initrd_start), PAGE_ALIGN(size));
free_bootmem_node(NODE_DATA(0), __pa(initrd_start),
PAGE_ALIGN(size));
if (!move_initrd(pci_mem))
printk("irongate_init_arch: initrd too big "
"(%ldK)\ndisabling initrd\n",
size / 1024);
}
#endif
reserve_bootmem(pci_mem, memtop - pci_mem);
reserve_bootmem_node(NODE_DATA(0), pci_mem, memtop - pci_mem);
printk("irongate_init_arch: temporarily reserving "
"region %08lx-%08lx for PCI\n", pci_mem, memtop - 1);
}
......
......@@ -279,7 +279,8 @@ setup_memory(void *kernel_end)
initrd_end,
phys_to_virt(PFN_PHYS(max_low_pfn)));
} else {
reserve_bootmem_node(NODE_DATA(KVADDR_TO_NID(initrd_start)),
nid = NODE_DATA(kvaddr_to_nid(initrd_start));
reserve_bootmem_node(nid,
virt_to_phys((void *)initrd_start),
INITRD_SIZE);
}
......@@ -349,8 +350,8 @@ void __init mem_init(void)
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, "
"%luk data, %luk init)\n",
nr_free_pages() << (PAGE_SHIFT-10),
"%luk data, %luk init)\n",
(unsigned long)nr_free_pages() << (PAGE_SHIFT-10),
num_physpages << (PAGE_SHIFT-10),
codesize >> 10,
reservedpages << (PAGE_SHIFT-10),
......
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