diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-06-29 05:24:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:26:23 -0400 |
commit | c0ad90a32fb60f4129d0e24dfd5fd7128e2e09f2 (patch) | |
tree | 260d99ab74d33a37cbcc3557e2f18a5e96879f4d /arch | |
parent | 096c8131c573ed37939dc3f1440221c92c87e74b (diff) |
[PATCH] genirq: add ->retrigger() irq op to consolidate hw_irq_resend()
Add ->retrigger() irq op to consolidate hw_irq_resend() implementations.
(Most architectures had it defined to NOP anyway.)
NOTE: ia64 needs testing. i386 and x86_64 tested.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/io_apic.c | 9 | ||||
-rw-r--r-- | arch/ia64/kernel/irq_lsapic.c | 10 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/irq.c | 11 | ||||
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 9 |
5 files changed, 33 insertions, 10 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index afe54f257cb8..ec9ea0269d36 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2071,6 +2071,13 @@ static void set_ioapic_affinity_vector (unsigned int vector, | |||
2071 | #endif | 2071 | #endif |
2072 | #endif | 2072 | #endif |
2073 | 2073 | ||
2074 | static int ioapic_retrigger(unsigned int irq) | ||
2075 | { | ||
2076 | send_IPI_self(IO_APIC_VECTOR(irq)); | ||
2077 | |||
2078 | return 1; | ||
2079 | } | ||
2080 | |||
2074 | /* | 2081 | /* |
2075 | * Level and edge triggered IO-APIC interrupts need different handling, | 2082 | * Level and edge triggered IO-APIC interrupts need different handling, |
2076 | * so we use two separate IRQ descriptors. Edge triggered IRQs can be | 2083 | * so we use two separate IRQ descriptors. Edge triggered IRQs can be |
@@ -2090,6 +2097,7 @@ static struct hw_interrupt_type ioapic_edge_type __read_mostly = { | |||
2090 | #ifdef CONFIG_SMP | 2097 | #ifdef CONFIG_SMP |
2091 | .set_affinity = set_ioapic_affinity, | 2098 | .set_affinity = set_ioapic_affinity, |
2092 | #endif | 2099 | #endif |
2100 | .retrigger = ioapic_retrigger, | ||
2093 | }; | 2101 | }; |
2094 | 2102 | ||
2095 | static struct hw_interrupt_type ioapic_level_type __read_mostly = { | 2103 | static struct hw_interrupt_type ioapic_level_type __read_mostly = { |
@@ -2103,6 +2111,7 @@ static struct hw_interrupt_type ioapic_level_type __read_mostly = { | |||
2103 | #ifdef CONFIG_SMP | 2111 | #ifdef CONFIG_SMP |
2104 | .set_affinity = set_ioapic_affinity, | 2112 | .set_affinity = set_ioapic_affinity, |
2105 | #endif | 2113 | #endif |
2114 | .retrigger = ioapic_retrigger, | ||
2106 | }; | 2115 | }; |
2107 | 2116 | ||
2108 | static inline void init_IO_APIC_traps(void) | 2117 | static inline void init_IO_APIC_traps(void) |
diff --git a/arch/ia64/kernel/irq_lsapic.c b/arch/ia64/kernel/irq_lsapic.c index ea14e6a04409..1ab58b09f3d7 100644 --- a/arch/ia64/kernel/irq_lsapic.c +++ b/arch/ia64/kernel/irq_lsapic.c | |||
@@ -26,6 +26,13 @@ lsapic_noop (unsigned int irq) | |||
26 | /* nuthing to do... */ | 26 | /* nuthing to do... */ |
27 | } | 27 | } |
28 | 28 | ||
29 | static int lsapic_retrigger(unsigned int irq) | ||
30 | { | ||
31 | ia64_resend_irq(irq); | ||
32 | |||
33 | return 1; | ||
34 | } | ||
35 | |||
29 | struct hw_interrupt_type irq_type_ia64_lsapic = { | 36 | struct hw_interrupt_type irq_type_ia64_lsapic = { |
30 | .typename = "LSAPIC", | 37 | .typename = "LSAPIC", |
31 | .startup = lsapic_noop_startup, | 38 | .startup = lsapic_noop_startup, |
@@ -33,5 +40,6 @@ struct hw_interrupt_type irq_type_ia64_lsapic = { | |||
33 | .enable = lsapic_noop, | 40 | .enable = lsapic_noop, |
34 | .disable = lsapic_noop, | 41 | .disable = lsapic_noop, |
35 | .ack = lsapic_noop, | 42 | .ack = lsapic_noop, |
36 | .end = lsapic_noop | 43 | .end = lsapic_noop, |
44 | .retrigger = lsapic_retrigger, | ||
37 | }; | 45 | }; |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 6d7bc8ff7b3a..a0055d3d695c 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -6165,7 +6165,7 @@ pfm_load_regs (struct task_struct *task) | |||
6165 | /* | 6165 | /* |
6166 | * will replay the PMU interrupt | 6166 | * will replay the PMU interrupt |
6167 | */ | 6167 | */ |
6168 | if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR); | 6168 | if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR); |
6169 | 6169 | ||
6170 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; | 6170 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; |
6171 | } | 6171 | } |
@@ -6305,7 +6305,7 @@ pfm_load_regs (struct task_struct *task) | |||
6305 | /* | 6305 | /* |
6306 | * will replay the PMU interrupt | 6306 | * will replay the PMU interrupt |
6307 | */ | 6307 | */ |
6308 | if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR); | 6308 | if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR); |
6309 | 6309 | ||
6310 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; | 6310 | pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; |
6311 | } | 6311 | } |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index ea6a55e1a0c5..82fe6ba29727 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -125,6 +125,10 @@ static struct hw_interrupt_type cpu_interrupt_type = { | |||
125 | #ifdef CONFIG_SMP | 125 | #ifdef CONFIG_SMP |
126 | .set_affinity = cpu_set_affinity_irq, | 126 | .set_affinity = cpu_set_affinity_irq, |
127 | #endif | 127 | #endif |
128 | /* XXX: Needs to be written. We managed without it so far, but | ||
129 | * we really ought to write it. | ||
130 | */ | ||
131 | .retrigger = NULL, | ||
128 | }; | 132 | }; |
129 | 133 | ||
130 | int show_interrupts(struct seq_file *p, void *v) | 134 | int show_interrupts(struct seq_file *p, void *v) |
@@ -404,13 +408,6 @@ void __init init_IRQ(void) | |||
404 | 408 | ||
405 | } | 409 | } |
406 | 410 | ||
407 | void hw_resend_irq(struct hw_interrupt_type *type, unsigned int irq) | ||
408 | { | ||
409 | /* XXX: Needs to be written. We managed without it so far, but | ||
410 | * we really ought to write it. | ||
411 | */ | ||
412 | } | ||
413 | |||
414 | void ack_bad_irq(unsigned int irq) | 411 | void ack_bad_irq(unsigned int irq) |
415 | { | 412 | { |
416 | printk("unexpected IRQ %d\n", irq); | 413 | printk("unexpected IRQ %d\n", irq); |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 88a8736eb8ce..401b687fef21 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -1618,6 +1618,13 @@ static void set_ioapic_affinity_vector (unsigned int vector, | |||
1618 | #endif // CONFIG_SMP | 1618 | #endif // CONFIG_SMP |
1619 | #endif // CONFIG_PCI_MSI | 1619 | #endif // CONFIG_PCI_MSI |
1620 | 1620 | ||
1621 | static int ioapic_retrigger(unsigned int irq) | ||
1622 | { | ||
1623 | send_IPI_self(IO_APIC_VECTOR(irq)); | ||
1624 | |||
1625 | return 1; | ||
1626 | } | ||
1627 | |||
1621 | /* | 1628 | /* |
1622 | * Level and edge triggered IO-APIC interrupts need different handling, | 1629 | * Level and edge triggered IO-APIC interrupts need different handling, |
1623 | * so we use two separate IRQ descriptors. Edge triggered IRQs can be | 1630 | * so we use two separate IRQ descriptors. Edge triggered IRQs can be |
@@ -1638,6 +1645,7 @@ static struct hw_interrupt_type ioapic_edge_type __read_mostly = { | |||
1638 | #ifdef CONFIG_SMP | 1645 | #ifdef CONFIG_SMP |
1639 | .set_affinity = set_ioapic_affinity, | 1646 | .set_affinity = set_ioapic_affinity, |
1640 | #endif | 1647 | #endif |
1648 | .retrigger = ioapic_retrigger, | ||
1641 | }; | 1649 | }; |
1642 | 1650 | ||
1643 | static struct hw_interrupt_type ioapic_level_type __read_mostly = { | 1651 | static struct hw_interrupt_type ioapic_level_type __read_mostly = { |
@@ -1651,6 +1659,7 @@ static struct hw_interrupt_type ioapic_level_type __read_mostly = { | |||
1651 | #ifdef CONFIG_SMP | 1659 | #ifdef CONFIG_SMP |
1652 | .set_affinity = set_ioapic_affinity, | 1660 | .set_affinity = set_ioapic_affinity, |
1653 | #endif | 1661 | #endif |
1662 | .retrigger = ioapic_retrigger, | ||
1654 | }; | 1663 | }; |
1655 | 1664 | ||
1656 | static inline void init_IO_APIC_traps(void) | 1665 | static inline void init_IO_APIC_traps(void) |