From 556da547f03952405e44f07baaf53bc8dc7660aa Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Wed, 15 Jun 2016 19:06:09 +0800 Subject: [PATCH] mptable: Reduce log verbosity --- sys/platform/pc64/x86_64/mptable.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sys/platform/pc64/x86_64/mptable.c b/sys/platform/pc64/x86_64/mptable.c index 8bb2c37319..b5b65e33b5 100644 --- a/sys/platform/pc64/x86_64/mptable.c +++ b/sys/platform/pc64/x86_64/mptable.c @@ -1042,16 +1042,21 @@ mptable_pci_int_callback(void *xarg, const void *pos, int type) break; } if (ioapic == NULL) { - static char intdis_warned[64]; - int apic_id = ent->dst_apic_id; - - if (apic_id < 0 || apic_id >= sizeof(intdis_warned)) { - kprintf("MPTABLE: warning PCI int dst apic id %d " - "does not exist\n", apic_id); - } else if (intdis_warned[apic_id] == 0) { - intdis_warned[apic_id] = 1; - kprintf("MPTABLE: warning PCI int dst apic id %d " - "does not exist\n", apic_id); + if (bootverbose) { + static char intdis_warned[64]; + int apic_id = ent->dst_apic_id; + int warn = 0; + + if (apic_id < 0 || apic_id >= sizeof(intdis_warned)) { + warn = 1; + } else if (intdis_warned[apic_id] == 0) { + intdis_warned[apic_id] = 1; + warn = 1; + } + if (warn) { + kprintf("MPTABLE: warning PCI int dst apic id " + "%d does not exist\n", apic_id); + } } return 0; } -- 2.11.4.GIT