[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] x86: suppress bogus log message



The way we populate mpc_cpufeature is not compatible with modern CPUs,
and hence the message printed using that information is useless/bogus.
It's of interest only anyway when not using ACPI, so move it into MPS
parsing code. This at once significantly reduces boot time logging on
huge systems.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Of course it is questionable whether retaining MPS support is actually
useful, but ripping that out is a somewhat bigger task.

--- a/xen/include/asm-x86/mach-generic/mach_apic.h
+++ b/xen/include/asm-x86/mach-generic/mach_apic.h
@@ -28,16 +28,6 @@ static inline void enable_apic_mode(void
 
 extern u32 bios_cpu_apicid[];
 
-static inline int mpc_apic_id(struct mpc_config_processor *m, u32 apicid)
-{
-       printk("Processor #%d %d:%d APIC version %d\n",
-                       apicid,
-                       (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
-                       (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
-                       m->mpc_apicver);
-       return apicid;
-}
-
 static inline int multi_timer_check(int apic, int irq)
 {
        return 0;
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -125,9 +125,9 @@ static int __init mpf_checksum(unsigned
 
 /* Return xen's logical cpu_id of the new added cpu or <0 if error */
 static int __devinit MP_processor_info_x(struct mpc_config_processor *m,
-                                        u32 apicidx, bool_t hotplug)
+                                        u32 apicid, bool_t hotplug)
 {
-       int ver, apicid, cpu = 0;
+       int ver, cpu = 0;
        
        if (!(m->mpc_cpuflag & CPU_ENABLED)) {
                if (!hotplug)
@@ -135,8 +135,6 @@ static int __devinit MP_processor_info_x
                return -EINVAL;
        }
 
-       apicid = mpc_apic_id(m, apicidx);
-
        if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
                Dprintk("    Bootup CPU\n");
                boot_cpu_physical_apicid = apicid;
@@ -340,11 +338,24 @@ static int __init smp_read_mpc(struct mp
                        {
                                struct mpc_config_processor *m=
                                        (struct mpc_config_processor *)mpt;
-                               /* ACPI may have already provided this data */
-                               if (!acpi_lapic)
-                                       MP_processor_info(m);
+
                                mpt += sizeof(*m);
                                count += sizeof(*m);
+
+                               /* ACPI may have already provided this data. */
+                               if (acpi_lapic)
+                                       break;
+
+                               printk("Processor #%02x %u:%u APIC version 
%u%s\n",
+                                      m->mpc_apicid,
+                                      MASK_EXTR(m->mpc_cpufeature,
+                                                CPU_FAMILY_MASK),
+                                      MASK_EXTR(m->mpc_cpufeature,
+                                                CPU_MODEL_MASK),
+                                      m->mpc_apicver,
+                                      m->mpc_cpuflag & CPU_ENABLED
+                                      ? "" : " [disabled]");
+                               MP_processor_info(m);
                                break;
                        }
                        case MP_BUS:
@@ -781,8 +792,15 @@ int __devinit mp_register_lapic (
        bool_t                  enabled,
        bool_t                  hotplug)
 {
-       struct mpc_config_processor processor;
-       int                     boot_cpu = 0;
+       struct mpc_config_processor processor = {
+               .mpc_type = MP_PROCESSOR,
+               /* Note: We don't fill in fields not consumed anywhere. */
+               .mpc_apicid = id,
+               .mpc_apicver = GET_APIC_VERSION(apic_read(APIC_LVR)),
+               .mpc_cpuflag = (enabled ? CPU_ENABLED : 0) |
+                              (id == boot_cpu_physical_apicid ?
+                               CPU_BOOTPROCESSOR : 0),
+       };
        
        if (MAX_APICS <= id) {
                printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
@@ -790,21 +808,6 @@ int __devinit mp_register_lapic (
                return -EINVAL;
        }
 
-       if (id == boot_cpu_physical_apicid)
-               boot_cpu = 1;
-
-       processor.mpc_type = MP_PROCESSOR;
-       processor.mpc_apicid = id;
-       processor.mpc_apicver = GET_APIC_VERSION(apic_read(APIC_LVR));
-       processor.mpc_cpuflag = (enabled ? CPU_ENABLED : 0);
-       processor.mpc_cpuflag |= (boot_cpu ? CPU_BOOTPROCESSOR : 0);
-       processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | 
-               (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
-       processor.mpc_featureflag
-            = boot_cpu_data.x86_capability[cpufeat_word(X86_FEATURE_FPU)];
-       processor.mpc_reserved[0] = 0;
-       processor.mpc_reserved[1] = 0;
-
        return MP_processor_info_x(&processor, id, hotplug);
 }
 



Attachment: x86-hide-bogus-CPU-message.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.