aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h66
1 files changed, 25 insertions, 41 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 6f463606c318..c64f3cc7e870 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -21,6 +21,12 @@
21 21
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/ptrace.h> 23#include <asm/ptrace.h>
24#include <asm/irq_regs.h>
25
26struct irq_desc;
27typedef void fastcall (*irq_flow_handler_t)(unsigned int irq,
28 struct irq_desc *desc);
29
24 30
25/* 31/*
26 * IRQ line status. 32 * IRQ line status.
@@ -139,9 +145,7 @@ struct irq_chip {
139 * Pad this out to 32 bytes for cache and indexing reasons. 145 * Pad this out to 32 bytes for cache and indexing reasons.
140 */ 146 */
141struct irq_desc { 147struct irq_desc {
142 void fastcall (*handle_irq)(unsigned int irq, 148 irq_flow_handler_t handle_irq;
143 struct irq_desc *desc,
144 struct pt_regs *regs);
145 struct irq_chip *chip; 149 struct irq_chip *chip;
146 void *handler_data; 150 void *handler_data;
147 void *chip_data; 151 void *chip_data;
@@ -254,43 +258,31 @@ static inline int select_smp_affinity(unsigned int irq)
254extern int no_irq_affinity; 258extern int no_irq_affinity;
255 259
256/* Handle irq action chains: */ 260/* Handle irq action chains: */
257extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, 261extern int handle_IRQ_event(unsigned int irq, struct irqaction *action);
258 struct irqaction *action);
259 262
260/* 263/*
261 * Built-in IRQ handlers for various IRQ types, 264 * Built-in IRQ handlers for various IRQ types,
262 * callable via desc->chip->handle_irq() 265 * callable via desc->chip->handle_irq()
263 */ 266 */
264extern void fastcall 267extern void fastcall handle_level_irq(unsigned int irq, struct irq_desc *desc);
265handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); 268extern void fastcall handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
266extern void fastcall 269extern void fastcall handle_edge_irq(unsigned int irq, struct irq_desc *desc);
267handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, 270extern void fastcall handle_simple_irq(unsigned int irq, struct irq_desc *desc);
268 struct pt_regs *regs); 271extern void fastcall handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
269extern void fastcall 272extern void fastcall handle_bad_irq(unsigned int irq, struct irq_desc *desc);
270handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
271extern void fastcall
272handle_simple_irq(unsigned int irq, struct irq_desc *desc,
273 struct pt_regs *regs);
274extern void fastcall
275handle_percpu_irq(unsigned int irq, struct irq_desc *desc,
276 struct pt_regs *regs);
277extern void fastcall
278handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
279 273
280/* 274/*
281 * Get a descriptive string for the highlevel handler, for 275 * Get a descriptive string for the highlevel handler, for
282 * /proc/interrupts output: 276 * /proc/interrupts output:
283 */ 277 */
284extern const char * 278extern const char *handle_irq_name(irq_flow_handler_t handle);
285handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
286 struct pt_regs *));
287 279
288/* 280/*
289 * Monolithic do_IRQ implementation. 281 * Monolithic do_IRQ implementation.
290 * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) 282 * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
291 */ 283 */
292#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 284#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
293extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); 285extern fastcall unsigned int __do_IRQ(unsigned int irq);
294#endif 286#endif
295 287
296/* 288/*
@@ -299,23 +291,23 @@ extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
299 * irqchip-style controller then we call the ->handle_irq() handler, 291 * irqchip-style controller then we call the ->handle_irq() handler,
300 * and it calls __do_IRQ() if it's attached to an irqtype-style controller. 292 * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
301 */ 293 */
302static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) 294static inline void generic_handle_irq(unsigned int irq)
303{ 295{
304 struct irq_desc *desc = irq_desc + irq; 296 struct irq_desc *desc = irq_desc + irq;
305 297
306#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 298#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
307 desc->handle_irq(irq, desc, regs); 299 desc->handle_irq(irq, desc);
308#else 300#else
309 if (likely(desc->handle_irq)) 301 if (likely(desc->handle_irq))
310 desc->handle_irq(irq, desc, regs); 302 desc->handle_irq(irq, desc);
311 else 303 else
312 __do_IRQ(irq, regs); 304 __do_IRQ(irq);
313#endif 305#endif
314} 306}
315 307
316/* Handling of unhandled and spurious interrupts: */ 308/* Handling of unhandled and spurious interrupts: */
317extern void note_interrupt(unsigned int irq, struct irq_desc *desc, 309extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
318 int action_ret, struct pt_regs *regs); 310 int action_ret);
319 311
320/* Resending of interrupts :*/ 312/* Resending of interrupts :*/
321void check_irq_resend(struct irq_desc *desc, unsigned int irq); 313void check_irq_resend(struct irq_desc *desc, unsigned int irq);
@@ -335,22 +327,15 @@ extern struct irq_chip dummy_irq_chip;
335 327
336extern void 328extern void
337set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, 329set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
338 void fastcall (*handle)(unsigned int, 330 irq_flow_handler_t handle);
339 struct irq_desc *,
340 struct pt_regs *));
341extern void 331extern void
342__set_irq_handler(unsigned int irq, 332__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained);
343 void fastcall (*handle)(unsigned int, struct irq_desc *,
344 struct pt_regs *),
345 int is_chained);
346 333
347/* 334/*
348 * Set a highlevel flow handler for a given IRQ: 335 * Set a highlevel flow handler for a given IRQ:
349 */ 336 */
350static inline void 337static inline void
351set_irq_handler(unsigned int irq, 338set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
352 void fastcall (*handle)(unsigned int, struct irq_desc *,
353 struct pt_regs *))
354{ 339{
355 __set_irq_handler(irq, handle, 0); 340 __set_irq_handler(irq, handle, 0);
356} 341}
@@ -362,8 +347,7 @@ set_irq_handler(unsigned int irq,
362 */ 347 */
363static inline void 348static inline void
364set_irq_chained_handler(unsigned int irq, 349set_irq_chained_handler(unsigned int irq,
365 void fastcall (*handle)(unsigned int, struct irq_desc *, 350 irq_flow_handler_t handle)
366 struct pt_regs *))
367{ 351{
368 __set_irq_handler(irq, handle, 1); 352 __set_irq_handler(irq, handle, 1);
369} 353}