LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Peter Rival <frival@zk3.dec.com>
To: paulus@samba.org
Cc: "Martin J. Bligh" <Martin.Bligh@us.ibm.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	jay.estabrook@compaq.com, rth@twiddle.net
Subject: Re: [PATCH] change name of rep_nop
Date: Mon, 08 Oct 2001 15:27:49 -0400	[thread overview]
Message-ID: <3BC1FE35.2050704@zk3.dec.com> (raw)
In-Reply-To: <15294.16913.2117.383987@cargo.ozlabs.ibm.com>	<1573466920.1002300846@mbligh.des.sequent.com> <15294.24873.866942.423260@cargo.ozlabs.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

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


[-- Attachment #2: alpha_patch --]
[-- Type: text/plain, Size: 880 bytes --]

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

  reply	other threads:[~2001-10-08 19:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-05 10:46 Paul Mackerras
2001-10-05 14:37 ` Alan Cox
2001-10-05 18:06   ` Peter Rival
2001-10-05 23:28   ` Paul Mackerras
2001-10-05 23:54     ` Martin J. Bligh
2001-10-06  1:40     ` Paul Mackerras
2001-10-08 19:27       ` Peter Rival [this message]
2001-10-08 22:36       ` David Woodhouse
2001-10-08 22:49         ` Alan Cox
2001-10-08 23:06         ` David Woodhouse
2001-10-08 23:42           ` David Woodhouse
2001-10-08 23:46           ` David S. Miller
2001-10-08 23:08         ` David S. Miller
2001-10-08 23:46         ` Linus Torvalds
2001-10-09  0:03           ` David Woodhouse
2001-10-08 22:46       ` David S. Miller
2001-10-08 23:16         ` Alan Cox
2001-10-08 23:24           ` Dave Jones
2001-10-08 23:33             ` Alan Cox
2001-10-09  5:01             ` George Greer
2001-10-08 23:30           ` David S. Miller
2001-10-09 10:33           ` Benjamin Herrenschmidt
2001-10-09 11:30             ` Keith Owens
2001-10-09 12:13               ` Benjamin Herrenschmidt
2001-10-09 12:15               ` Alan Cox
2001-10-09  8:51 Etienne Lorrain
2001-10-09 11:30 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BC1FE35.2050704@zk3.dec.com \
    --to=frival@zk3.dec.com \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jay.estabrook@compaq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=rth@twiddle.net \
    --cc=torvalds@transmeta.com \
    --subject='Re: [PATCH] change name of rep_nop' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).