Messages in this thread Patch in this message |  | | Date | Mon, 08 Oct 2001 15:27:49 -0400 | From | Peter Rival <> | Subject | Re: [PATCH] change name of rep_nop |
| |
Paul Mackerras wrote: <snip>
> > There is a race on PPC with your patch, but I can fix that by removing > the init_idle() call from smp_callin() in arch/ppc/kernel/smp.c. > At a quick glance it looks like alpha and sparc (sun4m) may have the > same problem since they also call init_idle before waiting for > smp_commence() (or smp_threads_ready != 0).
Okay, I'm attaching a patch to fix the issue on Alpha. I've tested it on both a Wildfire and a Tincup (Rawhide); without the patch both hang due to the above race, while with it both boot just fine. Linus, Alan - please apply, unless Jay or Richard come screaming with their hair on fire. ;)
- Pete
diff -urN linux-2.4.11-pre5/arch/alpha/kernel/smp.c linux-2.4.11-pre5+fix/arch/alpha/kernel/smp.c --- linux-2.4.11-pre5/arch/alpha/kernel/smp.c Mon Oct 8 13:37:57 2001 +++ linux-2.4.11-pre5+fix/arch/alpha/kernel/smp.c Mon Oct 8 14:17:50 2001 @@ -171,13 +171,6 @@ /* Set interrupt vector. */ wrent(entInt, 0); - /* Setup the scheduler for this processor. */ - init_idle(); - - /* ??? This should be in init_idle. */ - atomic_inc(&init_mm.mm_count); - current->active_mm = &init_mm; - /* Get our local ticker going. */ smp_setup_percpu_timer(cpuid); @@ -207,6 +200,12 @@ DBGS(("smp_callin: commencing CPU %d current %p\n", cpuid, current)); + /* Setup the scheduler for this processor. */ + init_idle(); + + /* ??? This should be in init_idle. */ + atomic_inc(&init_mm.mm_count); + current->active_mm = &init_mm; /* Do nothing. */ cpu_idle(); } |  |