All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Jander <david.jander@protonic.nl>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Subject: Why does handle_simple_irq() require IRQ's to be disabled?
Date: Mon, 6 Jun 2011 17:28:40 +0200	[thread overview]
Message-ID: <20110606172840.322f09d4@archvile> (raw)


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?

Best regards,

-- 
David Jander
Protonic Holland.

             reply	other threads:[~2011-06-06 15:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 15:28 David Jander [this message]
2011-06-06 16:18 ` Why does handle_simple_irq() require IRQ's to be disabled? Thomas Gleixner
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=20110606172840.322f09d4@archvile \
    --to=david.jander@protonic.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.