blob: c81af5bd916792791ea05baf006270cf459fb26a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/cris/mm/init.c
3 *
4 * Copyright (C) 1995 Linus Torvalds
5 * Copyright (C) 2000,2001 Axis Communications AB
6 *
7 * Authors: Bjorn Wesen (bjornw@axis.com)
8 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 */
10
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090011#include <linux/gfp.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/init.h>
13#include <linux/bootmem.h>
14#include <asm/tlb.h>
Jiang Liu2e529812013-04-29 15:06:36 -070015#include <asm/sections.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Linus Torvalds1da177e2005-04-16 15:20:36 -070017unsigned long empty_zero_page;
18
Linus Torvalds1da177e2005-04-16 15:20:36 -070019void __init
20mem_init(void)
21{
Stoyan Gaydarov59b97762009-03-10 06:10:40 +010022 BUG_ON(!mem_map);
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
24 /* max/min_low_pfn was set by setup.c
25 * now we just copy it to some other necessary places...
26 *
27 * high_memory was also set in setup.c
28 */
Jiang Liu4e422de2013-07-03 15:03:54 -070029 max_mapnr = max_low_pfn - min_low_pfn;
Jiang Liu0c988532013-07-03 15:03:24 -070030 free_all_bootmem();
Jiang Liu4e422de2013-07-03 15:03:54 -070031 mem_init_print_info(NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -070032}
33
34/* free the pages occupied by initialization code */
35
36void
37free_initmem(void)
38{
Jiang Liudbe67df2013-07-03 15:02:51 -070039 free_initmem_default(-1);
Linus Torvalds1da177e2005-04-16 15:20:36 -070040}