diff options
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 90d84c3eee53..32a7d70913ac 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -176,15 +176,10 @@ static int acpi_register_lapic(int id, u32 acpiid, u8 enabled) | |||
176 | return -EINVAL; | 176 | return -EINVAL; |
177 | } | 177 | } |
178 | 178 | ||
179 | if (!enabled) { | ||
180 | ++disabled_cpus; | ||
181 | return -EINVAL; | ||
182 | } | ||
183 | |||
184 | if (boot_cpu_physical_apicid != -1U) | 179 | if (boot_cpu_physical_apicid != -1U) |
185 | ver = apic_version[boot_cpu_physical_apicid]; | 180 | ver = boot_cpu_apic_version; |
186 | 181 | ||
187 | cpu = generic_processor_info(id, ver); | 182 | cpu = __generic_processor_info(id, ver, enabled); |
188 | if (cpu >= 0) | 183 | if (cpu >= 0) |
189 | early_per_cpu(x86_cpu_to_acpiid, cpu) = acpiid; | 184 | early_per_cpu(x86_cpu_to_acpiid, cpu) = acpiid; |
190 | 185 | ||
@@ -282,6 +277,8 @@ acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, | |||
282 | if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) | 277 | if (BAD_MADT_ENTRY(lapic_addr_ovr, end)) |
283 | return -EINVAL; | 278 | return -EINVAL; |
284 | 279 | ||
280 | acpi_table_print_madt_entry(header); | ||
281 | |||
285 | acpi_lapic_addr = lapic_addr_ovr->address; | 282 | acpi_lapic_addr = lapic_addr_ovr->address; |
286 | 283 | ||
287 | return 0; | 284 | return 0; |
@@ -705,7 +702,7 @@ static void __init acpi_set_irq_model_ioapic(void) | |||
705 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | 702 | #ifdef CONFIG_ACPI_HOTPLUG_CPU |
706 | #include <acpi/processor.h> | 703 | #include <acpi/processor.h> |
707 | 704 | ||
708 | static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) | 705 | int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) |
709 | { | 706 | { |
710 | #ifdef CONFIG_ACPI_NUMA | 707 | #ifdef CONFIG_ACPI_NUMA |
711 | int nid; | 708 | int nid; |
@@ -716,6 +713,7 @@ static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) | |||
716 | numa_set_node(cpu, nid); | 713 | numa_set_node(cpu, nid); |
717 | } | 714 | } |
718 | #endif | 715 | #endif |
716 | return 0; | ||
719 | } | 717 | } |
720 | 718 | ||
721 | int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, int *pcpu) | 719 | int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, int *pcpu) |
@@ -998,21 +996,6 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
998 | if (!boot_cpu_has(X86_FEATURE_APIC)) | 996 | if (!boot_cpu_has(X86_FEATURE_APIC)) |
999 | return -ENODEV; | 997 | return -ENODEV; |
1000 | 998 | ||
1001 | /* | ||
1002 | * Note that the LAPIC address is obtained from the MADT (32-bit value) | ||
1003 | * and (optionally) overridden by a LAPIC_ADDR_OVR entry (64-bit value). | ||
1004 | */ | ||
1005 | |||
1006 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, | ||
1007 | acpi_parse_lapic_addr_ovr, 0); | ||
1008 | if (count < 0) { | ||
1009 | printk(KERN_ERR PREFIX | ||
1010 | "Error parsing LAPIC address override entry\n"); | ||
1011 | return count; | ||
1012 | } | ||
1013 | |||
1014 | register_lapic_address(acpi_lapic_addr); | ||
1015 | |||
1016 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, | 999 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, |
1017 | acpi_parse_sapic, MAX_LOCAL_APIC); | 1000 | acpi_parse_sapic, MAX_LOCAL_APIC); |
1018 | 1001 | ||
@@ -1031,8 +1014,8 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
1031 | return ret; | 1014 | return ret; |
1032 | } | 1015 | } |
1033 | 1016 | ||
1034 | x2count = madt_proc[0].count; | 1017 | count = madt_proc[0].count; |
1035 | count = madt_proc[1].count; | 1018 | x2count = madt_proc[1].count; |
1036 | } | 1019 | } |
1037 | if (!count && !x2count) { | 1020 | if (!count && !x2count) { |
1038 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); | 1021 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); |
@@ -1513,7 +1496,7 @@ void __init acpi_boot_table_init(void) | |||
1513 | * If acpi_disabled, bail out | 1496 | * If acpi_disabled, bail out |
1514 | */ | 1497 | */ |
1515 | if (acpi_disabled) | 1498 | if (acpi_disabled) |
1516 | return; | 1499 | return; |
1517 | 1500 | ||
1518 | /* | 1501 | /* |
1519 | * Initialize the ACPI boot-time table parser. | 1502 | * Initialize the ACPI boot-time table parser. |