diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 740b7b23765f..afb48f726db7 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/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 #include +#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) diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 740b7b23765f..afb48f726db7 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 #include +#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) diff --git a/sys/i386/include/ipl.h b/sys/i386/include/ipl.h index 09e72627e1cc..4bcf5f144c0d 100644 --- a/sys/i386/include/ipl.h +++ b/sys/i386/include/ipl.h @@ -30,13 +30,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ipl.h,v 1.4 1997/02/22 09:34:45 peter Exp $ + * $Id: ipl.h,v 1.5 1997/04/26 11:45:37 peter Exp $ */ #ifndef _ISA_IPL_H_ #define _ISA_IPL_H_ +#ifdef KERNEL #include "opt_smp.h" +#endif #if defined(APIC_IO) diff --git a/sys/i386/include/spl.h b/sys/i386/include/spl.h index e9be52a064f2..8be3e9204475 100644 --- a/sys/i386/include/spl.h +++ b/sys/i386/include/spl.h @@ -30,13 +30,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: spl.h,v 1.17 1997/02/22 09:35:16 peter Exp $ + * $Id: spl.h,v 1.18 1997/04/26 11:45:48 peter Exp $ */ #ifndef _MACHINE_IPL_H_ #define _MACHINE_IPL_H_ -#include +#ifdef KERNEL +#include "opt_smp.h" +#endif #include /* XXX "machine" means cpu for i386 */ /*