x86: get apic_id later in acpi_numa_processor_affinity_init
[sfrench/cifs-2.6.git] / arch / x86 / mm / srat_64.c
index 845001c617cc7130697b5e659f3e5ce0e71eb936..04e06c8226e3f29ce03f02950509a29f3e44663f 100644 (file)
@@ -132,7 +132,6 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
        int pxm, node;
        int apic_id;
 
        int pxm, node;
        int apic_id;
 
-       apic_id = pa->apic_id;
        if (srat_disabled())
                return;
        if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) {
        if (srat_disabled())
                return;
        if (pa->header.length != sizeof(struct acpi_srat_cpu_affinity)) {
@@ -148,6 +147,8 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
                bad_srat();
                return;
        }
                bad_srat();
                return;
        }
+
+       apic_id = pa->apic_id;
        apicid_to_node[apic_id] = node;
        acpi_numa = 1;
        printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
        apicid_to_node[apic_id] = node;
        acpi_numa = 1;
        printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",