Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ee41eea947ebe2f1f627fafe0e429b5dcaaab944
Commit:     ee41eea947ebe2f1f627fafe0e429b5dcaaab944
Parent:     d23f5099297c0f017ba4fb165dc9879bda11f9ce
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 21 15:39:32 2007 +1100
Committer:  Josh Boyer <[EMAIL PROTECTED]>
CommitDate: Sun Dec 23 13:14:22 2007 -0600

    [POWERPC] 4xx: Add mfspr/mtspr inline macros to 4xx bootwrapper
    
    The 4xx bootwrapper occasionally needs to access SPR registers,
    this adds mfspr/mtspr wrappers to it.
    
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Josh Boyer <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/reg.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/reg.h b/arch/powerpc/boot/reg.h
index d3cd9ee..9c2c997 100644
--- a/arch/powerpc/boot/reg.h
+++ b/arch/powerpc/boot/reg.h
@@ -16,6 +16,14 @@ static inline u32 mfpvr(void)
        return pvr;
 }
 
+#define __stringify_1(x)       #x
+#define __stringify(x)         __stringify_1(x)
+
+#define mfspr(rn)      ({unsigned long rval; \
+                       asm volatile("mfspr %0," __stringify(rn) \
+                               : "=r" (rval)); rval; })
+#define mtspr(rn, v)   asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
+
 register void *__stack_pointer asm("r1");
 #define get_sp()       (__stack_pointer)
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to