patch-2.2.14 linux/arch/ppc/kernel/chrp_setup.c

Next file: linux/arch/ppc/kernel/gemini_pci.c
Previous file: linux/arch/ppc/kernel/chrp_pci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.13/linux/arch/ppc/kernel/chrp_setup.c linux/arch/ppc/kernel/chrp_setup.c
@@ -386,8 +386,8 @@
                 }
         }
 #endif /* __SMP__ */
-
-        irq = openpic_irq(0);
+	
+        irq = openpic_irq(smp_processor_id());
         if (irq == IRQ_8259_CASCADE)
         {
                 /*
@@ -402,7 +402,7 @@
                 /*
                  * Acknowledge as soon as possible to allow i8259
                  * interrupt nesting                         */
-                openpic_eoi(0);
+                openpic_eoi(smp_processor_id());
                 openpic_eoi_done = 1;
         }
         if (irq == OPENPIC_VEC_SPURIOUS)
@@ -429,7 +429,7 @@
 	}
 out:
         if (!openpic_eoi_done)
-                openpic_eoi(0);
+                openpic_eoi(smp_processor_id());
 }
 
 __initfunc(void
@@ -446,12 +446,9 @@
 			(*(unsigned long *)get_property(np,
 							"8259-interrupt-acknowledge", NULL));
 	}
+	open_pic.irq_offset = 16;
 	for ( i = 16 ; i < NR_IRQS ; i++ )
 		irq_desc[i].ctl = &open_pic;
-	/* openpic knows that it's at irq 16 offset
-	 * so we don't need to set it in the pic structure
-	 * -- Cort
-	 */
 	openpic_init(1);
 	for ( i = 0 ; i < 16  ; i++ )
 		irq_desc[i].ctl = &i8259_pic;
@@ -461,8 +458,14 @@
 		    xmon_irq, 0, "NMI", 0);
 #endif	/* CONFIG_XMON */
 #ifdef __SMP__
-	request_irq(openpic_to_irq(OPENPIC_VEC_IPI),
-		    openpic_ipi_action, 0, "IPI0", 0);
+	request_irq(OPENPIC_VEC_IPI, openpic_ipi_action,
+		    0, "IPI0", 0);
+	request_irq(OPENPIC_VEC_IPI+1, openpic_ipi_action,
+		    0, "IPI1 (invalidate TLB)", 0);
+	request_irq(OPENPIC_VEC_IPI+2, openpic_ipi_action,
+		    0, "IPI2 (stop CPU)", 0);
+	request_irq(OPENPIC_VEC_IPI+3, openpic_ipi_action,
+		    0, "IPI3 (reschedule)", 0);
 #endif	/* __SMP__ */
 }
 
@@ -471,7 +474,6 @@
 {
 	adb_init();
 
-	/* Should this be here? - Corey */
 	pmac_nvram_init();
 
 #ifdef CONFIG_VT

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