]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commita7e96629efcab1ccea3a376f3f5683c8d9e882c1
tree8bbd5361289975ffe8e2673746842472a76a3420
parentbc2cea6a34fdb30f118ec75db39a46a191870607
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