/*
 * Load a MCPCIA SGMAP-mapped DMA map with a linear buffer.
 */
int
mcpcia_bus_dmamap_load_sgmap(bus_dma_tag_t t, bus_dmamap_t map, void *buf, bus_size_t buflen, struct proc *p, int flags)
{
	int error;
	struct mcpcia_config *ccp = t->_cookie;

	error = pci_sgmap_pte64_load(t, map, buf, buflen, p, flags,
	    t->_sgmap);
	if (error == 0)
		MCPCIA_SGTLB_INVALIDATE(ccp);
	return (error);
}
Exemplo n.º 2
0
/*
 * Load a TSP SGMAP-mapped DMA map with a linear buffer.
 */
int
tsp_bus_dmamap_load_sgmap(bus_dma_tag_t t, bus_dmamap_t map, void *buf, bus_size_t buflen, struct proc *p, int flags)
{
	int error;

	error = pci_sgmap_pte64_load(t, map, buf, buflen, p, flags,
	    t->_sgmap);
	if (error == 0)
		tsp_tlb_invalidate(t->_cookie);

	return (error);
}
Exemplo n.º 3
0
/*
 * Load a T2 SGMAP-mapped DMA map with a liner buffer.
 */
int
ttwoga_bus_dmamap_load_sgmap(bus_dma_tag_t t, bus_dmamap_t map, void *buf,
    bus_size_t buflen, struct proc *p, int flags)
{
	struct ttwoga_config *tcp = t->_cookie;
	int error;

	error = pci_sgmap_pte64_load(t, map, buf, buflen, p, flags,
	    t->_sgmap);
	if (error == 0 && tcp->tc_use_tlb)
		TTWOGA_TLB_INVALIDATE(tcp);

	return (error);
}