linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH] genirq: Fix handling of nested shared IRQs
Date: Mon, 6 Mar 2017 19:05:39 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703061845500.3771@nanos> (raw)
In-Reply-To: <1488816484-6029-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>

On Mon, 6 Mar 2017, Charles Keepax wrote:

> When an IRQ is nested the nested handler is called directly from within the
> threaded handler of the parent IRQ, however, the code in handle_nested_irq
> only calls a single handler. This means when a shared IRQ is nested only
> the first of the shared IRQ handlers will be run. This patch adds a loop
> to move through and process all the handlers associated with the IRQ in
> handle_nested_irq.

That was never meant to deal with nested shaed interrupts, so the $subject
is misleading. This is not a fix, it's a functional extension.

Aside of that, please structure the changelog in paragraphs instead of one
big lump.

 1) Context
 2) Problem
 3) Solution

See also Documentation/process/submitting-patches.rst and please search
there for "This patch" .....

> @@ -348,9 +348,12 @@ void handle_nested_irq(unsigned int irq)
>  	irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
>  	raw_spin_unlock_irq(&desc->lock);
>  
> -	action_ret = action->thread_fn(action->irq, action->dev_id);
> -	if (!noirqdebug)
> -		note_interrupt(desc, action_ret);
> +	do {

  	for_each_action_of_desc() please

> +		action_ret = action->thread_fn(action->irq, action->dev_id);
> +		if (!noirqdebug)
> +			note_interrupt(desc, action_ret);

That's wrong. See __handle_irq_event_percpu() for the correct handling of
shared interrupts vs. note_interrupt() 

Thanks,

	tglx

  reply	other threads:[~2017-03-06 18:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 16:08 [PATCH] genirq: Fix handling of nested shared IRQs Charles Keepax
2017-03-06 18:05 ` Thomas Gleixner [this message]
2017-03-07  9:15   ` Charles Keepax

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.DEB.2.20.1703061845500.3771@nanos \
    --to=tglx@linutronix.de \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).