Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | */ |
| 10 | |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 11 | #include <linux/gfp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/init.h> |
| 13 | #include <linux/bootmem.h> |
| 14 | #include <asm/tlb.h> |
Jiang Liu | 2e52981 | 2013-04-29 15:06:36 -0700 | [diff] [blame] | 15 | #include <asm/sections.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | unsigned long empty_zero_page; |
| 18 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | void __init |
| 20 | mem_init(void) |
| 21 | { |
Stoyan Gaydarov | 59b9776 | 2009-03-10 06:10:40 +0100 | [diff] [blame] | 22 | BUG_ON(!mem_map); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
| 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 Liu | 4e422de | 2013-07-03 15:03:54 -0700 | [diff] [blame] | 29 | max_mapnr = max_low_pfn - min_low_pfn; |
Jiang Liu | 0c98853 | 2013-07-03 15:03:24 -0700 | [diff] [blame] | 30 | free_all_bootmem(); |
Jiang Liu | 4e422de | 2013-07-03 15:03:54 -0700 | [diff] [blame] | 31 | mem_init_print_info(NULL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | /* free the pages occupied by initialization code */ |
| 35 | |
| 36 | void |
| 37 | free_initmem(void) |
| 38 | { |
Jiang Liu | dbe67df | 2013-07-03 15:02:51 -0700 | [diff] [blame] | 39 | free_initmem_default(-1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | } |