[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-omap
Subject:    Re: Warnings: pm branch
From:       Kevin Hilman <khilman () deeprootsystems ! com>
Date:       2009-09-30 17:32:48
Message-ID: 636c5030909301032q4d39dd3ar7ee2fb522f009910 () mail ! gmail ! com
[Download RAW message or body]

On Wed, Aug 12, 2009 at 7:38 AM, Kevin Hilman
<khilman@deeprootsystems.com> wrote:
> "Hemanth V" <hemanthv@ti.com> writes:
>
>> ----- Original Message -----
>> From: "Kevin Hilman" <khilman@deeprootsystems.com>
>>>>  /* enter the state and update stats */
>>>> @@ -91,6 +93,12 @@ static void cpuidle_idle_call(void)
>>>>  /* give the governor an opportunity to reflect on the outcome */
>>>>  if (cpuidle_curr_governor->reflect)
>>>>  cpuidle_curr_governor->reflect(dev);
>>>> +
>>>> + return;
>>>> +
>>>
>>> ... I think you want to drop this return.  If it returns here, it
>>> will still not enable IRQs.  I think it should just fall through
>>> to the enable and return.
>>
>> Since omap3_enter_idle returns with interrupts enabled, I had
>> added this return. We could remove it also for safety purposes.
>
> OK.  I think you should post to linux-pm for comment, and possibly
> raise this as a question.
>
> You can add:
>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>

Hemanth,

I've reworked/simplified this patch slightly (see below) and will send
to linux-pm shortly.

Kevin


This one is against PM branch:

commit 808854375b94017ba996a467a082a38730fff434
Author: Kevin Hilman <khilman@deeprootsystems.com>
Date:   Wed Sep 30 09:57:40 2009 -0700

    CPUidle: always return with interrupts enabled

    In the case where cpuidle_idle_call() returns before changing state
    due to a need_resched(), it was returning with IRQs disabled.

    This patche ensures IRQs are (re)enabled before returning.

    Reported-by: Hemanth V <hemanthv@ti.com>
    Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>

diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 8504a21..910c49d 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -75,8 +75,11 @@ static void cpuidle_idle_call(void)
 #endif
 	/* ask the governor for the next state */
 	next_state = cpuidle_curr_governor->select(dev);
-	if (need_resched())
+	if (need_resched()) {
+		local_irq_enable();
 		return;
+	}
+
 	target_state = &dev->states[next_state];

 	/* enter the state and update stats */
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic