patch-2.3.48 linux/arch/mips/kernel/irq.c

Next file: linux/arch/mips/kernel/mips_ksyms.c
Previous file: linux/arch/mips/kernel/irixsig.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/arch/mips/kernel/irq.c linux/arch/mips/kernel/irq.c
@@ -1,4 +1,4 @@
-/* $Id: irq.c,v 1.15 1999/02/25 21:50:49 tsbogend Exp $
+/* $Id: irq.c,v 1.20 2000/02/23 00:41:00 ralf Exp $
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -29,6 +29,7 @@
 #include <asm/mipsregs.h>
 #include <asm/system.h>
 #include <asm/sni.h>
+#include <asm/nile4.h>
 
 /*
  * This contains the irq mask for both 8259A irq controllers, it's an
@@ -72,7 +73,7 @@
 	}
 }
 
-void disable_irq(unsigned int irq_nr)
+void i8259_disable_irq(unsigned int irq_nr)
 {
 	unsigned long flags;
 
@@ -81,7 +82,7 @@
 	restore_flags(flags);
 }
 
-void enable_irq(unsigned int irq_nr)
+void i8259_enable_irq(unsigned int irq_nr)
 {
 	unsigned long flags;
 	save_and_cli(flags);
@@ -123,8 +124,6 @@
 	return len;
 }
 
-atomic_t __mips_bh_counter;
-
 static inline void i8259_mask_and_ack_irq(int irq)
 {
 	cached_irq_mask |= 1 << irq;
@@ -147,7 +146,7 @@
 	int do_random, cpu;
 
 	cpu = smp_processor_id();
-	hardirq_enter(cpu);
+	irq_enter(cpu);
 
 	if (irq >= 16)
 		goto out;
@@ -175,7 +174,7 @@
 	unmask_irq (irq);
 
 out:
-	hardirq_exit(cpu);
+	irq_exit(cpu);
 }
 
 /*
@@ -191,7 +190,7 @@
 	int do_random, cpu;
 
 	cpu = smp_processor_id();
-	hardirq_enter(cpu);
+	irq_enter(cpu);
 	kstat.irqs[cpu][irq]++;
 
 	action = *(irq + irq_action);
@@ -209,7 +208,10 @@
 			add_interrupt_randomness(irq);
 		__cli();
 	}
-	hardirq_exit(cpu);
+	irq_exit(cpu);
+
+	if (softirq_state[cpu].active&softirq_state[cpu].mask)
+		do_softirq();
 
 	/* unmasking and bottom half handling is done magically for us. */
 }
@@ -245,7 +247,10 @@
 	*p = new;
 
 	if (!shared) {
-		unmask_irq(irq);
+		if (is_i8259_irq(irq))
+		    unmask_irq(irq);
+		else
+		    nile4_enable_irq(irq_to_nile4(irq));
 	}
 	restore_flags(flags);
 	return 0;
@@ -356,7 +361,7 @@
 	return ((irq == 2) ? 9 : irq);
 }
 
-static void __init i8259_init(void)
+void __init i8259_init(void)
 {
 	/* Init master interrupt controller */
 	outb(0x11, 0x20); /* Start init sequence */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)