linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: "T. Weyergraf" <kirk@colinet.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.70 dies on alpha-SMP
Date: Tue, 27 May 2003 18:05:50 +0400	[thread overview]
Message-ID: <20030527180550.B2292@jurassic.park.msu.ru> (raw)
In-Reply-To: <kirk-1030527151258.A0117853@hydra.colinet.de>; from kirk@colinet.de on Tue, May 27, 2003 at 03:12:58PM +0200

On Tue, May 27, 2003 at 03:12:58PM +0200, T. Weyergraf wrote:
> the stock 2.5.70 dies early upon boot on my alpha UP2000
> ( dual EV67, DP264 vector ). It happens, after the kernel
> tries to start the second CPU. The error happens regardless
> of the compilers i tried ( gcc 3.2.3 and 2.95.4 ).

Does this help?

Ivan.

--- 2.5/arch/alpha/kernel/smp.c	Wed May 21 15:20:27 2003
+++ linux/arch/alpha/kernel/smp.c	Wed May 21 15:27:23 2003
@@ -417,12 +417,7 @@ fork_by_hand(void)
 	/* Don't care about the contents of regs since we'll never
 	   reschedule the forked task. */
 	struct pt_regs regs;
-	int pid;
-	pid = do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
-	if (pid < 0)
-		return NULL;
-
-	return find_task_by_pid (pid);
+	return copy_process(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
 }
 
 /*
@@ -441,8 +436,10 @@ smp_boot_one_cpu(int cpuid)
 	   wish.  We can't use kernel_thread since we must avoid
 	   rescheduling the child.  */
 	idle = fork_by_hand();
-	if (!idle)
+	if (IS_ERR(idle))
 		panic("failed fork for CPU %d", cpuid);
+
+	wake_up_forked_process(idle);
 
 	init_idle(idle, cpuid);
 	unhash_process(idle);

  reply	other threads:[~2003-05-27 13:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-27 13:12 2.5.70 dies on alpha-SMP T. Weyergraf
2003-05-27 14:05 ` Ivan Kokshaysky [this message]
2003-05-27 14:06   ` T. Weyergraf

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=20030527180550.B2292@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=kirk@colinet.de \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).