powerpc: Use physical cpu id when setting the processor affinity
authorKumar Gala <galak@kernel.crashing.org>
Tue, 2 Dec 2008 19:37:01 +0000 (13:37 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Dec 2008 23:50:40 +0000 (15:50 -0800)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/sysdev/mpic.c

index b24e1d0855573df690aaf6f9022266ad98b95604..1890fb085cded9bdcc66c61214a4058b579c98e6 100644 (file)
@@ -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)