All of lore.kernel.org
 help / color / mirror / Atom feed
* pmu_suspend/resume
@ 2001-08-12  3:57 Ira Weiny
  2001-08-12 17:36 ` pmu_suspend/resume Benjamin Herrenschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Ira Weiny @ 2001-08-12  3:57 UTC (permalink / raw)
  To: linuxppc-dev


I have been using pmu_suspend and pmu_resume to keep my TiBook from
turning off when debugging some kernel stuff.  Is this ok?

The reason I ask is that pmu_suspend seems to have the desired effect,
temporarily turning off the PMU.  But pmu_resume does not seem to leave
the PMU in a stable state.  Now I realize that I am debuging a kernel
and that it could/probably is other factors which are causing these
problems but I just wanted to make sure that there is not some better
way of disabiling the PMU or that I might be using these functions
incorrectly.

Basically:

pmu_suspend();

/* suspicious/known bad code here */

pmu_resume();

Just like that right?

Thanks,
Ira Weiny
iweiny@acm.org

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: pmu_suspend/resume
  2001-08-12  3:57 pmu_suspend/resume Ira Weiny
@ 2001-08-12 17:36 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2001-08-12 17:36 UTC (permalink / raw)
  To: Ira Weiny, linuxppc-dev


>
>I have been using pmu_suspend and pmu_resume to keep my TiBook from
>turning off when debugging some kernel stuff.  Is this ok?
>
>The reason I ask is that pmu_suspend seems to have the desired effect,
>temporarily turning off the PMU.  But pmu_resume does not seem to leave
>the PMU in a stable state.  Now I realize that I am debuging a kernel
>and that it could/probably is other factors which are causing these
>problems but I just wanted to make sure that there is not some better
>way of disabiling the PMU or that I might be using these functions
>incorrectly.

pmu_suspend waits for the PMU to be idle, then disable the PMU
"request" interrupt. The goal here is to make sure there's no
asynchronous PMU activity going on at a point where we might
switch interrupts off for a long time.
If we are in the middle of a PMU request and interrupts are
switched off long enough, it will timeout and shut down the
machine.

You should not need to use them unless you expect to disable
interrupts for a long time, which is usually a bad thing to do.

If you are tracking a problem where the PMU is shutting you
off while running a piece of code, then it may be useful.

Note that if you enter xmon, then xmon will regulary call
pmu_poll to keep it happy, despite having interrupts disabled.

Ben.

BTW. Obviously, pmu_resume puts things back to normal.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* PMU suspend/resume
       [not found] <1423311618.2021537.1478003748549.ref@mail.yahoo.com>
@ 2016-11-01 12:35 ` Amit Mahadik
  2016-11-01 18:39   ` Stefan Wahren
  0 siblings, 1 reply; 5+ messages in thread
From: Amit Mahadik @ 2016-11-01 12:35 UTC (permalink / raw)
  To: kernelnewbies

Hi,? ? ?I am trying to understand ?the Linux Power management Unit framework. I have an ARM Cortex-A9x4 board. When I enable pm_test or pass initcall_debug parameter through U-boot via bootargs the system goes into (wfi/suspend state) and resumes properly.However, the issue is when I disable pm_test and initcall_debug and put my system into WFI/SUSPEND state , it does not resume even if the registered wakeup IRQ is generated.?? ? I am using linux kernel source revision 4.4.16. Can somebody please help me regarding this issue?

Regards,Amit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161101/620b3dae/attachment.html 

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

* PMU suspend/resume
  2016-11-01 12:35 ` PMU suspend/resume Amit Mahadik
@ 2016-11-01 18:39   ` Stefan Wahren
  2016-11-02  8:38     ` Amit Mahadik
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Wahren @ 2016-11-01 18:39 UTC (permalink / raw)
  To: kernelnewbies

Hi Amit,

