All of lore.kernel.org
 help / color / mirror / Atom feed
From: dushistov@mail.ru (Evgeniy Dushistov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] fix for certain sequnce of request_irq can cause irq storm
Date: Sat, 26 Jul 2014 22:48:53 +0400	[thread overview]
Message-ID: <20140726184853.GA6730@fifteen> (raw)
In-Reply-To: <20140726174506.GB29849@lunn.ch>

On Sat, Jul 26, 2014 at 07:45:06PM +0200, Andrew Lunn wrote:
> 
> Did you look at the way gpio-mvebu.c handles this? It is a little bit
> different from your solution. I'm wondering if gpio-mvebu.c is just
> different, or wrong? It does seem to be using one mask_cache for both
> edge and level trigger.
> 

Looks wrong to me. I don't look at irq handling, just unmask.
Consider the same scenario.
1)unmask interrupt A for "edge type" trigger
call mvebu_gpio_edge_irq_unmask and now CPU trigger interrupt A
if edge changed

2)unmask interupt B for "level type" trigger
call mvebu_gpio_level_irq_unmask,
gc->mask_cache have interrupt A,
so we unmask A and B for "level type" trigger.

So  expected result:
A edge type interrupt
B level type iterrupt

Actual result:
A edge type interrupt
A and B level type interrupt.

This may cause many funny things,
for example drivers may works or not works depending
on loading order.

-- 
/Evgeniy

  reply	other threads:[~2014-07-26 18:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26 15:56 [PATCH] fix for certain sequnce of request_irq can cause irq storm Evgeniy Dushistov
2014-07-26 16:56 ` Andrew Lunn
2014-07-26 17:12   ` Evgeniy Dushistov
2014-10-21 14:15     ` Thomas Petazzoni
2014-10-21 15:20       ` Evgeniy Dushistov
2014-10-21 15:37         ` Thomas Petazzoni
2014-10-21 18:54           ` Evgeniy Dushistov
2014-07-26 17:45 ` Andrew Lunn
2014-07-26 18:48   ` Evgeniy Dushistov [this message]
2014-10-15  0:08 ` Evgeniy Dushistov
2014-10-15 15:51 ` 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=20140726184853.GA6730@fifteen \
    --to=dushistov@mail.ru \
    --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.