diff options
author | peter <peter@FreeBSD.org> | 2000-12-04 21:15:14 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-12-04 21:15:14 +0000 |
commit | 8bd975051ebdbe73def349683309a3e8817a810c (patch) | |
tree | 12b90cf52960947e5198729ffa8939a5bed00779 /sys/amd64/isa/icu.h | |
parent | f2e5184027227edebf7519183f99bc3f8b96dc64 (diff) | |
download | FreeBSD-src-8bd975051ebdbe73def349683309a3e8817a810c.zip FreeBSD-src-8bd975051ebdbe73def349683309a3e8817a810c.tar.gz |
Cleanup some leftover lint from the old interrupt system.
Also, while here, run up to 32 interrupt sources on APIC systems.
Normalize INTREN/INTRDIS so they are the same on both UP and SMP systems
rather than sometimes a macro, and sometimes a function.
Reviewed by: jhb, jakeb
Diffstat (limited to 'sys/amd64/isa/icu.h')
-rw-r--r-- | sys/amd64/isa/icu.h | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/sys/amd64/isa/icu.h b/sys/amd64/isa/icu.h index ed3a879..b5f2de4 100644 --- a/sys/amd64/isa/icu.h +++ b/sys/amd64/isa/icu.h @@ -47,8 +47,6 @@ #ifndef LOCORE -#ifdef APIC_IO - /* #define MP_SAFE * Note: @@ -61,41 +59,14 @@ void INTREN __P((u_int)); void INTRDIS __P((u_int)); -#else /* APIC_IO */ - -/* - * Interrupt "level" mechanism variables, masks, and macros - */ -extern unsigned imen; /* interrupt mask enable */ - -#define INTREN(s) (imen &= ~(s), SET_ICUS()) -#define INTRDIS(s) (imen |= (s), SET_ICUS()) - -#if 0 -#ifdef PC98 -#define SET_ICUS() (outb(IO_ICU1 + 2, imen), outb(IU_ICU2 + 2, imen >> 8)) -#define INTRGET() ((inb(IO_ICU2) << 8 | inb(IO_ICU1)) & 0xffff) -#else /* IBM-PC */ -#define SET_ICUS() (outb(IO_ICU1 + 1, imen), outb(IU_ICU2 + 1, imen >> 8)) -#define INTRGET() ((inb(IO_ICU2) << 8 | inb(IO_ICU1)) & 0xffff) -#endif /* PC98 */ -#else -/* - * XXX - IO_ICU* are defined in isa.h, not icu.h, and nothing much bothers to - * include isa.h, while too many things include icu.h. - */ -#ifdef PC98 -#define SET_ICUS() (outb(0x02, imen), outb(0x0a, imen >> 8)) -/* XXX is this correct? */ -#define INTRGET() ((inb(0x0a) << 8 | inb(0x02)) & 0xffff) +#ifdef APIC_IO +extern unsigned apic_imen; /* APIC interrupt mask enable */ +#define APIC_IMEN_BITS 32 /* number of bits in apic_imen */ #else -#define SET_ICUS() (outb(0x21, imen), outb(0xa1, imen >> 8)) -#define INTRGET() ((inb(0xa1) << 8 | inb(0x21)) & 0xffff) -#endif +extern unsigned imen; /* interrupt mask enable */ +#define IMEN_BITS 16 /* number of bits in imen */ #endif -#endif /* APIC_IO */ - #endif /* LOCORE */ |