2 * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
8 #include <asm/ptrace.h>
11 extern void timer_interrupt(struct pt_regs *);
15 #define irqs_disabled() ((mfmsr() & MSR_EE) == 0)
19 static inline void local_irq_disable(void)
24 __asm__ __volatile__("": : :"memory");
27 static inline void local_irq_enable(void)
30 __asm__ __volatile__("": : :"memory");
35 static inline void local_irq_save_ptr(unsigned long *flags)
41 __asm__ __volatile__("": : :"memory");
44 #define local_save_flags(flags) ((flags) = mfmsr())
45 #define local_irq_save(flags) local_irq_save_ptr(&flags)
46 #define local_irq_restore(flags) mtmsr(flags)
50 extern void local_irq_enable(void);
51 extern void local_irq_disable(void);
52 extern void local_irq_restore(unsigned long);
53 extern void local_save_flags_ptr(unsigned long *);
55 #define local_save_flags(flags) local_save_flags_ptr(&flags)
56 #define local_irq_save(flags) ({local_save_flags(flags);local_irq_disable();})
60 extern void do_lost_interrupts(unsigned long);
62 #define mask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->disable) irq_desc[irq].handler->disable(irq);})
63 #define unmask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->enable) irq_desc[irq].handler->enable(irq);})
64 #define ack_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->ack) irq_desc[irq].handler->ack(irq);})
66 /* Should we handle this via lost interrupts and IPIs or should we don't care like
69 struct hw_interrupt_type;
70 static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
73 #endif /* _PPC_HW_IRQ_H */
74 #endif /* __KERNEL__ */