summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1999-04-28 01:04:33 +0000
committerluoqi <luoqi@FreeBSD.org>1999-04-28 01:04:33 +0000
commitaf7e9be5cce9a2ceb819f00b3f58014d23ab57cd (patch)
tree0e70c0e764f072d43041acca8ac52e30616dced3 /sys/i386/linux/linux_sysvec.c
parent0f4a245030e7f1acb03f8de0822a58b188fc0d28 (diff)
downloadFreeBSD-src-af7e9be5cce9a2ceb819f00b3f58014d23ab57cd.zip
FreeBSD-src-af7e9be5cce9a2ceb819f00b3f58014d23ab57cd.tar.gz
Enable vmspace sharing on SMP. Major changes are,
- %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r--sys/i386/linux/linux_sysvec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index d3a2f71..8584d96 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_sysvec.c,v 1.45 1999/02/04 21:20:13 newton Exp $
+ * $Id: linux_sysvec.c,v 1.46 1999/04/19 14:14:14 peter Exp $
*/
/* XXX we use functions that might not exist. */
@@ -249,8 +249,8 @@ linux_sendsig(sig_t catcher, int sig, int mask, u_long code)
* Build the signal context to be used by sigreturn.
*/
frame.sf_sc.sc_mask = mask;
- __asm("movl %%gs,%w0" : "=r" (frame.sf_sc.sc_gs));
- __asm("movl %%fs,%w0" : "=r" (frame.sf_sc.sc_fs));
+ frame.sf_sc.sc_gs = rgs();
+ frame.sf_sc.sc_fs = regs->tf_fs;
frame.sf_sc.sc_es = regs->tf_es;
frame.sf_sc.sc_ds = regs->tf_ds;
frame.sf_sc.sc_edi = regs->tf_edi;
@@ -286,6 +286,7 @@ linux_sendsig(sig_t catcher, int sig, int mask, u_long code)
regs->tf_cs = _ucodesel;
regs->tf_ds = _udatasel;
regs->tf_es = _udatasel;
+ regs->tf_fs = _udatasel;
regs->tf_ss = _udatasel;
}
@@ -359,7 +360,8 @@ linux_sigreturn(p, args)
/*
* Restore signal context.
*/
- /* %fs and %gs were restored by the trampoline. */
+ /* %gs was restored by the trampoline. */
+ regs->tf_fs = context.sc_fs;
regs->tf_es = context.sc_es;
regs->tf_ds = context.sc_ds;
regs->tf_edi = context.sc_edi;
OpenPOWER on IntegriCloud