svn commit: r327049 - head/sys/arm/arm

Ian Lepore ian at FreeBSD.org
Wed Dec 20 22:17:29 UTC 2017


Author: ian
Date: Wed Dec 20 22:17:27 2017
New Revision: 327049
URL: https://svnweb.freebsd.org/changeset/base/327049

Log:
  Allow pmap_kremove() to remove 1MB section mappings as well as 4K pages.
  This will allow it to undo temporary device mappings such as those made
  with pmap_preboot_map_attr().
  
  Reviewed by:	cognet

Modified:
  head/sys/arm/arm/pmap-v6.c

Modified: head/sys/arm/arm/pmap-v6.c
==============================================================================
--- head/sys/arm/arm/pmap-v6.c	Wed Dec 20 20:46:12 2017	(r327048)
+++ head/sys/arm/arm/pmap-v6.c	Wed Dec 20 22:17:27 2017	(r327049)
@@ -1310,10 +1310,16 @@ pmap_kenter(vm_offset_t va, vm_paddr_t pa)
 PMAP_INLINE void
 pmap_kremove(vm_offset_t va)
 {
+	pt1_entry_t *pte1p;
 	pt2_entry_t *pte2p;
 
-	pte2p = pt2map_entry(va);
-	pte2_clear(pte2p);
+	pte1p = kern_pte1(va);
+	if (pte1_is_section(pte1_load(pte1p))) {
+		pte1_clear(pte1p);
+	} else {
+		pte2p = pt2map_entry(va);
+		pte2_clear(pte2p);
+	}
 }
 
 /*


More information about the svn-src-head mailing list