linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][for 2.6.28] powerpc: Use physical cpu id when setting the processor affinity
@ 2008-12-02 19:37 Kumar Gala
  2008-12-02 21:30 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2008-12-02 19:37 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Andrew Morton, linuxppc-dev, Linus Torvalds, linux-kernel

In the CONFIG_SMP case the irq_choose_cpu() code was returning back
a logical cpu id not the physical id.  We were writing that directly
into the HW register.

We need to be calling get_hard_smp_processor_id() so irq_choose_cpu()
always returns a physical cpu id.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/sysdev/mpic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index b24e1d0..1890fb0 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -600,7 +600,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
 		cpuid = first_cpu(tmp);
 	}
 
-	return cpuid;
+	return get_hard_smp_processor_id(cpuid);
 }
 #else
 static int irq_choose_cpu(unsigned int virt_irq)
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-02 23:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 19:37 [PATCH][for 2.6.28] powerpc: Use physical cpu id when setting the processor affinity Kumar Gala
2008-12-02 21:30 ` Benjamin Herrenschmidt
2008-12-02 23:05   ` Kumar Gala

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).