patch-2.4.0-test2 linux/arch/i386/kernel/i8259.c
Next file: linux/arch/i386/kernel/io_apic.c
Previous file: linux/arch/i386/kernel/i387.c
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Tue Jun 20 14:25:08 2000
- Orig file:
v2.4.0-test1/linux/arch/i386/kernel/i8259.c
- Orig date:
Mon Jun 19 16:31:57 2000
diff -u --recursive --new-file v2.4.0-test1/linux/arch/i386/kernel/i8259.c linux/arch/i386/kernel/i8259.c
@@ -127,7 +127,7 @@
* moves to arch independent land
*/
-static spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
static void end_8259A_irq (unsigned int irq)
{
@@ -180,10 +180,6 @@
*/
unsigned long io_apic_irqs = 0;
-/*
- * These have to be protected by the irq controller spinlock
- * before being called.
- */
void disable_8259A_irq(unsigned int irq)
{
unsigned int mask = 1 << irq;
@@ -239,6 +235,8 @@
/*
* This function assumes to be called rarely. Switching between
* 8259A registers is slow.
+ * This has to be protected by the irq controller spinlock
+ * before being called.
*/
static inline int i8259A_irq_real(unsigned int irq)
{
@@ -337,8 +335,7 @@
{
unsigned long flags;
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&i8259A_lock, flags);
outb(0xff, 0x21); /* mask all of 8259A-1 */
outb(0xff, 0xA1); /* mask all of 8259A-2 */
@@ -372,7 +369,7 @@
outb(cached_21, 0x21); /* restore master IRQ mask */
outb(cached_A1, 0xA1); /* restore slave IRQ mask */
- restore_flags(flags);
+ spin_unlock_irqrestore(&i8259A_lock, flags);
}
#ifndef CONFIG_VISWS
@@ -397,7 +394,11 @@
math_error((void *)regs->eip);
}
-static struct irqaction irq13 = { math_error_irq, 0, 0, "fpu", NULL, NULL };
+/*
+ * New motherboards sometimes make IRQ 13 be a PCI interrupt,
+ * so allow interrupt sharing.
+ */
+static struct irqaction irq13 = { math_error_irq, SA_SHIRQ, 0, "fpu", NULL, NULL };
/*
* IRQ2 is cascade interrupt to second interrupt controller
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)