]> xenbits.xensource.com Git - xen.git/commitdiff
x86/boot: silence MADT table entry logging
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Sep 2018 15:51:40 +0000 (17:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Sep 2018 15:51:40 +0000 (17:51 +0200)
Logging disabled LAPIC / x2APIC entries with invalid local APIC IDs
(ones having "broadcast" meaning when used) isn't very useful, and can
be quite noisy on larger systems. Suppress their logging unless
opt_cpu_info is true.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/acpi/boot.c

index e89c2e9009e824a5b4b1b7be2f0ccd6a3338800e..e6ab9fa3989b2c592f208da1ddbec5a7516347cb 100644 (file)
@@ -83,21 +83,26 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end)
 {
        struct acpi_madt_local_x2apic *processor =
                container_of(header, struct acpi_madt_local_x2apic, header);
-       bool enabled = false;
+       bool enabled = false, log = false;
 
        if (BAD_MADT_ENTRY(processor, end))
                return -EINVAL;
 
-       acpi_table_print_madt_entry(header);
+       if ((processor->lapic_flags & ACPI_MADT_ENABLED) ||
+           processor->local_apic_id != 0xffffffff || opt_cpu_info) {
+               acpi_table_print_madt_entry(header);
+               log = true;
+       }
 
        /* Record local apic id only when enabled and fitting. */
        if (processor->local_apic_id >= MAX_APICS ||
            processor->uid >= MAX_MADT_ENTRIES) {
-               printk("%sAPIC ID %#x and/or ACPI ID %#x beyond limit"
-                      " - processor ignored\n",
-                      processor->lapic_flags & ACPI_MADT_ENABLED ?
-                               KERN_WARNING "WARNING: " : KERN_INFO,
-                      processor->local_apic_id, processor->uid);
+               if (log)
+                       printk("%sAPIC ID %#x and/or ACPI ID %#x beyond limit"
+                              " - processor ignored\n",
+                              processor->lapic_flags & ACPI_MADT_ENABLED
+                              ? KERN_WARNING "WARNING: " : KERN_INFO,
+                              processor->local_apic_id, processor->uid);
                /*
                 * Must not return an error here, to prevent
                 * acpi_table_parse_entries() from terminating early.
@@ -132,7 +137,9 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end)
        if (BAD_MADT_ENTRY(processor, end))
                return -EINVAL;
 
-       acpi_table_print_madt_entry(header);
+       if ((processor->lapic_flags & ACPI_MADT_ENABLED) ||
+           processor->id != 0xff || opt_cpu_info)
+               acpi_table_print_madt_entry(header);
 
        /* Record local apic id only when enabled */
        if (processor->lapic_flags & ACPI_MADT_ENABLED) {