Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / mips / kernel / i8259.c
index 6fb136b..2125ba5 100644 (file)
@@ -31,7 +31,7 @@ void disable_8259A_irq(unsigned int irq);
  * moves to arch independent land
  */
 
-spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(i8259A_lock);
 
 static void end_8259A_irq (unsigned int irq)
 {
@@ -52,14 +52,13 @@ static unsigned int startup_8259A_irq(unsigned int irq)
 }
 
 static struct hw_interrupt_type i8259A_irq_type = {
-       "XT-PIC",
-       startup_8259A_irq,
-       shutdown_8259A_irq,
-       enable_8259A_irq,
-       disable_8259A_irq,
-       mask_and_ack_8259A,
-       end_8259A_irq,
-       NULL
+       .typename = "XT-PIC",
+       .startup = startup_8259A_irq,
+       .shutdown = shutdown_8259A_irq,
+       .enable = enable_8259A_irq,
+       .disable = disable_8259A_irq,
+       .ack = mask_and_ack_8259A,
+       .end = end_8259A_irq,
 };
 
 /*
@@ -188,6 +187,10 @@ handle_real_irq:
                outb(cached_21,0x21);
                outb(0x60+irq,0x20);    /* 'Specific EOI' to master */
        }
+#ifdef CONFIG_MIPS_MT_SMTC
+        if (irq_hwmask[irq] & ST0_IM)
+               set_c0_status(irq_hwmask[irq] & ST0_IM);
+#endif /* CONFIG_MIPS_MT_SMTC */
        spin_unlock_irqrestore(&i8259A_lock, flags);
        return;
 
@@ -209,7 +212,7 @@ spurious_8259A_irq:
                 * lets ACK and report it. [once per IRQ]
                 */
                if (!(spurious_irq_mask & irqmask)) {
-                       printk("spurious 8259A interrupt: IRQ%d.\n", irq);
+                       printk(KERN_DEBUG "spurious 8259A interrupt: IRQ%d.\n", irq);
                        spurious_irq_mask |= irqmask;
                }
                atomic_inc(&irq_err_count);
@@ -295,7 +298,7 @@ void __init init_8259A(int auto_eoi)
  * IRQ2 is cascade interrupt to second interrupt controller
  */
 static struct irqaction irq2 = {
-       no_action, 0, 0, "cascade", NULL, NULL
+       no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL
 };
 
 static struct resource pic1_io_resource = {
@@ -308,7 +311,7 @@ static struct resource pic2_io_resource = {
 
 /*
  * On systems with i8259-style interrupt controllers we assume for
- * driver compatibility reasons interrupts 0 - 15 to be the i8295
+ * driver compatibility reasons interrupts 0 - 15 to be the i8259
  * interrupts even if the hardware uses a different interrupt numbering.
  */
 void __init init_i8259_irqs (void)
@@ -322,7 +325,7 @@ void __init init_i8259_irqs (void)
 
        for (i = 0; i < 16; i++) {
                irq_desc[i].status = IRQ_DISABLED;
-               irq_desc[i].action = 0;
+               irq_desc[i].action = NULL;
                irq_desc[i].depth = 1;
                irq_desc[i].handler = &i8259A_irq_type;
        }