Date: Sat, 26 Jan 2008 07:36:50 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 134124 for review Message-ID: <200801260736.m0Q7aoxB047391@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=134124 Change 134124 by kmacy@pandemonium:kmacy:xen31 on 2008/01/26 07:35:55 assert that the multicalls succeed Affected files ... .. //depot/projects/xen31/sys/i386/xen/pmap.c#35 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/pmap.c#35 (text+ko) ==== @@ -1227,7 +1227,8 @@ int mclcount = 0; multicall_entry_t mcl[16]; multicall_entry_t *mclp = mcl; - + int error; + pte = vtopte(sva); endpte = pte + count; while (pte < endpte) { @@ -1245,13 +1246,17 @@ mclp++; mclcount++; if (mclcount == 16) { - HYPERVISOR_multicall(mcl, mclcount); + error = HYPERVISOR_multicall(mcl, mclcount); mclp = mcl; mclcount = 0; + KASSERT(error == 0, ("bad multicall %d", error)); } } - if (mclcount) - HYPERVISOR_multicall(mcl, mclcount); + if (mclcount) { + error = HYPERVISOR_multicall(mcl, mclcount); + KASSERT(error == 0, ("bad multicall %d", error)); + } + #ifdef INVARIANTS for (pte = vtopte(sva), mclcount = 0; mclcount < count; mclcount++, pte++) KASSERT(*pte, ("pte not set for va=0x%x\n", sva + mclcount*PAGE_SIZE)); @@ -2746,7 +2751,7 @@ vm_pindex_t diff, psize; multicall_entry_t mcl[16]; multicall_entry_t *mclp = mcl; - int count = 0; + int error, count = 0; VM_OBJECT_LOCK_ASSERT(m_start->object, MA_OWNED); psize = atop(end - start); @@ -2759,14 +2764,18 @@ prot, mpte); m = TAILQ_NEXT(m, listq); if (count == 16) { - HYPERVISOR_multicall(mcl, count); + error = HYPERVISOR_multicall(mcl, count); + KASSERT(error == 0, ("bad multicall %d", error)); mclp = mcl; count = 0; } } - if (count) - HYPERVISOR_multicall(mcl, count); - PMAP_UNLOCK(pmap); + if (count) { + error = HYPERVISOR_multicall(mcl, count); + KASSERT(error == 0, ("bad multicall %d", error)); + } + + PMAP_UNLOCK(pmap); } /* @@ -2795,7 +2804,7 @@ void pmap_enter_quick_range(pmap_t pmap, vm_offset_t *addrs, vm_page_t *pages, vm_prot_t *prots, int count) { - int i, index = 0; + int i, error, index = 0; multicall_entry_t mcl[16]; multicall_entry_t *mclp = mcl; @@ -2806,13 +2815,17 @@ (void) pmap_enter_quick_locked(&mclp, &index, pmap, *addrs, *pages, *prots, NULL); if (index == 16) { - HYPERVISOR_multicall(mcl, count); + error = HYPERVISOR_multicall(mcl, count); mclp = mcl; index = 0; + KASSERT(error == 0, ("bad multicall %d", error)); } } - if (index) - HYPERVISOR_multicall(mcl, index); + if (index) { + error = HYPERVISOR_multicall(mcl, index); + KASSERT(error == 0, ("bad multicall %d", error)); + } + PMAP_UNLOCK(pmap); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801260736.m0Q7aoxB047391>