diff options
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 65 |
1 files changed, 60 insertions, 5 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index a18eb7ce2236..723989d7f802 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -230,6 +230,35 @@ static void __cpuinit acpi_register_lapic(int id, u8 enabled) | |||
230 | } | 230 | } |
231 | 231 | ||
232 | static int __init | 232 | static int __init |
233 | acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end) | ||
234 | { | ||
235 | struct acpi_madt_local_x2apic *processor = NULL; | ||
236 | |||
237 | processor = (struct acpi_madt_local_x2apic *)header; | ||
238 | |||
239 | if (BAD_MADT_ENTRY(processor, end)) | ||
240 | return -EINVAL; | ||
241 | |||
242 | acpi_table_print_madt_entry(header); | ||
243 | |||
244 | #ifdef CONFIG_X86_X2APIC | ||
245 | /* | ||
246 | * We need to register disabled CPU as well to permit | ||
247 | * counting disabled CPUs. This allows us to size | ||
248 | * cpus_possible_map more accurately, to permit | ||
249 | * to not preallocating memory for all NR_CPUS | ||
250 | * when we use CPU hotplug. | ||
251 | */ | ||
252 | acpi_register_lapic(processor->local_apic_id, /* APIC ID */ | ||
253 | processor->lapic_flags & ACPI_MADT_ENABLED); | ||
254 | #else | ||
255 | printk(KERN_WARNING PREFIX "x2apic entry ignored\n"); | ||
256 | #endif | ||
257 | |||
258 | return 0; | ||
259 | } | ||
260 | |||
261 | static int __init | ||
233 | acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) | 262 | acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) |
234 | { | 263 | { |
235 | struct acpi_madt_local_apic *processor = NULL; | 264 | struct acpi_madt_local_apic *processor = NULL; |
@@ -289,6 +318,25 @@ acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, | |||
289 | } | 318 | } |
290 | 319 | ||
291 | static int __init | 320 | static int __init |
321 | acpi_parse_x2apic_nmi(struct acpi_subtable_header *header, | ||
322 | const unsigned long end) | ||
323 | { | ||
324 | struct acpi_madt_local_x2apic_nmi *x2apic_nmi = NULL; | ||
325 | |||
326 | x2apic_nmi = (struct acpi_madt_local_x2apic_nmi *)header; | ||
327 | |||
328 | if (BAD_MADT_ENTRY(x2apic_nmi, end)) | ||
329 | return -EINVAL; | ||
330 | |||
331 | acpi_table_print_madt_entry(header); | ||
332 | |||
333 | if (x2apic_nmi->lint != 1) | ||
334 | printk(KERN_WARNING PREFIX "NMI not connected to LINT 1!\n"); | ||
335 | |||
336 | return 0; | ||
337 | } | ||
338 | |||
339 | static int __init | ||
292 | acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end) | 340 | acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long end) |
293 | { | 341 | { |
294 | struct acpi_madt_local_apic_nmi *lapic_nmi = NULL; | 342 | struct acpi_madt_local_apic_nmi *lapic_nmi = NULL; |
@@ -793,6 +841,7 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void) | |||
793 | static int __init acpi_parse_madt_lapic_entries(void) | 841 | static int __init acpi_parse_madt_lapic_entries(void) |
794 | { | 842 | { |
795 | int count; | 843 | int count; |
844 | int x2count = 0; | ||
796 | 845 | ||
797 | if (!cpu_has_apic) | 846 | if (!cpu_has_apic) |
798 | return -ENODEV; | 847 | return -ENODEV; |
@@ -816,22 +865,28 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
816 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, | 865 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, |
817 | acpi_parse_sapic, MAX_APICS); | 866 | acpi_parse_sapic, MAX_APICS); |
818 | 867 | ||
819 | if (!count) | 868 | if (!count) { |
869 | x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC, | ||
870 | acpi_parse_x2apic, MAX_APICS); | ||
820 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, | 871 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, |
821 | acpi_parse_lapic, MAX_APICS); | 872 | acpi_parse_lapic, MAX_APICS); |
822 | if (!count) { | 873 | } |
874 | if (!count && !x2count) { | ||
823 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); | 875 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); |
824 | /* TBD: Cleanup to allow fallback to MPS */ | 876 | /* TBD: Cleanup to allow fallback to MPS */ |
825 | return -ENODEV; | 877 | return -ENODEV; |
826 | } else if (count < 0) { | 878 | } else if (count < 0 || x2count < 0) { |
827 | printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); | 879 | printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); |
828 | /* TBD: Cleanup to allow fallback to MPS */ | 880 | /* TBD: Cleanup to allow fallback to MPS */ |
829 | return count; | 881 | return count; |
830 | } | 882 | } |
831 | 883 | ||
884 | x2count = | ||
885 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC_NMI, | ||
886 | acpi_parse_x2apic_nmi, 0); | ||
832 | count = | 887 | count = |
833 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0); | 888 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_NMI, acpi_parse_lapic_nmi, 0); |
834 | if (count < 0) { | 889 | if (count < 0 || x2count < 0) { |
835 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); | 890 | printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); |
836 | /* TBD: Cleanup to allow fallback to MPS */ | 891 | /* TBD: Cleanup to allow fallback to MPS */ |
837 | return count; | 892 | return count; |
@@ -1470,7 +1525,7 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) | |||
1470 | 1525 | ||
1471 | /* | 1526 | /* |
1472 | * If your system is blacklisted here, but you find that acpi=force | 1527 | * If your system is blacklisted here, but you find that acpi=force |
1473 | * works for you, please contact acpi-devel@sourceforge.net | 1528 | * works for you, please contact linux-acpi@vger.kernel.org |
1474 | */ | 1529 | */ |
1475 | static struct dmi_system_id __initdata acpi_dmi_table[] = { | 1530 | static struct dmi_system_id __initdata acpi_dmi_table[] = { |
1476 | /* | 1531 | /* |