diff options
Diffstat (limited to 'arch/v850')
-rw-r--r-- | arch/v850/kernel/setup.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c index 4a222dc5ab82..abd48409dcca 100644 --- a/arch/v850/kernel/setup.c +++ b/arch/v850/kernel/setup.c | |||
@@ -294,3 +294,33 @@ init_mem_alloc (unsigned long ram_start, unsigned long ram_len) | |||
294 | free_area_init_node (0, NODE_DATA(0), zones_size, | 294 | free_area_init_node (0, NODE_DATA(0), zones_size, |
295 | ADDR_TO_PAGE (PAGE_OFFSET), 0); | 295 | ADDR_TO_PAGE (PAGE_OFFSET), 0); |
296 | } | 296 | } |
297 | |||
298 | |||
299 | |||
300 | /* Taken from m68knommu */ | ||
301 | void show_mem(void) | ||
302 | { | ||
303 | unsigned long i; | ||
304 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
305 | int cached = 0; | ||
306 | |||
307 | printk(KERN_INFO "\nMem-info:\n"); | ||
308 | show_free_areas(); | ||
309 | i = max_mapnr; | ||
310 | while (i-- > 0) { | ||
311 | total++; | ||
312 | if (PageReserved(mem_map+i)) | ||
313 | reserved++; | ||
314 | else if (PageSwapCache(mem_map+i)) | ||
315 | cached++; | ||
316 | else if (!page_count(mem_map+i)) | ||
317 | free++; | ||
318 | else | ||
319 | shared += page_count(mem_map+i) - 1; | ||
320 | } | ||
321 | printk(KERN_INFO "%d pages of RAM\n",total); | ||
322 | printk(KERN_INFO "%d free pages\n",free); | ||
323 | printk(KERN_INFO "%d reserved pages\n",reserved); | ||
324 | printk(KERN_INFO "%d pages shared\n",shared); | ||
325 | printk(KERN_INFO "%d pages swap cached\n",cached); | ||
326 | } | ||