understanding DMA cache maint

From: Neshama Parhoti
Date: Sun Feb 14 2010 - 10:32:35 EST


in the following function,
what's the different between the inner_op (dmac_*) and outer_op (outer_*) ?
why do we need two functions to do the cache operation ?
isn't this an action on the cache hardware itself ? are there 2
hardwares involved ?

void dma_cache_maint(const void *start, size_t size, int direction)
{
...
switch (direction) {
case DMA_FROM_DEVICE: /* invalidate only */
inner_op = dmac_inv_range;
outer_op = outer_inv_range;
break;
case DMA_TO_DEVICE: /* writeback only */
inner_op = dmac_clean_range;
outer_op = outer_clean_range;
break;
case DMA_BIDIRECTIONAL: /* writeback and invalidate */
inner_op = dmac_flush_range;
outer_op = outer_flush_range;


thank you!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/