Date: Wed, 10 Oct 2012 17:15:35 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241400 - head/sys/i386/xen Message-ID: <201210101715.q9AHFZT1068413@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Wed Oct 10 17:15:34 2012 New Revision: 241400 URL: http://svn.freebsd.org/changeset/base/241400 Log: MFi386 r241356 Add several asserts. MFC after: 3 days Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Wed Oct 10 17:13:46 2012 (r241399) +++ head/sys/i386/xen/pmap.c Wed Oct 10 17:15:34 2012 (r241400) @@ -2014,6 +2014,9 @@ pmap_pv_reclaim(pmap_t locked_pmap) pmap_pte_release(pte); if ((tpte & PG_W) != 0) continue; + KASSERT(tpte != 0, + ("pmap_pv_reclaim: pmap %p va %x zero pte", + pmap, va)); if ((tpte & PG_G) != 0) pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); @@ -2286,6 +2289,8 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = *ptq; PT_SET_VA_MA(ptq, 0, TRUE); + KASSERT(oldpte != 0, + ("pmap_remove_pte: pmap %p va %x zero pte", pmap, va)); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; /* @@ -2470,6 +2475,8 @@ pmap_remove_all(vm_page_t m) pte = pmap_pte_quick(pmap, pv->pv_va); tpte = *pte; PT_SET_VA_MA(pte, 0, TRUE); + KASSERT(tpte != 0, ("pmap_remove_all: pmap %p va %x zero pte", + pmap, pv->pv_va)); if (tpte & PG_W) pmap->pm_stats.wired_count--; if (tpte & PG_A) @@ -3533,6 +3540,8 @@ pmap_remove_pages(pmap_t pmap) PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { + KASSERT(pc->pc_pmap == pmap, ("Wrong pmap %p %p", pmap, + pc->pc_pmap)); allfree = 1; for (field = 0; field < _NPCM; field++) { inuse = ~pc->pc_map[field] & pc_freemask[field];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210101715.q9AHFZT1068413>