Date: Tue, 30 Aug 2016 16:45:16 +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: r305071 - head/sys/arm64/arm64 Message-ID: <201608301645.u7UGjGtF059227@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608301645.u7UGjGtF059227>