On Mon, Apr 16, 2012 at 09:48:14AM -0700, David Daney wrote:
> On 04/16/2012 12:25 AM, Yong Zhang wrote:
> >From: Yong Zhang<firstname.lastname@example.org>
> >Too early to enable irq will break some following action,
> >such as notify_cpu_starting().
> Can you be more specific about what breaks?
wake up softirqd;
/* select wrong cpu */
> >I don't get side effect with this patch.
> Without this, where do irqs get enabled on the secondary CPUs?
cpu_idle() will handle it. But in fact we should not depend on
But it seems there is not suitable place to put local_irq_enable(),
though ->smp_finish() looks like a more suitable place.
When looking more at smp support on MIPS, there is more things I find.
Such as set_cpu_online() is called on CPU1, so there will be another race
window like above scenario. Please take a look at what commit 2baab4e9
intend to resolve.
> >Signed-off-by: Yong Zhang<email@example.com>
> >Cc: David Daney<firstname.lastname@example.org>
> >Cc: Ralf Baechle<email@example.com>
> > arch/mips/cavium-octeon/smp.c | 1 -
> > 1 files changed, 0 insertions(+), 1 deletions(-)
> >diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
> >index 97e7ce9..7e65c88 100644
> >--- a/arch/mips/cavium-octeon/smp.c
> >+++ b/arch/mips/cavium-octeon/smp.c
> >@@ -185,7 +185,6 @@ static void __cpuinit octeon_init_secondary(void)
> > octeon_init_cvmcount();
> > octeon_irq_setup_secondary();
> >- raw_local_irq_enable();
> > }
> > /**
Only stand for myself