linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix xics set_affinity code
@ 2007-09-30 21:45 Anton Blanchard
  0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2007-09-30 21:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: paulus


On a POWER6 machine running 2.6.23-rc8 I sometimes see the following error:

xics_set_affinity: No online cpus in the mask 00000000,00000000,00000000,00000001 for irq 20

In a desperate attempt to get a changelog entry in 2.6.23, I took a look
into it.

It turns out we are passing a real and not a virtual irq into
get_irq_server. This works for the case where hwirq < NR_IRQS and we set
virq = hwirq. In my case however hwirq = 590082 and we try and access
irq_desc[590082], slightly past the end at 512 entries. 

Lucky we ship lots of memory with our machines.

Signed-off-by: Anton Blanchard <anton@samba.org>
---
2.6.23 candidate? Am I too late?

diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 5bd90a7..f0b5ff1 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -419,7 +419,7 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
 	 * For the moment only implement delivery to all cpus or one cpu.
 	 * Get current irq_server for the given irq
 	 */
-	irq_server = get_irq_server(irq, 1);
+	irq_server = get_irq_server(virq, 1);
 	if (irq_server == -1) {
 		char cpulist[128];
 		cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-30 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-30 21:45 [PATCH] fix xics set_affinity code Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).