[PATCH 1/3] global interrupt queue cleanup

R Sharada sharada at in.ibm.com
Thu Apr 14 00:08:07 EST 2005



Move the code to set global interrupt queue membership to xics.c,
and remove no longer needed extern declarations.  Also call it on
all cpus (even the boot cpu) to prepare for kexec.

Signed-off-by: Milton Miller <miltonm at bga.com>

Signed-off-by: R Sharada <sharada at in.ibm.com>
---

 linux-2.6.12-rc2-mm3-sharada/arch/ppc64/kernel/pSeries_smp.c |    7 ----
 linux-2.6.12-rc2-mm3-sharada/arch/ppc64/kernel/xics.c        |   16 ++++++++---
 linux-2.6.12-rc2-mm3-sharada/include/asm-ppc64/xics.h        |    3 --
 3 files changed, 12 insertions(+), 14 deletions(-)

diff -puN arch/ppc64/kernel/pSeries_smp.c~ppc64-cleanup-global-interrupt-queue arch/ppc64/kernel/pSeries_smp.c
--- linux-2.6.12-rc2-mm3/arch/ppc64/kernel/pSeries_smp.c~ppc64-cleanup-global-interrupt-queue	2005-04-12 17:34:13.000000000 +0530
+++ linux-2.6.12-rc2-mm3-sharada/arch/ppc64/kernel/pSeries_smp.c	2005-04-12 17:34:38.000000000 +0530
@@ -329,13 +329,6 @@ static void __devinit smp_xics_setup_cpu
 
 	cpu_clear(cpu, of_spin_map);
 
-	/*
-	 * Put the calling processor into the GIQ.  This is really only
-	 * necessary from a secondary thread as the OF start-cpu interface
-	 * performs this function for us on primary threads.
-	 */
-	rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
-		(1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
 }
 
 static DEFINE_SPINLOCK(timebase_lock);
diff -puN arch/ppc64/kernel/xics.c~ppc64-cleanup-global-interrupt-queue arch/ppc64/kernel/xics.c
--- linux-2.6.12-rc2-mm3/arch/ppc64/kernel/xics.c~ppc64-cleanup-global-interrupt-queue	2005-04-12 17:34:13.000000000 +0530
+++ linux-2.6.12-rc2-mm3-sharada/arch/ppc64/kernel/xics.c	2005-04-12 17:34:38.000000000 +0530
@@ -432,6 +432,7 @@ void xics_cause_IPI(int cpu)
 {
 	ops->qirr_info(cpu, IPI_PRIORITY);
 }
+#endif /* CONFIG_SMP */
 
 void xics_setup_cpu(void)
 {
@@ -439,9 +440,17 @@ void xics_setup_cpu(void)
 
 	ops->cppr_info(cpu, 0xff);
 	iosync();
-}
 
-#endif /* CONFIG_SMP */
+	/*
+	 * Put the calling processor into the GIQ.  This is really only
+	 * necessary from a secondary thread as the OF start-cpu interface
+	 * performs this function for us on primary threads.
+	 *
+	 * XXX: undo of teardown on kexec needs this too, as may hotplug
+	 */
+	rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
+		(1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
+}
 
 void xics_init_IRQ(void)
 {
@@ -563,8 +572,7 @@ nextnode:
 	for (; i < NR_IRQS; ++i)
 		get_irq_desc(i)->handler = &xics_pic;
 
-	ops->cppr_info(boot_cpuid, 0xff);
-	iosync();
+	xics_setup_cpu();
 
 	ppc64_boot_msg(0x21, "XICS Done");
 }
diff -puN include/asm-ppc64/xics.h~ppc64-cleanup-global-interrupt-queue include/asm-ppc64/xics.h
--- linux-2.6.12-rc2-mm3/include/asm-ppc64/xics.h~ppc64-cleanup-global-interrupt-queue	2005-04-12 17:34:13.000000000 +0530
+++ linux-2.6.12-rc2-mm3-sharada/include/asm-ppc64/xics.h	2005-04-12 17:34:38.000000000 +0530
@@ -30,7 +30,4 @@ struct xics_ipi_struct {
 
 extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
 
-extern unsigned int default_distrib_server;
-extern unsigned int interrupt_server_size;
-
 #endif /* _PPC64_KERNEL_XICS_H */
_



More information about the Linuxppc64-dev mailing list