Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 2010 12:36:36 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210294 - in head/sys: i386/i386 pc98/pc98
Message-ID:  <201007201236.o6KCaaRx095029@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Tue Jul 20 12:36:36 2010
New Revision: 210294
URL: http://svn.freebsd.org/changeset/base/210294

Log:
  Store fsbase and gsbase in the right fields of the mcontext. They were
  switched.
  
  PR:		i386/148344
  Approved by:	kib (mentor)
  MFC after:	1 week

Modified:
  head/sys/i386/i386/machdep.c
  head/sys/pc98/pc98/machdep.c

Modified: head/sys/i386/i386/machdep.c
==============================================================================
--- head/sys/i386/i386/machdep.c	Tue Jul 20 11:46:45 2010	(r210293)
+++ head/sys/i386/i386/machdep.c	Tue Jul 20 12:36:36 2010	(r210294)
@@ -645,10 +645,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	/*
 	 * Unconditionally fill the fsbase and gsbase into the mcontext.
 	 */
-	sdp = &td->td_pcb->pcb_gsd;
+	sdp = &td->td_pcb->pcb_fsd;
 	sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 |
 	    sdp->sd_lobase;
-	sdp = &td->td_pcb->pcb_fsd;
+	sdp = &td->td_pcb->pcb_gsd;
 	sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 |
 	    sdp->sd_lobase;
 
@@ -3255,9 +3255,9 @@ get_mcontext(struct thread *td, mcontext
 	 * mcontext after mc_fpstate.
 	 */
 	get_fpcontext(td, mcp);
-	sdp = &td->td_pcb->pcb_gsd;
-	mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
 	sdp = &td->td_pcb->pcb_fsd;
+	mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
+	sdp = &td->td_pcb->pcb_gsd;
 	mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
 
 	return (0);

Modified: head/sys/pc98/pc98/machdep.c
==============================================================================
--- head/sys/pc98/pc98/machdep.c	Tue Jul 20 11:46:45 2010	(r210293)
+++ head/sys/pc98/pc98/machdep.c	Tue Jul 20 12:36:36 2010	(r210294)
@@ -580,10 +580,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	/*
 	 * Unconditionally fill the fsbase and gsbase into the mcontext.
 	 */
-	sdp = &td->td_pcb->pcb_gsd;
+	sdp = &td->td_pcb->pcb_fsd;
 	sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 |
 	    sdp->sd_lobase;
-	sdp = &td->td_pcb->pcb_fsd;
+	sdp = &td->td_pcb->pcb_gsd;
 	sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 |
 	    sdp->sd_lobase;
 
@@ -2583,9 +2583,9 @@ get_mcontext(struct thread *td, mcontext
 	 * mcontext after mc_fpstate.
 	 */
 	get_fpcontext(td, mcp);
-	sdp = &td->td_pcb->pcb_gsd;
-	mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
 	sdp = &td->td_pcb->pcb_fsd;
+	mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
+	sdp = &td->td_pcb->pcb_gsd;
 	mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase;
 
 	return (0);



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