svn commit: r305071 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Tue Aug 30 16:45:17 UTC 2016
Author: andrew
Date: Tue Aug 30 16:45:15 2016
New Revision: 305071
URL: https://svnweb.freebsd.org/changeset/base/305071
Log:
Because we need to use a break-before-make sequence when promoting pages
there is a short period where functions that walk the kernel page table
without locking them may see an invalid entry. One solution would be to add
locking to these functions, however some may be called from locations where
we are unable to sleep.
Until a better solution can be found stop promoting pages in the kernel
pmap so these functions work as expected.
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 Tue Aug 30 16:43:24 2016 (r305070)
+++ head/sys/arm64/arm64/pmap.c Tue Aug 30 16:45:15 2016 (r305071)
@@ -2936,14 +2936,17 @@ validate:
PTE_SYNC(l3);
pmap_invalidate_page(pmap, va);
- if ((pmap != pmap_kernel()) && (pmap == &curproc->p_vmspace->vm_pmap))
- cpu_icache_sync_range(va, PAGE_SIZE);
-
- if ((mpte == NULL || mpte->wire_count == NL3PG) &&
- pmap_superpages_enabled() && (m->flags & PG_FICTITIOUS) == 0 &&
- vm_reserv_level_iffullpop(m) == 0) {
- KASSERT(lvl == 2, ("Invalid pde level %d", lvl));
- pmap_promote_l2(pmap, pde, va, &lock);
+ if (pmap != pmap_kernel()) {
+ if (pmap == &curproc->p_vmspace->vm_pmap)
+ cpu_icache_sync_range(va, PAGE_SIZE);
+
+ if ((mpte == NULL || mpte->wire_count == NL3PG) &&
+ pmap_superpages_enabled() &&
+ (m->flags & PG_FICTITIOUS) == 0 &&
+ vm_reserv_level_iffullpop(m) == 0) {
+ KASSERT(lvl == 2, ("Invalid pde level %d", lvl));
+ pmap_promote_l2(pmap, pde, va, &lock);
+ }
}
if (lock != NULL)
More information about the svn-src-head
mailing list