Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2014 13:27:45 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r261922 - head/sys/arm/arm
Message-ID:  <201402151327.s1FDRjED021589@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zbb
Date: Sat Feb 15 13:27:45 2014
New Revision: 261922
URL: http://svnweb.freebsd.org/changeset/base/261922

Log:
  Handle pmap_enter() on already promoted mappings for ARMv6/v7
  
  Attempt to demote the superpage if trying to pmap_enter() on
  one. Panic only when the particular superpage should
  no longer exist for that pmap and address.

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

Modified: head/sys/arm/arm/pmap-v6.c
==============================================================================
--- head/sys/arm/arm/pmap-v6.c	Sat Feb 15 13:24:58 2014	(r261921)
+++ head/sys/arm/arm/pmap-v6.c	Sat Feb 15 13:27:45 2014	(r261922)
@@ -2973,8 +2973,10 @@ pmap_enter_locked(pmap_t pmap, vm_offset
 	}
 
 	pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)];
-	if ((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO)
-		panic("pmap_enter_locked: attempt pmap_enter_on 1MB page");
+	if ((va < VM_MAXUSER_ADDRESS) &&
+	    (*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) {
+		(void)pmap_demote_section(pmap, va);
+	}
 
 	user = 0;
 	/*
@@ -3014,6 +3016,10 @@ do_l2b_alloc:
 		}
 	}
 
+	pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)];
+	if ((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO)
+		panic("pmap_enter: attempt to enter on 1MB page, va: %#x", va);
+
 	ptep = &l2b->l2b_kva[l2pte_index(va)];
 
 	opte = *ptep;



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