diff options
author | 2007-11-28 19:13:51 +0000 | |
---|---|---|
committer | 2007-11-28 19:13:51 +0000 | |
commit | 93c1e19f17e798bb7a3558b57abad1d5458e30f6 (patch) | |
tree | 39a84c24b3ec3ece2492238f0831e1086ed41fe1 /sys | |
parent | Give UltraSPARC-IV CPUs a chance again to attach on GENERIC. (diff) | |
download | wireguard-openbsd-93c1e19f17e798bb7a3558b57abad1d5458e30f6.tar.xz wireguard-openbsd-93c1e19f17e798bb7a3558b57abad1d5458e30f6.zip |
Don't free the old idt vector if we reuse it.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/ioapic.c | 9 |
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. |