diff options
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 66 |
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 | |||
26 | struct irq_desc; | ||
27 | typedef 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 | */ |
141 | struct irq_desc { | 147 | struct 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) | |||
254 | extern int no_irq_affinity; | 258 | extern int no_irq_affinity; |
255 | 259 | ||
256 | /* Handle irq action chains: */ | 260 | /* Handle irq action chains: */ |
257 | extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | 261 | extern 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 | */ |
264 | extern void fastcall | 267 | extern void fastcall handle_level_irq(unsigned int irq, struct irq_desc *desc); |
265 | handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); | 268 | extern void fastcall handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); |
266 | extern void fastcall | 269 | extern void fastcall handle_edge_irq(unsigned int irq, struct irq_desc *desc); |
267 | handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, | 270 | extern void fastcall handle_simple_irq(unsigned int irq, struct irq_desc *desc); |
268 | struct pt_regs *regs); | 271 | extern void fastcall handle_percpu_irq(unsigned int irq, struct irq_desc *desc); |
269 | extern void fastcall | 272 | extern void fastcall handle_bad_irq(unsigned int irq, struct irq_desc *desc); |
270 | handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); | ||
271 | extern void fastcall | ||
272 | handle_simple_irq(unsigned int irq, struct irq_desc *desc, | ||
273 | struct pt_regs *regs); | ||
274 | extern void fastcall | ||
275 | handle_percpu_irq(unsigned int irq, struct irq_desc *desc, | ||
276 | struct pt_regs *regs); | ||
277 | extern void fastcall | ||
278 | handle_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 | */ |
284 | extern const char * | 278 | extern const char *handle_irq_name(irq_flow_handler_t handle); |
285 | handle_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 |
293 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); | 285 | extern 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 | */ |
302 | static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) | 294 | static 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: */ |
317 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | 309 | extern 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 :*/ |
321 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 313 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
@@ -335,22 +327,15 @@ extern struct irq_chip dummy_irq_chip; | |||
335 | 327 | ||
336 | extern void | 328 | extern void |
337 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 329 | set_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 *)); | ||
341 | extern void | 331 | extern 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 | */ |
350 | static inline void | 337 | static inline void |
351 | set_irq_handler(unsigned int irq, | 338 | set_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 | */ |
363 | static inline void | 348 | static inline void |
364 | set_irq_chained_handler(unsigned int irq, | 349 | set_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 | } |