aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-07-12 05:16:03 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2011-07-14 14:47:50 -0400
commit6b5d41a1b97f5529284f16170211b87fd60264c0 (patch)
tree4c11da3e2876e8e5d981bbad8d658cdf268a9203 /arch/x86/include
parent8a9ca34c11e1695dab7aff3cfa7780fbfe76b2f8 (diff)
memblock, x86: Reimplement memblock_find_dma_reserve() using iterators
memblock_find_dma_reserve() wants to find out how much memory is reserved under MAX_DMA_PFN. memblock_x86_memory_[free_]in_range() are used to find out the amounts of all available and free memory in the area, which are then subtracted to find out the amount of reservation. memblock_x86_memblock_[free_]in_range() are implemented using __memblock_x86_memory_in_range() which builds ranges from memblock and then count them, which is rather unnecessarily complex. This patch open codes the counting logic directly in memblock_find_dma_reserve() using memblock iterators and removes now unused __memblock_x86_memory_in_range() and find_range_array(). Signed-off-by: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/1310462166-31469-11-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/include')
-rw-r--r--arch/x86/include/asm/memblock.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/include/asm/memblock.h b/arch/x86/include/asm/memblock.h
index bc9e44b0812d..a0cc7d66ac55 100644
--- a/arch/x86/include/asm/memblock.h
+++ b/arch/x86/include/asm/memblock.h
@@ -7,7 +7,5 @@ void memblock_x86_reserve_range(u64 start, u64 end, char *name);
7void memblock_x86_free_range(u64 start, u64 end); 7void memblock_x86_free_range(u64 start, u64 end);
8 8
9u64 memblock_x86_hole_size(u64 start, u64 end); 9u64 memblock_x86_hole_size(u64 start, u64 end);
10u64 memblock_x86_free_memory_in_range(u64 addr, u64 limit);
11u64 memblock_x86_memory_in_range(u64 addr, u64 limit);
12 10
13#endif 11#endif