diff options
| author | Mark Murray <markm@FreeBSD.org> | 2001-02-11 10:44:09 +0000 |
|---|---|---|
| committer | Mark Murray <markm@FreeBSD.org> | 2001-02-11 10:44:09 +0000 |
| commit | d888fc4e737af84dd01cea8a7e529e101b1e06d5 (patch) | |
| tree | c815f131250a842a0adc2e7b9709a4487a7b2781 /sys/dev | |
| parent | a57815efd2f9d14e317b9254dff5a5f184422d10 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/cy/cy.c | 22 | ||||
| -rw-r--r-- | sys/dev/cy/cy_isa.c | 22 | ||||
| -rw-r--r-- | sys/dev/sio/sio.c | 4 |
3 files changed, 42 insertions, 6 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 374b9324149cb..9a56e2df10104 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.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 diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 374b9324149cb..9a56e2df10104 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 diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 252a376a461a3..ee3d4f180cf6e 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -80,12 +80,8 @@ #include <pci/pcireg.h> #include <pci/pcivar.h> #endif -#include <machine/lock.h> #include <machine/clock.h> -#ifndef SMP -#include <machine/lock.h> -#endif #include <machine/resource.h> #include <isa/sioreg.h> |
