summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-08-21 05:47:25 +0000
committerfsmp <fsmp@FreeBSD.org>1997-08-21 05:47:25 +0000
commit21623b13bca01fa8ec9a427bb7ffbfa0c1d0e339 (patch)
tree6a8792806e47e5ef6658a8f63f2d6f90f889dffb
parentb66d5dcfc98c4c873a8f6c204802c2111a52dc34 (diff)
downloadFreeBSD-src-21623b13bca01fa8ec9a427bb7ffbfa0c1d0e339.zip
FreeBSD-src-21623b13bca01fa8ec9a427bb7ffbfa0c1d0e339.tar.gz
Moved the COM_LOCK and COM_UNLOCK macros to machine/param.h.
-rw-r--r--sys/dev/cy/cy.c11
-rw-r--r--sys/dev/cy/cy_isa.c11
-rw-r--r--sys/dev/sio/sio.c11
-rw-r--r--sys/i386/include/param.h19
-rw-r--r--sys/i386/isa/cy.c11
-rw-r--r--sys/i386/isa/sio.c11
-rw-r--r--sys/isa/sio.c11
7 files changed, 23 insertions, 62 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 5bcc40c..65647d3 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/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.1 1997/08/20 05:59:24 smp Exp smp $
+ * $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $
*/
#include "cy.h"
@@ -84,15 +84,6 @@
#include <machine/clock.h>
-#ifdef SMP
-#include <machine/smp.h>
-#define COM_LOCK() s_lock(&com_lock)
-#define COM_UNLOCK() s_unlock(&com_lock)
-#else
-#define COM_LOCK()
-#define COM_UNLOCK()
-#endif /* SMP */
-
#include <i386/isa/isa_device.h>
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 5bcc40c..65647d3 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.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.1 1997/08/20 05:59:24 smp Exp smp $
+ * $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $
*/
#include "cy.h"
@@ -84,15 +84,6 @@
#include <machine/clock.h>
-#ifdef SMP
-#include <machine/smp.h>
-#define COM_LOCK() s_lock(&com_lock)
-#define COM_UNLOCK() s_unlock(&com_lock)
-#else
-#define COM_LOCK()
-#define COM_UNLOCK()
-#endif /* SMP */
-
#include <i386/isa/isa_device.h>
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 5249698..b647051 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.174 1997/08/04 19:12:54 fsmp Exp $
+ * $Id: sio.c,v 1.175 1997/08/20 05:25:16 fsmp Exp $
*/
#include "opt_comconsole.h"
@@ -82,15 +82,6 @@
#include <pccard/slot.h>
#endif
-#ifdef SMP
-#include <machine/smp.h>
-#define COM_LOCK() s_lock(&com_lock)
-#define COM_UNLOCK() s_unlock(&com_lock)
-#else
-#define COM_LOCK()
-#define COM_UNLOCK()
-#endif /* SMP */
-
#ifdef APIC_IO
/*
* INTs are masked in the (global) IO APIC,
diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h
index ec399c1..b819c69 100644
--- a/sys/i386/include/param.h
+++ b/sys/i386/include/param.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
- * $Id: param.h,v 1.9 1997/08/21 04:48:45 smp Exp smp $
+ * $Id: param.h,v 1.35 1997/08/21 05:07:56 fsmp Exp $
*/
#ifndef _MACHINE_PARAM_H_
@@ -214,10 +214,25 @@
#define SYSCALL_LOCK /* NOP */
#define ALTSYSCALL_LOCK /* NOP */
-#endif /* SMP */
+#endif /* SMP */
#else /* LOCORE */
+#ifdef SMP
+
+/*
+ * Protects com/tty data as a critical region.
+ */
+#define COM_LOCK() s_lock(&com_lock)
+#define COM_UNLOCK() s_unlock(&com_lock)
+
+#else /* SMP */
+
+#define COM_LOCK()
+#define COM_UNLOCK()
+
+#endif /* SMP */
+
/*
* A simple spin lock.
*
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 5bcc40c..65647d3 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.1 1997/08/20 05:59:24 smp Exp smp $
+ * $Id: cy.c,v 1.49 1997/08/20 06:16:44 fsmp Exp $
*/
#include "cy.h"
@@ -84,15 +84,6 @@
#include <machine/clock.h>
-#ifdef SMP
-#include <machine/smp.h>
-#define COM_LOCK() s_lock(&com_lock)
-#define COM_UNLOCK() s_unlock(&com_lock)
-#else
-#define COM_LOCK()
-#define COM_UNLOCK()
-#endif /* SMP */
-
#include <i386/isa/isa_device.h>
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index 5249698..b647051 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.174 1997/08/04 19:12:54 fsmp Exp $
+ * $Id: sio.c,v 1.175 1997/08/20 05:25:16 fsmp Exp $
*/
#include "opt_comconsole.h"
@@ -82,15 +82,6 @@
#include <pccard/slot.h>
#endif
-#ifdef SMP
-#include <machine/smp.h>
-#define COM_LOCK() s_lock(&com_lock)
-#define COM_UNLOCK() s_unlock(&com_lock)
-#else
-#define COM_LOCK()
-#define COM_UNLOCK()
-#endif /* SMP */
-
#ifdef APIC_IO
/*
* INTs are masked in the (global) IO APIC,
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 5249698..b647051 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.174 1997/08/04 19:12:54 fsmp Exp $
+ * $Id: sio.c,v 1.175 1997/08/20 05:25:16 fsmp Exp $
*/
#include "opt_comconsole.h"
@@ -82,15 +82,6 @@
#include <pccard/slot.h>
#endif
-#ifdef SMP
-#include <machine/smp.h>
-#define COM_LOCK() s_lock(&com_lock)
-#define COM_UNLOCK() s_unlock(&com_lock)
-#else
-#define COM_LOCK()
-#define COM_UNLOCK()
-#endif /* SMP */
-
#ifdef APIC_IO
/*
* INTs are masked in the (global) IO APIC,
OpenPOWER on IntegriCloud