diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-29 17:59:09 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-29 18:10:15 -0500 |
commit | de65d816aa44f9ddd79861ae21d75010cc1fd003 (patch) | |
tree | 04a637a43b2e52a733d0dcb7595a47057571e7da /mm/nobootmem.c | |
parent | 9710f581bb4c35589ac046b0cfc0deb7f369fc85 (diff) | |
parent | 5dcd14ecd41ea2b3ae3295a9b30d98769d52165f (diff) |
Merge remote-tracking branch 'origin/x86/boot' into x86/mm2
Coming patches to x86/mm2 require the changes and advanced baseline in
x86/boot.
Resolved Conflicts:
arch/x86/kernel/setup.c
mm/nobootmem.c
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'mm/nobootmem.c')
-rw-r--r-- | mm/nobootmem.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mm/nobootmem.c b/mm/nobootmem.c index ecc2f13d557d..03d152a76acf 100644 --- a/mm/nobootmem.c +++ b/mm/nobootmem.c | |||
@@ -137,6 +137,22 @@ unsigned long __init free_low_memory_core_early(int nodeid) | |||
137 | return count; | 137 | return count; |
138 | } | 138 | } |
139 | 139 | ||
140 | static void reset_node_lowmem_managed_pages(pg_data_t *pgdat) | ||
141 | { | ||
142 | struct zone *z; | ||
143 | |||
144 | /* | ||
145 | * In free_area_init_core(), highmem zone's managed_pages is set to | ||
146 | * present_pages, and bootmem allocator doesn't allocate from highmem | ||
147 | * zones. So there's no need to recalculate managed_pages because all | ||
148 | * highmem pages will be managed by the buddy system. Here highmem | ||
149 | * zone also includes highmem movable zone. | ||
150 | */ | ||
151 | for (z = pgdat->node_zones; z < pgdat->node_zones + MAX_NR_ZONES; z++) | ||
152 | if (!is_highmem(z)) | ||
153 | z->managed_pages = 0; | ||
154 | } | ||
155 | |||
140 | /** | 156 | /** |
141 | * free_all_bootmem - release free pages to the buddy allocator | 157 | * free_all_bootmem - release free pages to the buddy allocator |
142 | * | 158 | * |
@@ -144,6 +160,11 @@ unsigned long __init free_low_memory_core_early(int nodeid) | |||
144 | */ | 160 | */ |
145 | unsigned long __init free_all_bootmem(void) | 161 | unsigned long __init free_all_bootmem(void) |
146 | { | 162 | { |
163 | struct pglist_data *pgdat; | ||
164 | |||
165 | for_each_online_pgdat(pgdat) | ||
166 | reset_node_lowmem_managed_pages(pgdat); | ||
167 | |||
147 | /* | 168 | /* |
148 | * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id | 169 | * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id |
149 | * because in some case like Node0 doesn't have RAM installed | 170 | * because in some case like Node0 doesn't have RAM installed |