diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-11-06 12:41:06 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-11-06 15:55:38 -0500 |
commit | 4a4cf77923eeb3cec40a302656d6ab5ced04ba48 (patch) | |
tree | 6388d7a2227a28697b4c833089980c26df696745 /arch/mips/sgi-ip27/ip27-irq.c | |
parent | 325d08d1a44b601fbf70c259fb61c38d2af7d309 (diff) |
[MIPS] Make irq number allocator generally available for fixing EV64120.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-irq.c')
-rw-r--r-- | arch/mips/sgi-ip27/ip27-irq.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index f01ba1f9077..270ecd3e6b4 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -354,29 +354,6 @@ static struct irq_chip bridge_irq_type = { | |||
354 | .end = end_bridge_irq, | 354 | .end = end_bridge_irq, |
355 | }; | 355 | }; |
356 | 356 | ||
357 | static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; | ||
358 | |||
359 | int allocate_irqno(void) | ||
360 | { | ||
361 | int irq; | ||
362 | |||
363 | again: | ||
364 | irq = find_first_zero_bit(irq_map, NR_IRQS); | ||
365 | |||
366 | if (irq >= NR_IRQS) | ||
367 | return -ENOSPC; | ||
368 | |||
369 | if (test_and_set_bit(irq, irq_map)) | ||
370 | goto again; | ||
371 | |||
372 | return irq; | ||
373 | } | ||
374 | |||
375 | void free_irqno(unsigned int irq) | ||
376 | { | ||
377 | clear_bit(irq, irq_map); | ||
378 | } | ||
379 | |||
380 | void __devinit register_bridge_irq(unsigned int irq) | 357 | void __devinit register_bridge_irq(unsigned int irq) |
381 | { | 358 | { |
382 | irq_desc[irq].status = IRQ_DISABLED; | 359 | irq_desc[irq].status = IRQ_DISABLED; |