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()
From: Song Bao Hua (Barry Song) <hidden>
Date: 2021-02-12 20:50:12
Also in:
lkml
From: Song Bao Hua (Barry Song) <hidden>
Date: 2021-02-12 20:50:12
Also in:
lkml
-----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) <redacted>; Andy Shevchenko [off-list ref]; luojiaxing [off-list ref]; Linus Walleij [off-list ref]; Santosh Shilimkar [off-list ref]; Kevin Hilman [off-list ref]; open list:GPIO SUBSYSTEM [off-list ref]; 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 [off-list ref] wrote:quoted
The worst RT case I can imagine is when gpio API is still called from hardIRQ context by somequoted
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() -- oopsGood 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/ (local)
ArndThanks Barry