Re: Warnings: pm branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 12, 2009 at 7:38 AM, Kevin Hilman
<khilman@xxxxxxxxxxxxxxxxxxx> wrote:
> "Hemanth V" <hemanthv@xxxxxx> writes:
>
>> ----- Original Message -----
>> From: "Kevin Hilman" <khilman@xxxxxxxxxxxxxxxxxxx>
>>>>  /* 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@xxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx>
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@xxxxxx>
    Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux