public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Hemanth V <hemanthv@ti.com>
Cc: "Pandita, Vikram" <vikram.pandita@ti.com>, linux-omap@vger.kernel.org
Subject: Re: Warnings: pm branch
Date: Wed, 12 Aug 2009 07:15:58 -0700	[thread overview]
Message-ID: <87d4712k4h.fsf@deeprootsystems.com> (raw)
In-Reply-To: <7803.10.24.255.18.1250081698.squirrel@dbdmail.itg.ti.com> (Hemanth V.'s message of "Wed\, 12 Aug 2009 18\:24\:58 +0530 \(IST\)")

"Hemanth V" <hemanthv@ti.com> writes:

[...]

> Below patch seems to fix the issue.

After looking closer, I think this is the right fix as the
cpuidle_idle_call() can return with interrupts disabled, but...

[...]

> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 8504a21..3014104 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -75,8 +75,10 @@ static void cpuidle_idle_call(void)
>  #endif
>  	/* ask the governor for the next state */
>  	next_state = cpuidle_curr_governor->select(dev);
> +
>  	if (need_resched())
> -		return;
> +		goto out;
> +
>  	target_state = &dev->states[next_state];
>
>  	/* 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.

> +out:
> +	local_irq_enable();
> +	return;
>  }
>
>  /**


Kevin

  parent reply	other threads:[~2009-08-12 14:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 14:55 Warnings: pm branch Pandita, Vikram
2009-08-11 15:27 ` Kevin Hilman
2009-08-12  9:48   ` Hemanth V
2009-08-12 12:54     ` Hemanth V
2009-08-12 13:28       ` Kevin Hilman
2009-08-12 13:38         ` Sripathy, Vishwanath
2009-08-12 14:15       ` Kevin Hilman [this message]
2009-08-12 14:22         ` Hemanth V
2009-08-12 14:38           ` Kevin Hilman
2009-09-30 17:32             ` Kevin Hilman

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=87d4712k4h.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=hemanthv@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=vikram.pandita@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