diff options
author | markm <markm@FreeBSD.org> | 2001-02-11 10:44:09 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-02-11 10:44:09 +0000 |
commit | 4e9c36b3003ffcfb812ef0bea8d7504d6a422c13 (patch) | |
tree | 3590416bf784163b3ca3a8bc2452bde5c704d0ad /sys/dev | |
parent | 0f9088da5625e8088bdbd7b3587fdadb265b1482 (diff) | |
download | FreeBSD-src-4e9c36b3003ffcfb812ef0bea8d7504d6a422c13.zip FreeBSD-src-4e9c36b3003ffcfb812ef0bea8d7504d6a422c13.tar.gz |
RIP <machine/lock.h>.
Some things needed bits of <i386/include/lock.h> - cy.c now has its
own (only) copy of the COM_(UN)LOCK() macros, and IMASK_(UN)LOCK()
has been moved to <i386/include/apic.h> (AKA <machine/apic.h>).
Reviewed by: jhb
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 374b932..9a56e2d 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 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 diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 252a376..ee3d4f1 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> |