diff mbox

[v2] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off

Message ID 1360745724-30058-1-git-send-email-santosh.shilimkar@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Santosh Shilimkar Feb. 13, 2013, 8:55 a.m. UTC
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.

The patch has been tested on OMAP4430 and OMAP5430(with few out of tree patches)
devices for suspend and CPUidle.

Cc: Kevin Hilman <khilman@deeprootsystems.com>

Reported-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
Update changelog to include testing details as suggested
by Kevin Hilman.

 arch/arm/mach-omap2/omap-mpuss-lowpower.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Santosh Shilimkar March 11, 2013, 11:09 a.m. UTC | #1
Kevin,

On Wednesday 13 February 2013 02:25 PM, Santosh Shilimkar wrote:
> 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.
> 
> The patch has been tested on OMAP4430 and OMAP5430(with few out of tree patches)
> devices for suspend and CPUidle.
> 
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> 
> Reported-by: Richard Woodruff <r-woodruff2@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
> Update changelog to include testing details as suggested
> by Kevin Hilman.
> 
Ping.
It can get into rc's but since it is not strict regression,
and if it has to wait for 3.10 then I can add this one
along with rest of the PM patches posted towards 3.10

Either way, let me know.

Regards,
Santosh
--
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
Kevin Hilman March 13, 2013, 5:42 p.m. UTC | #2
Santosh Shilimkar <santosh.shilimkar@ti.com> writes:

> Kevin,
>
> On Wednesday 13 February 2013 02:25 PM, Santosh Shilimkar wrote:
>> 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.
>> 
>> The patch has been tested on OMAP4430 and OMAP5430(with few out of tree patches)
>> devices for suspend and CPUidle.
>> 
>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>> 
>> Reported-by: Richard Woodruff <r-woodruff2@ti.com>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>> Update changelog to include testing details as suggested
>> by Kevin Hilman.
>> 
> Ping.
> It can get into rc's but since it is not strict regression,
> and if it has to wait for 3.10 then I can add this one
> along with rest of the PM patches posted towards 3.10
>
> Either way, let me know.

I have this updated one queued for v3.10 in my PM cleanup branch
(for_3.10/cleanup/pm)

Kevin





--
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
Santosh Shilimkar March 14, 2013, 6:08 a.m. UTC | #3
On Wednesday 13 March 2013 11:12 PM, Kevin Hilman wrote:
> Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
> 
>> Kevin,
>>
>> On Wednesday 13 February 2013 02:25 PM, Santosh Shilimkar wrote:
>>> 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.
>>>
>>> The patch has been tested on OMAP4430 and OMAP5430(with few out of tree patches)
>>> devices for suspend and CPUidle.
>>>
>>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>>>
>>> Reported-by: Richard Woodruff <r-woodruff2@ti.com>
>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> ---
>>> Update changelog to include testing details as suggested
>>> by Kevin Hilman.
>>>
>> Ping.
>> It can get into rc's but since it is not strict regression,
>> and if it has to wait for 3.10 then I can add this one
>> along with rest of the PM patches posted towards 3.10
>>
>> Either way, let me know.
> 
> I have this updated one queued for v3.10 in my PM cleanup branch
> (for_3.10/cleanup/pm)
> 
Thanks Kevin.

Regards,
Santosh

--
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
diff mbox

Patch

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