diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-10 15:14:20 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 12:58:24 +0100 |
commit | 781295762defc709a609efc01d8bb065276cd9a2 (patch) | |
tree | 21f035b5f92571c8c3559b5e94eb0e1aa4113a36 /include | |
parent | 3836ca08aad4575c120ccf328652f3873eea9063 (diff) | |
download | linux-stable-781295762defc709a609efc01d8bb065276cd9a2.tar.gz linux-stable-781295762defc709a609efc01d8bb065276cd9a2.tar.bz2 linux-stable-781295762defc709a609efc01d8bb065276cd9a2.zip |
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 'include')
-rw-r--r-- | include/linux/irq.h | 3 | ||||
-rw-r--r-- | include/linux/irqdesc.h | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 3e29e2f42e04..36390970693c 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -29,9 +29,10 @@ #include <asm/irq_regs.h> struct irq_desc; +struct irq_data; typedef void (*irq_flow_handler_t)(unsigned int irq, struct irq_desc *desc); - +typedef void (*irq_preflow_handler_t)(struct irq_data *data); /* * IRQ line status. diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 36c95f08023d..2f87d6441302 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -63,6 +63,9 @@ struct irq_desc { struct timer_rand_state *timer_rand_state; unsigned int __percpu *kstat_irqs; irq_flow_handler_t handle_irq; +#ifdef CONFIG_IRQ_PREFLOW_FASTEOI + irq_preflow_handler_t preflow_handler; +#endif struct irqaction *action; /* IRQ action list */ #ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT unsigned int status_use_accessors; @@ -187,6 +190,17 @@ static inline void __set_irq_handler_unlocked(int irq, desc = irq_to_desc(irq); desc->handle_irq = handler; } + +#ifdef CONFIG_IRQ_PREFLOW_FASTEOI +static inline void +__irq_set_preflow_handler(unsigned int irq, irq_preflow_handler_t handler) +{ + struct irq_desc *desc; + + desc = irq_to_desc(irq); + desc->preflow_handler = handler; +} +#endif #endif #endif |