From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 1AD20DDEE5 for ; Thu, 28 Dec 2006 13:30:25 +1100 (EST) In-Reply-To: References: <1167176934.3522.15.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: From: Segher Boessenkool Subject: Re: Chenging 2 bits in MSR in ppc6xx_idle() with 1 command? Date: Thu, 28 Dec 2006 03:30:47 +0100 To: Guennadi Liakhovetski Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , >>> 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