0001
0002
0003
0004
0005
0006
0007 #ifndef __IRQCHIP_CHAINED_IRQ_H
0008 #define __IRQCHIP_CHAINED_IRQ_H
0009
0010 #include <linux/irq.h>
0011
0012
0013
0014
0015
0016 static inline void chained_irq_enter(struct irq_chip *chip,
0017 struct irq_desc *desc)
0018 {
0019
0020 if (chip->irq_eoi)
0021 return;
0022
0023 if (chip->irq_mask_ack) {
0024 chip->irq_mask_ack(&desc->irq_data);
0025 } else {
0026 chip->irq_mask(&desc->irq_data);
0027 if (chip->irq_ack)
0028 chip->irq_ack(&desc->irq_data);
0029 }
0030 }
0031
0032 static inline void chained_irq_exit(struct irq_chip *chip,
0033 struct irq_desc *desc)
0034 {
0035 if (chip->irq_eoi)
0036 chip->irq_eoi(&desc->irq_data);
0037 else
0038 chip->irq_unmask(&desc->irq_data);
0039 }
0040
0041 #endif