powerpc: Use physical cpu id when setting the processor affinity
PATCH 1/1 powerpc: Use physical cpu id when setting the processor affinity
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.
--- arch/powerpc/sysdev/mpic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/sysdev/mpic.c +1 -1
@@ -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)
Signature · 1 line
1.5.6.5
Quoted 6 lines · Kumar Gala
In the
CONFIG_SMPcase theirq_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()soirq_choose_cpu()always returns a physical cpu id.
That will probably do for now but if we ever move that routine to generic code, I'd rather have the caller do the conversion.
Cheers,
Ben.
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 6 lines · Kumar Gala
In the
CONFIG_SMPcase theirq_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()soirq_choose_cpu()always returns a physical cpu id.That will probably do for now but if we ever move that routine to generic code, I'd rather have the caller do the conversion.
Fair.. I felt at this point matching what the !CONFIG_SMP case of irq_choose_cpu() is doing was the best choice.
- k