All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Doug Anderson <dianders@chromium.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"Kukjin Kim" <kgene.kim@samsung.com>,
	"Olof Johansson" <olof@lixom.net>,
	"Simon Glass" <sjg@chromium.org>,
	"Luigi Semenzato" <semenzato@chromium.org>,
	"Ilho Lee" <ilho215.lee@samsung.com>, 김은기 <eunki_kim@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH 3/3] pinctrl: exynos: ack level-triggered interrupts before unmasking
Date: Thu, 13 Jun 2013 18:40:24 +0200	[thread overview]
Message-ID: <21437214.t3ykTcfRY8@flatron> (raw)
In-Reply-To: <CAD=FV=XzAGoVDic5L8Zub6MMBf_sb6-4aOuq5orT5ska84XiOA@mail.gmail.com>

On Thursday 13 of June 2013 09:34:43 Doug Anderson wrote:
> Tomasz,
> 
> On Thu, Jun 13, 2013 at 3:54 AM, Tomasz Figa <tomasz.figa@gmail.com> 
wrote:
> > Hi Doug,
> > 
> > On Wednesday 12 of June 2013 10:33:19 Doug Anderson wrote:
> >> A level-triggered interrupt should be acked after the interrupt line
> >> becomes inactive and before it is unmasked, or else another interrupt
> >> will be immediately triggered.  Acking before or after calling the
> >> handler is not enough.
> > 
> > Nice catch.
> > 
> > I guess that pinctrl-s3c64xx will need similar fix as well, won't it?
> 
> It needs this whole series of 3, probably.  The mask and unmask need
> the lock and as well as the acking for level interrupts.
> 
> I don't have any way to test that code but it's a pretty simple change
> to make.  Do you want to do it or do you have an idea of someone who
> should?

I'll take care of s3c64xx, probably as a part of my patches finally adding 
DT support for it, as without them the pinctrl-s3c64xx driver is just 
sitting there unused.

> > I think you can eliminate most of the code by doing this following 
way:
> >         if (irqd_get_trigger_type(irqd) & IRQ_TYPE_LEVEL_MASK)
> >         
> >                 exynos_gpio_irq_ack(irqd);
> 
> Duh, right.  OK, v2 coming shortly.

Good!

> Thank you for pointing out the
> right way to do this!  :)

You're welcome.

Best regards,
Tomasz

  reply	other threads:[~2013-06-13 16:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 17:33 [PATCH 1/3] pinctrl: exynos: Add spinlocks to irq_mask and irq_unmask Doug Anderson
2013-06-12 17:33 ` [PATCH 2/3] pinctrl: exynos: reorder xyz_irq_unmask() so future patch can ack Doug Anderson
2013-06-13 11:14   ` Tomasz Figa
2013-06-13 12:01   ` Kukjin Kim
2013-06-13 12:32   ` Linus Walleij
2013-06-13 16:43     ` Doug Anderson
2013-06-12 17:33 ` [PATCH 3/3] pinctrl: exynos: ack level-triggered interrupts before unmasking Doug Anderson
2013-06-13 10:54   ` Tomasz Figa
2013-06-13 16:34     ` Doug Anderson
2013-06-13 16:40       ` Tomasz Figa [this message]
2013-06-13 12:04   ` Kukjin Kim
2013-06-13 16:38     ` Doug Anderson
2013-06-13 16:42       ` Tomasz Figa
2013-06-13 16:50         ` Doug Anderson
2013-06-13 23:13           ` Kukjin Kim
2013-06-14  0:00             ` Doug Anderson
2013-06-14  0:18               ` Kukjin Kim
2013-06-13 12:34   ` Linus Walleij
2013-06-13 11:03 ` [PATCH 1/3] pinctrl: exynos: Add spinlocks to irq_mask and irq_unmask Tomasz Figa
2013-06-13 12:00 ` Kukjin Kim
2013-06-13 12:29 ` Linus Walleij
2013-06-13 16:38 ` [PATCH v2 3/3] pinctrl: exynos: ack level-triggered interrupts before unmasking Doug Anderson
2013-06-13 16:44   ` Tomasz Figa
2013-06-13 18:20   ` Linus Walleij
2013-06-17 16:56     ` Linus Walleij

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=21437214.t3ykTcfRY8@flatron \
    --to=tomasz.figa@gmail.com \
    --cc=dianders@chromium.org \
    --cc=eunki_kim@samsung.com \
    --cc=ilho215.lee@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=semenzato@chromium.org \
    --cc=sjg@chromium.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.