diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-07-15 04:56:58 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-07-15 04:56:58 +0000 |
commit | 2b97a333e619f1c1cd2677d220097de0d1e40555 (patch) | |
tree | 988eea4b5dfc65c29d67af5ecf2efd6353472726 /sys | |
parent | 927c784b4bdbcd23aecd25ffba3e529fe5ceeee3 (diff) | |
download | FreeBSD-src-2b97a333e619f1c1cd2677d220097de0d1e40555.zip FreeBSD-src-2b97a333e619f1c1cd2677d220097de0d1e40555.tar.gz |
Removed several "magic numbers".
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/i386/mpapic.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index 4197ef7..95bcd7e 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mpapic.c,v 1.11 1997/07/15 00:09:53 smp Exp smp $ + * $Id: mpapic.c,v 1.12 1997/07/15 02:51:19 fsmp Exp $ */ #include "opt_smp.h" @@ -53,8 +53,6 @@ volatile ioapic_t *ioapic[NAPIC]; /* * Enable APIC, configure interrupts. - * - * XXX FIXME: remove the magic numbers. */ void apic_initialize(void) @@ -63,7 +61,7 @@ apic_initialize(void) /* setup LVT1 as ExtINT */ temp = lapic.lvt_lint0; - temp &= 0xfffe58ff; /* preserve undefined fields */ + temp &= ~(APIC_LVT_M | APIC_LVT_TM | APIC_LVT_IIPP | APIC_LVT_DM); if (cpuid == 0) temp |= 0x00000700; /* process ExtInts */ else @@ -72,7 +70,7 @@ apic_initialize(void) /* setup LVT2 as NMI, masked till later... */ temp = lapic.lvt_lint1; - temp &= 0xfffe58ff; /* preserve undefined fields */ + temp &= ~(APIC_LVT_M | APIC_LVT_TM | APIC_LVT_IIPP | APIC_LVT_DM); temp |= 0x00010400; /* masked, edge trigger, active hi */ lapic.lvt_lint1 = temp; @@ -82,15 +80,7 @@ apic_initialize(void) temp &= ~APIC_TPR_PRIO; /* clear priority field */ #if defined(TEST_LOPRIO) -#if 1 - /* The new order of startup since private pages makes this possible. */ temp |= LOPRIO_LEVEL; /* allow INT arbitration */ -#else - if (cpuid == 0) - temp |= 0x10; /* allow INT arbitration */ - else - temp |= 0xff; /* disallow INT arbitration */ -#endif #endif /* TEST_LOPRIO */ lapic.tpr = temp; |