[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220511085741.GA6558@wunner.de>
Date: Wed, 11 May 2022 10:57:41 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Mark Rutland <mark.rutland@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>, maz@...nel.org,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
linux-gpio@...r.kernel.org,
Octavian Purdila <octavian.purdila@....com>,
linux-kernel@...r.kernel.org, aou@...s.berkeley.edu,
catalin.marinas@....com, deanbo422@...il.com, green.hu@...il.com,
guoren@...nel.org, jonas@...thpole.se, kernelfans@...il.com,
linux-arm-kernel@...ts.infradead.org, linux@...linux.org.uk,
nickhu@...estech.com, palmer@...belt.com, paul.walmsley@...ive.com,
shorne@...il.com, stefan.kristiansson@...nalahti.fi,
tsbogend@...ha.franken.de, vgupta@...nel.org,
vladimir.murzin@....com, will@...nel.org,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v2 17/17] irq: remove handle_domain_{irq,nmi}()
On Wed, May 11, 2022 at 09:23:56AM +0100, Mark Rutland wrote:
> On Wed, May 11, 2022 at 12:52:29AM +0200, Thomas Gleixner wrote:
> > + /* USB interrupts are received in softirq (tasklet) context.
> > + * Switch to hardirq context to make genirq code happy.
> > + */
> > + local_irq_save(flags);
> > + __irq_enter_raw();
> > +
> > if (intdata & INT_ENP_PHY_INT_)
> > - ;
> > + generic_handle_domain_irq(pdata->irqdomain, PHY_HWIRQ);
>
> Agreed. IIUC everyone agrees the __irq_enter_raw() usage is a hack,
> but what's not clear is what we *should* do
>
> I suspect that given we have generic_handle_irq_safe() for situations
> like this we should add a generic_handle_domain_irq_safe(), and use
> that in this driver?
> That way we can keep the `WARN_ON_ONCE(!in_hardirq())` in
> generic_handle_domain_irq().
Thomas applied 792ea6a074ae ("genirq: Remove WARN_ON_ONCE() in
generic_handle_domain_irq()") tonight:
http://git.kernel.org/tip/tip/c/792ea6a074ae
That allows me to drop the controversial __irq_enter_raw()
and thus unblock my smsc95xx series.
generic_handle_domain_irq_safe() would merely be a wrapper for
generic_handle_domain_irq() which disables local interrupts.
Then I wouldn't have to do that in smsc95xx.c. IMHO that's a
cosmetic improvement, though I'll be happy to provide a patch
if desired?
Thanks,
Lukas
Powered by blists - more mailing lists