diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-01-24 20:27:00 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-01-24 20:27:00 +0000 |
commit | 52e9ed267fe1eaeba6fd5a0d048f8e49da4aa865 (patch) | |
tree | e283c74eb4ad2fecdeb8e751e9f89e308fc7bce3 /sys | |
parent | 19f2872c956fffbcfbef0dec508647d290fccc15 (diff) |
Check nioapics to see whether we're using I/O APICs.
ok marco@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/lapic.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/lapic.c b/sys/arch/amd64/amd64/lapic.c index db5b2e7b5e4..f9a55d9dd6d 100644 --- a/sys/arch/amd64/amd64/lapic.c +++ b/sys/arch/amd64/amd64/lapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lapic.c,v 1.7 2007/01/15 23:19:05 jsg Exp $ */ +/* $OpenBSD: lapic.c,v 1.8 2007/01/24 20:26:59 kettenis Exp $ */ /* $NetBSD: lapic.c,v 1.2 2003/05/08 01:04:35 fvdl Exp $ */ /*- @@ -63,6 +63,12 @@ #include <machine/i82489reg.h> #include <machine/i82489var.h> +#include "ioapic.h" + +#if NIOAPIC > 0 +#include <machine/i82093var.h> +#endif + struct evcount clk_count; struct evcount ipi_count; @@ -147,15 +153,16 @@ lapic_set_lvt(void) } #endif +#if NIOAPIC > 0 /* * Disable ExtINT by default when using I/O APICs. - * XXX mp_nintr > 0 isn't quite the right test for this. */ - if (mp_nintr > 0) { + if (nioapics > 0) { lint0 = i82489_readreg(LAPIC_LVINT0); lint0 |= LAPIC_LVT_MASKED; i82489_writereg(LAPIC_LVINT0, lint0); } +#endif for (i = 0; i < mp_nintr; i++) { mpi = &mp_intrs[i]; @@ -172,7 +179,7 @@ lapic_set_lvt(void) i82489_writereg(LAPIC_LVINT1, mpi->redir); } } - + #ifdef MULTIPROCESSOR if (mp_verbose) { apic_format_redir (ci->ci_dev->dv_xname, "timer", 0, 0, |