Re: [PATCH] change name of rep_nop

From: Peter Rival (frival@zk3.dec.com)
Date: Mon Oct 08 2001 - 14:27:49 EST


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();
 }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:20 EST