diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2013-09-26 12:35:34 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-09-26 16:21:20 +0100 |
commit | 4cfdb1210ca4028303dd75b6d141685990096adc (patch) | |
tree | 065c183666cfaf28136ffde8b4c806cba7c71193 /xen/arch/arm/setup.c | |
parent | f042e3280babbe66884371eee18bd0f38b016a8e (diff) | |
download | xen-4cfdb1210ca4028303dd75b6d141685990096adc.tar.gz xen-4cfdb1210ca4028303dd75b6d141685990096adc.tar.bz2 xen-4cfdb1210ca4028303dd75b6d141685990096adc.zip |
xen/arm: ensure the xenheap is 32MB aligned
My patch 08693f5948d8 "xen: arm: reduce the size of the xen heap to max 1/8
RAM size" unintentionally violated the constraint that the xenheap must be
32MB aligned, since we only explicitly align the end of the heap and
xenheap_pages was not a multiple of 32 pages.
Round xenheap pages up to a 32MB boundary.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/arch/arm/setup.c')
-rw-r--r-- | xen/arch/arm/setup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 1d0b5e902b..24bbc73921 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -324,7 +324,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) * constraints. */ heap_pages = (ram_size >> PAGE_SHIFT); - xenheap_pages = max(heap_pages/8, 128UL<<(20-PAGE_SHIFT)); + xenheap_pages = (heap_pages/8 + 0x1fffUL) & ~0x1fffUL; + xenheap_pages = max(xenheap_pages, 128UL<<(20-PAGE_SHIFT)); do { |