public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tony Lindgren <tony@atomide.com>
Cc: David Brownell <david-b@pacbell.net>, linux-omap@vger.kernel.org
Subject: Re: [PATCH omap-fixes] OMAP2/3: GPIO: remove recursion in IRQ wakeup path
Date: Fri, 20 Feb 2009 13:21:12 -0800	[thread overview]
Message-ID: <499F1EC8.1030508@deeprootsystems.com> (raw)
In-Reply-To: <20090220194636.GZ7414@atomide.com>

Tony Lindgren wrote:
> * Kevin Hilman <khilman@deeprootsystems.com> [090210 16:42]:
>> David Brownell <david-b@pacbell.net> writes:
>>
>>> On Wednesday 28 January 2009, Kevin Hilman wrote:
>>>> Now that the generic IRQ and GPIO frameworks are used for enabling and
>>>> disabling GPIO IRQ wakeup sources, there is no longer a need to call
>>>> [enable|disable]_irq_wake() in the low-level code.  Doing so results
>>>> in recursive calls to [enable|disable]_irq_wake().
>>> Could you clarify what actually made that requirement go away?
>>>
>>> The recursion was introduced -- using the generic IRQ framework! -- as
>>> a simple way to ensure the parent IRQ was properly wake-enabled.  Is
>>> the issue that something changed, so that something else wake-enables
>>> the parent?
>>>
>> My description was not very descriptive... sorry...
>>
>> From what I can understand here, I don't see the point in
>> wake-enabling the parent IRQ since there is no wakeup glue for the
>> bank IRQs, thus these calls are actually failing and causing
>> 'unbalanced IRQ disable' noise in the generic IRQ layer.
>>
>> Here is what is happening.  Consider the gpio-keys driver.  Upon
>> suspend, it enables the IRQ wake for its GPIO.  The OMAP GPIO code
>> then calls enable_wake_irq() for the parent irq (the GPIO bank IRQ).
>> This call is actually failing because the bank IRQ has no 'set_wake'
>> method.  Because of this failure, the generic IRQ code doesn't
>> actually do anything, and sets the 'disable_depth' to zero for the
>> bank IRQ.
>>
>> Then, upon resume, the resume path disables IRQ wakeups for the GPIO.
>> The OMAP GPIO code then tries to call disable_irq_wake() for the bank
>> IRQ and you get noisy 'unbalanced IRQ disable' warnings from the
>> generic IRQ layere because of the attempt to disable the IRQ wake of
>> an IRQ that was never enabled.
>>
>> So the options that I see are:
>>
>> 1) fix the OMAP GPIO code to check the return code of the parent enable, or
>> 2) drop the parent enable/disable
>>
>> I prefer (1) since those calls will always fail AFAICT.
>>
>> Does that make any sense?
>>
>> If you're OK with (1), I will re-issue the patch with a better discription.
> 
> Ignoring this for now, please let me know if you want me to queue this
> for omap-upstream with the updates mentioned above.

OK.  I'll re-send with updated description if above is OK with Dave.

Kevin

      reply	other threads:[~2009-02-20 21:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 18:35 [PATCH omap-fixes] OMAP2/3: GPIO: remove recursion in IRQ wakeup path Kevin Hilman
2009-02-02 17:51 ` Kevin Hilman
2009-02-04 20:02   ` Tony Lindgren
2009-02-09  4:39 ` David Brownell
2009-02-11  0:18   ` Kevin Hilman
2009-02-20 19:46     ` Tony Lindgren
2009-02-20 21:21       ` Kevin Hilman [this message]

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=499F1EC8.1030508@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=david-b@pacbell.net \
    --cc=linux-omap@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox