summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-08-18 07:47:12 +0000
committermsmith <msmith@FreeBSD.org>1998-08-18 07:47:12 +0000
commit95c3baa7ee4b5dd88be242a814c7fbe0c238c5e1 (patch)
treefe45982843022a23d3080db53e654e3e1426b6a7 /sys/i386/include/mptable.h
parent5bb2852b1133eb81dde95b08b0e5bc7272f7b62f (diff)
downloadFreeBSD-src-95c3baa7ee4b5dd88be242a814c7fbe0c238c5e1.zip
FreeBSD-src-95c3baa7ee4b5dd88be242a814c7fbe0c238c5e1.tar.gz
Presently there is only one `currentldt' variable for all cpus
in a SMP system. Unexpected things could happen if each cpu has a different ldt setting and one cpu tries to use value of currentldt set by another cpu. The fix is to move currentldt to the per-cpu area. It includes patches I filed in PR i386/6219 which are also user ldt related. PR: i386/7591, i386/6219 Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
Diffstat (limited to 'sys/i386/include/mptable.h')
-rw-r--r--sys/i386/include/mptable.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 8052740..d36835d 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,12 +22,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.76 1998/05/17 22:12:08 tegge Exp $
+ * $Id: mp_machdep.c,v 1.77 1998/08/16 00:41:40 bde Exp $
*/
#include "opt_smp.h"
#include "opt_vm86.h"
#include "opt_cpu.h"
+#include "opt_user_ldt.h"
#ifdef SMP
#include <machine/smptests.h>
@@ -466,6 +467,9 @@ init_secondary(void)
lgdt(&r_gdt); /* does magic intra-segment return */
lidt(&r_idt);
lldt(_default_ldt);
+#ifdef USER_LDT
+ currentldt = _default_ldt;
+#endif
my_tr = NGDT + cpuid;
gsel_tss = GSEL(my_tr, SEL_KPL);
OpenPOWER on IntegriCloud