]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xen/arm: setup: Calculate correctly the size of Xen
authorJulien Grall <julien.grall@arm.com>
Wed, 16 Oct 2019 11:12:51 +0000 (12:12 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 29 Oct 2019 18:39:20 +0000 (11:39 -0700)
The current size of Xen is computed using _end - _start + 1. However,
_end is pointing one past the end of Xen, so the size of Xen is
off-by-one.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit 08e2059facd78d5ffaf206ba06ac2017c4adeed4)

xen/arch/arm/setup.c

index ff949f545abcd3bc5ac0452dde1c99ec37de4a3c..4cb87ac9a38dce2ccbbc1a055efca2b04ecd8182 100644 (file)
@@ -726,7 +726,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     /* Register Xen's load address as a boot module. */
     xen_bootmodule = add_boot_module(BOOTMOD_XEN,
                              (paddr_t)(uintptr_t)(_start + boot_phys_offset),
-                             (paddr_t)(uintptr_t)(_end - _start + 1), NULL);
+                             (paddr_t)(uintptr_t)(_end - _start), NULL);
     BUG_ON(!xen_bootmodule);
 
     xen_paddr = get_xen_paddr();