예제 #1
0
/*
 * Unload a UBA DMA map.
 */
void
uba_bus_dmamap_unload_sgmap(bus_dma_tag_t t, bus_dmamap_t map)
{
	/*
	 * Invalidate any SGMAP page table entries used by this
	 * mapping.
	 */
	vax_sgmap_unload(t, map, t->_sgmap);

	/*
	 * Do the generic bits of the unload.
	 */
	_bus_dmamap_unload(t, map);
}
예제 #2
0
/*
 * unload a DMA map.
 */
void
jazz_bus_dmamap_unload(bus_dma_tag_t t, bus_dmamap_t map)
{

	if ((map->_dm_flags & BUS_DMA_ALLOCNOW) != 0) {
		/* DMA TLB should be preserved */
		map->dm_mapsize = 0;
		map->dm_nsegs = 0;
		return;
	}

	jazz_bus_dmamap_free_sgmap(t, map->dm_segs, map->dm_nsegs);
	_bus_dmamap_unload(t, map);
}
예제 #3
0
/*
 * Unload a TSP DMA map.
 */
void
tsp_bus_dmamap_unload_sgmap(bus_dma_tag_t t, bus_dmamap_t map)
{

	/*
	 * Invalidate any SGMAP page table entries used by this
	 * mapping.
	 */
	pci_sgmap_pte64_unload(t, map, t->_sgmap);
	tsp_tlb_invalidate(t->_cookie);

	/*
	 * Do the generic bits of the unload.
	 */
	_bus_dmamap_unload(t, map);
}
/*
 * Unload a MCPCIA DMA map.
 */
void
mcpcia_bus_dmamap_unload_sgmap(bus_dma_tag_t t, bus_dmamap_t map)
{
	struct mcpcia_config *ccp = t->_cookie;

	/*
	 * Invalidate any SGMAP page table entries used by this mapping.
	 */
	pci_sgmap_pte64_unload(t, map, t->_sgmap);
	MCPCIA_SGTLB_INVALIDATE(ccp);

	/*
	 * Do the generic bits of the unload.
	 */
	_bus_dmamap_unload(t, map);
}
예제 #5
0
파일: ttwoga_dma.c 프로젝트: MarginC/kame
/*
 * Unload an T2 DMA map.
 */
void
ttwoga_bus_dmamap_unload_sgmap(bus_dma_tag_t t, bus_dmamap_t map)
{
	struct ttwoga_config *tcp = t->_cookie;

	/*
	 * Invalidate any SGMAP page table entries used by this
	 * mapping.
	 */
	pci_sgmap_pte64_unload(t, map, t->_sgmap);
	if (tcp->tc_use_tlb)
		TTWOGA_TLB_INVALIDATE(tcp);

	/*
	 * Do the generic bits of the unload.
	 */
	_bus_dmamap_unload(t, map);
}
예제 #6
0
/*
 * Unload an ISA DMA map.
 */
void
_isa_bus_dmamap_unload(bus_dma_tag_t t, bus_dmamap_t map)
{
	struct i386_isa_dma_cookie *cookie = map->_dm_cookie;

	/*
	 * If we have bounce pages, free them, unless they're
	 * reserved for our exclusive use.
	 */
	if ((cookie->id_flags & ID_HAS_BOUNCE) &&
	    (map->_dm_flags & BUS_DMA_ALLOCNOW) == 0)
		_isa_dma_free_bouncebuf(t, map);

	cookie->id_flags &= ~ID_IS_BOUNCING;

	/*
	 * Do the generic bits of the unload.
	 */
	_bus_dmamap_unload(t, map);
}
예제 #7
0
/*
 * Unload an Integrator DMA map.
 */
static void
integrator_bus_dmamap_unload(bus_dma_tag_t t, bus_dmamap_t map)
{
	struct integrator_dma_cookie *cookie = map->_dm_cookie;

	/*
	 * If we have bounce pages, free them, unless they're
	 * reserved for our exclusive use.
	 */
	if ((cookie->id_flags & ID_HAS_BOUNCE) &&
	    (map->_dm_flags & BUS_DMA_ALLOCNOW) == 0)
		integrator_dma_free_bouncebuf(t, map);

	cookie->id_flags &= ~ID_IS_BOUNCING;
	cookie->id_buftype = ID_BUFTYPE_INVALID;

	/*
	 * Do the generic bits of the unload.
	 */
	_bus_dmamap_unload(t, map);
}