mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
x86: make sparse mem work in non-NUMA mode
With sparse memory, holes should not be marked present for memmap. This patch makes sure sparsemem really works on SMP mode (!NUMA). [ Impact: use less memory to map fragmented RAM, avoid boot-OOM/crash ] Signed-off-by: Shaohua Li <[email protected]> Signed-off-by: Sheng Yang <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
bf78ad69cd
commit
ed077b58f6
1 changed files with 2 additions and 2 deletions
|
|
@ -706,15 +706,15 @@ void __init initmem_init(unsigned long start_pfn,
|
|||
highstart_pfn = highend_pfn = max_pfn;
|
||||
if (max_pfn > max_low_pfn)
|
||||
highstart_pfn = max_low_pfn;
|
||||
memory_present(0, 0, highend_pfn);
|
||||
e820_register_active_regions(0, 0, highend_pfn);
|
||||
sparse_memory_present_with_active_regions(0);
|
||||
printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
|
||||
pages_to_mb(highend_pfn - highstart_pfn));
|
||||
num_physpages = highend_pfn;
|
||||
high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
|
||||
#else
|
||||
memory_present(0, 0, max_low_pfn);
|
||||
e820_register_active_regions(0, 0, max_low_pfn);
|
||||
sparse_memory_present_with_active_regions(0);
|
||||
num_physpages = max_low_pfn;
|
||||
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue