diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-10 09:14:20 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 06:58:24 -0500 |
commit | 781295762defc709a609efc01d8bb065276cd9a2 (patch) | |
tree | 21f035b5f92571c8c3559b5e94eb0e1aa4113a36 /kernel/irq/chip.c | |
parent | 3836ca08aad4575c120ccf328652f3873eea9063 (diff) |
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>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 2a36038b8f59..08be5d182be3 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -471,6 +471,16 @@ out_unlock: | |||
471 | } | 471 | } |
472 | EXPORT_SYMBOL_GPL(handle_level_irq); | 472 | EXPORT_SYMBOL_GPL(handle_level_irq); |
473 | 473 | ||
474 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI | ||
475 | static inline void preflow_handler(struct irq_desc *desc) | ||
476 | { | ||
477 | if (desc->preflow_handler) | ||
478 | desc->preflow_handler(&desc->irq_data); | ||
479 | } | ||
480 | #else | ||
481 | static inline void preflow_handler(struct irq_desc *desc) { } | ||
482 | #endif | ||
483 | |||
474 | /** | 484 | /** |
475 | * handle_fasteoi_irq - irq handler for transparent controllers | 485 | * handle_fasteoi_irq - irq handler for transparent controllers |
476 | * @irq: the interrupt number | 486 | * @irq: the interrupt number |
@@ -503,6 +513,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | |||
503 | mask_irq(desc); | 513 | mask_irq(desc); |
504 | goto out; | 514 | goto out; |
505 | } | 515 | } |
516 | preflow_handler(desc); | ||
506 | handle_irq_event(desc); | 517 | handle_irq_event(desc); |
507 | out: | 518 | out: |
508 | desc->irq_data.chip->irq_eoi(&desc->irq_data); | 519 | desc->irq_data.chip->irq_eoi(&desc->irq_data); |