diff options
author | Tejun Heo <[email protected]> | 2011-07-12 11:16:03 +0200 |
---|---|---|
committer | H. Peter Anvin <[email protected]> | 2011-07-14 11:47:50 -0700 |
commit | 6b5d41a1b97f5529284f16170211b87fd60264c0 (patch) | |
tree | 4c11da3e2876e8e5d981bbad8d658cdf268a9203 /arch/x86/mm/numa_32.c | |
parent | 8a9ca34c11e1695dab7aff3cfa7780fbfe76b2f8 (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 <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Cc: Yinghai Lu <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'arch/x86/mm/numa_32.c')
0 files changed, 0 insertions, 0 deletions