genirq: Add preflow handler support

sparc64 needs to call a preflow handler on certain interrupts befor
calling the action chain. Integrate it into handle_fasteoi_irq. Must
be enabled via CONFIG_IRQ_FASTEOI_PREFLOW. No impact when disabled.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
This commit is contained in:
Thomas Gleixner
2011-02-10 15:14:20 +01:00
parent 3836ca08aa
commit 781295762d
4 changed files with 30 additions and 1 deletions

View File

@@ -471,6 +471,16 @@ out_unlock:
}
EXPORT_SYMBOL_GPL(handle_level_irq);
#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
static inline void preflow_handler(struct irq_desc *desc)
{
if (desc->preflow_handler)
desc->preflow_handler(&desc->irq_data);
}
#else
static inline void preflow_handler(struct irq_desc *desc) { }
#endif
/**
* handle_fasteoi_irq - irq handler for transparent controllers
* @irq: the interrupt number
@@ -503,6 +513,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
mask_irq(desc);
goto out;
}
preflow_handler(desc);
handle_irq_event(desc);
out:
desc->irq_data.chip->irq_eoi(&desc->irq_data);