Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/amd64/amd64/cpufunc.S,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/amd64/amd64/cpufunc.S,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.27.8.1 retrieving revision 1.28 diff -u -p -r1.27.8.1 -r1.28 --- src/sys/arch/amd64/amd64/cpufunc.S 2018/02/26 00:49:48 1.27.8.1 +++ src/sys/arch/amd64/amd64/cpufunc.S 2017/10/15 10:58:32 1.28 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.S,v 1.27.8.1 2018/02/26 00:49:48 snj Exp $ */ +/* $NetBSD: cpufunc.S,v 1.28 2017/10/15 10:58:32 maxv Exp $ */ /*- * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -371,7 +371,8 @@ ENTRY(__byte_swap_u16_variable) * Load a new GDT pointer (and do any necessary cleanup). * XXX It's somewhat questionable whether reloading all the segment registers * is necessary, since the actual descriptor data is not changed except by - * process creation and exit, both of which clean up via task switches. + * process creation and exit, both of which clean up via task switches. OTOH, + * this only happens at run time when the GDT is resized. */ #ifndef XEN ENTRY(lgdt) @@ -381,21 +382,19 @@ ENTRY(lgdt) /* Flush the prefetch q. */ jmp 1f nop -1: jmp _C_LABEL(lgdt_finish) -END(lgdt) -#endif - +1: /* Reload "stale" selectors. */ +#else /* XEN */ /* * void lgdt_finish(void); * Reload segments after a GDT change */ ENTRY(lgdt_finish) +#endif /* XEN */ movl $GSEL(GDATA_SEL, SEL_KPL),%eax movl %eax,%ds movl %eax,%es movl %eax,%ss - jmp _C_LABEL(x86_flush) -END(lgdt_finish) + /* FALLTHROUGH */ /* * void x86_flush() @@ -642,6 +641,7 @@ ENTRY(setfs) movw %di, %fs ret +#ifndef XEN ENTRY(setusergs) CLI(ax) swapgs @@ -649,3 +649,4 @@ ENTRY(setusergs) swapgs STI(ax) ret +#endif