diff options
Diffstat (limited to 'lib/show_mem.c')
-rw-r--r-- | lib/show_mem.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/show_mem.c b/lib/show_mem.c index 09225796991a..7de89f4a36cf 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/nmi.h> | 9 | #include <linux/nmi.h> |
10 | #include <linux/quicklist.h> | 10 | #include <linux/quicklist.h> |
11 | #include <linux/cma.h> | ||
11 | 12 | ||
12 | void show_mem(unsigned int filter) | 13 | void show_mem(unsigned int filter) |
13 | { | 14 | { |
@@ -28,7 +29,7 @@ void show_mem(unsigned int filter) | |||
28 | continue; | 29 | continue; |
29 | 30 | ||
30 | total += zone->present_pages; | 31 | total += zone->present_pages; |
31 | reserved = zone->present_pages - zone->managed_pages; | 32 | reserved += zone->present_pages - zone->managed_pages; |
32 | 33 | ||
33 | if (is_highmem_idx(zoneid)) | 34 | if (is_highmem_idx(zoneid)) |
34 | highmem += zone->present_pages; | 35 | highmem += zone->present_pages; |
@@ -38,7 +39,12 @@ void show_mem(unsigned int filter) | |||
38 | 39 | ||
39 | printk("%lu pages RAM\n", total); | 40 | printk("%lu pages RAM\n", total); |
40 | printk("%lu pages HighMem/MovableOnly\n", highmem); | 41 | printk("%lu pages HighMem/MovableOnly\n", highmem); |
42 | #ifdef CONFIG_CMA | ||
43 | printk("%lu pages reserved\n", (reserved - totalcma_pages)); | ||
44 | printk("%lu pages cma reserved\n", totalcma_pages); | ||
45 | #else | ||
41 | printk("%lu pages reserved\n", reserved); | 46 | printk("%lu pages reserved\n", reserved); |
47 | #endif | ||
42 | #ifdef CONFIG_QUICKLIST | 48 | #ifdef CONFIG_QUICKLIST |
43 | printk("%lu pages in pagetable cache\n", | 49 | printk("%lu pages in pagetable cache\n", |
44 | quicklist_total_size()); | 50 | quicklist_total_size()); |