* [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
* Re: [PATCH][for 2.6.28] powerpc: Use physical cpu id when setting the processor affinity
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
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2008-12-02 21:30 UTC (permalink / raw)
To: Kumar Gala
Cc: Andrew Morton, linuxppc-dev, Linus Torvalds, Paul Mackerras,
linux-kernel
On Tue, 2008-12-02 at 13:37 -0600, Kumar Gala wrote:
> 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.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][for 2.6.28] powerpc: Use physical cpu id when setting the processor affinity
2008-12-02 21:30 ` Benjamin Herrenschmidt
@ 2008-12-02 23:05 ` Kumar Gala
0 siblings, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2008-12-02 23:05 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Andrew Morton, linuxppc-dev, Linus Torvalds, Paul Mackerras,
linux-kernel
On Dec 2, 2008, at 3:30 PM, Benjamin Herrenschmidt wrote:
> On Tue, 2008-12-02 at 13:37 -0600, Kumar Gala wrote:
>> 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.
>
> 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
^ permalink raw reply [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).