Re: [PATCH 3/4] dmaengine: Add Freescale i.MX SDMA support
From: Dan Williams
Date: Thu Oct 07 2010 - 20:15:08 EST
On Thu, Sep 30, 2010 at 6:56 AM, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:
> This patch adds support for the Freescale i.MX SDMA engine.
>
Applied, this set, however...
> +static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
> + struct dma_chan *chan, struct scatterlist *sgl,
> + unsigned int sg_len, enum dma_data_direction direction,
> + unsigned long flags)
> +{
> + struct sdma_channel *sdmac = to_sdma_chan(chan);
> + struct sdma_engine *sdma = sdmac->sdma;
> + int ret, i, count;
> + int channel = chan->chan_id;
> + struct scatterlist *sg;
> +
> + if (sdmac->status == DMA_IN_PROGRESS)
> + return NULL;
> + sdmac->status = DMA_IN_PROGRESS;
...shouldn't this be an atomic test and set operation to ensure a
single user at a time?
--
Dan
--
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/