Module Name: src Committed By: kre Date: Wed Feb 8 18:53:01 UTC 2017
Modified Files: src/sys/arch/i386/i386: gdt.c Log Message: Analagous fix to that just committed to the equiv amd64 sources. Note: this one has yet to be compile tested, so anything is possible... To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/i386/i386/gdt.c 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/i386/i386/gdt.c diff -u src/sys/arch/i386/i386/gdt.c:1.59 src/sys/arch/i386/i386/gdt.c:1.60 --- src/sys/arch/i386/i386/gdt.c:1.59 Wed Feb 8 10:08:26 2017 +++ src/sys/arch/i386/i386/gdt.c Wed Feb 8 18:53:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: gdt.c,v 1.59 2017/02/08 10:08:26 maxv Exp $ */ +/* $NetBSD: gdt.c,v 1.60 2017/02/08 18:53:01 kre Exp $ */ /*- * Copyright (c) 1996, 1997, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.59 2017/02/08 10:08:26 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.60 2017/02/08 18:53:01 kre Exp $"); #include "opt_multiprocessor.h" #include "opt_xen.h" @@ -60,7 +60,9 @@ int gdt_free[2]; /* next free slot; term static int ldt_count; /* number of LDTs */ static int ldt_max = 1000;/* max number of LDTs */ +#ifndef XEN static void setgdt(int, const void *, size_t, int, int, int, int); +#endif void gdt_init(void); static void gdt_grow(int); static int gdt_get_slot1(int); @@ -82,6 +84,7 @@ update_descriptor(union descriptor *tabl #endif } +#ifndef XEN /* * Called on a newly-allocated GDT slot, so no race between CPUs. */ @@ -106,6 +109,7 @@ setgdt(int sel, const void *base, size_t (union descriptor *)sd); } } +#endif /* * Initialize the GDT. We already have a gdtstore, which was temporarily used