FreeBSD/sys/dev/xen/blkback/blkback.c
/**
 * Free allocated KVA.
 *
 * \param xbb	    Per-instance xbb configuration structure.
 * \param kva_ptr   Pointer to allocated KVA region.  
 * \param nr_pages  Number of pages in the KVA region.
 */
Free allocated KVA.
\param xbb       Per-instance xbb configuration structure.
\param kva_ptr   Pointer to allocated KVA region.
\param nr_pages  Number of pages in the KVA region.
Free allocated KVA . \ param xbb Per - instance xbb configuration structure . \ param kva_ptr Pointer to allocated KVA region . \ param nr_pages Number of pages in the KVA region .
static void
xbb_free_kva(struct xbb_softc *xbb, uint8_t *kva_ptr, int nr_pages)
{
	intptr_t start_page;
	mtx_assert(&xbb->lock, MA_OWNED);
	start_page = (intptr_t)(kva_ptr - xbb->kva) >> PAGE_SHIFT;
	bit_nclear(xbb->kva_free, start_page, start_page + nr_pages - 1);
}
static void xbb_free_kva ( struct xbb_softc * xbb , uint8_t * kva_ptr , int nr_pages ) { intptr_t start_page ; mtx_assert ( & xbb -> lock , MA_OWNED ) ; start_page = ( intptr_t ) ( kva_ptr - xbb -> kva ) >> PAGE_SHIFT ; bit_nclear ( xbb -> kva_free , start_page , start_page + nr_pages - 1 ) ; }
Free allocated KVA.
Free allocated KVA .