linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Soren Brinkmann <soren.brinkmann@xilinx.com>
Cc: Alexandre Courbot <gnurou@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Michal Simek <michal.simek@xilinx.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	John Linn <linnj@xilinx.com>
Subject: Re: [PATCH] gpio: zynq: Implement irq_(request|release)_resources
Date: Tue, 27 Oct 2015 18:18:54 +0200	[thread overview]
Message-ID: <562FA3EE.5040408@ti.com> (raw)
In-Reply-To: <CACRpkda4QKEJvwkwGLS7OLTP8Nxu5W05tzbcFXA_FPnBsFtKhw@mail.gmail.com>

On 10/27/2015 05:53 PM, Linus Walleij wrote:
> On Fri, Oct 23, 2015 at 3:36 PM, Soren Brinkmann
> <soren.brinkmann@xilinx.com> wrote:
>
>> The driver uses runtime PM to leverage low power techniques. For
>> use-cases using GPIO as interrupt the device needs to be in an
>> appropriate state.
>>
>> Reported-by: John Linn <linnj@xilinx.com>
>> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
>> Tested-by: John Linn <linnj@xilinx.com>
>
> As pointed out by Grygorii in
> commit aca82d1cbb49af34b69ecd4571a0fe48ad9247c1:
>
>      The PM runtime API can't be used in atomic contex on -RT even if
>      it's configured as irqsafe. As result, below error report can
>      be seen when PM runtime API called from IRQ chip's callbacks
>      irq_startup/irq_shutdown/irq_set_type, because they are
>      protected by RAW spinlock:
> (...)
>      The IRQ chip interface defines only two callbacks which are executed in
>      non-atomic contex - irq_bus_lock/irq_bus_sync_unlock, so lets move
>      PM runtime calls there.
>
> I.e. these calls are atomic context and it's just luck that it works
> and this is fragile.
>
> Can you please check if you can move it to
> irq_bus_lock()/irq_sync_unlock()
> like Grygorii does?
>

This patch rises the question not only about PM runtime, but also
about gpiochip_irq_reqres()/gpiochip_irq_relres().


-- 
regards,
-grygorii

  reply	other threads:[~2015-10-27 16:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 13:36 [PATCH] gpio: zynq: Implement irq_(request|release)_resources Soren Brinkmann
2015-10-27 15:53 ` Linus Walleij
2015-10-27 16:18   ` Grygorii Strashko [this message]
2015-10-27 16:23     ` Linus Walleij
2015-10-27 17:54       ` Grygorii Strashko
2015-10-28 15:20         ` Linus Walleij
2015-10-27 16:37   ` Lars-Peter Clausen
2015-10-29 16:47     ` Sören Brinkmann
2015-10-30 10:05     ` Thomas Gleixner

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=562FA3EE.5040408@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=gnurou@gmail.com \
    --cc=linnj@xilinx.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=soren.brinkmann@xilinx.com \
    /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).