mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Mason <slash.tmp@free.fr>, Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Sebastian Frias <sf84@laposte.net>
Subject: Re: Disabling an interrupt in the handler locks the system up
Date: Fri, 21 Oct 2016 18:46:42 +0100	[thread overview]
Message-ID: <a79e2d2c-8ec8-744f-50fb-8c39216aa23e@arm.com> (raw)
In-Reply-To: <580A4460.2090306@free.fr>

On 21/10/16 17:37, Mason wrote:
> Hello,
> 
> On my platform, one HW block pulls the interrupt line high
> as long as it remains idle, and low when it is busy.
> 
> The device tree node is:
> 
> 		test@22222 {
> 			compatible = "vendor,testme";
> 			interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
> 		};

I assume that this is for the sake of the discussion, and that you do
not actually intend to put together such a monstrosity.

> 
> I wrote a minimal driver which registers the irq.
> And in the interrupt handler, I disable said irq.
> 
> Since the irq is IRQ_TYPE_LEVEL_HIGH, it will fire as soon as
> it is registered (because the block is idle).
> 
> Here is the code I've been running, request_irq doesn't return.

[...]

> And here's what I get when I try to load the module:
> (I'm using the default CONFIG_RCU_CPU_STALL_TIMEOUT=21)

[...]

> Are we not supposed to disable the irq in the handler?

You can. It then depends on what your interrupt controller does to
actually ensure that the interrupt is disabled. Only you can trace it on
your HW to find out.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2016-10-21 17:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 16:37 Mason
2016-10-21 17:46 ` Marc Zyngier [this message]
2016-10-21 18:39   ` Mason
2016-10-21 19:14     ` Marc Zyngier
2016-10-21 19:47       ` Mason
2016-10-21 19:49         ` Thomas Gleixner
2016-10-21 20:27           ` Mason
2016-10-22 11:37             ` Marc Zyngier
2016-10-22 23:10               ` Mason
2016-10-24  8:17                 ` Marc Zyngier
2016-10-24 16:12                 ` Mason
2016-10-24 16:55                   ` Thomas Gleixner
2016-10-25  8:29                     ` Sebastian Frias
2016-10-25  8:36                       ` Mason
2016-10-25 10:45                         ` Marc Zyngier
2016-10-25 13:56                           ` Mason
2016-10-25 13:56                             ` Thomas Gleixner
2016-10-25  9:20                       ` Thomas Gleixner

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=a79e2d2c-8ec8-744f-50fb-8c39216aa23e@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sf84@laposte.net \
    --cc=slash.tmp@free.fr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®