linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, linuxppc-dev@lists.ozlabs.org
Cc: "Greg Kurz" <groug@kaod.org>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Paul Mackerras" <paulus@samba.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Alistair Popple" <alistair@popple.id.au>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [RFC PATCH kernel] powerpc/xive: Drop deregistered irqs
Date: Fri, 12 Jul 2019 18:29:43 +1000	[thread overview]
Message-ID: <abbee9db2fa0abdaa2e01bb92bab920773a2ad8d.camel@kernel.crashing.org> (raw)
In-Reply-To: <20190712082036.40440-1-aik@ozlabs.ru>

On Fri, 2019-07-12 at 18:20 +1000, Alexey Kardashevskiy wrote:
> 
> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
> index 082c7e1c20f0..65742e280337 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
> @@ -148,8 +148,12 @@ static u32 xive_scan_interrupts(struct xive_cpu *xc, bool just_peek)
>  		irq = xive_read_eq(&xc->queue[prio], just_peek);
>  
>  		/* Found something ? That's it */
> -		if (irq)
> -			break;
> +		if (irq) {
> +			/* Another CPU may have shut this irq down, check it */
> +			if (irq_to_desc(irq))

What if it gets deregistered here .... ?

> +				break;
> +			irq = 0;
> +		}
>  
>  		/* Clear pending bits */
>  		xc->pending_prio &= ~(1 << prio);

Wouldn't it be better to check the return value from generic_handle_irq
instead ?

Cheers,
Ben.



  reply	other threads:[~2019-07-12  8:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12  8:20 [RFC PATCH kernel] powerpc/xive: Drop deregistered irqs Alexey Kardashevskiy
2019-07-12  8:29 ` Benjamin Herrenschmidt [this message]
2019-07-12  9:37   ` Alexey Kardashevskiy
2019-07-12 23:47     ` Benjamin Herrenschmidt
2019-07-13  8:53       ` Alexey Kardashevskiy
2019-07-14  1:31         ` Benjamin Herrenschmidt
2019-07-14 19:44           ` Cédric Le Goater
2019-07-14 22:48             ` Benjamin Herrenschmidt
2019-07-14 19:14 ` Daniel Henrique Barboza
2019-07-15  2:27   ` Alexey Kardashevskiy

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=abbee9db2fa0abdaa2e01bb92bab920773a2ad8d.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=aik@ozlabs.ru \
    --cc=alistair@popple.id.au \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.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 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).