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