Author: andrew
Date: Thu Aug 25 14:42:29 2016
New Revision: 304806
URL: https://svnweb.freebsd.org/changeset/base/304806

Log:
  Fix an assert, it should check if, when moving from 1 l1 to 512 l2 blocks,
  the l2 entry is a block type and not an l3 page.
  
  While here fix the string to correct the level name and add a missing ')'.
  
  Obtained from:        ABT Systems Ltd
  MFC after:    1 month
  Sponsored by: The FreeBSD Foundation

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

Modified: head/sys/arm64/arm64/pmap.c
==============================================================================
--- head/sys/arm64/arm64/pmap.c Thu Aug 25 13:59:19 2016        (r304805)
+++ head/sys/arm64/arm64/pmap.c Thu Aug 25 14:42:29 2016        (r304806)
@@ -4323,9 +4323,9 @@ pmap_demote_l1(pmap_t pmap, pt_entry_t *
                phys += L2_SIZE;
        }
        cpu_dcache_wb_range((vm_offset_t)l2, PAGE_SIZE);
-       KASSERT(l2[0] == ((oldl1 & ~ATTR_DESCR_MASK) | L3_PAGE),
-           ("Invalid l3 page (%lx != %lx", l2[0],
-           (oldl1 & ~ATTR_DESCR_MASK) | L3_PAGE));
+       KASSERT(l2[0] == ((oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK),
+           ("Invalid l2 page (%lx != %lx)", l2[0],
+           (oldl1 & ~ATTR_DESCR_MASK) | L2_BLOCK));
 
        if (tmpl1 != 0) {
                pmap_kenter(tmpl1, PAGE_SIZE,
@@ -4405,7 +4405,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_en
                cpu_dcache_wb_range((vm_offset_t)l3, PAGE_SIZE);
        }
        KASSERT(l3[0] == ((oldl2 & ~ATTR_DESCR_MASK) | L3_PAGE),
-           ("Invalid l3 page (%lx != %lx", l3[0],
+           ("Invalid l3 page (%lx != %lx)", l3[0],
            (oldl2 & ~ATTR_DESCR_MASK) | L3_PAGE));
 
        /*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to