linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off
@ 2013-02-13  8:55 Santosh Shilimkar
  2013-03-11 11:09 ` Santosh Shilimkar
  0 siblings, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2013-02-13  8:55 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off
  2013-02-13  8:55 [PATCH v2] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off Santosh Shilimkar
@ 2013-03-11 11:09 ` Santosh Shilimkar
  2013-03-13 17:42   ` Kevin Hilman
  0 siblings, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2013-03-11 11:09 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off
  2013-03-11 11:09 ` Santosh Shilimkar
@ 2013-03-13 17:42   ` Kevin Hilman
  2013-03-14  6:08     ` Santosh Shilimkar
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2013-03-13 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off
  2013-03-13 17:42   ` Kevin Hilman
@ 2013-03-14  6:08     ` Santosh Shilimkar
  0 siblings, 0 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2013-03-14  6:08 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-14  6:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-13  8:55 [PATCH v2] ARM: OMAP4: PM: Avoid expensive cpu_suspend() path for all CPU power states except off Santosh Shilimkar
2013-03-11 11:09 ` Santosh Shilimkar
2013-03-13 17:42   ` Kevin Hilman
2013-03-14  6:08     ` Santosh Shilimkar

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).