diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-03-31 23:45:27 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-04-01 17:41:19 -0400 |
commit | aa235fc712f379d4194cff9217f07026c452c141 (patch) | |
tree | 9807da3453cfb9592c1a45f6fc327b5d227672d5 /mm | |
parent | 337998587f802535896e9ed16d19f97915ccd368 (diff) |
bootmem, x86: Fix 32bit numa system without RAM on node 0
When 32bit numa is used, free_all_bootmem() will still only go over with
node id 0.
If node 0 doesn't have RAM installed, the lowest populated node
becomes low RAM.
This one fixes BOOTMEM path by iterating over the bdata_list.
-v3: add more comments, and fix bootmem path too.
-v4: seperate from one big patch
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4BB416D7.6090203@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/bootmem.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index 2058cb7595f2..ba37d62b684a 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -312,7 +312,13 @@ unsigned long __init free_all_bootmem(void) | |||
312 | */ | 312 | */ |
313 | return free_all_memory_core_early(MAX_NUMNODES); | 313 | return free_all_memory_core_early(MAX_NUMNODES); |
314 | #else | 314 | #else |
315 | return free_all_bootmem_core(NODE_DATA(0)->bdata); | 315 | unsigned long total_pages = 0; |
316 | bootmem_data_t *bdata; | ||
317 | |||
318 | list_for_each_entry(bdata, &bdata_list, list) | ||
319 | total_pages += free_all_bootmem_core(bdata); | ||
320 | |||
321 | return total_pages; | ||
316 | #endif | 322 | #endif |
317 | } | 323 | } |
318 | 324 | ||