All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brown <davidb@codeaurora.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	Linus Walleij <linus.walleij@stericsson.com>,
	linux-kernel@vger.kernel.org, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] gpio/msm-v1: re-read IRQ flags on each iteration
Date: Wed, 16 May 2012 11:38:35 -0700	[thread overview]
Message-ID: <20120516183835.GA8120@codeaurora.org> (raw)
In-Reply-To: <CACRpkdYWfmwAZS=KAFkUO1RSV5=YD-PnO3cHfs=P+eoQDZCsZA@mail.gmail.com>

On Wed, May 16, 2012 at 09:23:33AM +0200, Linus Walleij wrote:
> On Wed, May 16, 2012 at 3:09 AM, David Brown <davidb@codeaurora.org> wrote:
> > On Fri, May 11, 2012 at 11:41:12AM -0600, Grant Likely wrote:
> 
> >> I'll need an ack from an msm developer before applying this.
> >
> > I though I saw Jeff Ohlstein reply, but I'm not finding that message.
> 
> He was replying to a similar patch affecting the DMA controller
> interrupt-like construct.
> 
> > I believe this patch is actually incorrect.  The register needs to
> > only be read once, and the bits walked through.  If another interrupt
> > comes in during the loop, the interrupt will remain asserted, and we
> > will re-enter the irq handler.  I suppose it could be wrapped in yet
> > another loop, but I'm not sure it is worth it.
> 
> OK the code doesn't say really. (It did say something like that
> in the DMA controller). It's quite uncommon with these type of
> latched-clear registers (reading IRQ status clears the flags) type
> of hardware so maybe it should be commented.

I'll see if I can get confirmation on it.

> > I'm pretty sure the code works as it is, since it is the same as the
> > code in the Android kernel.
> 
> The problem with this bug is that it often works until you get a
> demanding case. On the VIC I guess it wasn't noticed until tested with
> a device that raised a storm of IRQs so the handler started missing
> them.

At one point, the target got a lot of use, so I'm going to guess the
current code is correct.  I'll see if I can dig up a definitive
answer, though.  Since I don't have one to even test on, I'm a little
reluctant to change the code, though.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

      reply	other threads:[~2012-05-16 18:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 12:07 [PATCH] gpio/msm-v1: re-read IRQ flags on each iteration Linus Walleij
2012-05-11 17:41 ` Grant Likely
2012-05-11 21:22   ` Linus Walleij
2012-05-16  1:09   ` David Brown
2012-05-16  7:23     ` Linus Walleij
2012-05-16 18:38       ` David Brown [this message]

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=20120516183835.GA8120@codeaurora.org \
    --to=davidb@codeaurora.org \
    --cc=grant.likely@secretlab.ca \
    --cc=julia.lawall@lip6.fr \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@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 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.