From: Thomas Gleixner <tglx@linutronix.de>
To: David Jander <david.jander@protonic.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Why does handle_simple_irq() require IRQ's to be disabled?
Date: Mon, 6 Jun 2011 18:18:41 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1106061816280.13964@ionos> (raw)
In-Reply-To: <20110606172840.322f09d4@archvile>
On Mon, 6 Jun 2011, David Jander wrote:
>
> Hi,
>
> I am trying to implement/fix interrupt controller functionality in
> gpio/pca953x.c, and for some reason which I don't understand, I need to disable
> interrupts with local_irq_disable() before calling generic_handle_irq(). This
> does not seem right.
> If I follow the code of handle_simple_irq(), the handler function setup for
> this IRQ, I get to handle_irq_event_percpu(), which has a
> WARN_ONCE(!irqs_disabled(),...
> This WARN is triggered, since nobody explicitly disables interrupts. Why?
>
> generic_hanlde_irq() is called from a threaded interrupt handler of the parent
> of this interrupt controller, and calling local_irq_disable() here seems like
> a crime. What am I doing wrong?
handle_nested_irq() is your friend.
next prev parent reply other threads:[~2011-06-06 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 15:28 Why does handle_simple_irq() require IRQ's to be disabled? David Jander
2011-06-06 16:18 ` Thomas Gleixner [this message]
2011-06-07 7:05 ` David Jander
2011-06-07 8:26 ` Thomas Gleixner
2011-06-07 8:55 ` David Jander
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=alpine.LFD.2.02.1106061816280.13964@ionos \
--to=tglx@linutronix.de \
--cc=david.jander@protonic.nl \
--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.