diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-08-29 15:19:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-08-29 15:19:58 +0000 |
commit | 24e3dada9f7f6d011d5649e9b66ddd99e339f888 (patch) | |
tree | 7bb3347e9569ff1e98906acdcffe9776d3c069b4 /sys/arch | |
parent | 89ed813e7535a1938538861d3a9c5dfc70c44773 (diff) |
In previous change, misconfigured APICs were not being repaired.
noticed by Andrew Daugherity
ok kettenis
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/ioapic.c | 9 | ||||
-rw-r--r-- | sys/arch/i386/i386/ioapic.c | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/ioapic.c b/sys/arch/amd64/amd64/ioapic.c index e8f5e6aa77e..1d61e25c875 100644 --- a/sys/arch/amd64/amd64/ioapic.c +++ b/sys/arch/amd64/amd64/ioapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioapic.c,v 1.26 2017/08/08 15:53:55 visa Exp $ */ +/* $OpenBSD: ioapic.c,v 1.27 2017/08/29 15:19:57 deraadt Exp $ */ /* $NetBSD: ioapic.c,v 1.6 2003/05/15 13:30:31 fvdl Exp $ */ /*- @@ -356,9 +356,10 @@ ioapic_attach(struct device *parent, struct device *self, void *aux) * Maybe we should record the original ID for interrupt * mapping later ... */ - if (mp_verbose && apic_id != sc->sc_apicid) { - printf("%s: misconfigured as apic %d", - sc->sc_pic.pic_name, apic_id); + if (apic_id != sc->sc_apicid) { + if (mp_verbose) + printf("%s: misconfigured as apic %d", + sc->sc_pic.pic_name, apic_id); ioapic_set_id(sc); } #if 0 diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c index f6de0573efc..3562599dcc0 100644 --- a/sys/arch/i386/i386/ioapic.c +++ b/sys/arch/i386/i386/ioapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioapic.c,v 1.39 2017/08/08 15:53:55 visa Exp $ */ +/* $OpenBSD: ioapic.c,v 1.40 2017/08/29 15:19:57 deraadt Exp $ */ /* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */ /*- @@ -352,9 +352,10 @@ ioapic_attach(struct device *parent, struct device *self, void *aux) * In case the APIC is not initialized to the correct ID * do it now. */ - if (mp_verbose && apic_id != sc->sc_apicid) { - printf("%s: misconfigured as apic %d", - sc->sc_pic.pic_name, apic_id); + if (apic_id != sc->sc_apicid) { + if (mp_verbose) + printf("%s: misconfigured as apic %d", + sc->sc_pic.pic_name, apic_id); ioapic_set_id(sc); } #if 0 |