The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: akpm@osdl.org, torvalds@osdl.org
Cc: anton@samba.org, linux-kernel@vger.kernel.org, miltonm@bga.com,
	sharada@in.ibm.com
Subject: [PATCH] ppc64: global interrupt queue cleanup
Date: Fri, 6 May 2005 16:28:56 +1000	[thread overview]
Message-ID: <17019.3752.917407.742713@cargo.ozlabs.ibm.com> (raw)

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@bga.com>
Signed-off-by: R Sharada <sharada@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
---

diff -urN linux-2.6/arch/ppc64/kernel/pSeries_smp.c test/arch/ppc64/kernel/pSeries_smp.c
--- linux-2.6/arch/ppc64/kernel/pSeries_smp.c	2005-04-26 15:37:55.000000000 +1000
+++ test/arch/ppc64/kernel/pSeries_smp.c	2005-05-06 15:23:05.000000000 +1000
@@ -326,13 +326,6 @@
 
 	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 -urN linux-2.6/arch/ppc64/kernel/xics.c test/arch/ppc64/kernel/xics.c
--- linux-2.6/arch/ppc64/kernel/xics.c	2005-04-26 15:37:55.000000000 +1000
+++ test/arch/ppc64/kernel/xics.c	2005-05-06 15:23:05.000000000 +1000
@@ -432,6 +432,7 @@
 {
 	ops->qirr_info(cpu, IPI_PRIORITY);
 }
+#endif /* CONFIG_SMP */
 
 void xics_setup_cpu(void)
 {
@@ -439,9 +440,17 @@
 
 	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 @@
 	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 -urN linux-2.6/include/asm-ppc64/xics.h test/include/asm-ppc64/xics.h
--- linux-2.6/include/asm-ppc64/xics.h	2005-04-26 15:38:02.000000000 +1000
+++ test/include/asm-ppc64/xics.h	2005-05-06 15:23:05.000000000 +1000
@@ -30,7 +30,4 @@
 
 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 */

             reply	other threads:[~2005-05-06  6:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-06  6:28 Paul Mackerras [this message]
2005-05-06 12:41 ` [PATCH] ppc64: native hash clear R Sharada
2005-05-06 12:44   ` [PATCH] ppc64: kexec support for ppc64 R Sharada
2005-05-06 23:05     ` Andrew Morton
2005-05-06 23:40       ` Gerrit Huizenga
2005-05-07  0:32         ` Andrew Morton
2005-05-07  2:02           ` Gerrit Huizenga
2005-05-07  2:36           ` Paul Mackerras
2005-05-07  8:40       ` [Fastboot] " Dipankar Sarma
2005-05-07 16:49       ` Suparna Bhattacharya
2005-05-09 11:55         ` Maneesh Soni
2005-05-09 12:05       ` R Sharada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17019.3752.917407.742713@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=sharada@in.ibm.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox