From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] dma: mv_xor: take channel spinlock in mv_xor_status()
Date: Fri, 7 Mar 2014 12:51:09 -0300 [thread overview]
Message-ID: <20140307155109.GA12784@arch.cereza> (raw)
In-Reply-To: <CAPcyv4hRP3o0=LTByvp8mg3x2iBo5fQ_pwmTzXnjHs4hxPXvkA@mail.gmail.com>
Hello Dan,
Thomas is a bit busy right now, so I'm picking this where he left it.
On Dec 31, Dan Williams wrote:
> On Fri, Dec 27, 2013 at 3:38 AM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
[..]
> > @@ -701,14 +701,20 @@ static enum dma_status mv_xor_status(struct dma_chan *chan,
> > struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
> > enum dma_status ret;
> >
> > + spin_lock_bh(&mv_chan->lock);
> > +
> > ret = dma_cookie_status(chan, cookie, txstate);
> > if (ret == DMA_COMPLETE) {
> > mv_xor_clean_completed_slots(mv_chan);
>
> I think you can just delete this call to
> mv_xor_clean_completed_slots(). The fact that the descriptors are
> complete means that __mv_xor_slot_cleanup ran, and if that is the case
> there should be nothing to cleanup.
>
In that case, we don't need to take the lock anywhere in this function:
1. It's not needed for dma_cookie_status() (as per Andy's comment).
2. It's not needed for mv_xor_slot_cleanup(), which takes the lock.
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-03-07 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 11:38 [PATCH 0/3] dma: mv_xor: spinlock related improvements Thomas Petazzoni
2013-12-27 11:38 ` [PATCH 1/3] dma: mv_xor: take channel spinlock in mv_xor_status() Thomas Petazzoni
2013-12-30 9:55 ` Shevchenko, Andriy
2013-12-31 22:48 ` Dan Williams
2014-03-07 15:51 ` Ezequiel Garcia [this message]
2013-12-27 11:38 ` [PATCH 2/3] dma: mv_xor: use __mv_xor_slot_cleanup() in mv_xor_free_chan_resources() Thomas Petazzoni
2013-12-27 11:38 ` [PATCH 3/3] dma: mv_xor: rename __mv_xor_slot_cleanup() to mv_xor_slot_cleanup() Thomas Petazzoni
2013-12-27 15:54 ` [PATCH 0/3] dma: mv_xor: spinlock related improvements Ezequiel Garcia
2013-12-27 17:48 ` Jason Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140307155109.GA12784@arch.cereza \
--to=ezequiel.garcia@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.