summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/cpufunc.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-04-26 20:04:21 +0000
committerpeter <peter@FreeBSD.org>1997-04-26 20:04:21 +0000
commit2302234a84217606a50178bd29908648ca5d5806 (patch)
tree0a6a80a4bdeda73dc07c566c9bce0ea88262df3d /sys/i386/include/cpufunc.h
parent56d2f97fe52273b824a83b7d0383c55955777704 (diff)
downloadFreeBSD-src-2302234a84217606a50178bd29908648ca5d5806.zip
FreeBSD-src-2302234a84217606a50178bd29908648ca5d5806.tar.gz
Try and make these usermode safe, Steve beat me in finding these..
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r--sys/i386/include/cpufunc.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 740b7b2..afb48f7 100644
--- a/sys/i386/include/cpufunc.h
+++ b/sys/i386/include/cpufunc.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cpufunc.h,v 1.62 1997/03/22 18:52:57 kato Exp $
+ * $Id: cpufunc.h,v 1.63 1997/04/26 11:45:36 peter Exp $
*/
/*
@@ -44,8 +44,10 @@
#include <sys/types.h>
#include <machine/smp.h>
+#ifdef KERNEL
#include "opt_smp.h"
#include "opt_smp_invltlb.h"
+#endif
#ifdef __GNUC__
@@ -205,7 +207,7 @@ invd(void)
__asm __volatile("invd");
}
-#if defined(SMP) && defined(SMP_INVLTLB)
+#if defined(SMP) && defined(SMP_INVLTLB) && defined(KERNEL)
/*
* When using APIC IPI's, the inlining cost is prohibitive..
@@ -232,7 +234,7 @@ invltlb(void)
__asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp)
: : "memory");
}
-#endif /* SMP && SMP_INVLTLB */
+#endif /* SMP && SMP_INVLTLB && KERNEL */
static __inline u_short
inw(u_int port)
OpenPOWER on IntegriCloud