summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-11-28 19:13:52 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-11-28 19:13:52 +0000
commit22e352f942a5ebc2794b8f70a827dd94e29e68ea (patch)
tree54597400af8bc19d058c42be6518249afb4bc33b /sys/arch
parentf33be9bffe76da6db0b21b0444e79a0ac3ff706e (diff)
Don't free the old idt vector if we reuse it.
ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/ioapic.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c
index 4cc75a602db..31a5573617a 100644
--- a/sys/arch/i386/i386/ioapic.c
+++ b/sys/arch/i386/i386/ioapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioapic.c,v 1.14 2007/02/22 19:46:16 marco Exp $ */
+/* $OpenBSD: ioapic.c,v 1.15 2007/11/28 19:13:51 kettenis Exp $ */
/* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */
/*-
@@ -477,10 +477,7 @@ void
apic_vectorset(struct ioapic_softc *sc, int pin, int minlevel, int maxlevel)
{
struct ioapic_pin *pp = &sc->sc_pins[pin];
- int ovector = 0;
- int nvector = 0;
-
- ovector = pp->ip_vector;
+ int nvector, ovector = pp->ip_vector;
if (maxlevel == 0) {
/* no vector needed. */
@@ -525,7 +522,7 @@ apic_vectorset(struct ioapic_softc *sc, int pin, int minlevel, int maxlevel)
}
apic_intrhand[pp->ip_vector] = pp->ip_handler;
- if (ovector) {
+ if (ovector && ovector != pp->ip_vector) {
/*
* XXX should defer this until we're sure the old vector
* doesn't have a pending interrupt on any processor.