diff options
author | Tejun Heo <tj@kernel.org> | 2011-07-12 05:16:04 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-07-14 14:47:51 -0400 |
commit | 474b881bf4ee86aba55d46a4fdf293de32cba91b (patch) | |
tree | bd197e7989ec4d76445a393679ca1f18727825b6 /arch/x86/mm/numa.c | |
parent | 6b5d41a1b97f5529284f16170211b87fd60264c0 (diff) |
x86: Use absent_pages_in_range() instead of memblock_x86_hole_size()
memblock_x86_hole_size() calculates the total size of holes in a given
range according to memblock and is used by numa emulation code and
numa_meminfo_cover_memory().
Since conversion to MEMBLOCK_NODE_MAP, absent_pages_in_range() also
uses memblock and gives the same result. This patch replaces
memblock_x86_hole_size() uses with absent_pages_in_range(). After the
conversion the x86 function doesn't have any user left and is killed.
Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310462166-31469-12-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm/numa.c')
-rw-r--r-- | arch/x86/mm/numa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index f4a40bdb2e4e..88e562729967 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c | |||
@@ -475,8 +475,8 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi) | |||
475 | numaram = 0; | 475 | numaram = 0; |
476 | } | 476 | } |
477 | 477 | ||
478 | e820ram = max_pfn - (memblock_x86_hole_size(0, | 478 | e820ram = max_pfn - absent_pages_in_range(0, max_pfn); |
479 | PFN_PHYS(max_pfn)) >> PAGE_SHIFT); | 479 | |
480 | /* We seem to lose 3 pages somewhere. Allow 1M of slack. */ | 480 | /* We seem to lose 3 pages somewhere. Allow 1M of slack. */ |
481 | if ((s64)(e820ram - numaram) >= (1 << (20 - PAGE_SHIFT))) { | 481 | if ((s64)(e820ram - numaram) >= (1 << (20 - PAGE_SHIFT))) { |
482 | printk(KERN_ERR "NUMA: nodes only cover %LuMB of your %LuMB e820 RAM. Not used.\n", | 482 | printk(KERN_ERR "NUMA: nodes only cover %LuMB of your %LuMB e820 RAM. Not used.\n", |