aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/mm/init.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index bba125b4bb06..479d7537a32a 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -173,39 +173,16 @@ void __init zones_init(void)
173 173
174void __init mem_init(void) 174void __init mem_init(void)
175{ 175{
176 unsigned long codesize, reservedpages, datasize, initsize; 176 max_mapnr = max_low_pfn - ARCH_PFN_OFFSET;
177 unsigned long highmemsize, tmp, ram;
178
179 max_mapnr = num_physpages = max_low_pfn - ARCH_PFN_OFFSET;
180 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); 177 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
181 highmemsize = 0;
182 178
183#ifdef CONFIG_HIGHMEM 179#ifdef CONFIG_HIGHMEM
184#error HIGHGMEM not implemented in init.c 180#error HIGHGMEM not implemented in init.c
185#endif 181#endif
186 182
187 totalram_pages += free_all_bootmem(); 183 free_all_bootmem();
188
189 reservedpages = ram = 0;
190 for (tmp = 0; tmp < max_mapnr; tmp++) {
191 ram++;
192 if (PageReserved(mem_map+tmp))
193 reservedpages++;
194 }
195 184
196 codesize = (unsigned long) _etext - (unsigned long) _stext; 185 mem_init_print_info(NULL);
197 datasize = (unsigned long) _edata - (unsigned long) _sdata;
198 initsize = (unsigned long) __init_end - (unsigned long) __init_begin;
199
200 printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
201 "%ldk data, %ldk init %ldk highmem)\n",
202 nr_free_pages() << (PAGE_SHIFT-10),
203 ram << (PAGE_SHIFT-10),
204 codesize >> 10,
205 reservedpages << (PAGE_SHIFT-10),
206 datasize >> 10,
207 initsize >> 10,
208 highmemsize >> 10);
209} 186}
210 187
211#ifdef CONFIG_BLK_DEV_INITRD 188#ifdef CONFIG_BLK_DEV_INITRD
@@ -214,11 +191,11 @@ extern int initrd_is_mapped;
214void free_initrd_mem(unsigned long start, unsigned long end) 191void free_initrd_mem(unsigned long start, unsigned long end)
215{ 192{
216 if (initrd_is_mapped) 193 if (initrd_is_mapped)
217 free_reserved_area(start, end, 0, "initrd"); 194 free_reserved_area((void *)start, (void *)end, -1, "initrd");
218} 195}
219#endif 196#endif
220 197
221void free_initmem(void) 198void free_initmem(void)
222{ 199{
223 free_initmem_default(0); 200 free_initmem_default(-1);
224} 201}