xen: correct xenheap_bits after "xen: support RAM at addresses 0 and 4096"
authorIan Campbell <ian.campbell@citrix.com>
Thu, 10 Oct 2013 14:43:40 +0000 (15:43 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 24 Oct 2013 13:23:20 +0000 (14:23 +0100)
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 <ian.campbell@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
xen/common/page_alloc.c

index fb8187bb35a9c1b576111aae682f0fd7abbe91ae..4c17fbde40e2f88b33b6c6777ea87ff461469091 100644 (file)
@@ -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)