All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Li Tao <b22598@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Kenneth Johansson <kenneth@southpole.se>
Subject: Re: Question about e300 core decrementer interrupt
Date: Thu, 10 Sep 2009 10:30:14 -0500	[thread overview]
Message-ID: <4AA91B86.7090805@freescale.com> (raw)
In-Reply-To: <1252583922.26108.23.camel@ubuntu.ubuntu-domain>

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

      reply	other threads:[~2009-09-10 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-08  5:48 Question about e300 core decrementer interrupt Li Tao-B22598
2009-09-09 11:16 ` Kenneth Johansson
2009-09-09 18:43   ` Scott Wood
2009-09-10  9:09     ` Kenneth Johansson
2009-09-10 11:53       ` Li Tao
2009-09-10 11:58     ` Li Tao
2009-09-10 15:30       ` Scott Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AA91B86.7090805@freescale.com \
    --to=scottwood@freescale.com \
    --cc=b22598@freescale.com \
    --cc=kenneth@southpole.se \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.