FreeBSD/sys/x86/x86/busdma_machdep.c
/*
 * Return true if a match is made.
 *
 * To find a match walk the chain of bus_dma_tag_t's looking for 'paddr'.
 *
 * If paddr is within the bounds of the dma tag then call the filter callback
 * to check for a match, if there is no filter callback then assume a match.
 */
Return true if a match is made.
To find a match walk the chain of bus_dma_tag_t's looking for 'paddr'.

If paddr is within the bounds of the dma tag then call the filter callback
to check for a match, if there is no filter callback then assume a match.
Return true if a match is made . To find a match walk the chain of bus_dma_tag_t ' s looking for ' paddr ' . If paddr is within the bounds of the dma tag then call the filter callback to check for a match if there is no filter callback then assume a match .
int
bus_dma_run_filter(struct bus_dma_tag_common *tc, bus_addr_t paddr)
{
	int retval;
	retval = 0;
	do {
		if (((paddr > tc->lowaddr && paddr <= tc->highaddr) ||
		    ((paddr & (tc->alignment - 1)) != 0)) &&
		    (tc->filter == NULL ||
		    (*tc->filter)(tc->filterarg, paddr) != 0))
			retval = 1;
		tc = tc->parent;		
	} while (retval == 0 && tc != NULL);
	return (retval);
}
int bus_dma_run_filter ( struct bus_dma_tag_common * tc , bus_addr_t paddr ) { int retval ; retval = 0 ; do { if ( ( ( paddr > tc -> lowaddr && paddr <= tc -> highaddr ) || ( ( paddr & ( tc -> alignment - 1 ) ) != 0 ) ) && ( tc -> filter == NULL || ( * tc -> filter ) ( tc -> filterarg , paddr ) != 0 ) ) retval = 1 ; tc = tc -> parent ; } while ( retval == 0 && tc != NULL ) ; return ( retval ) ; }
Return true if a match is made.
Return true if a match is made .