4 #ifndef _ASM_POWERPC_HW_IRQ_H
5 #define _ASM_POWERPC_HW_IRQ_H
9 #include <linux/errno.h>
10 #include <linux/compiler.h>
11 #include <asm/ptrace.h>
12 #include <asm/processor.h>
23 #define PACA_IRQ_HARD_DIS 0x01
24 #define PACA_IRQ_DBELL 0x02
25 #define PACA_IRQ_EE 0x04
26 #define PACA_IRQ_DEC 0x08
27 #define PACA_IRQ_EE_EDGE 0x10
33 extern void __replay_interrupt(
unsigned int vector);
37 extern void WatchdogException(
struct pt_regs *
regs);
50 :
"i" (
offsetof(
struct paca_struct, soft_enabled)));
60 "li %1,0; lbz %0,%2(13); stb %1,%2(13)"
61 :
"=r" (
flags),
"=&r" (zero)
62 :
"i" (
offsetof(
struct paca_struct, soft_enabled))
90 #ifdef CONFIG_PPC_BOOK3E
91 #define __hard_irq_enable() asm volatile("wrteei 1" : : : "memory")
92 #define __hard_irq_disable() asm volatile("wrteei 0" : : : "memory")
94 #define __hard_irq_enable() __mtmsrd(local_paca->kernel_msr | MSR_EE, 1)
95 #define __hard_irq_disable() __mtmsrd(local_paca->kernel_msr, 1)
100 __hard_irq_disable();
101 get_paca()->soft_enabled = 0;
102 get_paca()->irq_happened |= PACA_IRQ_HARD_DIS;
106 #define hard_irq_disable hard_irq_disable
108 static inline bool lazy_irq_pending(
void)
110 return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS);
118 static inline void may_hard_irq_enable(
void)
120 get_paca()->irq_happened &= ~PACA_IRQ_HARD_DIS;
121 if (!(get_paca()->irq_happened & PACA_IRQ_EE))
125 static inline bool arch_irq_disabled_regs(
struct pt_regs *
regs)
130 extern bool prep_irq_for_idle(
void);
134 #define SET_MSR_EE(x) mtmsr(x)
143 #if defined(CONFIG_BOOKE)
144 asm volatile(
"wrtee %0" : :
"r" (
flags) :
"memory");
154 asm volatile(
"wrteei 0" : : :
"memory");
156 SET_MSR_EE(flags & ~
MSR_EE);
164 asm volatile(
"wrteei 0" : : :
"memory");
173 asm volatile(
"wrteei 1" : : :
"memory");
175 unsigned long msr = mfmsr();
182 return (flags &
MSR_EE) == 0;
190 #define hard_irq_disable() arch_local_irq_disable()
192 static inline bool arch_irq_disabled_regs(
struct pt_regs *
regs)
197 static inline void may_hard_irq_enable(
void) { }
201 #define ARCH_IRQ_INIT_FLAGS IRQ_NOREQUEST