summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-08-25 16:09:30 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-08-25 16:09:30 +0000
commitd2a91c10c1a90277c03f97a4bc9b82807d159e9c (patch)
treed72045f24939db7bad74b16ba19ca899ba6cf1a6 /sys/arch
parentae7af1427ea73856b2c16ada12b6ae7f81105678 (diff)
Fix printing of ioapic remapping messages; avoid printing duplicate info.
ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/ioapic.c13
-rw-r--r--sys/arch/i386/i386/ioapic.c13
2 files changed, 16 insertions, 10 deletions
diff --git a/sys/arch/amd64/amd64/ioapic.c b/sys/arch/amd64/amd64/ioapic.c
index b39c5f55a0f..0029edf0b56 100644
--- a/sys/arch/amd64/amd64/ioapic.c
+++ b/sys/arch/amd64/amd64/ioapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioapic.c,v 1.28 2017/10/14 04:44:43 jsg Exp $ */
+/* $OpenBSD: ioapic.c,v 1.29 2018/08/25 16:09:29 kettenis Exp $ */
/* $NetBSD: ioapic.c,v 1.6 2003/05/15 13:30:31 fvdl Exp $ */
/*-
@@ -259,9 +259,9 @@ ioapic_set_id(struct ioapic_softc *sc)
IOAPIC_ID_SHIFT;
if (apic_id != sc->sc_apicid)
- printf(", can't remap to apid %d\n", sc->sc_apicid);
+ printf(", can't remap");
else
- printf(", remapped to apid %d\n", sc->sc_apicid);
+ printf(", remapped");
}
/*
@@ -330,7 +330,7 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
aaa->flags & IOAPIC_PICMODE ? "PIC" : "virtual wire");
}
- printf(", version %x, %d pins\n", sc->sc_apic_vers, sc->sc_apic_sz);
+ printf(", version %x, %d pins", sc->sc_apic_vers, sc->sc_apic_sz);
apic_id = (ioapic_read(sc, IOAPIC_ID) & IOAPIC_ID_MASK) >>
IOAPIC_ID_SHIFT;
@@ -353,10 +353,13 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
*/
if (apic_id != sc->sc_apicid) {
if (mp_verbose)
- printf("%s: misconfigured as apic %d",
+ printf("\n%s: misconfigured as apic %d",
sc->sc_pic.pic_name, apic_id);
ioapic_set_id(sc);
}
+
+ printf("\n");
+
#if 0
/* output of this was boring. */
if (mp_verbose)
diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c
index 3562599dcc0..72783af8038 100644
--- a/sys/arch/i386/i386/ioapic.c
+++ b/sys/arch/i386/i386/ioapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioapic.c,v 1.40 2017/08/29 15:19:57 deraadt Exp $ */
+/* $OpenBSD: ioapic.c,v 1.41 2018/08/25 16:09:29 kettenis Exp $ */
/* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */
/*-
@@ -270,9 +270,9 @@ ioapic_set_id(struct ioapic_softc *sc)
IOAPIC_ID_SHIFT;
if (apic_id != sc->sc_apicid)
- printf(", can't remap to apid %d\n", sc->sc_apicid);
+ printf(", can't remap");
else
- printf(", remapped to apid %d\n", sc->sc_apicid);
+ printf(", remapped");
}
/*
@@ -330,7 +330,7 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
aaa->flags & IOAPIC_PICMODE ? "PIC" : "virtual wire");
}
- printf(", version %x, %d pins\n", sc->sc_apic_vers, sc->sc_apic_sz);
+ printf(", version %x, %d pins", sc->sc_apic_vers, sc->sc_apic_sz);
apic_id = (ioapic_read(sc, IOAPIC_ID) & IOAPIC_ID_MASK) >>
IOAPIC_ID_SHIFT;
@@ -354,10 +354,13 @@ ioapic_attach(struct device *parent, struct device *self, void *aux)
*/
if (apic_id != sc->sc_apicid) {
if (mp_verbose)
- printf("%s: misconfigured as apic %d",
+ printf("\n%s: misconfigured as apic %d",
sc->sc_pic.pic_name, apic_id);
ioapic_set_id(sc);
}
+
+ printf("\n");
+
#if 0
/* output of this was boring. */
if (mp_verbose)