linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Chenging 2 bits in MSR in ppc6xx_idle() with 1 command?
Date: Thu, 28 Dec 2006 03:30:47 +0100	[thread overview]
Message-ID: <f548f02517e8a0a9aeb09776946ec0c0@kernel.crashing.org> (raw)
In-Reply-To: <Pine.LNX.4.60.0612272135470.13342@poirot.grange>

>>> Whereas MPC8245's user manual says, that when setting the MSR_POW 
>>> bit in
>>> the MSR one may not set any other bit in it with the same 
>>> instruction.
>>> Does this mean that the above does not actually work on those (and
>>> similar) CPUs or does it work because of the loop?
>>
>> That doc bit looks a bit strange. The kernel pretty much relies on
>> setting MSR:EE and MSR:POW atomicaly.
>
> Hm, wouldn't it just work? In ppc6xx_idle() the _TLF_NAPPING bit is 
> set.
> If as a result of mtmsr only the EE bit is set and we get an interrupt,

But what if only the POW flag gets set, and EE doesn't?
That's one CPU that won't wake up anymore :-/

It sounds like changing the sequence to first set EE, sync,
isync, and only then set POW as well will work safely on all
hardware?


Segher

      parent reply	other threads:[~2006-12-28  2:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-25 20:07 Chenging 2 bits in MSR in ppc6xx_idle() with 1 command? Guennadi Liakhovetski
2006-12-26 23:48 ` Benjamin Herrenschmidt
2006-12-26 23:56   ` Guennadi Liakhovetski
2006-12-27 20:44   ` Guennadi Liakhovetski
2006-12-27 21:15     ` Benjamin Herrenschmidt
2006-12-28  2:30     ` Segher Boessenkool [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=f548f02517e8a0a9aeb09776946ec0c0@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=g.liakhovetski@gmx.de \
    --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 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).