diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-07 11:02:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-07 11:02:23 -0700 |
commit | fb1ae635772d679eb312fa447290fc02cd0e4cf1 (patch) | |
tree | 45733f9820da1190cd58bfff080edbb02af961a8 /mm/bootmem.c | |
parent | addb2d6c13993060ae75f5005815b19dd2abdd64 (diff) | |
parent | 472a474c6630efd195d3738339fd1bdc8aa3b1aa (diff) | |
download | kernel_samsung_aries-fb1ae635772d679eb312fa447290fc02cd0e4cf1.zip kernel_samsung_aries-fb1ae635772d679eb312fa447290fc02cd0e4cf1.tar.gz kernel_samsung_aries-fb1ae635772d679eb312fa447290fc02cd0e4cf1.tar.bz2 |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
x86: Fix double enable_IR_x2apic() call on SMP kernel on !SMP boards
x86: Increase CONFIG_NODES_SHIFT max to 10
ibft, x86: Change reserve_ibft_region() to find_ibft_region()
x86, hpet: Fix bug in RTC emulation
x86, hpet: Erratum workaround for read after write of HPET comparator
bootmem, x86: Fix 32bit numa system without RAM on node 0
nobootmem, x86: Fix 32bit numa system without RAM on node 0
x86: Handle overlapping mptables
x86: Make e820_remove_range to handle all covered case
x86-32, resume: do a global tlb flush in S4 resume
Diffstat (limited to 'mm/bootmem.c')
-rw-r--r-- | mm/bootmem.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index eff2242..58c66cc 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -304,9 +304,22 @@ unsigned long __init free_all_bootmem_node(pg_data_t *pgdat) unsigned long __init free_all_bootmem(void) { #ifdef CONFIG_NO_BOOTMEM - return free_all_memory_core_early(NODE_DATA(0)->node_id); + /* + * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id + * because in some case like Node0 doesnt have RAM installed + * low ram will be on Node1 + * Use MAX_NUMNODES will make sure all ranges in early_node_map[] + * will be used instead of only Node0 related + */ + return free_all_memory_core_early(MAX_NUMNODES); #else - return free_all_bootmem_core(NODE_DATA(0)->bdata); + unsigned long total_pages = 0; + bootmem_data_t *bdata; + + list_for_each_entry(bdata, &bdata_list, list) + total_pages += free_all_bootmem_core(bdata); + + return total_pages; #endif } |