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/amd64/include/apicreg.h | |
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/amd64/include/apicreg.h')
-rw-r--r-- | sys/amd64/include/apicreg.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/amd64/include/apicreg.h b/sys/amd64/include/apicreg.h index be9de4f..3d84792 100644 --- a/sys/amd64/include/apicreg.h +++ b/sys/amd64/include/apicreg.h @@ -463,4 +463,28 @@ typedef struct IOAPIC ioapic_t; #define IOART_INTVEC 0x000000ff /* R/W: INTerrupt vector field */ +#ifdef LOCORE + +#ifdef SMP + +/* + * Protects the IO APIC and apic_imen as a critical region. + */ +#define IMASK_LOCK MTX_LOCK_SPIN(_imen_mtx, 0) +#define IMASK_UNLOCK MTX_UNLOCK_SPIN(_imen_mtx) + +#else /* SMP */ + +#define IMASK_LOCK /* NOP */ +#define IMASK_UNLOCK /* NOP */ + +#endif /* SMP */ + +#else /* LOCORE */ + +/* global data in mp_machdep.c */ +extern struct mtx imen_mtx; + +#endif /* LOCORE */ + #endif /* _MACHINE_APIC_H_ */ |