Li Tao wrote:
Hi Scott Wood,
Thanks for your response

在 2009-09-09三的 13:43 -0500,Scott Wood写道:
The decrementer stops ticking when the core goes to sleep.  However, if a
decrementer was already pending (but masked with MSR[EE]) before you
enter sleep mode, it will cause a wakeup.

To avoid this, the decrementer is set to a very large value prior to and
after disabling interrupts.  See generic_suspend_disable_irqs() in
arch/powerpc/kernel/time.c.  Is this not happening for you?  Which kernel
version are you using, and what mechanism are you using to go to sleep?
I use 2.6.24 kernel. The PM driver code have set decrementer to
0x7fffffff before go to sleep mode.

It looks like 2.6.24 doesn't have commit 7ac5dde99eb9fefdb526973c600075b7c5703a86 (Implement arch disable/enable irq hooks) -- are you disabling the decrementer in a similar manner, or is it possible that the decrementer has already fired by the time you set it to 0x7fffffff? Could you read the value just prior to entering sleep?

Why use such an old kernel, BTW?

The driver set HID0[10]=1, then set MSR POW bit. PMCCR = 00111.

I was more interested in whether you were using the suspend_ops (maybe pm_ops back then?) infrastructure (which would invoke the irq hooks) or something custom.

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to