diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-11-13 11:13:18 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-11-29 20:14:46 -0500 |
commit | 1417836e81c0ab8f5a0bfeafa90d3eaa41b2a067 (patch) | |
tree | 0274893cb78ca2e1bb85c3eee0c07a85e0b83d04 /arch/mips/mips-boards | |
parent | 1603b5aca4f15b34848fb5594d0c7b6333b99144 (diff) |
[MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq
Further incorporation of generic irq framework. Replacing __do_IRQ()
by proper flow handler would make the irq handling path a bit simpler
and faster.
* use generic_handle_irq() instead of __do_IRQ().
* use handle_level_irq for obvious level-type irq chips.
* use handle_percpu_irq for irqs marked as IRQ_PER_CPU.
* setup .eoi routine for irq chips possibly used with handle_percpu_irq.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mips-boards')
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_int.c | 3 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/time.c | 1 | ||||
-rw-r--r-- | arch/mips/mips-boards/sim/sim_time.c | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c index 7c710040d3f1..43dba6ce6603 100644 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ b/arch/mips/mips-boards/atlas/atlas_int.c | |||
@@ -74,6 +74,7 @@ static struct irq_chip atlas_irq_type = { | |||
74 | .mask = disable_atlas_irq, | 74 | .mask = disable_atlas_irq, |
75 | .mask_ack = disable_atlas_irq, | 75 | .mask_ack = disable_atlas_irq, |
76 | .unmask = enable_atlas_irq, | 76 | .unmask = enable_atlas_irq, |
77 | .eoi = enable_atlas_irq, | ||
77 | .end = end_atlas_irq, | 78 | .end = end_atlas_irq, |
78 | }; | 79 | }; |
79 | 80 | ||
@@ -207,7 +208,7 @@ static inline void init_atlas_irqs (int base) | |||
207 | atlas_hw0_icregs->intrsten = 0xffffffff; | 208 | atlas_hw0_icregs->intrsten = 0xffffffff; |
208 | 209 | ||
209 | for (i = ATLAS_INT_BASE; i <= ATLAS_INT_END; i++) | 210 | for (i = ATLAS_INT_BASE; i <= ATLAS_INT_END; i++) |
210 | set_irq_chip(i, &atlas_irq_type); | 211 | set_irq_chip_and_handler(i, &atlas_irq_type, handle_level_irq); |
211 | } | 212 | } |
212 | 213 | ||
213 | static struct irqaction atlasirq = { | 214 | static struct irqaction atlasirq = { |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index d817c60c5ca5..e4604c73f02e 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -288,6 +288,7 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
288 | The effect is that the int remains disabled on the second cpu. | 288 | The effect is that the int remains disabled on the second cpu. |
289 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ | 289 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ |
290 | irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; | 290 | irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; |
291 | set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); | ||
291 | #endif | 292 | #endif |
292 | 293 | ||
293 | /* to generate the first timer interrupt */ | 294 | /* to generate the first timer interrupt */ |
diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c index 24a4ed00cc0a..f2d998d2c169 100644 --- a/arch/mips/mips-boards/sim/sim_time.c +++ b/arch/mips/mips-boards/sim/sim_time.c | |||
@@ -203,7 +203,8 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
203 | on seperate cpu's the first one tries to handle the second interrupt. | 203 | on seperate cpu's the first one tries to handle the second interrupt. |
204 | The effect is that the int remains disabled on the second cpu. | 204 | The effect is that the int remains disabled on the second cpu. |
205 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ | 205 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ |
206 | irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; | 206 | irq_desc[mips_cpu_timer_irq].flags |= IRQ_PER_CPU; |
207 | set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); | ||
207 | #endif | 208 | #endif |
208 | 209 | ||
209 | /* to generate the first timer interrupt */ | 210 | /* to generate the first timer interrupt */ |