[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <76fcbf8fb4f74d39b68e7cdb52636db1@hisilicon.com>
Date: Fri, 12 Feb 2021 10:25:42 +0000
From: "Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>
To: Arnd Bergmann <arnd@...nel.org>
CC: Grygorii Strashko <grygorii.strashko@...com>,
luojiaxing <luojiaxing@...wei.com>,
Linus Walleij <linus.walleij@...aro.org>,
"Andy Shevchenko" <andy.shevchenko@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Kevin Hilman <khilman@...nel.org>,
"open list:GPIO SUBSYSTEM <linux-gpio@...r.kernel.org>,
linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxarm@...neuler.org" <linuxarm@...neuler.org>
Subject: RE: [Linuxarm] Re: [PATCH for next v1 1/2] gpio: omap: Replace
raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler()
> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@...nel.org]
> Sent: Friday, February 12, 2021 10:45 PM
> To: Song Bao Hua (Barry Song) <song.bao.hua@...ilicon.com>
> Cc: Grygorii Strashko <grygorii.strashko@...com>; luojiaxing
> <luojiaxing@...wei.com>; Linus Walleij <linus.walleij@...aro.org>; Andy
> Shevchenko <andy.shevchenko@...il.com>; Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com>; Santosh Shilimkar <ssantosh@...nel.org>;
> Kevin Hilman <khilman@...nel.org>; open list:GPIO SUBSYSTEM
> <linux-gpio@...r.kernel.org>, linux-kernel@...r.kernel.org
> <linux-kernel@...r.kernel.org>; linuxarm@...neuler.org
> Subject: Re: [Linuxarm] Re: [PATCH for next v1 1/2] gpio: omap: Replace
> raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler()
>
> On Fri, Feb 12, 2021 at 6:05 AM Song Bao Hua (Barry Song)
> <song.bao.hua@...ilicon.com> wrote:
> > > -----Original Message-----
>
> > >
> > > Note. there is also generic_handle_irq() call inside.
> >
> > So generic_handle_irq() is not safe to run in thread thus requires
> > an interrupt-disabled environment to run? If so, I'd rather this
> > irqsave moved into generic_handle_irq() rather than asking everyone
> > calling it to do irqsave.
>
> In a preempt-rt kernel, interrupts are run in task context, so they clearly
> should not be called with interrupts disabled, that would defeat the
> purpose of making them preemptible.
Yes. Sounds sensible. Irqsave in generic_handle_irq() will defeat
the purpose of RT.
>
> generic_handle_irq() does need to run with in_irq()==true though,
> but this should be set by the caller of the gpiochip's handler, and
> it is not set by raw_spin_lock_irqsave().
>
So sounds like this issue of in_irq()=true is still irrelevant with
this patch.
I guess this should have been set by the caller of the gpiochip's
handler somewhere, otherwise, gpiochip's irq handler won't be able
to be threaded. Has it been set somewhere?
> Arnd
Thanks
Barry
Powered by blists - more mailing lists