]> git.baikalelectronics.ru Git - kernel.git/commit
x86_64: fix e820_hole_size based on address ranges
authorDavid Rientjes <rientjes@google.com>
Sat, 21 Jul 2007 15:11:29 +0000 (17:11 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 22 Jul 2007 01:37:14 +0000 (18:37 -0700)
commitac788582aaa0e91687d9617284947c01f01a350b
tree8bbd5361289975ffe8e2673746842472a76a3420
parent047745706c22668c4a45f89a21c43b6f7cfba41c
x86_64: fix e820_hole_size based on address ranges

e820_hole_size() now uses the newly extracted helper function,
e820_find_active_region(), to determine the size of usable RAM in a range of
PFN's.

This was previously broken because of two reasons:

 - The start and end PFN's of each e820 entry were not properly rounded
   prior to excluding those entries in the range, and

 - Entries smaller than a page were not properly excluded from being
   accumulated.

This resulted in emulated nodes being incorrectly mapped to ranges that
were completely reserved and not candidates for being registered as
active ranges.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/e820.c
arch/x86_64/mm/numa.c