diff options
author | Michal Simek <monstr@monstr.eu> | 2011-12-19 07:47:03 -0500 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2012-03-23 04:28:12 -0400 |
commit | 832997990ab912ab8ed4ade08cb6ac5f471efa1e (patch) | |
tree | a24791d5132be378c710383802982c1f404e6d54 /arch/microblaze/mm | |
parent | 419387612c03fce2ca6d5a3d6aac3dae42069264 (diff) |
microblaze: Show more detailed information about memory
Microblaze MMU is similar to ppc that's why ppc layout
was reused.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/mm')
-rw-r--r-- | arch/microblaze/mm/init.c | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index af87fd71a83e..cbcdf24b1c89 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -206,14 +206,50 @@ void free_initmem(void) | |||
206 | 206 | ||
207 | void __init mem_init(void) | 207 | void __init mem_init(void) |
208 | { | 208 | { |
209 | pg_data_t *pgdat; | ||
210 | unsigned long reservedpages = 0, codesize, initsize, datasize, bsssize; | ||
211 | |||
209 | high_memory = (void *)__va(memory_start + lowmem_size - 1); | 212 | high_memory = (void *)__va(memory_start + lowmem_size - 1); |
210 | 213 | ||
211 | /* this will put all memory onto the freelists */ | 214 | /* this will put all memory onto the freelists */ |
212 | totalram_pages += free_all_bootmem(); | 215 | totalram_pages += free_all_bootmem(); |
213 | 216 | ||
214 | printk(KERN_INFO "Memory: %luk/%luk available\n", | 217 | for_each_online_pgdat(pgdat) { |
215 | nr_free_pages() << (PAGE_SHIFT-10), | 218 | unsigned long i; |
216 | num_physpages << (PAGE_SHIFT-10)); | 219 | struct page *page; |
220 | |||
221 | for (i = 0; i < pgdat->node_spanned_pages; i++) { | ||
222 | if (!pfn_valid(pgdat->node_start_pfn + i)) | ||
223 | continue; | ||
224 | page = pgdat_page_nr(pgdat, i); | ||
225 | if (PageReserved(page)) | ||
226 | reservedpages++; | ||
227 | } | ||
228 | } | ||
229 | |||
230 | codesize = (unsigned long)&_sdata - (unsigned long)&_stext; | ||
231 | datasize = (unsigned long)&_edata - (unsigned long)&_sdata; | ||
232 | initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin; | ||
233 | bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start; | ||
234 | |||
235 | pr_info("Memory: %luk/%luk available (%luk kernel code, " | ||
236 | "%luk reserved, %luk data, %luk bss, %luk init)\n", | ||
237 | nr_free_pages() << (PAGE_SHIFT-10), | ||
238 | num_physpages << (PAGE_SHIFT-10), | ||
239 | codesize >> 10, | ||
240 | reservedpages << (PAGE_SHIFT-10), | ||
241 | datasize >> 10, | ||
242 | bsssize >> 10, | ||
243 | initsize >> 10); | ||
244 | |||
245 | #ifdef CONFIG_MMU | ||
246 | pr_info("Kernel virtual memory layout:\n"); | ||
247 | pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP); | ||
248 | pr_info(" * 0x%08lx..0x%08lx : early ioremap\n", | ||
249 | ioremap_bot, ioremap_base); | ||
250 | pr_info(" * 0x%08lx..0x%08lx : vmalloc & ioremap\n", | ||
251 | (unsigned long)VMALLOC_START, VMALLOC_END); | ||
252 | #endif | ||
217 | mem_init_done = 1; | 253 | mem_init_done = 1; |
218 | } | 254 | } |
219 | 255 | ||