Re: [PATCH] add machine state register support
From: Geoff Levand <hidden>
Date: 2005-05-24 17:39:55
Benjamin Herrenschmidt wrote:
On Mon, 2005-05-23 at 16:40 -0700, Geoff Levand wrote:quoted
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 <redacted> for CELFHi 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