don't bother to allocate gdt slots for tss

as we don't actually use them.
This commit is contained in:
yamt 2005-03-25 10:27:03 +00:00
parent bb7bbb2d16
commit 2e2956423c
1 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: gdt.c,v 1.2 2005/03/09 22:39:20 bouyer Exp $ */
/* $NetBSD: gdt.c,v 1.3 2005/03/25 10:27:03 yamt Exp $ */
/* NetBSD: gdt.c,v 1.32 2004/02/13 11:36:13 wiz Exp */
/*-
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.2 2005/03/09 22:39:20 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.3 2005/03/25 10:27:03 yamt Exp $");
#include "opt_multiprocessor.h"
#include "opt_xen.h"
@ -363,19 +363,28 @@ gdt_put_slot1(int slot, int which)
int
tss_alloc(struct pcb *pcb)
{
#ifndef XEN
int slot;
slot = gdt_get_slot();
setgdt(slot, &pcb->pcb_tss, sizeof(struct pcb) - 1,
SDT_SYS386TSS, SEL_KPL, 0, 0);
return GSEL(slot, SEL_KPL);
#else
return GSEL(GNULL_SEL, SEL_KPL);
#endif
}
void
tss_free(int sel)
{
#ifndef XEN
gdt_put_slot(IDXSEL(sel));
#else
KASSERT(sel == GSEL(GNULL_SEL, SEL_KPL));
#endif
}
/*