aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-10 09:14:20 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:24 -0500
commit781295762defc709a609efc01d8bb065276cd9a2 (patch)
tree21f035b5f92571c8c3559b5e94eb0e1aa4113a36 /include/linux
parent3836ca08aad4575c120ccf328652f3873eea9063 (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 'include/linux')
-rw-r--r--include/linux/irq.h3
-rw-r--r--include/linux/irqdesc.h14
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 @@
29#include <asm/irq_regs.h> 29#include <asm/irq_regs.h>
30 30
31struct irq_desc; 31struct irq_desc;
32struct irq_data;
32typedef void (*irq_flow_handler_t)(unsigned int irq, 33typedef void (*irq_flow_handler_t)(unsigned int irq,
33 struct irq_desc *desc); 34 struct irq_desc *desc);
34 35typedef void (*irq_preflow_handler_t)(struct irq_data *data);
35 36
36/* 37/*
37 * IRQ line status. 38 * 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 {
63 struct timer_rand_state *timer_rand_state; 63 struct timer_rand_state *timer_rand_state;
64 unsigned int __percpu *kstat_irqs; 64 unsigned int __percpu *kstat_irqs;
65 irq_flow_handler_t handle_irq; 65 irq_flow_handler_t handle_irq;
66#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
67 irq_preflow_handler_t preflow_handler;
68#endif
66 struct irqaction *action; /* IRQ action list */ 69 struct irqaction *action; /* IRQ action list */
67#ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT 70#ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
68 unsigned int status_use_accessors; 71 unsigned int status_use_accessors;
@@ -187,6 +190,17 @@ static inline void __set_irq_handler_unlocked(int irq,
187 desc = irq_to_desc(irq); 190 desc = irq_to_desc(irq);
188 desc->handle_irq = handler; 191 desc->handle_irq = handler;
189} 192}
193
194#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
195static inline void
196__irq_set_preflow_handler(unsigned int irq, irq_preflow_handler_t handler)
197{
198 struct irq_desc *desc;
199
200 desc = irq_to_desc(irq);
201 desc->preflow_handler = handler;
202}
203#endif
190#endif 204#endif
191 205
192#endif 206#endif