summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2009-02-03 11:24:20 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2009-02-03 11:24:20 +0000
commitda56e28ebdc3bdfecf90063da7c3e744fbd3434e (patch)
treec71d1315046251dacdd7f34588cd199af805dada /sys/arch/amd64/include
parent52cdb2d704b7a4e357e1c1e35240d0e7ebe2e84d (diff)
Free TSS on the stack of the dead process.
In order to do that we have to remove all sleeping parts: sleeping memory allocation and a sleeping lock. Thus we're moving this code to the spinning lock (mutex) and getting rid of the GDT grow code. Downside is that now we're pre-allocating 64kb of memory per CPU from the start, but this might be optimized in future. This also unifies GDT code and MAXGDTSIZ define across i386 and amd64. With help from mickey. ok toby, art
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/gdt.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/amd64/include/gdt.h b/sys/arch/amd64/include/gdt.h
index 3b4abd01071..b52bc98e3eb 100644
--- a/sys/arch/amd64/include/gdt.h
+++ b/sys/arch/amd64/include/gdt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt.h,v 1.3 2008/06/26 05:42:09 ray Exp $ */
+/* $OpenBSD: gdt.h,v 1.4 2009/02/03 11:24:19 mikeb Exp $ */
/* $NetBSD: gdt.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
/*-
@@ -51,6 +51,8 @@ void set_sys_gdt(struct sys_segment_descriptor *, void *, size_t, int, int,
int);
#endif
-/* MINGDTSIZ must be a multiple of PAGE_SIZE or gdt_grow breaks */
-#define MINGDTSIZ PAGE_SIZE
+/*
+ * Maximum GDT size. It cannot exceed 65536 since the selector field of
+ * a descriptor is just 16 bits, and used as free list link.
+ */
#define MAXGDTSIZ 65536