- unsigned long irq;
- struct busdevice *busdev = (struct busdevice *) dev;
-
- /*
- Don't need to protect OFFSET_IRR with spinlock since this is
- the only place it's touched.
- Protect busdev_region by disabling this region's interrupts,
- modifying the region, and then re-enabling the region.
- */
-
- irq = gsc_readl(busdev->hpa+OFFSET_IRR);
- if (irq == 0) {
- printk(KERN_ERR "%s: barking without apparent reason.\n", busdev->name);
- } else {
- DEBPRINTK ("%s (0x%x) barked, mask=0x%x, irq=%d\n",
- busdev->name, busdev->busdev_region->data.irqbase,
- irq, GSC_FIX_IRQ(ffs(irq))+1 );
-
- do_irq_mask(irq, busdev->busdev_region, regs);
- }
+ unsigned long irr;
+ struct gsc_asic *gsc_asic = dev;
+
+ irr = gsc_readl(gsc_asic->hpa + OFFSET_IRR);
+ if (irr == 0)
+ return IRQ_NONE;
+
+ DEBPRINTK("%s intr, mask=0x%x\n", gsc_asic->name, irr);
+
+ do {
+ int local_irq = __ffs(irr);
+ unsigned int irq = gsc_asic->global_irq[local_irq];
+ __do_IRQ(irq, regs);
+ irr &= ~(1 << local_irq);
+ } while (irr);
+