set_msr() and get_msr() are defined and used twice.
This patch moves them into ppc.h
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
ulong get_ddr_freq(ulong);
#endif
+static inline unsigned long get_msr(void)
+{
+ unsigned long msr;
+
+ asm volatile ("mfmsr %0" : "=r" (msr) : );
+
+ return msr;
+}
+
+static inline void set_msr(unsigned long msr)
+{
+ asm volatile ("mtmsr %0" : : "r" (msr));
+}
+
#endif /* !__ASSEMBLY__ */
#ifdef CONFIG_PPC
static unsigned decrementer_count; /* count value for 1e6/HZ microseconds */
-static __inline__ unsigned long get_msr (void)
-{
- unsigned long msr;
-
- asm volatile ("mfmsr %0":"=r" (msr):);
-
- return msr;
-}
-
-static __inline__ void set_msr (unsigned long msr)
-{
- asm volatile ("mtmsr %0"::"r" (msr));
-}
-
static __inline__ unsigned long get_dec (void)
{
unsigned long val;
: "=&r"(temp) : "r" (buf), "r" (val));
}
-static inline unsigned long
-get_msr(void)
-{
- unsigned long msr;
- asm volatile("mfmsr %0" : "=r" (msr):);
- return msr;
-}
-
-static inline void
-set_msr(unsigned long msr)
-{
- asm volatile("mtmsr %0" : : "r" (msr));
-}
-
/* Convert the SPARC hardware trap type code to a unix signal number. */
/*
* This table contains the mapping between PowerPC hardware trap types, and