Module Name:    src
Committed By:   rmind
Date:           Tue Oct 27 03:05:28 UTC 2009

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/amd64/include: pcb.h

Log Message:
Make pcb_ldt_sel, in amd64, an unused field.  Unlike in i386, it was
missed during clean-up of LDT handling.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amd64/include/pcb.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.134 src/sys/arch/amd64/amd64/machdep.c:1.135
--- src/sys/arch/amd64/amd64/machdep.c:1.134	Mon Oct 19 18:41:10 2009
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Oct 27 03:05:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.134 2009/10/19 18:41:10 bouyer Exp $	*/
+/*	$NetBSD: machdep.c,v 1.135 2009/10/27 03:05:27 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.134 2009/10/19 18:41:10 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.135 2009/10/27 03:05:27 rmind Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -415,13 +415,12 @@
 	pcb->pcb_rsp0 = (USER_TO_UAREA(l->l_addr) + KSTACK_SIZE - 16) & ~0xf;
 	pcb->pcb_iopl = SEL_KPL;
 
-	pcb->pcb_ldt_sel = pmap_kernel()->pm_ldt_sel =
-	    GSYSSEL(GLDT_SEL, SEL_KPL);
+	pmap_kernel()->pm_ldt_sel = GSYSSEL(GLDT_SEL, SEL_KPL);
 	pcb->pcb_cr0 = rcr0() & ~CR0_TS;
 	l->l_md.md_regs = (struct trapframe *)pcb->pcb_rsp0 - 1;
 
 #if !defined(XEN)
-	lldt(pcb->pcb_ldt_sel);
+	lldt(pmap_kernel()->pm_ldt_sel);
 #else
 	{
 	struct physdev_op physop;

Index: src/sys/arch/amd64/include/pcb.h
diff -u src/sys/arch/amd64/include/pcb.h:1.15 src/sys/arch/amd64/include/pcb.h:1.16
--- src/sys/arch/amd64/include/pcb.h:1.15	Sun Oct 26 00:08:15 2008
+++ src/sys/arch/amd64/include/pcb.h	Tue Oct 27 03:05:28 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcb.h,v 1.15 2008/10/26 00:08:15 mrg Exp $	*/
+/*	$NetBSD: pcb.h,v 1.16 2009/10/27 03:05:28 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 	uint64_t pcb_rsp;
 	uint64_t pcb_rbp;
 	uint64_t pcb_usersp;
-	uint64_t pcb_ldt_sel;
+	uint64_t pcb_unused;		/* unused */
 	struct	savefpu pcb_savefpu __aligned(16); /* floating point state */
 	void     *pcb_onfault;		/* copyin/out fault recovery */
 	struct cpu_info *pcb_fpcpu;	/* cpu holding our fp state. */

Reply via email to