Merge commit 'v2.6.28-rc8' into x86/doc
[sfrench/cifs-2.6.git] / arch / ia64 / kernel / acpi.c
index 0635015d0aaada0de519d1b0487a787b41594db7..bd7acc71e8a9e4d408e50102e513bbe4a948a064 100644 (file)
@@ -678,6 +678,30 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
        return 0;
 }
 
+int __init early_acpi_boot_init(void)
+{
+       int ret;
+
+       /*
+        * do a partial walk of MADT to determine how many CPUs
+        * we have including offline CPUs
+        */
+       if (acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {
+               printk(KERN_ERR PREFIX "Can't find MADT\n");
+               return 0;
+       }
+
+       ret = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC,
+               acpi_parse_lsapic, NR_CPUS);
+       if (ret < 1)
+               printk(KERN_ERR PREFIX
+                      "Error parsing MADT - no LAPIC entries\n");
+
+       return 0;
+}
+
+
+
 int __init acpi_boot_init(void)
 {
 
@@ -701,11 +725,6 @@ int __init acpi_boot_init(void)
                printk(KERN_ERR PREFIX
                       "Error parsing LAPIC address override entry\n");
 
-       if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, acpi_parse_lsapic, NR_CPUS)
-           < 1)
-               printk(KERN_ERR PREFIX
-                      "Error parsing MADT - no LAPIC entries\n");
-
        if (acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0)
            < 0)
                printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");