x86-32, memblock: Make add_highpages honor early reserved ranges
authorYinghai Lu <yinghai@kernel.org>
Tue, 5 Oct 2010 23:15:15 +0000 (16:15 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 6 Oct 2010 04:44:35 +0000 (21:44 -0700)
commit1d931264af0f10649b35afa8fbd2e169da51ac08
tree01ccff1fd0777cf256aeef478357bda6fc178276
parent9f4c13964b58608fbce05540743281ea3146c0e8
x86-32, memblock: Make add_highpages honor early reserved ranges

Originally the only early reserved range that is overlapped with high
pages is "KVA RAM", but we already do remove that from the active ranges.

However, It turns out Xen could have that kind of overlapping to support memory
ballooning.x

So we need to make add_highpage_with_active_regions() to subtract
memblock reserved just like low ram; this is the proper design anyway.

In this patch, refactering get_freel_all_memory_range() to make it can
be used by add_highpage_with_active_regions().  Also we don't need to
remove "KVA RAM" from active ranges.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4CABB183.1040607@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/include/asm/memblock.h
arch/x86/mm/init_32.c
arch/x86/mm/memblock.c
arch/x86/mm/numa_32.c