linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/6] dmaengine: rcar-dmac: Fix spinlock issues in interrupt
Date: Tue, 27 Jan 2015 19:08:35 +0000	[thread overview]
Message-ID: <3002938.RLnqgDO36D@avalon> (raw)
In-Reply-To: <1422379516-1633-3-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

Hi Sergei,

On Tuesday 27 January 2015 22:01:18 Sergei Shtylyov wrote:
> On 01/27/2015 09:55 PM, Laurent Pinchart wrote:
> >> On 01/27/2015 08:25 PM, Laurent Pinchart wrote:
> >> 
> >> [...]
> >> 
> >>> Furthermore, as the driver can be used on SMP systems, the IRQ handlers
> >>> must use spin_lock_irqsave() instead of spin_lock().
> >> 
> >> Hmm, care to explain why? It's the first time I'm hearing that...
> >> This looks especially strange in the context of the current genirq code
> >> calling IRQ handlers with interrupts always disabled.
> > 
> > I should have been more precise here.
> > 
> > The DMAC has several interrupt sources than can occur simultaneously.
> > While genirq should guarantee that an interrupt will not be preempted by
> > another interrupt (including itself) on the same CPU, does it offer that
> > guarantee across CPUs in an SMP system ?
> 
> No. But spin_lock_irqsave() wouldn't help with that -- it only disables
> interrupts on the local CPU...

You're of course right. I'm not sure what I was thinking. I'll send a v2 after 
waiting for review of the other patches.

> >>> Signed-off-by: Laurent Pinchart
> >>> <laurent.pinchart+renesas@ideasonboard.com>

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2015-01-27 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 17:25 [PATCH 2/6] dmaengine: rcar-dmac: Fix spinlock issues in interrupt Laurent Pinchart
2015-01-27 18:19 ` Sergei Shtylyov
2015-01-27 18:55 ` Laurent Pinchart
2015-01-27 19:01 ` Sergei Shtylyov
2015-01-27 19:08 ` Laurent Pinchart [this message]
2015-01-27 19:12 ` Sergei Shtylyov

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=3002938.RLnqgDO36D@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).