aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/interrupt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r--include/linux/interrupt.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 75f3f00ac1e5..d7e7a7660c6c 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -77,6 +77,18 @@ enum {
77 IRQTF_AFFINITY, 77 IRQTF_AFFINITY,
78}; 78};
79 79
80/**
81 * These values can be returned by request_any_context_irq() and
82 * describe the context the interrupt will be run in.
83 *
84 * IRQC_IS_HARDIRQ - interrupt runs in hardirq context
85 * IRQC_IS_NESTED - interrupt runs in a nested threaded context
86 */
87enum {
88 IRQC_IS_HARDIRQ = 0,
89 IRQC_IS_NESTED,
90};
91
80typedef irqreturn_t (*irq_handler_t)(int, void *); 92typedef irqreturn_t (*irq_handler_t)(int, void *);
81 93
82/** 94/**
@@ -120,6 +132,10 @@ request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags,
120 return request_threaded_irq(irq, handler, NULL, flags, name, dev); 132 return request_threaded_irq(irq, handler, NULL, flags, name, dev);
121} 133}
122 134
135extern int __must_check
136request_any_context_irq(unsigned int irq, irq_handler_t handler,
137 unsigned long flags, const char *name, void *dev_id);
138
123extern void exit_irq_thread(void); 139extern void exit_irq_thread(void);
124#else 140#else
125 141
@@ -141,6 +157,13 @@ request_threaded_irq(unsigned int irq, irq_handler_t handler,
141 return request_irq(irq, handler, flags, name, dev); 157 return request_irq(irq, handler, flags, name, dev);
142} 158}
143 159
160static inline int __must_check
161request_any_context_irq(unsigned int irq, irq_handler_t handler,
162 unsigned long flags, const char *name, void *dev_id)
163{
164 return request_irq(irq, handler, flags, name, dev_id);
165}
166
144static inline void exit_irq_thread(void) { } 167static inline void exit_irq_thread(void) { }
145#endif 168#endif
146 169