Re: [PATCH] change name of rep_nop

Peter Rival (frival@zk3.dec.com)
Mon, 08 Oct 2001 15:27:49 -0400


This is a multi-part message in MIME format.
--------------000807050807010901080406
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------000807050807010901080406
Content-Type: text/plain;
name="alpha_patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="alpha_patch"

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

--------------000807050807010901080406--

-
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/