Am 01.11.2016 um 13:35 schrieb Amit Mahadik:
> Hi,
>      I am trying to understand  the Linux Power management Unit
> framework. I have an ARM Cortex-A9x4 board. When I enable pm_test or
> pass initcall_debug parameter through U-boot via bootargs the system
> goes into (wfi/suspend state) and resumes properly.
> However, the issue is when I disable pm_test and initcall_debug and put
> my system into WFI/SUSPEND state , it does not resume even if the
> registered wakeup IRQ is generated.
>     I am using linux kernel source revision 4.4.16. Can somebody please
> help me regarding this issue?

i have a similiar issue with a i.MX28 board [1].

Here are some question which should help to narrow down the issue:

Are you able to reproduce the issue with current Mainline kernel 4.9rcX?
What exact platform you are using?
What are the exact commands to suspend your board?
What device is your wakeup source?
Does suspend already worked before?
Did you try no_console_debug on a debug UART?

Regards
Stefan

[1] - http://marc.info/?l=linux-arm-kernel&m=147721451006631&w=2

>
> Regards,
> Amit.
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

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

* PMU suspend/resume
  2016-11-01 18:39   ` Stefan Wahren
@ 2016-11-02  8:38     ` Amit Mahadik
  0 siblings, 0 replies; 5+ messages in thread
From: Amit Mahadik @ 2016-11-02  8:38 UTC (permalink / raw)
  To: kernelnewbies

Hi Stephen,1.Are you able to reproduce the issue with current Mainline kernel 4.9rcX?? ??What exact platform you are using?? ?I am porting linux kernel 4.4.16 onto our custom ARM cortexA9x4 based SoC.
2.?What are the exact commands to suspend your board?? ? ?I am using the sysfs entry for wfi
? ? ?# echo wfi > /sys/power/state
3.What device is your wakeup source?? ? I have configured a oush button on the board as my wakeup IRQ.
4.?Does suspend already worked before?? ? Suspend worked on previous kernel 3.4.14 on the board.
5.?Did you try no_console_debug on a debug UART?? ? I am using?no_console_debug?option passed via u-Boot.
Regards,Amit. 

    On Wednesday, 2 November 2016 12:12 AM, Stefan Wahren <info@lategoodbye.de> wrote:
 

 Hi Amit,

Am 01.11.2016 um 13:35 schrieb Amit Mahadik:
> Hi,
>? ? ? I am trying to understand? the Linux Power management Unit
> framework. I have an ARM Cortex-A9x4 board. When I enable pm_test or
> pass initcall_debug parameter through U-boot via bootargs the system
> goes into (wfi/suspend state) and resumes properly.
> However, the issue is when I disable pm_test and initcall_debug and put
> my system into WFI/SUSPEND state , it does not resume even if the
> registered wakeup IRQ is generated.
>? ? I am using linux kernel source revision 4.4.16. Can somebody please
> help me regarding this issue?

i have a similiar issue with a i.MX28 board [1].

Here are some question which should help to narrow down the issue:

Are you able to reproduce the issue with current Mainline kernel 4.9rcX?
What exact platform you are using?
What are the exact commands to suspend your board?
What device is your wakeup source?
Does suspend already worked before?
Did you try no_console_debug on a debug UART?

Regards
Stefan

[1] - http://marc.info/?l=linux-arm-kernel&m=147721451006631&w=2

>
> Regards,
> Amit.
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161102/4cb84d41/attachment.html 

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

end of thread, other threads:[~2016-11-02  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-12  3:57 pmu_suspend/resume Ira Weiny
2001-08-12 17:36 ` pmu_suspend/resume Benjamin Herrenschmidt
     [not found] <1423311618.2021537.1478003748549.ref@mail.yahoo.com>
2016-11-01 12:35 ` PMU suspend/resume Amit Mahadik
2016-11-01 18:39   ` Stefan Wahren
2016-11-02  8:38     ` Amit Mahadik

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.