FreeBSD/sys/x86/x86/busdma_machdep.c
/*
 * Allocate a device specific dma_tag.
 */
Allocate a device specific dma_tag.
Allocate a device specific dma_tag .
int
bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
    bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr,
    bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize,
    int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
    void *lockfuncarg, bus_dma_tag_t *dmat)
{
	struct bus_dma_tag_common *tc;
	int error;
	if (parent == NULL) {
		error = bus_dma_bounce_impl.tag_create(parent, alignment,
		    boundary, lowaddr, highaddr, filter, filterarg, maxsize,
		    nsegments, maxsegsz, flags, lockfunc, lockfuncarg, dmat);
	} else {
		tc = (struct bus_dma_tag_common *)parent;
		error = tc->impl->tag_create(parent, alignment,
		    boundary, lowaddr, highaddr, filter, filterarg, maxsize,
		    nsegments, maxsegsz, flags, lockfunc, lockfuncarg, dmat);
	}
	return (error);
}
int bus_dma_tag_create ( bus_dma_tag_t parent , bus_size_t alignment , bus_addr_t boundary , bus_addr_t lowaddr , bus_addr_t highaddr , bus_dma_filter_t * filter , void * filterarg , bus_size_t maxsize , int nsegments , bus_size_t maxsegsz , int flags , bus_dma_lock_t * lockfunc , void * lockfuncarg , bus_dma_tag_t * dmat ) { struct bus_dma_tag_common * tc ; int error ; if ( parent == NULL ) { error = bus_dma_bounce_impl . tag_create ( parent , alignment , boundary , lowaddr , highaddr , filter , filterarg , maxsize , nsegments , maxsegsz , flags , lockfunc , lockfuncarg , dmat ) ; } else { tc = ( struct bus_dma_tag_common * ) parent ; error = tc -> impl -> tag_create ( parent , alignment , boundary , lowaddr , highaddr , filter , filterarg , maxsize , nsegments , maxsegsz , flags , lockfunc , lockfuncarg , dmat ) ; } return ( error ) ; }
Allocate a device specific dma_tag.
Allocate a device specific dma_tag .