Merge branch 'WIP.x86/asm' into x86/urgent, because the topic is ready
[linux-2.6-block.git] / arch / x86 / kernel / acpi / boot.c
index 7a37d9357bc48a4f8224179c32f3c86da0e560eb..dde444f932c135d11f93b22188689e3e97e8e046 100644 (file)
@@ -200,7 +200,7 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end)
 {
        struct acpi_madt_local_x2apic *processor = NULL;
 #ifdef CONFIG_X86_X2APIC
-       int apic_id;
+       u32 apic_id;
        u8 enabled;
 #endif
 
@@ -222,10 +222,13 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end)
         * to not preallocating memory for all NR_CPUS
         * when we use CPU hotplug.
         */
-       if (!apic->apic_id_valid(apic_id) && enabled)
-               printk(KERN_WARNING PREFIX "x2apic entry ignored\n");
-       else
-               acpi_register_lapic(apic_id, processor->uid, enabled);
+       if (!apic->apic_id_valid(apic_id)) {
+               if (enabled)
+                       pr_warn(PREFIX "x2apic entry ignored\n");
+               return 0;
+       }
+
+       acpi_register_lapic(apic_id, processor->uid, enabled);
 #else
        printk(KERN_WARNING PREFIX "x2apic entry ignored\n");
 #endif