[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <B56CDBE15CE27145A4B77D2D24263E851FD6C6@039-SN1MPN1-004.039d.mgd.msft.net>
Date: Tue, 6 Aug 2013 05:15:54 +0000
From: Lu Jingchang-B35083 <B35083@...escale.com>
To: Vinod Koul <vinod.koul@...el.com>
CC: "djbw@...com" <djbw@...com>,
"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Wang Huan-B18965 <B18965@...escale.com>,
Li Xiaochun-B41219 <B41219@...escale.com>
Subject: RE: [PATCH v2 3/3] dma: Add Freescale eDMA engine driver support
> -----Original Message-----
> From: Vinod Koul [mailto:vinod.koul@...el.com]
> Sent: Tuesday, August 06, 2013 12:25 PM
> To: Lu Jingchang-B35083
> Cc: djbw@...com; shawn.guo@...aro.org; linux-kernel@...r.kernel.org;
> linux-arm-kernel@...ts.infradead.org; Wang Huan-B18965; Li Xiaochun-
> B41219
> Subject: Re: [PATCH v2 3/3] dma: Add Freescale eDMA engine driver support
>
> On Tue, Aug 06, 2013 at 01:24:31AM +0000, Lu Jingchang-B35083 wrote:
> > > -----Original Message-----
> > > From: Vinod Koul [mailto:vinod.koul@...el.com]
> > > Sent: Tuesday, August 06, 2013 12:35 AM
> > > To: Lu Jingchang-B35083
> > > Cc: djbw@...com; shawn.guo@...aro.org; linux-kernel@...r.kernel.org;
> > > linux-arm-kernel@...ts.infradead.org; Wang Huan-B18965; Li Xiaochun-
> > > B41219
> > > Subject: Re: [PATCH v2 3/3] dma: Add Freescale eDMA engine driver
> > > support
> > > > +
> > > > +static void fsl_edma_free_desc(struct virt_dma_desc *vdesc) {
> > > > + struct fsl_edma_desc *fsl_desc;
> > > > + int i;
> > > > +
> > > > + fsl_desc = to_fsl_edma_desc(vdesc);
> > > > + for (i = 0; i < fsl_desc->n_tcds; i++)
> > > > + dma_pool_free(fsl_desc->echan->tcd_pool,
> > > > + fsl_desc->tcd[i].vtcd,
> > > > + fsl_desc->tcd[i].ptcd);
> > > > + kfree(fsl_desc);
> > > should this be called with lock held or not?
> > [Lu Jingchang-B35083]
> > The desc list to be freed is got with lock held, and the free for each
> desc is independent, and the lock is not needed. Thanks.
> Would be apt to add this comment in the code, so that people know this
> function needs to be always called with lock held!
[Lu Jingchang-B35083]
Sorry, this function is called without lock held, I mean that the free() doesn't need the lock held,
just as other drivers do.
It is called from vchan_free_chan_resources().
Thanks!
Best Regards,
Jingchang
--
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