From: Ian Campbell Date: Thu, 10 Oct 2013 14:43:40 +0000 (+0100) Subject: xen: correct xenheap_bits after "xen: support RAM at addresses 0 and 4096" X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6133 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e4d7c89e34bf62eda5118d61caef9858c38cdf57;p=xen.git xen: correct xenheap_bits after "xen: support RAM at addresses 0 and 4096" This is incorrect after commit 1aac966e24e which shuffled the zones up by one. I've observed failures on arm64 systems with RAM at 0x8,00000000-0x8,7fffffff since xenheap_bits ends up as 35 instead of 36 (which is the zone with all the RAM). Signed-off-by: Ian Campbell Reviewed-by: Jan Beulich Acked-by: Keir Fraser Cc: Tim Deegan --- diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index fb8187bb35..4c17fbde40 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1364,7 +1364,7 @@ static unsigned int __read_mostly xenheap_bits; void __init xenheap_max_mfn(unsigned long mfn) { - xenheap_bits = fls(mfn) + PAGE_SHIFT - 1; + xenheap_bits = fls(mfn) + PAGE_SHIFT; } void init_xenheap_pages(paddr_t ps, paddr_t pe)