summaryrefslogtreecommitdiffstats
path: root/sys/dev/cy/cy_isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/cy/cy_isa.c')
-rw-r--r--sys/dev/cy/cy_isa.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 374b932..9a56e2d 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -80,7 +80,6 @@
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/syslog.h>
-#include <machine/lock.h>
#include <machine/psl.h>
#include <i386/isa/isa_device.h>
@@ -91,6 +90,27 @@
#error "The cy device requires the old isa compatibility shims"
#endif
+#ifdef SMP
+
+#include <machine/smptests.h> /** xxx_LOCK */
+
+#ifdef USE_COMLOCK
+#define COM_LOCK() mtx_lock_spin(&com_mtx)
+#define COM_UNLOCK() mtx_unlock_spin(&com_mtx)
+#else
+#define COM_LOCK()
+#define COM_UNLOCK()
+#endif /* USE_COMLOCK */
+
+#else /* SMP */
+
+#define COM_LOCK()
+#define COM_UNLOCK()
+
+#endif /* SMP */
+
+extern struct mtx com_mtx;
+
/*
* 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
OpenPOWER on IntegriCloud