Author: markj
Date: Tue Oct  8 16:42:50 2019
New Revision: 353311
URL: https://svnweb.freebsd.org/changeset/base/353311

Log:
  Simplify pmap_page_array_startup() a bit.
  
  No functional change intended.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Tue Oct  8 15:48:28 2019        (r353310)
+++ head/sys/amd64/amd64/pmap.c Tue Oct  8 16:42:50 2019        (r353311)
@@ -3947,9 +3947,9 @@ pmap_page_array_startup(long pages)
 
        vm_page_array_size = pages;
 
-       start = va = VM_MIN_KERNEL_ADDRESS;
-       end = va + pages * sizeof(struct vm_page);
-       while (va < end) {
+       start = VM_MIN_KERNEL_ADDRESS;
+       end = start + pages * sizeof(struct vm_page);
+       for (va = start; va < end; va += NBPDR) {
                pfn = first_page + (va - start) / sizeof(struct vm_page);
                domain = _vm_phys_domain(ptoa(pfn));
                pdpe = pmap_pdpe(kernel_pmap, va);
@@ -3969,7 +3969,6 @@ pmap_page_array_startup(long pages)
                newpdir = (pd_entry_t)(pa | X86_PG_V | X86_PG_RW | X86_PG_A |
                    X86_PG_M | PG_PS | pg_g | pg_nx);
                pde_store(pde, newpdir);
-               va += NBPDR;
        }
        vm_page_array = (vm_page_t)start;
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to