All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
To: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>,
	Grant Likely <grant.likely@secretlab.ca>
Cc: open list <linux-kernel@vger.kernel.org>,
	alexander.stein@systec-electronic.com, qi.wang@intel.com,
	yong.y.wang@intel.com, joel.clark@intel.com,
	kok.howg.ewe@intel.com, toshiharu-linux@dsn.okisemi.com
Subject: Re: gpio-pch: BUG - driver does not honour IRQF_ONESHOT
Date: Wed, 25 Apr 2012 16:09:28 -0400	[thread overview]
Message-ID: <CA46BB56-61AD-45E9-8D03-906B71C21C71@gmail.com> (raw)
In-Reply-To: <3D60A4A2-3538-4B24-B65B-219D6ED7B219@gmail.com>

Isn't anyone concerned with this? I am replying to myself to provoke a response.

Configuring a gpio pin with the gpio-pch driver with
"IRQF_TRIGGER_LOW | IRQF_ONESHOT" generates an interrupt
storm for threaded ISR until the ISR thread actually gets to physically clear
the interrupt on the triggering chip!! The immediate observable symptom
is the high CPU usage for my ISR thread task and the interrupt count in
/proc/interrupts incrementing radically.

See below for more details.

On Dec 8, 2011, at 14:37, Jean-Francois Dagenais wrote:

> Hello all,
> 
> I am using the interrupt function of gpio-pch.c. I have an adp5588 who's interrupt line goes into one of the
> GPIO lines of a EG20T.
> 
> I have a patch (not yet submitted to lkml) which lets the platform control the IRQ flags for the chip. I had to
> do this to allow the IRQ line to be shared. I used IRQF_SHARED | IRQF_ONESHOT | IRQF_TRIGGER_LOW.
> 
> Unfortunately, since all of the handling of the adp5588 is done in a thread function, the interrupt stays low
> between the moment the hard handler is run and the 5588 function is run. Since pch_gpio_handler clears
> the interrupt status right away, I get an interrupt storm for the pch_gpio_handler function.
> 
> the line that does "iowrite32(BIT(i), &chip->reg->iclr);" right before calling generic_handle_irq should be
> executed only after the corresponding nested ISR has run it's thread function.
> 
> I am open to patching this and submitting, but I would like some pointers before I dive in.
> 
> Thanks for the help!
> (and thanks Tomoya for the interrupt support ;)
> 
> On Jul 20, 2011, at 20:19, Tomoya MORINAGA wrote:
> 
>> 
>> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
>> ---
>> drivers/gpio/Kconfig    |    1 +
>> drivers/gpio/gpio-pch.c |  187 +++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 188 insertions(+), 0 deletions(-)
>> ...


  reply	other threads:[~2012-04-25 20:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21  0:19 [PATCH 1/6 v2] gpio-pch: Delete invalid "restore" code in suspend() Tomoya MORINAGA
2011-07-21  0:19 ` [PATCH 2/6 v2] gpio-pch: add spinlock in suspend/resume processing Tomoya MORINAGA
2011-07-21  0:19 ` [PATCH 3/6 v2] gpio-pch: support ML7223 IOH n-Bus Tomoya MORINAGA
2011-07-21  0:19 ` [PATCH 4/6 v2] gpio-pch: modify gpio_nums and mask Tomoya MORINAGA
2011-07-21  0:19 ` [PATCH 5/6 v2] gpio-pch: Save register value in suspend() Tomoya MORINAGA
2011-07-21  0:19 ` [PATCH 6/6 v6] gpio-pch: Support interrupt function Tomoya MORINAGA
2011-12-08 19:37   ` gpio-pch: does not honour IRQF_ONESHOT? Jean-Francois Dagenais
2012-04-25 20:09     ` Jean-Francois Dagenais [this message]
2012-04-25 23:03       ` gpio-pch: BUG - driver does not honour IRQF_ONESHOTn Thomas Gleixner
2012-04-27 20:14         ` Jean-Francois Dagenais
2012-04-28  8:13           ` [PATCH] gpio: pch9: Use proper flow type handlers Thomas Gleixner
2012-05-12  0:20             ` Grant Likely
2011-10-05 18:00 ` [PATCH 1/6 v2] gpio-pch: Delete invalid "restore" code in suspend() Grant Likely

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=CA46BB56-61AD-45E9-8D03-906B71C21C71@gmail.com \
    --to=jeff.dagenais@gmail.com \
    --cc=alexander.stein@systec-electronic.com \
    --cc=grant.likely@secretlab.ca \
    --cc=joel.clark@intel.com \
    --cc=kok.howg.ewe@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qi.wang@intel.com \
    --cc=tomoya-linux@dsn.okisemi.com \
    --cc=toshiharu-linux@dsn.okisemi.com \
    --cc=yong.y.wang@intel.com \
    /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.