public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@mvista.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 01/02] OMAP3 CPUidle driver
Date: Tue, 17 Jun 2008 10:30:11 -0700	[thread overview]
Message-ID: <871w2w6kbg.fsf@paris.hilman.org> (raw)
In-Reply-To: <003001c8d034$194be460$68bf18ac@ent.ti.com> (Rajendra Nayak's message of "Tue\, 17 Jun 2008 10\:09\:13 +0530")

"Rajendra Nayak" <rnayak@ti.com> writes:

>> "Rajendra Nayak" <rnayak@ti.com> writes:
>> 
>> > This patch adds the OMAP3 cpuidle driver. Irq enable/disable is done
>> > in the core cpuidle driver before it queries the governor for the
>> > next state.
>> 
>> Can you explain why you need the IRQ/FIQ disable added to 
>> cpuidle_idle_call()
>> 
>
> This was done to prevent any interrupts firing in between a 
> cpuidle_curr_governor->select() and target_state->enter().

I understand that, but I still don't understand exactly what you're
trying to prevent.  Did you have a specific bug that this prevented?

> An interrupt in between could end up with a previously selected 
> state to be programmed.

Remember that this function _is_ the idle loop, meaning when this runs
nothing else is happening.  After the select, if other system activity
has happened (e.g. and interrupt, or thread wakeup etc.), it will run
before the target_state->enter() because of the check for
need_resched().

> Any suggestions on a better way to handle this?

Just drop the IRQ/FIQ disables altogether.

Using previous versions of the CPUidle patches, I'm using unmodified
CPUidle code without any problems.

Kevin


  reply	other threads:[~2008-06-17 17:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10  7:09 [PATCH 01/02] OMAP3 CPUidle driver Rajendra Nayak
2008-06-16 23:21 ` Kevin Hilman
2008-06-17  4:39   ` Rajendra Nayak
2008-06-17 17:30     ` Kevin Hilman [this message]
2008-06-18  7:19       ` Högander Jouni
2008-06-20 17:25         ` Kevin Hilman
2008-06-23  6:03           ` Högander Jouni
2008-06-23 17:18             ` Kevin Hilman
2008-06-27  9:46               ` Högander Jouni

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=871w2w6kbg.fsf@paris.hilman.org \
    --to=khilman@mvista.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=rnayak@ti.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