Commit 5595d5bb authored by Anton Blanchard's avatar Anton Blanchard

ppc64: add non context synchronising version of mtmsrd

parent bc3126ff
......@@ -35,13 +35,13 @@ extern void __no_lpq_restore_flags(unsigned long);
#else
#define __save_flags(flags) ((flags) = mfmsr())
#define __restore_flags(flags) mtmsrd(flags)
#define __restore_flags(flags) __mtmsrd((flags), 1)
static inline void __cli(void)
{
unsigned long msr;
msr = mfmsr();
mtmsrd(msr & ~MSR_EE);
__mtmsrd(msr & ~MSR_EE, 1);
__asm__ __volatile__("": : :"memory");
}
......@@ -50,7 +50,7 @@ static inline void __sti(void)
unsigned long msr;
__asm__ __volatile__("": : :"memory");
msr = mfmsr();
mtmsrd(msr | MSR_EE);
__mtmsrd(msr | MSR_EE, 1);
}
static inline void __do_save_and_cli(unsigned long *flags)
......@@ -58,7 +58,7 @@ static inline void __do_save_and_cli(unsigned long *flags)
unsigned long msr;
msr = mfmsr();
*flags = msr;
mtmsrd(msr & ~MSR_EE);
__mtmsrd(msr & ~MSR_EE, 1);
__asm__ __volatile__("": : :"memory");
}
......
......@@ -579,7 +579,9 @@ GLUE(GLUE(.LT,NAME),_procname_end):
#define mfmsr() ({unsigned long rval; \
asm volatile("mfmsr %0" : "=r" (rval)); rval;})
#define mtmsrd(v) asm volatile("mtmsrd %0" : : "r" (v))
#define __mtmsrd(v, l) asm volatile("mtmsrd %0," __stringify(l) \
: : "r" (v))
#define mtmsrd(v) __mtmsrd((v), 0)
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment