linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [PATCH 1/4] sched / idle: Move the default idle call code to a separate function
Date: Mon, 4 May 2015 16:22:45 +0200	[thread overview]
Message-ID: <20150504142245.GL23123@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1607938.mB5HZupMYV@vostro.rjw.lan>

On Mon, May 04, 2015 at 03:56:24PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Move the code under the "use_default" label in cpuidle_idle_call()
> into a separate (new) function.
> 
> This just allows the subsequent changes to be more stratightforward.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  kernel/sched/idle.c |   42 +++++++++++++++++++++++-------------------
>  1 file changed, 23 insertions(+), 19 deletions(-)
> 
> Index: linux-pm/kernel/sched/idle.c
> ===================================================================
> --- linux-pm.orig/kernel/sched/idle.c
> +++ linux-pm/kernel/sched/idle.c
> @@ -67,6 +67,17 @@ void __weak arch_cpu_idle(void)
>  	local_irq_enable();
>  }
>  
> +static void default_idle_call(void) {

Please put opening brace of function on a new line.

> +	/*
> +	 * We can't use the cpuidle framework, let's use the default idle
> +	 * routine.
> +	 */
> +	if (current_clr_polling_and_test())
> +		local_irq_enable();
> +	else
> +		arch_cpu_idle();
> +}

  parent reply	other threads:[~2015-05-04 14:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 13:54 [PATCH 0/4] sched / idle: Reduce the number of branches in the idle loop Rafael J. Wysocki
2015-05-04 13:56 ` [PATCH 1/4] sched / idle: Move the default idle call code to a separate function Rafael J. Wysocki
2015-05-04 14:00   ` Daniel Lezcano
2015-05-04 14:22   ` Peter Zijlstra [this message]
2015-05-04 21:08     ` Rafael J. Wysocki
2015-05-04 13:57 ` [PATCH 2/4] cpuidle: Check the sign of index in cpuidle_reflect() Rafael J. Wysocki
2015-05-04 14:02   ` Daniel Lezcano
2015-05-04 13:57 ` [PATCH 3/4] sched / idle: Eliminate the "reflect" check from cpuidle_idle_call() Rafael J. Wysocki
2015-05-04 14:49   ` Daniel Lezcano
2015-05-04 13:58 ` [PATCH 4/4] sched / idle: Call default_idle_call() from cpuidle_enter_state() Rafael J. Wysocki
2015-05-04 15:04   ` Daniel Lezcano
2015-05-04 21:11     ` Rafael J. Wysocki
2015-05-04 14:25 ` [PATCH 0/4] sched / idle: Reduce the number of branches in the idle loop Peter Zijlstra
2015-05-04 21:23   ` Rafael J. Wysocki

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=20150504142245.GL23123@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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).