From: Jan Beulich Date: Mon, 1 Apr 2019 09:12:54 +0000 (+0200) Subject: x86/APIC: suppress redundant "Switched to ..." messages X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2425 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c37db16ccb3426e2d22ec7731649770b56984b27;p=xen.git x86/APIC: suppress redundant "Switched to ..." messages There's no need to log anything when what we "switch to" is what is in use already. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 2a2432619e..e6130cfc81 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -884,6 +884,7 @@ void x2apic_ap_setup(void) void __init x2apic_bsp_setup(void) { struct IO_APIC_route_entry **ioapic_entries = NULL; + const char *orig_name; if ( !cpu_has_x2apic ) return; @@ -946,8 +947,10 @@ void __init x2apic_bsp_setup(void) force_iommu = 1; + orig_name = genapic.name; genapic = *apic_x2apic_probe(); - printk("Switched to APIC driver %s.\n", genapic.name); + if ( genapic.name != orig_name ) + printk("Switched to APIC driver %s\n", genapic.name); if ( !x2apic_enabled ) { diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c index 6aa7eb7b1c..1fcc1734f5 100644 --- a/xen/arch/x86/genapic/probe.c +++ b/xen/arch/x86/genapic/probe.c @@ -85,7 +85,8 @@ int __init mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid int i; for (i = 0; apic_probe[i]; ++i) { if (apic_probe[i]->mps_oem_check(mpc,oem,productid)) { - if (!cmdline_apic) { + if (!cmdline_apic && + genapic.name != apic_probe[i]->name) { genapic = *apic_probe[i]; printk(KERN_INFO "Switched to APIC driver `%s'.\n", genapic.name); @@ -101,7 +102,8 @@ int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) int i; for (i = 0; apic_probe[i]; ++i) { if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { - if (!cmdline_apic) { + if (!cmdline_apic && + genapic.name != apic_probe[i]->name) { genapic = *apic_probe[i]; printk(KERN_INFO "Switched to APIC driver `%s'.\n", genapic.name);