aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip27
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-11-06 12:41:06 -0500
committerRalf Baechle <ralf@linux-mips.org>2006-11-06 15:55:38 -0500
commit4a4cf77923eeb3cec40a302656d6ab5ced04ba48 (patch)
tree6388d7a2227a28697b4c833089980c26df696745 /arch/mips/sgi-ip27
parent325d08d1a44b601fbf70c259fb61c38d2af7d309 (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')
-rw-r--r--arch/mips/sgi-ip27/ip27-irq.c23
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c2
2 files changed, 0 insertions, 25 deletions
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index f01ba1f90770..270ecd3e6b4a 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
357static unsigned long irq_map[NR_IRQS / BITS_PER_LONG];
358
359int allocate_irqno(void)
360{
361 int irq;
362
363again:
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
375void free_irqno(unsigned int irq)
376{
377 clear_bit(irq, irq_map);
378}
379
380void __devinit register_bridge_irq(unsigned int irq) 357void __devinit register_bridge_irq(unsigned int irq)
381{ 358{
382 irq_desc[irq].status = IRQ_DISABLED; 359 irq_desc[irq].status = IRQ_DISABLED;
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index c965705f3427..5e82a268e3c9 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -214,8 +214,6 @@ static struct irqaction rt_irqaction = {
214 .name = "timer" 214 .name = "timer"
215}; 215};
216 216
217extern int allocate_irqno(void);
218
219void __init plat_timer_setup(struct irqaction *irq) 217void __init plat_timer_setup(struct irqaction *irq)
220{ 218{
221 int irqno = allocate_irqno(); 219 int irqno = allocate_irqno();