All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@linaro.org>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off
Date: Fri, 08 Feb 2013 13:19:17 -0800	[thread overview]
Message-ID: <87d2wazep6.fsf@linaro.org> (raw)
In-Reply-To: <1360336306-18277-3-git-send-email-santosh.shilimkar@ti.com> (Santosh Shilimkar's message of "Fri, 8 Feb 2013 20:41:46 +0530")

Santosh Shilimkar <santosh.shilimkar@ti.com> writes:

> Current CPU PM code code make use of common cpu_suspend() path for all the
> CPU power states which is not optimal. In fact cpu_suspend() path is needed
> only when we put CPU power domain to off state where the CPU context is lost.
>
> Update the code accordingly so that the expensive cpu_suspend() path
> can be avoided for the shallow CPU power states like CPU PD INA/CSWR.
>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>
> Reported-by: Richard Woodruff <r-woodruff2@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Looks OK at first glance, but are you sure this is right for the
various ways both clusters might idle using coupled CPUidle?

Some description of the testing would be helpful here.

Thanks,

Kevin

> ---
>  arch/arm/mach-omap2/omap-mpuss-lowpower.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> index aac46bf..abdd0f6 100644
> --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> @@ -276,7 +276,10 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
>  	/*
>  	 * Call low level function  with targeted low power state.
>  	 */
> -	cpu_suspend(save_state, omap4_finish_suspend);
> +	if (save_state)
> +		cpu_suspend(save_state, omap4_finish_suspend);
> +	else
> +		omap4_finish_suspend(save_state);
>  
>  	/*
>  	 * Restore the CPUx power state to ON otherwise CPUx

WARNING: multiple messages have this Message-ID (diff)
From: khilman@linaro.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off
Date: Fri, 08 Feb 2013 13:19:17 -0800	[thread overview]
Message-ID: <87d2wazep6.fsf@linaro.org> (raw)
In-Reply-To: <1360336306-18277-3-git-send-email-santosh.shilimkar@ti.com> (Santosh Shilimkar's message of "Fri, 8 Feb 2013 20:41:46 +0530")

Santosh Shilimkar <santosh.shilimkar@ti.com> writes:

> Current CPU PM code code make use of common cpu_suspend() path for all the
> CPU power states which is not optimal. In fact cpu_suspend() path is needed
> only when we put CPU power domain to off state where the CPU context is lost.
>
> Update the code accordingly so that the expensive cpu_suspend() path
> can be avoided for the shallow CPU power states like CPU PD INA/CSWR.
>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>
> Reported-by: Richard Woodruff <r-woodruff2@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Looks OK at first glance, but are you sure this is right for the
various ways both clusters might idle using coupled CPUidle?

Some description of the testing would be helpful here.

Thanks,

Kevin

> ---
>  arch/arm/mach-omap2/omap-mpuss-lowpower.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> index aac46bf..abdd0f6 100644
> --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
> @@ -276,7 +276,10 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
>  	/*
>  	 * Call low level function  with targeted low power state.
>  	 */
> -	cpu_suspend(save_state, omap4_finish_suspend);
> +	if (save_state)
> +		cpu_suspend(save_state, omap4_finish_suspend);
> +	else
> +		omap4_finish_suspend(save_state);
>  
>  	/*
>  	 * Restore the CPUx power state to ON otherwise CPUx

  parent reply	other threads:[~2013-02-08 21:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 15:11 [PATCH] ARM: OMAP2+: PM: Fix the dt return condition in pm_late_init() Santosh Shilimkar
2013-02-08 15:11 ` Santosh Shilimkar
2013-02-08 15:11 ` [PATCH] ARM: OMAP2+: Remove duplicate omap4430_init_late() declaration Santosh Shilimkar
2013-02-08 15:11   ` Santosh Shilimkar
2013-02-08 15:21   ` Felipe Balbi
2013-02-08 15:21     ` Felipe Balbi
2013-02-15  9:35   ` Santosh Shilimkar
2013-02-15  9:35     ` Santosh Shilimkar
2013-03-04 18:19     ` Tony Lindgren
2013-03-04 18:19       ` Tony Lindgren
2013-02-08 15:11 ` [PATCH] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off Santosh Shilimkar
2013-02-08 15:11   ` Santosh Shilimkar
2013-02-08 15:26   ` Felipe Balbi
2013-02-08 15:26     ` Felipe Balbi
2013-02-08 15:34     ` Santosh Shilimkar
2013-02-08 15:34       ` Santosh Shilimkar
2013-02-08 21:19   ` Kevin Hilman [this message]
2013-02-08 21:19     ` Kevin Hilman
2013-02-12  4:55     ` Santosh Shilimkar
2013-02-12  4:55       ` Santosh Shilimkar
2013-02-12 15:18       ` Kevin Hilman
2013-02-12 15:18         ` Kevin Hilman
2013-02-13  5:05         ` Santosh Shilimkar
2013-02-13  5:05           ` Santosh Shilimkar
2013-02-08 15:20 ` [PATCH] ARM: OMAP2+: PM: Fix the dt return condition in pm_late_init() Felipe Balbi
2013-02-08 15:20   ` Felipe Balbi
2013-02-08 15:34 ` Paul Walmsley
2013-02-08 15:34   ` Paul Walmsley
2013-02-08 15:36   ` Santosh Shilimkar
2013-02-08 15:36     ` Santosh Shilimkar

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=87d2wazep6.fsf@linaro.org \
    --to=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.