Module Name:    src
Committed By:   maxv
Date:           Thu Nov  8 10:55:41 UTC 2018

Modified Files:
        src/sys/arch/x86/x86: sys_machdep.c

Log Message:
Simplify the ifdefs, and error out if XEN and USER_LDT are both defined.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x86/x86/sys_machdep.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/x86/x86/sys_machdep.c
diff -u src/sys/arch/x86/x86/sys_machdep.c:1.49 src/sys/arch/x86/x86/sys_machdep.c:1.50
--- src/sys/arch/x86/x86/sys_machdep.c:1.49	Mon Sep  3 16:29:29 2018
+++ src/sys/arch/x86/x86/sys_machdep.c	Thu Nov  8 10:55:41 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_machdep.c,v 1.49 2018/09/03 16:29:29 riastradh Exp $	*/
+/*	$NetBSD: sys_machdep.c,v 1.50 2018/11/08 10:55:41 maxv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.49 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.50 2018/11/08 10:55:41 maxv Exp $");
 
 #include "opt_mtrr.h"
 #include "opt_user_ldt.h"
@@ -63,18 +63,14 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep.
 #include <machine/sysarch.h>
 #include <machine/mtrr.h>
 
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(XEN)
 #undef	IOPERM	/* not implemented */
 #else
-#if defined(XEN)
-#undef	IOPERM
-#else /* defined(XEN) */
 #define	IOPERM
-#endif /* defined(XEN) */
 #endif
 
-#ifdef XEN
-#undef	USER_LDT
+#if defined(XEN) && defined(USER_LDT)
+#error "USER_LDT not supported on XEN"
 #endif
 
 extern struct vm_map *kernel_map;

Reply via email to