summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/memblock.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-08-25 13:39:16 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-08-27 11:11:16 -0700
commitb52c17ce854125700c4e19d4427d39bf2504ff63 (patch)
tree917bbfb7b1603b6deb7dee735d05071199d5ba51 /arch/x86/include/asm/memblock.h
parent6bcc8176d07f108da3b1af17fb2c0e82c80e948e (diff)
x86, memblock: Add memblock_x86_free_memory_in_range()
It will return free memory size in specified range. We can not use memory_size - reserved_size here, because some reserved area may not be in the scope of memblock.memory.region. Use memblock.memory.region subtracting memblock.reserved.region to get free range array. then count size of all free ranges. -v2: Ben insist on using _in_range Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm/memblock.h')
-rw-r--r--arch/x86/include/asm/memblock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/memblock.h b/arch/x86/include/asm/memblock.h
index 3a86b10380f..fc3c230812e 100644
--- a/arch/x86/include/asm/memblock.h
+++ b/arch/x86/include/asm/memblock.h
@@ -15,5 +15,6 @@ void memblock_x86_register_active_regions(int nid, unsigned long start_pfn,
unsigned long last_pfn);
u64 memblock_x86_hole_size(u64 start, u64 end);
u64 memblock_x86_find_in_range_node(int nid, u64 start, u64 end, u64 size, u64 align);
+u64 memblock_x86_free_memory_in_range(u64 addr, u64 limit);
#endif