diff options
Diffstat (limited to 'sys/i386/include/apic.h')
| -rw-r--r-- | sys/i386/include/apic.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/i386/include/apic.h b/sys/i386/include/apic.h index be9de4f8fe1ff..3d84792ed5046 100644 --- a/sys/i386/include/apic.h +++ b/sys/i386/include/apic.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_ */ |
