summaryrefslogtreecommitdiffstats
path: root/sys/dev/cy
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-09-01 07:45:37 +0000
committerfsmp <fsmp@FreeBSD.org>1997-09-01 07:45:37 +0000
commite771ecca0f52de0eb9e330af62ef2a6685ff7bc6 (patch)
tree792ab41dec7c5dfa5f548445fbb361df451ef055 /sys/dev/cy
parentc9f24c9fd2c2e8be3133555fca3de9a9ddd4ab21 (diff)
downloadFreeBSD-src-e771ecca0f52de0eb9e330af62ef2a6685ff7bc6.zip
FreeBSD-src-e771ecca0f52de0eb9e330af62ef2a6685ff7bc6.tar.gz
General cleanup of the sub-system locking macros.
Eliminated the RECURSIVE_MPINTRLOCK. clock.c and microtime use clock_lock. sio.c and cy.c use com_lock. Suggestions by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys/dev/cy')
-rw-r--r--sys/dev/cy/cy.c11
-rw-r--r--sys/dev/cy/cy_isa.c11
2 files changed, 16 insertions, 6 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 62a3598..b8c7e33 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.4 1997/08/30 01:23:40 smp Exp smp $
+ * $Id: cy.c,v 1.5 1997/09/01 07:37:01 smp Exp smp $
*/
#include "cy.h"
@@ -88,6 +88,11 @@
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>
+#ifdef SMP
+#define disable_intr() COM_DISABLE_INTR()
+#define enable_intr() COM_ENABLE_INTR()
+#endif /* SMP */
+
/*
* Dictionary so that I can name everything *sio* or *com* to compare with
* sio.c. There is also lots of ugly formatting and unnecessary ifdefs to
@@ -988,7 +993,7 @@ siointr(unit)
int baseu, cyu, cy_align;
u_char status;
- MPINTR_LOCK(); /* XXX could this be placed down lower in the loop? */
+ COM_LOCK(); /* XXX could this be placed down lower in the loop? */
baseu = unit * CY_MAX_PORTS;
cy_iobase = com_addr(baseu)->cy_iobase;
@@ -1337,7 +1342,7 @@ cont:
schedsofttty();
- MPINTR_UNLOCK();
+ COM_UNLOCK();
}
#if 0
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 62a3598..b8c7e33 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.4 1997/08/30 01:23:40 smp Exp smp $
+ * $Id: cy.c,v 1.5 1997/09/01 07:37:01 smp Exp smp $
*/
#include "cy.h"
@@ -88,6 +88,11 @@
#include <i386/isa/cyreg.h>
#include <i386/isa/ic/cd1400.h>
+#ifdef SMP
+#define disable_intr() COM_DISABLE_INTR()
+#define enable_intr() COM_ENABLE_INTR()
+#endif /* SMP */
+
/*
* Dictionary so that I can name everything *sio* or *com* to compare with
* sio.c. There is also lots of ugly formatting and unnecessary ifdefs to
@@ -988,7 +993,7 @@ siointr(unit)
int baseu, cyu, cy_align;
u_char status;
- MPINTR_LOCK(); /* XXX could this be placed down lower in the loop? */
+ COM_LOCK(); /* XXX could this be placed down lower in the loop? */
baseu = unit * CY_MAX_PORTS;
cy_iobase = com_addr(baseu)->cy_iobase;
@@ -1337,7 +1342,7 @@ cont:
schedsofttty();
- MPINTR_UNLOCK();
+ COM_UNLOCK();
}
#if 0
OpenPOWER on IntegriCloud