powerpc: cleanup hw_irq.h
SET_MSR_EE() is just use in this file and doesn't provide any added value compared to mtmsr(). Drop it. Add a wrtee() inline function to use wrtee/wrteei insn. Replace #ifdefs by IS_ENABLED() Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/a28a20514d5f6df9629c1a117b667e48c4272736.1567068137.git.christophe.leroy@c-s.fr
This commit is contained in:

committed by
Michael Ellerman

parent
44448640dd
commit
b020aa9d1e
@@ -1368,6 +1368,14 @@ static inline void mtmsr_isync(unsigned long val)
|
||||
#define wrtspr(rn) asm volatile("mtspr " __stringify(rn) ",0" : \
|
||||
: : "memory")
|
||||
|
||||
static inline void wrtee(unsigned long val)
|
||||
{
|
||||
if (__builtin_constant_p(val))
|
||||
asm volatile("wrteei %0" : : "i" ((val & MSR_EE) ? 1 : 0) : "memory");
|
||||
else
|
||||
asm volatile("wrtee %0" : : "r" (val) : "memory");
|
||||
}
|
||||
|
||||
extern unsigned long msr_check_and_set(unsigned long bits);
|
||||
extern bool strict_msr_control;
|
||||
extern void __msr_check_and_clear(unsigned long bits);
|
||||
|
Reference in New Issue
Block a user