diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-07-03 18:04:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:38 -0400 |
commit | ce7549e1d824e08871beddb6c7945635dfc4341d (patch) | |
tree | ccd105f748dcf5cc4b4408eb7b92492cf3681a36 /arch/avr32/mm | |
parent | fccc998771043db1613509b26c18b3d7f071e668 (diff) |
mm/AVR32: prepare for killing free_all_bootmem_node()
Prepare for killing free_all_bootmem_node() by using free_all_bootmem()
instead.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/avr32/mm')
-rw-r--r-- | arch/avr32/mm/init.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c index 0fc04b9323cf..def5391d927a 100644 --- a/arch/avr32/mm/init.c +++ b/arch/avr32/mm/init.c | |||
@@ -103,23 +103,12 @@ void __init mem_init(void) | |||
103 | pg_data_t *pgdat; | 103 | pg_data_t *pgdat; |
104 | 104 | ||
105 | high_memory = NULL; | 105 | high_memory = NULL; |
106 | for_each_online_pgdat(pgdat) | ||
107 | high_memory = max_t(void *, high_memory, | ||
108 | __va(pgdat_end_pfn(pgdat) << PAGE_SHIFT)); | ||
106 | 109 | ||
107 | /* this will put all low memory onto the freelists */ | 110 | set_max_mapnr(MAP_NR(high_memory)); |
108 | for_each_online_pgdat(pgdat) { | 111 | free_all_bootmem(); |
109 | void *node_high_memory; | ||
110 | |||
111 | if (pgdat->node_spanned_pages != 0) | ||
112 | free_all_bootmem_node(pgdat); | ||
113 | |||
114 | node_high_memory = (void *)((pgdat->node_start_pfn | ||
115 | + pgdat->node_spanned_pages) | ||
116 | << PAGE_SHIFT); | ||
117 | if (node_high_memory > high_memory) | ||
118 | high_memory = node_high_memory; | ||
119 | } | ||
120 | |||
121 | max_mapnr = MAP_NR(high_memory); | ||
122 | |||
123 | mem_init_print_info(NULL); | 112 | mem_init_print_info(NULL); |
124 | } | 113 | } |
125 | 114 | ||