2 * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
8 #include <asm/ptrace.h>
11 extern void timer_interrupt(struct pt_regs
*);
12 extern void ppc_irq_dispatch_handler(struct pt_regs
*regs
, int irq
);
16 #define irqs_disabled() ((mfmsr() & MSR_EE) == 0)
20 static inline void local_irq_disable(void)
25 __asm__
__volatile__("": : :"memory");
28 static inline void local_irq_enable(void)
31 __asm__
__volatile__("": : :"memory");
36 static inline void local_irq_save_ptr(unsigned long *flags
)
42 __asm__
__volatile__("": : :"memory");
45 #define local_save_flags(flags) ((flags) = mfmsr())
46 #define local_irq_save(flags) local_irq_save_ptr(&flags)
47 #define local_irq_restore(flags) mtmsr(flags)
51 extern void local_irq_enable(void);
52 extern void local_irq_disable(void);
53 extern void local_irq_restore(unsigned long);
54 extern void local_save_flags_ptr(unsigned long *);
56 #define local_save_flags(flags) local_save_flags_ptr(&flags)
57 #define local_irq_save(flags) ({local_save_flags(flags);local_irq_disable();})
61 extern void do_lost_interrupts(unsigned long);
63 #define mask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->disable) irq_desc[irq].handler->disable(irq);})
64 #define unmask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->enable) irq_desc[irq].handler->enable(irq);})
65 #define ack_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->ack) irq_desc[irq].handler->ack(irq);})
67 /* Should we handle this via lost interrupts and IPIs or should we don't care like
70 struct hw_interrupt_type
;
71 static inline void hw_resend_irq(struct hw_interrupt_type
*h
, unsigned int i
) {}
74 #endif /* _PPC_HW_IRQ_H */
75 #endif /* __KERNEL__ */