All of lore.kernel.org
 help / color / mirror / Atom feed
From: "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Felipe Balbi <balbi@ti.com>,
	Javier Martinez Canillas <javier@dowhile0.org>,
	Kevin Hilman <khilman@kernel.org>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Santosh Shilimkar <ssantosh@kernel.org>
Subject: Re: [PATCH 1/1] gpio: omap: Fix bad device access with setup_irq()
Date: Mon, 19 Jan 2015 11:05:17 -0800	[thread overview]
Message-ID: <54BD556D.3080206@oracle.com> (raw)
In-Reply-To: <20150117010003.GP18552@atomide.com>

On 1/16/15 5:00 PM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar@oracle.com> [150116 16:23]:
>> On 1/16/2015 2:50 PM, Tony Lindgren wrote:
>>> Similar to omap_gpio_irq_type() let's make sure that the GPIO
>>> is usable as an interrupt if the platform init code did not
>>> call gpio_request(). Otherwise we can get invalid device access
>>> after setup_irq():
>>>
>> I let Linus W comment on it but IIRC we chewed this issue last
>> time and the conclusion was the gpio_request() must have to be called
>> directly or indirectly in case of irq line.
>
> This is a corner case where the error is triggered by a wrong,
> non-GPIO IRQ so gpio_request() will never be called before setup_irq()
> unlike for any legacy platform code.
>
> The legacy and DT cases we're already handling in the gpio-omap.c
> driver a while back with:
>
> 2f56e0a57ff1 ("gpio/omap: use gpiolib API to mark a GPIO used as an IRQ")
> fac7fa162a19 ("gpio/omap: auto-setup a GPIO when used as an IRQ")
> fa365e4d7290 ("gpio/omap: maintain GPIO and IRQ usage separately")
>
> And most of that the bank specific hacks we can get rid of by making
> the driver multple instances as that allows replacing BANK_USED
> with just runtime PM.
>
Right. Thanks for expanding it.

Regards,
Santosh


WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@oracle.com (santosh.shilimkar at oracle.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] gpio: omap: Fix bad device access with setup_irq()
Date: Mon, 19 Jan 2015 11:05:17 -0800	[thread overview]
Message-ID: <54BD556D.3080206@oracle.com> (raw)
In-Reply-To: <20150117010003.GP18552@atomide.com>

On 1/16/15 5:00 PM, Tony Lindgren wrote:
> * santosh shilimkar <santosh.shilimkar@oracle.com> [150116 16:23]:
>> On 1/16/2015 2:50 PM, Tony Lindgren wrote:
>>> Similar to omap_gpio_irq_type() let's make sure that the GPIO
>>> is usable as an interrupt if the platform init code did not
>>> call gpio_request(). Otherwise we can get invalid device access
>>> after setup_irq():
>>>
>> I let Linus W comment on it but IIRC we chewed this issue last
>> time and the conclusion was the gpio_request() must have to be called
>> directly or indirectly in case of irq line.
>
> This is a corner case where the error is triggered by a wrong,
> non-GPIO IRQ so gpio_request() will never be called before setup_irq()
> unlike for any legacy platform code.
>
> The legacy and DT cases we're already handling in the gpio-omap.c
> driver a while back with:
>
> 2f56e0a57ff1 ("gpio/omap: use gpiolib API to mark a GPIO used as an IRQ")
> fac7fa162a19 ("gpio/omap: auto-setup a GPIO when used as an IRQ")
> fa365e4d7290 ("gpio/omap: maintain GPIO and IRQ usage separately")
>
> And most of that the bank specific hacks we can get rid of by making
> the driver multple instances as that allows replacing BANK_USED
> with just runtime PM.
>
Right. Thanks for expanding it.

Regards,
Santosh

  reply	other threads:[~2015-01-19 19:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 22:50 [PATCH 1/1] gpio: omap: Fix bad device access with setup_irq() Tony Lindgren
2015-01-16 22:50 ` Tony Lindgren
2015-01-16 22:55 ` Felipe Balbi
2015-01-16 22:55   ` Felipe Balbi
2015-01-17  0:19 ` santosh shilimkar
2015-01-17  0:19   ` santosh shilimkar
2015-01-17  1:00   ` Tony Lindgren
2015-01-17  1:00     ` Tony Lindgren
2015-01-19 19:05     ` santosh.shilimkar [this message]
2015-01-19 19:05       ` santosh.shilimkar at oracle.com
2015-01-17 10:10   ` Russell King - ARM Linux
2015-01-17 10:10     ` Russell King - ARM Linux
2015-01-21 16:41 ` Linus Walleij
2015-01-21 16:41   ` Linus Walleij
2015-01-21 21:39 ` Javier Martinez Canillas
2015-01-21 21:39   ` Javier Martinez Canillas

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=54BD556D.3080206@oracle.com \
    --to=santosh.shilimkar@oracle.com \
    --cc=balbi@ti.com \
    --cc=gnurou@gmail.com \
    --cc=javier@dowhile0.org \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=ssantosh@kernel.org \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.