NetBSD Problem Report #24007
Received: (qmail 14693 invoked by uid 605); 6 Jan 2004 20:08:44 -0000
Message-Id: <200401062009.i06K9N5X001503@s102-n054.tele2.cz>
Date: Tue, 6 Jan 2004 21:09:23 +0100 (CET)
From: Jaromir Dolecek <jdolecek@NetBSD.org>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: jdolecek@NetBSD.org
To: gnats-bugs@gnats.netbsd.org
Subject: sh3 cpu_exit() is volatile
X-Send-Pr-Version: 3.95
>Number: 24007
>Category: port-sh3
>Synopsis: sh3 cpu_exit() is volatile
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: port-sh3-maintainer
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Jan 06 20:09:00 +0000 2004
>Closed-Date: Sun Jan 18 19:21:13 +0000 2004
>Last-Modified: Sun Jan 18 19:21:13 +0000 2004
>Originator: Jaromir Dolecek
>Release: NetBSD 1.6ZG
>Organization:
>Environment:
System: NetBSD s102-n054.tele2.cz 1.6ZG NetBSD 1.6ZG (SARUMAN.MP) #10: Sun Jan 4 12:48:32 CET 2004 dolecek@s102-n054.tele2.cz:/usr/home/dolecek/soft/netbsd/sys/arch/i386/compile/SARUMAN.MP i386
Architecture: i386
Machine: i386
>Description:
sh3 cpu_exit() uses lwp0 stack and memory after it's reclaimed
('l' pointer after lwp_exit2() call, where the lwp is freed).
This only works due to the initial excessive interrupt blocking
via splsched, and feels as somewhat of a hack.
It would be safer to follow practice of other ports, which
switch to idle context, call lwp_exit2() from that context,
and then use special code path to schedule another lwp
instead of the one which exitted. I also believe this
would be necessary for MP, tho I'm not sure if Super-H 3
supports MP at all.
>How-To-Repeat:
code inspection
>Fix:
Sorry, no patch.
>Release-Note:
>Audit-Trail:
From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/24007 CVS commit: src/sys/arch/sh3/sh3
Date: Sun, 18 Jan 2004 18:54:17 +0000 (UTC)
Module Name: src
Committed By: uwe
Date: Sun Jan 18 18:54:17 UTC 2004
Modified Files:
src/sys/arch/sh3/sh3: locore_subr.S vm_machdep.c
Log Message:
Implement proper switch_exit in assembler. Since cpu_switch is
reduced to just a call to switch_exit, g/c the C version and add a one
instruction assembler version that just falls through to switch_exit.
Addresses PR#24007 by Jaromir Dolecek <jdolecek@netbsd> and makes sh3
kernels work again after his elimination of the reaper. Tested on hpcsh.
To generate a diff of this commit:
cvs rdiff -r1.18 -r1.19 src/sys/arch/sh3/sh3/locore_subr.S
cvs rdiff -r1.41 -r1.42 src/sys/arch/sh3/sh3/vm_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: uwe
State-Changed-When: Sun Jan 18 19:20:30 UTC 2004
State-Changed-Why:
Fixed, see commit mail in the PR.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.