]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86: fix comment on super page alignment requirement
authorWei Liu <wei.liu2@citrix.com>
Fri, 28 Sep 2018 08:39:57 +0000 (09:39 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 28 Sep 2018 17:07:54 +0000 (18:07 +0100)
BOOTSTRAP_DIRECTMAP_END is gone. The comment in question should refer
to BOOSTRAP_MAP_BASE and 4GB instead.

Move the entire comment block to where it belongs -- immediately
before the loop which does the things said in the comment.

Remove two trailing spaces while at it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/setup.c

index 2fbf7d574c8f33cbcfea09b56d9cd37733b30a93..cf404ecf124c06870b3a312af48935eaaf032f86 100644 (file)
@@ -942,19 +942,6 @@ void __init noreturn __start_xen(unsigned long mbi_p)
     initial_images = mod;
     nr_initial_images = mbi->mods_count;
 
-    /*
-     * Iterate backwards over all superpage-aligned RAM regions.
-     * 
-     * We require superpage alignment because the boot allocator is not yet
-     * initialised. Hence we can only map superpages in the address range
-     * 0 to BOOTSTRAP_DIRECTMAP_END, as this is guaranteed not to require
-     * dynamic allocation of pagetables.
-     * 
-     * As well as mapping superpages in that range, in preparation for
-     * initialising the boot allocator, we also look for a region to which
-     * we can relocate the dom0 kernel and other multiboot modules. Also, on
-     * x86/64, we relocate Xen to higher memory.
-     */
     for ( i = 0; !efi_enabled(EFI_LOADER) && i < mbi->mods_count; i++ )
     {
         if ( mod[i].mod_start & (PAGE_SIZE - 1) )
@@ -987,6 +974,19 @@ void __init noreturn __start_xen(unsigned long mbi_p)
         highmem_start &= ~((1UL << L3_PAGETABLE_SHIFT) - 1);
 #endif
 
+    /*
+     * Iterate backwards over all superpage-aligned RAM regions.
+     *
+     * We require superpage alignment because the boot allocator is
+     * not yet initialised. Hence we can only map superpages in the
+     * address range BOOTSTRAP_MAP_BASE to 4GB, as this is guaranteed
+     * not to require dynamic allocation of pagetables.
+     *
+     * As well as mapping superpages in that range, in preparation for
+     * initialising the boot allocator, we also look for a region to which
+     * we can relocate the dom0 kernel and other multiboot modules. Also, on
+     * x86/64, we relocate Xen to higher memory.
+     */
     for ( i = boot_e820.nr_map-1; i >= 0; i-- )
     {
         uint64_t s, e, mask = (1UL << L2_PAGETABLE_SHIFT) - 1;