linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: khilman@deeprootsystems.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] OMAP: PM: formalize idle notifications
Date: Fri, 22 Oct 2010 15:00:22 -0700	[thread overview]
Message-ID: <8762wt7urt.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20101022180553.GD17595@atomide.com> (Tony Lindgren's message of "Fri, 22 Oct 2010 11:05:53 -0700")

Tony Lindgren <tony@atomide.com> writes:

> * Kevin Hilman <khilman@deeprootsystems.com> [101020 16:22]:
>> Currently in the idle path, we have custom function calls into device
>> code to handle device specific actions that need to be coordinated CPU
>> idle transitions. Rather than continue this ad-hoc method of calling
>> device code from the PM core, create a formal way for device/driver
>> code to register for idle notifications.
>> 
>> Idle notifications are done late in the idle path when interrupts are
>> disabled, hence use atomic notifier chains.  These notifications will
>> also be atomic with respect to CPU idle transitions.
>
> ...
>
>> +EXPORT_SYMBOL_GPL(omap_idle_notifier_register);
>> +EXPORT_SYMBOL_GPL(omap_idle_notifier_unregister);
>
> Let's rather set this up as a generic framework to avoid adding
> more omap specific frameworks to the drivers.

Hmm, I thought I removed those EXPORT_SYMBOLs, just for that reason.  

I actually don't really intend these to be used from drivers, but only
from OMAP-specific device code.  We currently use these manly for errata
purposes, but also for UART debug purposes, and only from device code
currently.

That being said, I did consider a generic framework for this (x86_64 has
it's own idle notfiers as well), and this topic something already on the
table for LPC PM miniconf.  However, at least for OMAP, the location of
when the notifiers are triggered has to be in OMAP-specific code.  It
cannot be in the ARM-generic idle path (like they do in x86_64.)

The reason is because the idle notifiers have to be called *after* the
OMAP-specific idle path has programmed the next power states for the
various power domains.  That way, the idle notifiers can read the next
power state regs and make decisons on what they need to do (or not to
do) based on whether he power domain is going to RET, OFF, etc.

Kevin

      reply	other threads:[~2010-10-22 22:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 23:31 [PATCH 1/3] OMAP: PM: formalize idle notifications Kevin Hilman
2010-10-20 23:31 ` [PATCH 2/3] OMAP: INTC: use idle notifier for autoidle management Kevin Hilman
2010-10-20 23:31 ` [PATCH 3/3] OMAP: UART: use atomic idle notifiers Kevin Hilman
2010-10-22 12:54   ` Govindraj
2010-10-22 16:11     ` Kevin Hilman
2010-10-22 18:05 ` [PATCH 1/3] OMAP: PM: formalize idle notifications Tony Lindgren
2010-10-22 22:00   ` 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=8762wt7urt.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.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).