diff options
Diffstat (limited to 'arch/s390/mm/init.c')
-rw-r--r-- | arch/s390/mm/init.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 89ebae4008f2..ce36ea80e4f9 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -135,30 +135,17 @@ void __init paging_init(void) | |||
135 | 135 | ||
136 | void __init mem_init(void) | 136 | void __init mem_init(void) |
137 | { | 137 | { |
138 | unsigned long codesize, reservedpages, datasize, initsize; | 138 | max_mapnr = max_low_pfn; |
139 | |||
140 | max_mapnr = num_physpages = max_low_pfn; | ||
141 | high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); | 139 | high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); |
142 | 140 | ||
143 | /* Setup guest page hinting */ | 141 | /* Setup guest page hinting */ |
144 | cmma_init(); | 142 | cmma_init(); |
145 | 143 | ||
146 | /* this will put all low memory onto the freelists */ | 144 | /* this will put all low memory onto the freelists */ |
147 | totalram_pages += free_all_bootmem(); | 145 | free_all_bootmem(); |
148 | setup_zero_pages(); /* Setup zeroed pages. */ | 146 | setup_zero_pages(); /* Setup zeroed pages. */ |
149 | 147 | ||
150 | reservedpages = 0; | 148 | mem_init_print_info(NULL); |
151 | |||
152 | codesize = (unsigned long) &_etext - (unsigned long) &_text; | ||
153 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; | ||
154 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; | ||
155 | printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, %ldk data, %ldk init)\n", | ||
156 | nr_free_pages() << (PAGE_SHIFT-10), | ||
157 | max_mapnr << (PAGE_SHIFT-10), | ||
158 | codesize >> 10, | ||
159 | reservedpages << (PAGE_SHIFT-10), | ||
160 | datasize >>10, | ||
161 | initsize >> 10); | ||
162 | printk("Write protected kernel read-only data: %#lx - %#lx\n", | 149 | printk("Write protected kernel read-only data: %#lx - %#lx\n", |
163 | (unsigned long)&_stext, | 150 | (unsigned long)&_stext, |
164 | PFN_ALIGN((unsigned long)&_eshared) - 1); | 151 | PFN_ALIGN((unsigned long)&_eshared) - 1); |
@@ -166,13 +153,14 @@ void __init mem_init(void) | |||
166 | 153 | ||
167 | void free_initmem(void) | 154 | void free_initmem(void) |
168 | { | 155 | { |
169 | free_initmem_default(0); | 156 | free_initmem_default(POISON_FREE_INITMEM); |
170 | } | 157 | } |
171 | 158 | ||
172 | #ifdef CONFIG_BLK_DEV_INITRD | 159 | #ifdef CONFIG_BLK_DEV_INITRD |
173 | void __init free_initrd_mem(unsigned long start, unsigned long end) | 160 | void __init free_initrd_mem(unsigned long start, unsigned long end) |
174 | { | 161 | { |
175 | free_reserved_area(start, end, POISON_FREE_INITMEM, "initrd"); | 162 | free_reserved_area((void *)start, (void *)end, POISON_FREE_INITMEM, |
163 | "initrd"); | ||
176 | } | 164 | } |
177 | #endif | 165 | #endif |
178 | 166 | ||