FreeBSD/sys/powerpc/powerpc/busdma_machdep.c
/*
 * Free a piece of memory and it's allociated dmamap, that was allocated
 * via bus_dmamem_alloc.  Make the same choice for free/contigfree.
 */
Free a piece of memory and it's allociated dmamap, that was allocated
via bus_dmamem_alloc.  Make the same choice for free/contigfree.
Free a piece of memory and it ' s allociated dmamap that was allocated via bus_dmamem_alloc . Make the same choice for free / contigfree .
void
bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
{
	if (!map->contigalloc)
		free(vaddr, M_DEVBUF);
	else
		kmem_free(kmem_arena, (vm_offset_t)vaddr, dmat->maxsize);
	bus_dmamap_destroy(dmat, map);
	CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
}
void bus_dmamem_free ( bus_dma_tag_t dmat , void * vaddr , bus_dmamap_t map ) { if ( ! map -> contigalloc ) free ( vaddr , M_DEVBUF ) ; else kmem_free ( kmem_arena , ( vm_offset_t ) vaddr , dmat -> maxsize ) ; bus_dmamap_destroy ( dmat , map ) ; CTR3 ( KTR_BUSDMA , " " , __func__ , dmat , dmat -> flags ) ; }
Free a piece of memory and it's allociated dmamap, that was allocated
 via bus_dmamem_alloc.
Free a piece of memory and it ' s allociated dmamap that was allocated via bus_dmamem_alloc .