linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Javier Martinez Canillas <javier@dowhile0.org>
Cc: santosh shilimkar <santosh.shilimkar@oracle.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Kevin Hilman <khilman@deeprootsystems.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Linux GPIO List <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH REPOST] gpio: omap: use raw locks for locking
Date: Mon, 22 Jun 2015 00:08:21 -0700	[thread overview]
Message-ID: <20150622070821.GB4156@atomide.com> (raw)
In-Reply-To: <CABxcv==5Fo-x9CdSu6BYNfBpAS7rp63fHA319J_KvWZZG9q=ng@mail.gmail.com>

* Javier Martinez Canillas <javier@dowhile0.org> [150619 14:57]:
> On Fri, Jun 19, 2015 at 7:42 PM, santosh shilimkar
> <santosh.shilimkar@oracle.com> wrote:
> > On 6/19/2015 10:06 AM, Sebastian Andrzej Siewior wrote:
> >>
> >> This patch converts gpio_bank.lock from a spin_lock into a
> >> raw_spin_lock. The call path is to access this lock is always under a
> >> raw_spin_lock, for instance
> >> - __setup_irq() holds &desc->lock with irq off
> >>    + __irq_set_trigger()
> >>     + omap_gpio_irq_type()
> >>
> >> - handle_level_irq() (runs with irqs off therefore raw locks)
> >>    + mask_ack_irq()
> >>     + omap_gpio_mask_irq()
> >>
> >> This fixes the obvious backtrace on -RT. However the locking vs context
> >> is not and this is not limited to -RT:
> >> - omap_gpio_irq_type() is called with IRQ off and has an conditional
> >>    call to pm_runtime_get_sync() which may sleep. Either it may happen or
> >>    it may not happen but pm_runtime_get_sync() should not be called with
> >>    irqs off.
> >>
> >> - omap_gpio_debounce() is holding the lock with IRQs off.
> >>    + omap2_set_gpio_debounce()
> >>     + clk_prepare_enable()
> >>      + clk_prepare() this one might sleep.
> >>    The number of users of gpiod_set_debounce() / gpio_set_debounce()
> >>    looks low but still this is not good.
> >>
> >> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> >> ---
> >
> > Should be safe to do it.
> > Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
> >
> 
> Answered on the wrong thread, sorry for the noise.
> 
> Acked-by: Javier Martinez Canillas <javier@dowhile0.org>

Seems OK but looks like this needs updating against current Linux next
to apply though.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in

  reply	other threads:[~2015-06-22  7:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 17:06 [PATCH REPOST] gpio: omap: use raw locks for locking Sebastian Andrzej Siewior
2015-06-19 17:42 ` santosh shilimkar
2015-06-19 21:54   ` Javier Martinez Canillas
2015-06-22  7:08     ` Tony Lindgren [this message]
2015-06-30 10:55       ` Grygorii Strashko
2015-06-30 16:36         ` Sebastian Andrzej Siewior
2015-07-01  7:32           ` Tony Lindgren
2015-07-01 11:29             ` Tony Lindgren
2015-07-07  8:58               ` Grygorii Strashko

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=20150622070821.GB4156@atomide.com \
    --to=tony@atomide.com \
    --cc=bigeasy@linutronix.de \
    --cc=gnurou@gmail.com \
    --cc=javier@dowhile0.org \
    --cc=khilman@deeprootsystems.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@oracle.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).