summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-01-08 19:17:49 +0000
committerbde <bde@FreeBSD.org>1999-01-08 19:17:49 +0000
commite53595f704322430791eaee9e3f65b0c80fc6c0e (patch)
tree9d92ec9b3a3e856f5448f3b7b6425b4c61ec9de5 /sys/i386
parent670683fcb99d8dc6fd235f8111c5c641e149a065 (diff)
downloadFreeBSD-src-e53595f704322430791eaee9e3f65b0c80fc6c0e.zip
FreeBSD-src-e53595f704322430791eaee9e3f65b0c80fc6c0e.tar.gz
Unspammed includes in <machine/cpufunc.h> in the !SMP case. Partially
unspammed them in the SMP case.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/cpufunc.h23
-rw-r--r--sys/i386/isa/cy.c5
-rw-r--r--sys/i386/isa/intr_machdep.c5
-rw-r--r--sys/i386/isa/nmi.c5
-rw-r--r--sys/i386/isa/sio.c5
5 files changed, 29 insertions, 14 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h
index bd14162..c3dd48b 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.81 1998/08/17 08:57:05 dfr Exp $
+ * $Id: cpufunc.h,v 1.82 1999/01/08 16:29:57 bde Exp $
*/
/*
@@ -40,15 +40,6 @@
#ifndef _MACHINE_CPUFUNC_H_
#define _MACHINE_CPUFUNC_H_
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <machine/lock.h>
-
-#if defined(SWTCH_OPTIM_STATS)
-extern int tlb_flush_count;
-#endif
-
#define readb(va) (*(volatile u_int8_t *) (va))
#define readw(va) (*(volatile u_int16_t *) (va))
#define readl(va) (*(volatile u_int32_t *) (va))
@@ -59,6 +50,14 @@ extern int tlb_flush_count;
#ifdef __GNUC__
+#ifdef SMP
+#include <machine/lock.h> /* XXX */
+#endif
+
+#ifdef SWTCH_OPTIM_STATS
+extern int tlb_flush_count; /* XXX */
+#endif
+
static __inline void
breakpoint(void)
{
@@ -69,13 +68,17 @@ static __inline void
disable_intr(void)
{
__asm __volatile("cli" : : : "memory");
+#ifdef SMP
MPINTR_LOCK();
+#endif
}
static __inline void
enable_intr(void)
{
+#ifdef SMP
MPINTR_UNLOCK();
+#endif
__asm __volatile("sti");
}
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 30a2cac..794d4d6 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.81 1998/12/19 16:28:57 bde Exp $
+ * $Id: cy.c,v 1.82 1998/12/24 14:17:57 bde Exp $
*/
#include "opt_compat.h"
@@ -86,6 +86,9 @@
#include <machine/clock.h>
#include <machine/ipl.h>
+#ifndef SMP
+#include <machine/lock.h>
+#endif
#include <i386/isa/isa_device.h>
#include <i386/isa/cyreg.h>
diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c
index 08c2049..0254195 100644
--- a/sys/i386/isa/intr_machdep.c
+++ b/sys/i386/isa/intr_machdep.c
@@ -34,12 +34,15 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.14 1998/09/06 22:41:41 tegge Exp $
+ * $Id: intr_machdep.c,v 1.15 1998/12/04 22:54:46 archie Exp $
*/
#include "opt_auto_eoi.h"
#include <sys/param.h>
+#ifndef SMP
+#include <machine/lock.h>
+#endif
#include <sys/systm.h>
#include <sys/syslog.h>
#include <machine/ipl.h>
diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c
index 08c2049..0254195 100644
--- a/sys/i386/isa/nmi.c
+++ b/sys/i386/isa/nmi.c
@@ -34,12 +34,15 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.14 1998/09/06 22:41:41 tegge Exp $
+ * $Id: intr_machdep.c,v 1.15 1998/12/04 22:54:46 archie Exp $
*/
#include "opt_auto_eoi.h"
#include <sys/param.h>
+#ifndef SMP
+#include <machine/lock.h>
+#endif
#include <sys/systm.h>
#include <sys/syslog.h>
#include <machine/ipl.h>
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index ae24d4c..90049d0 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.220 1998/12/27 12:35:48 phk Exp $
+ * $Id: sio.c,v 1.221 1999/01/07 14:14:23 yokota Exp $
*/
#include "opt_comconsole.h"
@@ -70,6 +70,9 @@
#include <machine/clock.h>
#include <machine/ipl.h>
+#ifndef SMP
+#include <machine/lock.h>
+#endif
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
OpenPOWER on IntegriCloud