summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2007-05-21 11:57:36 +0000
committernyan <nyan@FreeBSD.org>2007-05-21 11:57:36 +0000
commitb41a739b99a026e922996a51b8c36460ac643424 (patch)
tree744fe8f02c462e6296113b410b00ef4cf5493c79 /sys/pc98
parent9af56a3ee664f965607d695799f8e554cbed4a1a (diff)
downloadFreeBSD-src-b41a739b99a026e922996a51b8c36460ac643424.zip
FreeBSD-src-b41a739b99a026e922996a51b8c36460ac643424.tar.gz
MFi386: revision 1.652
- Move GDT/LDT locking into a seperate spinlock, removing the global scheduler lock from this responsibility.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/pc98/machdep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 2d9ca3d..28fff4e 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -1168,8 +1168,10 @@ exec_setregs(td, entry, stack, ps_strings)
pcb->pcb_gs = _udatasel;
load_gs(_udatasel);
+ mtx_lock_spin(&dt_lock);
if (td->td_proc->p_md.md_ldt)
user_ldt_free(td);
+ mtx_unlock_spin(&dt_lock);
bzero((char *)regs, sizeof(struct trapframe));
regs->tf_eip = entry;
@@ -1275,6 +1277,7 @@ static struct gate_descriptor idt0[NIDT];
struct gate_descriptor *idt = &idt0[0]; /* interrupt descriptor table */
union descriptor ldt[NLDT]; /* local descriptor table */
struct region_descriptor r_gdt, r_idt; /* table descriptors */
+struct mtx dt_lock; /* lock for GDT and LDT */
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
extern int has_f00f_bug;
@@ -1954,6 +1957,7 @@ init386(first)
r_gdt.rd_limit = NGDT * sizeof(gdt[0]) - 1;
r_gdt.rd_base = (int) gdt;
+ mtx_init(&dt_lock, "descriptor tables", NULL, MTX_SPIN);
lgdt(&r_gdt);
pcpu_init(pc, 0, sizeof(struct pcpu));
OpenPOWER on IntegriCloud