Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2004 16:55:26 +0400
From:      Andrew Belashov <bel@orel.ru>
To:        freebsd-sparc64@freebsd.org
Subject:   libkse: One more bug in kernel?
Message-ID:  <41595F3E.9080909@orel.ru>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------090709000205070904000502
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi!

I have found a bug in kernel.

Here a patch with short explanation.

See also my development set of patches for libkse:

<http://www.orel.ru/~bel/patches/libkse.patch>;

--
Best regards,
Andrew Belashov.

--------------090709000205070904000502
Content-Type: text/plain;
 name="machdep.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="machdep.patch"

--- sys/sparc64/sparc64/machdep.c.orig	Thu Aug  5 09:42:40 2004
+++ sys/sparc64/sparc64/machdep.c	Tue Sep 28 15:11:08 2004
@@ -623,6 +623,11 @@ set_mcontext(struct thread *td, const mc
 	tf = td->td_frame;
 	pcb = td->td_pcb;
 	wstate = tf->tf_wstate;
+	/* XXXKSE Make sure the pre-trap windows are spilled.
+	 * This is needed for kse_switchin(2) for correct switching between
+	 * threads stacks.
+	 */
+	flushw();
 	bcopy(mc, tf, sizeof(*tf));
 	tf->tf_wstate = wstate;
 	if ((mc->mc_fprs & FPRS_FEF) != 0) {

--------------090709000205070904000502--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41595F3E.9080909>