[PATCH] add machine state register support

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue May 24 09:53:35 EST 2005


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.

Regards,
Ben.





More information about the Linuxppc-dev mailing list