diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-06-29 05:25:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:26:26 -0400 |
commit | 47c2a3aa4475d27073dd3c7e183fcc13f495c8f5 (patch) | |
tree | d151e03da804103753977c2c94e17b71104e3d35 | |
parent | f702d7013c7470284843a6370aaa53b8b75c5a40 (diff) |
[PATCH] genirq: add chip->eoi(), fastack -> fasteoi
Clean up the fastack concept by turning it into fasteoi and introducing the
->eoi() method for chips.
This also allows the cleanup of an i386 EOI quirk - now the quirk is
cleanly separated from the pure ACK implementation.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/linux/irq.h | 6 | ||||
-rw-r--r-- | kernel/irq/chip.c | 25 |
2 files changed, 15 insertions, 16 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 0d8eaf3e4036..0832149cdb18 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -74,7 +74,8 @@ struct proc_dir_entry; | |||
74 | * @mask: mask an interrupt source | 74 | * @mask: mask an interrupt source |
75 | * @mask_ack: ack and mask an interrupt source | 75 | * @mask_ack: ack and mask an interrupt source |
76 | * @unmask: unmask an interrupt source | 76 | * @unmask: unmask an interrupt source |
77 | * @end: end of interrupt | 77 | * @eoi: end of interrupt - chip level |
78 | * @end: end of interrupt - flow level | ||
78 | * @set_affinity: set the CPU affinity on SMP machines | 79 | * @set_affinity: set the CPU affinity on SMP machines |
79 | * @retrigger: resend an IRQ to the CPU | 80 | * @retrigger: resend an IRQ to the CPU |
80 | * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ | 81 | * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ |
@@ -94,6 +95,7 @@ struct irq_chip { | |||
94 | void (*mask)(unsigned int irq); | 95 | void (*mask)(unsigned int irq); |
95 | void (*mask_ack)(unsigned int irq); | 96 | void (*mask_ack)(unsigned int irq); |
96 | void (*unmask)(unsigned int irq); | 97 | void (*unmask)(unsigned int irq); |
98 | void (*eoi)(unsigned int irq); | ||
97 | 99 | ||
98 | void (*end)(unsigned int irq); | 100 | void (*end)(unsigned int irq); |
99 | void (*set_affinity)(unsigned int irq, cpumask_t dest); | 101 | void (*set_affinity)(unsigned int irq, cpumask_t dest); |
@@ -287,7 +289,7 @@ extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | |||
287 | extern void fastcall | 289 | extern void fastcall |
288 | handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); | 290 | handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); |
289 | extern void fastcall | 291 | extern void fastcall |
290 | handle_fastack_irq(unsigned int irq, struct irq_desc *desc, | 292 | handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, |
291 | struct pt_regs *regs); | 293 | struct pt_regs *regs); |
292 | extern void fastcall | 294 | extern void fastcall |
293 | handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); | 295 | handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index a99047a324eb..4a0952d9458b 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -280,18 +280,18 @@ out: | |||
280 | } | 280 | } |
281 | 281 | ||
282 | /** | 282 | /** |
283 | * handle_fastack_irq - irq handler for transparent controllers | 283 | * handle_fasteoi_irq - irq handler for transparent controllers |
284 | * @irq: the interrupt number | 284 | * @irq: the interrupt number |
285 | * @desc: the interrupt description structure for this irq | 285 | * @desc: the interrupt description structure for this irq |
286 | * @regs: pointer to a register structure | 286 | * @regs: pointer to a register structure |
287 | * | 287 | * |
288 | * Only a single callback will be issued to the chip: an ->ack() | 288 | * Only a single callback will be issued to the chip: an ->eoi() |
289 | * call when the interrupt has been serviced. This enables support | 289 | * call when the interrupt has been serviced. This enables support |
290 | * for modern forms of interrupt handlers, which handle the flow | 290 | * for modern forms of interrupt handlers, which handle the flow |
291 | * details in hardware, transparently. | 291 | * details in hardware, transparently. |
292 | */ | 292 | */ |
293 | void fastcall | 293 | void fastcall |
294 | handle_fastack_irq(unsigned int irq, struct irq_desc *desc, | 294 | handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, |
295 | struct pt_regs *regs) | 295 | struct pt_regs *regs) |
296 | { | 296 | { |
297 | unsigned int cpu = smp_processor_id(); | 297 | unsigned int cpu = smp_processor_id(); |
@@ -327,10 +327,7 @@ handle_fastack_irq(unsigned int irq, struct irq_desc *desc, | |||
327 | spin_lock(&desc->lock); | 327 | spin_lock(&desc->lock); |
328 | desc->status &= ~IRQ_INPROGRESS; | 328 | desc->status &= ~IRQ_INPROGRESS; |
329 | out: | 329 | out: |
330 | if (!(desc->status & IRQ_DISABLED)) | 330 | desc->chip->eoi(irq); |
331 | desc->chip->ack(irq); | ||
332 | else | ||
333 | desc->chip->mask(irq); | ||
334 | 331 | ||
335 | spin_unlock(&desc->lock); | 332 | spin_unlock(&desc->lock); |
336 | } | 333 | } |
@@ -510,19 +507,19 @@ handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, | |||
510 | struct pt_regs *)) | 507 | struct pt_regs *)) |
511 | { | 508 | { |
512 | if (handle == handle_level_irq) | 509 | if (handle == handle_level_irq) |
513 | return "level "; | 510 | return "level "; |
514 | if (handle == handle_fastack_irq) | 511 | if (handle == handle_fasteoi_irq) |
515 | return "level "; | 512 | return "fasteoi"; |
516 | if (handle == handle_edge_irq) | 513 | if (handle == handle_edge_irq) |
517 | return "edge "; | 514 | return "edge "; |
518 | if (handle == handle_simple_irq) | 515 | if (handle == handle_simple_irq) |
519 | return "simple"; | 516 | return "simple "; |
520 | #ifdef CONFIG_SMP | 517 | #ifdef CONFIG_SMP |
521 | if (handle == handle_percpu_irq) | 518 | if (handle == handle_percpu_irq) |
522 | return "percpu"; | 519 | return "percpu "; |
523 | #endif | 520 | #endif |
524 | if (handle == handle_bad_irq) | 521 | if (handle == handle_bad_irq) |
525 | return "bad "; | 522 | return "bad "; |
526 | 523 | ||
527 | return NULL; | 524 | return NULL; |
528 | } | 525 | } |