Re: Why move all map_sg/unmap_sg for slave channel to its client?

From: Linus Walleij
Date: Thu Jun 09 2011 - 05:38:15 EST


On Thu, Jun 9, 2011 at 8:54 AM, viresh kumar <viresh.kumar@xxxxxx> wrote:

> I thought map_sg/unmap_sg for slave channels will be handled according
> to the flags passed in prep_slave_sg(). But then i found following patch:
> (...)
> I don't have much knowledge about that discussion, but i think this should be left
> configurable.
> If the client wants to control map/unmap then it can simply pass
> DMA_COMPL_SKIP_DEST_UNMAP | DMA_COMPL_SKIP_SRC_UNMAP in flags. I didn't wanted to
> skip this in my driver and so i don't pass them.

What if the same driver is used on many different platforms like say
drivers/tty/serial/amba-pl011.c, and some of the platforms using it
has DMA engines that does not implement mapping/unmapping of
the passed sglist?

In that case I think you have to modify all drivers in drivers/dma/*
to do this mapping, and then you could just make it a required behaviour
and skip the flags altogether.

But apparently that approach was blocked at one point so let's see
what the others say.

Yours,
Linus Walleij
--
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/