summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2010-11-19 15:12:19 +0000
committercperciva <cperciva@FreeBSD.org>2010-11-19 15:12:19 +0000
commit8ee7b1a00a12a59b7a4d656b88caf663b928688b (patch)
tree40d389a35f33fedf3819fe5ee00900512b1c40ef /sys
parentf91dfaab21d850a29ba6230ceebe002ba41ba6b3 (diff)
downloadFreeBSD-src-8ee7b1a00a12a59b7a4d656b88caf663b928688b.zip
FreeBSD-src-8ee7b1a00a12a59b7a4d656b88caf663b928688b.tar.gz
Make pmap_release consistent with pmap_pinit with respect to unpinning
pages. The pinning of NPGPTD pages is #if 0ed out in pmap_pinit (I'm not quite sure why...) and this commit adds a corresponding #if 0 in pmap_release to avoid unpinning those pages. Some versions of Xen seem to silently ignore requests to unpin pages which were never pinned in the first place, but some return an error (causing FreeBSD to panic) prior to this commit.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/xen/pmap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c
index 237c018..0efdc40 100644
--- a/sys/i386/xen/pmap.c
+++ b/sys/i386/xen/pmap.c
@@ -1875,7 +1875,12 @@ pmap_release(pmap_t pmap)
m = ptdpg[i];
ma = xpmap_ptom(VM_PAGE_TO_PHYS(m));
/* unpinning L1 and L2 treated the same */
+#if 0
xen_pgd_unpin(ma);
+#else
+ if (i == NPGPTD)
+ xen_pgd_unpin(ma);
+#endif
#ifdef PAE
if (i < NPGPTD)
KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME),
OpenPOWER on IntegriCloud