linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Basak, Partha" <p-basak2@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Varadarajan, Charulatha" <charu@ti.com>,
	Tero Kristo <tero.kristo@nokia.com>,
	"Cousson, Benoit" <b-cousson@ti.com>
Subject: Re: [PATCH 2/2] OMAP2+: GPIO: move late PM out of interrupts-disabled idle path
Date: Mon, 27 Sep 2010 07:53:07 -0700	[thread overview]
Message-ID: <874odbutkc.fsf@deeprootsystems.com> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB5930233C35B07@dbde02.ent.ti.com> (Partha Basak's message of "Sat, 25 Sep 2010 09:00:22 +0530")

"Basak, Partha" <p-basak2@ti.com> writes:

>  
>
>> -----Original Message-----
>> From: Kevin Hilman [mailto:khilman@deeprootsystems.com] 
>> Sent: Friday, September 24, 2010 5:23 AM
>> To: Basak, Partha
>> Cc: linux-omap@vger.kernel.org; Varadarajan, Charulatha; Tero 
>> Kristo; Cousson, Benoit
>> Subject: Re: [PATCH 2/2] OMAP2+: GPIO: move late PM out of 
>> interrupts-disabled idle path
>> 
>> Kevin Hilman <khilman@deeprootsystems.com> writes:
>> 
>> [...]
>> 
>> >>
>> >> We cannot do a get_sync() from ISR context, right?
>> >
>> > Right, but we *should* be able to.  ;)
>> >
>> > I'm still trying to craft a good description of this 
>> problem so I can
>> > argue better for it on linux-pm.
>> >
>> > Until then...
>> >
>> > A bit of a hack, but you could do a _get_noresume() (which 
>> is safe from
>> > interrupt context) and directly call the drivers ->runtime_resume()
>> > method, which would be the equivalent of a _get_sync().  Followed of
>> > course by a _put() (async version, also interrupt safe) at 
>> the end of
>> > the ISR to keep the usecount correct.
>> 
>> You probably figured this out already, but I just realized that this
>> won't currently work either as omap_hwmod is using mutexes, and is 
>> safe in ISR context either. :(
>> 
>> What about for now just directly enabling (and re-disabling) the hwmod
>> clocks in the ISR using omap_hwmod_[enable|disable]_clocks()
>> 
>> Since this is a core driver in arch/arm/*omap*, you can directly call
>> the omap_hwmod API.
>> 
>
> omap_hwmod_[enable/disable]_clocks() use mutex inside & therefore cannot
> be used in the ISR context
>
> We cannot readily use the _enable_clocks/_disble_clocks directly as they are
> static APIs.
>
> But we can use the non-mutex versions, of omap_hwmod_enable/idle.
> (_omap_hwmod_enable/_omap_hwmod_disable)
>
> Do you agree?

Yes, I meant to use the non-mutex versions.

Sorry,

Kevin

  reply	other threads:[~2010-09-27 14:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 23:02 [PATCH 0/2] idle-path reorg for interrupt-enabled runtime PM Kevin Hilman
2010-09-13 23:02 ` [PATCH 1/2] OMAP3: PM: move device-specific special cases from PM core into CPUidle Kevin Hilman
2010-09-13 23:02 ` [PATCH 2/2] OMAP2+: GPIO: move late PM out of interrupts-disabled idle path Kevin Hilman
2010-09-14 14:14   ` Varadarajan, Charulatha
2010-09-14 14:41     ` Kevin Hilman
2010-09-14 16:09   ` Basak, Partha
2010-09-14 16:57     ` Kevin Hilman
2010-09-15  8:02       ` Basak, Partha
2010-09-23 12:54       ` Basak, Partha
2010-09-23 15:38         ` Kevin Hilman
2010-09-23 19:57           ` Basak, Partha
2010-09-23 23:18             ` Kevin Hilman
2010-09-23 23:53               ` Kevin Hilman
2010-09-25  3:30                 ` Basak, Partha
2010-09-27 14:53                   ` Kevin Hilman [this message]
2010-09-22  8:22   ` Kalliguddi, Hema
2010-09-22 14:24     ` Kevin Hilman
2010-09-22 15:09       ` Kalliguddi, Hema

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=874odbutkc.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=b-cousson@ti.com \
    --cc=charu@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=p-basak2@ti.com \
    --cc=tero.kristo@nokia.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).