summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/cpufunc.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-04-26 11:46:25 +0000
committerpeter <peter@FreeBSD.org>1997-04-26 11:46:25 +0000
commit6323aa10bffe459912ba8b2f8592c7ac4ffd8705 (patch)
treebf48960e09e26f0de373de093c89322724bbdd64 /sys/i386/include/cpufunc.h
parent96efe480c0c091aecb2f359675c74aca30f36a4a (diff)
downloadFreeBSD-src-6323aa10bffe459912ba8b2f8592c7ac4ffd8705.zip
FreeBSD-src-6323aa10bffe459912ba8b2f8592c7ac4ffd8705.tar.gz
Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r--sys/i386/include/cpufunc.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index 9cd0351..740b7b2 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.61 1997/02/22 09:34:08 peter Exp $
+ * $Id: cpufunc.h,v 1.62 1997/03/22 18:52:57 kato Exp $
*/
/*
@@ -42,6 +42,10 @@
#include <sys/cdefs.h>
#include <sys/types.h>
+#include <machine/smp.h>
+
+#include "opt_smp.h"
+#include "opt_smp_invltlb.h"
#ifdef __GNUC__
@@ -201,6 +205,16 @@ invd(void)
__asm __volatile("invd");
}
+#if defined(SMP) && defined(SMP_INVLTLB)
+
+/*
+ * When using APIC IPI's, the inlining cost is prohibitive..
+ */
+void invlpg __P((u_int addr));
+void invltlb __P((void));
+
+#else
+
static __inline void
invlpg(u_int addr)
{
@@ -218,6 +232,7 @@ invltlb(void)
__asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp)
: : "memory");
}
+#endif /* SMP && SMP_INVLTLB */
static __inline u_short
inw(u_int port)
OpenPOWER on IntegriCloud