patch-2.3.49 linux/arch/alpha/kernel/sys_rawhide.c
Next file: linux/arch/alpha/kernel/sys_ruffian.c
Previous file: linux/arch/alpha/kernel/sys_noritake.c
Back to the patch index
Back to the overall index
- Lines: 78
- Date:
Mon Feb 28 14:54:30 2000
- Orig file:
v2.3.48/linux/arch/alpha/kernel/sys_rawhide.c
- Orig date:
Sun Feb 20 21:12:38 2000
diff -u --recursive --new-file v2.3.48/linux/arch/alpha/kernel/sys_rawhide.c linux/arch/alpha/kernel/sys_rawhide.c
@@ -41,6 +41,7 @@
0xff0000, 0xfe0000, 0xff0000, 0xff0000
};
static unsigned int cached_irq_masks[4];
+spinlock_t rawhide_irq_lock = SPIN_LOCK_UNLOCKED;
static inline void
rawhide_update_irq_hw(int hose, int mask)
@@ -50,7 +51,7 @@
*(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose));
}
-static void
+static inline void
rawhide_enable_irq(unsigned int irq)
{
unsigned int mask, hose;
@@ -59,9 +60,11 @@
hose = irq / 24;
irq -= hose * 24;
+ spin_lock(&rawhide_irq_lock);
mask = cached_irq_masks[hose] |= 1 << irq;
mask |= hose_irq_masks[hose];
rawhide_update_irq_hw(hose, mask);
+ spin_unlock(&rawhide_irq_lock);
}
static void
@@ -73,9 +76,11 @@
hose = irq / 24;
irq -= hose * 24;
+ spin_lock(&rawhide_irq_lock);
mask = cached_irq_masks[hose] &= ~(1 << irq);
mask |= hose_irq_masks[hose];
rawhide_update_irq_hw(hose, mask);
+ spin_unlock(&rawhide_irq_lock);
}
@@ -86,6 +91,13 @@
return 0;
}
+static void
+rawhide_end_irq(unsigned int irq)
+{
+ if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
+ rawhide_enable_irq(irq);
+}
+
static struct hw_interrupt_type rawhide_irq_type = {
typename: "RAWHIDE",
startup: rawhide_startup_irq,
@@ -93,7 +105,7 @@
enable: rawhide_enable_irq,
disable: rawhide_disable_irq,
ack: rawhide_disable_irq,
- end: rawhide_enable_irq,
+ end: rawhide_end_irq,
};
static void
@@ -138,12 +150,11 @@
}
for (i = 16; i < 128; ++i) {
- irq_desc[i].status = IRQ_DISABLED;
+ irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].handler = &rawhide_irq_type;
}
init_i8259a_irqs();
- init_rtc_irq();
common_init_isa_dma();
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)