linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Implementing PowerManagment for a ppc target
@ 2004-11-30 21:40 Sylvain Munaut
  2004-11-30 22:53 ` Benjamin Herrenschmidt
  2004-11-30 23:35 ` Hollis Blanchard
  0 siblings, 2 replies; 3+ messages in thread
From: Sylvain Munaut @ 2004-11-30 21:40 UTC (permalink / raw)
  To: Linux PPC Dev

Hi,

I'm trying to implement Deep Sleep support for a ppc platform based on 
5200 and I have some questions :

 - How should I "integrate" it to linux, what the proper way ? I've been 
trying #defining CONFIG_PM and
   using the set_pm_ops operation but my call backs never get called 
when doing a echo standby > /sys/power/state

It justs says :

$ echo standby > 
/sys/power/state                                                                     

Stopping tasks: 
===                                                                                   

 stopping tasks failed (2 tasks 
remaining)                                                           
Restarting tasks...<6> Strange, init not 
stopped                                                     
 Strange, sh not 
stopped                                                                              

 done                                                                                                 

Stopping tasks: 
===                                                                                   

 stopping tasks failed (2 tasks 
remaining)                                                           
Restarting tasks...<6> Strange, init not 
stopped                                                     
 Strange, sh not 
stopped                                                                              

 done                 

I've been trying to look at Documentation/ and the sources but still I'm 
not sure ...


 - How can I ensure that one of my function runs out of I Cache ? Some 
pieces of assembler needs to not
   acces memory when the last 'orders' are sent. Does just keeping it 
small and aligned enough ?
 

Thanks,

    Sylvain Munaut

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

* Re: Implementing PowerManagment for a ppc target
  2004-11-30 21:40 Implementing PowerManagment for a ppc target Sylvain Munaut
@ 2004-11-30 22:53 ` Benjamin Herrenschmidt
  2004-11-30 23:35 ` Hollis Blanchard
  1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2004-11-30 22:53 UTC (permalink / raw)
  To: Sylvain Munaut; +Cc: linuxppc-dev list

On Tue, 2004-11-30 at 22:40 +0100, Sylvain Munaut wrote:
> Hi,
> 
> I'm trying to implement Deep Sleep support for a ppc platform based on 
> 5200 and I have some questions :
> 
>  - How should I "integrate" it to linux, what the proper way ? I've been 
> trying #defining CONFIG_PM and
>    using the set_pm_ops operation but my call backs never get called 
> when doing a echo standby > /sys/power/state
> 
> It justs says :
> 
> $ echo standby > 
> /sys/power/state                                                                     
> 
> Stopping tasks: 
> ===                                                                                   

Looks like a kernel thread isn't properly stopping ... note that on
pmac, I don't call that PM core, I do my own salad which does not
involve stopping tasks...

>  stopping tasks failed (2 tasks 
> remaining)                                                           
> Restarting tasks...<6> Strange, init not 
> stopped                                                     
>  Strange, sh not 
> stopped                                                                              
> 
>  done                                                                                                 
> 
> Stopping tasks: 
> ===                                                                                   
> 
>  stopping tasks failed (2 tasks 
> remaining)                                                           
> Restarting tasks...<6> Strange, init not 
> stopped                                                     
>  Strange, sh not 
> stopped                                                                              
> 
>  done                 
> 
> I've been trying to look at Documentation/ and the sources but still I'm 
> not sure ...
> 
> 
>  - How can I ensure that one of my function runs out of I Cache ? Some 
> pieces of assembler needs to not
>    acces memory when the last 'orders' are sent. Does just keeping it 
> small and aligned enough ?

Can you explain more precisely why and what are your precise
requirements ? (You can catch me on irc eventually) 
 
> 
> Thanks,
> 
>     Sylvain Munaut
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>

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

* Re: Implementing PowerManagment for a ppc target
  2004-11-30 21:40 Implementing PowerManagment for a ppc target Sylvain Munaut
  2004-11-30 22:53 ` Benjamin Herrenschmidt
@ 2004-11-30 23:35 ` Hollis Blanchard
  1 sibling, 0 replies; 3+ messages in thread
From: Hollis Blanchard @ 2004-11-30 23:35 UTC (permalink / raw)
  To: Linux PPC Dev

On Nov 30, 2004, at 3:40 PM, Sylvain Munaut wrote:
>
> I'm trying to implement Deep Sleep support for a ppc platform based on 
> 5200 and I have some questions :
>
> - How should I "integrate" it to linux, what the proper way ? I've 
> been trying #defining CONFIG_PM and
>   using the set_pm_ops operation but my call backs never get called 
> when doing a echo standby > /sys/power/state
> [...]
> I've been trying to look at Documentation/ and the sources but still 
> I'm not sure ...
>
>
> - How can I ensure that one of my function runs out of I Cache ? Some 
> pieces of assembler needs to not
>   acces memory when the last 'orders' are sent. Does just keeping it 
> small and aligned enough ?

You can see an example of the icache code in the linuxppc-2.4 tree, 
arch/ppc/platforms/ibm405lp_pmasm.S, after 
"_GLOBAL(ibm405lp_pm_command)". (You probably won't need to save and 
restore all CPU state though; that was needed because the 405LP was 
*really* powered down, not just paused.)

You can also see how that code is triggered from ibm405lp_pm.c . I 
don't think that's integrated with any laptop-style sleep work that's 
been done in the past 1.5 years, but it works with /proc/sys/sleep 
anyways (see Documentation/powerpc/405LP-sleep.txt).

-Hollis

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

end of thread, other threads:[~2004-11-30 23:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-30 21:40 Implementing PowerManagment for a ppc target Sylvain Munaut
2004-11-30 22:53 ` Benjamin Herrenschmidt
2004-11-30 23:35 ` Hollis Blanchard

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