[PATCH] add machine state register support
Geoff Levand
geoffrey.levand at am.sony.com
Wed May 25 03:39:38 EST 2005
Benjamin Herrenschmidt wrote:
> On Mon, 2005-05-23 at 16:40 -0700, Geoff Levand wrote:
>
>>This patch adds routines to get and set the machine state register. These
>>are needed by power management code on some platforms.
>>
>>Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com> for CELF
>
>
> Hi Geoff !
>
> Can you tell me more about this power management code ? I tend to think
> that code that wants to do more than just using the existing accessors
> should be written in assembly...
>
> Also, there is already
>
> void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
>
> That you can use for manipulating MSR bits.
>
> Finally, I tend to prefer such small register accessors to be written as
> inline assembly in some headers. But then, I don't think you actually
> need to add anything here.
>
Sorry for the trouble, Geert is right, there are already mfmsr() and
mtmsr() in <ppc-asm/reg.h>. I found get_msr in ppc64 and assumed they
were missing for ppc. I should have looked more carefully.
-Geoff
More information about the Linuxppc-dev
mailing list