Module Name: src
Committed By: christos
Date: Thu Apr 24 19:23:00 UTC 2014
Modified Files:
src/sys/arch/i386/include: types.h
Log Message:
Explain what is going on with the 64 bit atomic ops, and restore them
for pure kernel use.
To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/i386/include/types.h
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/include/types.h
diff -u src/sys/arch/i386/include/types.h:1.78 src/sys/arch/i386/include/types.h:1.79
--- src/sys/arch/i386/include/types.h:1.78 Tue Apr 22 10:09:19 2014
+++ src/sys/arch/i386/include/types.h Thu Apr 24 15:23:00 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.78 2014/04/22 14:09:19 christos Exp $ */
+/* $NetBSD: types.h,v 1.79 2014/04/24 19:23:00 christos Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -109,10 +109,12 @@ typedef volatile unsigned char __cpu_si
#define __HAVE_SYSCALL_INTERN
#define __HAVE_MINIMAL_EMUL
#define __HAVE_OLD_DISKLABEL
-#if 0
+#if defined(_KERNEL) && !defined(_RUMPKERNEL) && !defined(_RUMP_NATIVE_ABI)
/*
- * < i586 does not have cmpxchg8b, and we compile for i486 by default.
- * Atomic64 ops are not currently used in the kernel.
+ * Processors < i586 do not have cmpxchg8b, and we compile for i486
+ * by default in userland. The kernel tsc driver uses them though,
+ * and handles < i586 * by patching. We don't want to expose them in
+ * userland, that is why we exclude rump.
*/
#define __HAVE_ATOMIC64_OPS
#endif