[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTi=YY_bZ0mFy6dA18-mifM52H7wNJVHqgvfxR6zc@mail.gmail.com>
Date: Thu, 7 Oct 2010 17:14:59 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Sascha Hauer <s.hauer@...gutronix.de>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 3/4] dmaengine: Add Freescale i.MX SDMA support
On Thu, Sep 30, 2010 at 6:56 AM, Sascha Hauer <s.hauer@...gutronix.de> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists