linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
To: Arnd Bergmann <arnd@kernel.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	luojiaxing <luojiaxing@huawei.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"Santosh Shilimkar" <ssantosh@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linuxarm@openeuler.org" <linuxarm@openeuler.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()
Date: Fri, 12 Feb 2021 20:49:03 +0000	[thread overview]
Message-ID: <a92d5e15724a4843887212d7e05c99f8@hisilicon.com> (raw)
In-Reply-To: <CAK8P3a0JEhhw4vB=YgUJj5_ywds=sVuzPd4Zf0iiRwX4Mgsk3g@mail.gmail.com>



> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@kernel.org]
> Sent: Saturday, February 13, 2021 9:23 AM
> To: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>; Andy Shevchenko
> <andy.shevchenko@gmail.com>; luojiaxing <luojiaxing@huawei.com>; Linus
> Walleij <linus.walleij@linaro.org>; Santosh Shilimkar <ssantosh@kernel.org>;
> Kevin Hilman <khilman@kernel.org>; open list:GPIO SUBSYSTEM
> <linux-gpio@vger.kernel.org>; linux-kernel@vger.kernel.org;
> linuxarm@openeuler.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 12:53 PM Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
> >
> > The worst RT case I can imagine is when gpio API is still called from hard
> IRQ context by some
> > other device driver - some toggling for example.
> > Note. RT or "threadirqs" does not mean gpiochip become sleepable.
> >
> > In this case:
> >   threaded handler
> >     raw_spin_lock
> >         IRQ from other device
> >            hard_irq handler
> >              gpiod_x()
> >                 raw_spin_lock_irqsave() -- oops
> >
> 
> Good point, I had missed the fact that drivers can call gpio functions from
> hardirq context when I replied earlier, gpio is clearly special here.


Yes. Gpio provides APIs, thus, other drivers can go directly into the
territory of gpio driver.

Another one which is even more special might be m68k, which I cc-ed you
yesterday:
https://lore.kernel.org/lkml/c46ddb954cfe45d9849c911271d7ec23@hisilicon.com/

> 
>           Arnd

Thanks
Barry


  reply	other threads:[~2021-02-12 20:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  8:56 [PATCH for next v1 0/2] gpio: few clean up patches to replace spin_lock_irqsave with spin_lock Luo Jiaxing
2021-02-08  8:56 ` [PATCH for next v1 1/2] gpio: omap: Replace raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler() Luo Jiaxing
2021-02-11 18:14   ` Grygorii Strashko
2021-02-11 19:39     ` Arnd Bergmann
2021-02-11 20:16       ` Grygorii Strashko
     [not found]         ` <a61ef337fd1c4538a47fe855920f95d3@hisilicon.com>
     [not found]           ` <CAK8P3a3SHQNjF5ZpqHQweG7BQ52Xi1hQKDiMVKq4aNK_7VDw6w@mail.gmail.com>
2021-02-12 10:27             ` [Linuxarm] " Grygorii Strashko
2021-02-12 10:42               ` Song Bao Hua (Barry Song)
2021-02-12 10:57                 ` Andy Shevchenko
2021-02-12 11:29                   ` Song Bao Hua (Barry Song)
2021-02-12 11:53                     ` Grygorii Strashko
2021-02-12 13:12                       ` Song Bao Hua (Barry Song)
2021-02-12 14:08                         ` Grygorii Strashko
2021-02-12 20:06                           ` Song Bao Hua (Barry Song)
2021-02-12 20:23                       ` Arnd Bergmann
2021-02-12 20:49                         ` Song Bao Hua (Barry Song) [this message]
2021-02-12 10:59                 ` Arnd Bergmann
2021-02-12 11:35                   ` Andy Shevchenko
2021-02-08  9:11 ` [Linuxarm] [PATCH for next v1 0/2] gpio: few clean up patches to replace spin_lock_irqsave with spin_lock luojiaxing
2021-02-08 13:28   ` Andy Shevchenko
2021-02-09  9:24     ` luojiaxing
2021-02-09  9:42       ` Andy Shevchenko
2021-02-10  3:43         ` luojiaxing
2021-02-10 10:50           ` Andy Shevchenko
2021-02-10 11:50             ` [Linuxarm] " Song Bao Hua (Barry Song)
2021-02-10 14:56               ` Andy Shevchenko
2021-02-10 20:42                 ` Song Bao Hua (Barry Song)
2021-02-11  9:58                   ` Andy Shevchenko

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=a92d5e15724a4843887212d7e05c99f8@hisilicon.com \
    --to=song.bao.hua@hisilicon.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=arnd@kernel.org \
    --cc=grygorii.strashko@ti.com \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=luojiaxing@huawei.com \
    --cc=ssantosh@kernel.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).