microblaze: Use klimit instead of _end for memory init
For noMMU system when you use larger rootfs image there is problem with using _end label because we increase klimit but in memory initialization we use still _end which is wrong. Larger mtd rootfs was rewritten by init_bootmem_node. MMU kernel use static initialization where klimit is setup to _end. There is no any other hanling with klimit. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
2856ed35ea
commit
8f37b6c985
|
@ -130,13 +130,13 @@ void __init setup_memory(void)
|
||||||
* (in case the address isn't page-aligned).
|
* (in case the address isn't page-aligned).
|
||||||
*/
|
*/
|
||||||
#ifndef CONFIG_MMU
|
#ifndef CONFIG_MMU
|
||||||
map_size = init_bootmem_node(NODE_DATA(0), PFN_UP(TOPHYS((u32)_end)),
|
map_size = init_bootmem_node(NODE_DATA(0), PFN_UP(TOPHYS((u32)klimit)),
|
||||||
min_low_pfn, max_low_pfn);
|
min_low_pfn, max_low_pfn);
|
||||||
#else
|
#else
|
||||||
map_size = init_bootmem_node(&contig_page_data,
|
map_size = init_bootmem_node(&contig_page_data,
|
||||||
PFN_UP(TOPHYS((u32)_end)), min_low_pfn, max_low_pfn);
|
PFN_UP(TOPHYS((u32)klimit)), min_low_pfn, max_low_pfn);
|
||||||
#endif
|
#endif
|
||||||
lmb_reserve(PFN_UP(TOPHYS((u32)_end)) << PAGE_SHIFT, map_size);
|
lmb_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size);
|
||||||
|
|
||||||
/* free bootmem is whole main memory */
|
/* free bootmem is whole main memory */
|
||||||
free_bootmem(memory_start, memory_size);
|
free_bootmem(memory_start, memory_size);
|
||||||
|
|
Loading…
Reference in New Issue