Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Aug 2016 14:42:29 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304806 - head/sys/arm64/arm64
Message-ID:  <201608251442.u7PEgTDV013635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608251442.u7PEgTDV013635>