diff options
author | Jack Steiner <steiner@sgi.com> | 2008-03-28 15:12:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:33 -0400 |
commit | ac049c1db72963e19b29b63c42ab8759384eef20 (patch) | |
tree | 00b04e515ca03323daa1c0f7ba3ccae185f2c6c5 /arch/x86/kernel/acpi/boot.c | |
parent | a65d1d644c2b65bfb99e766e7160d764b8b2bfa4 (diff) |
x86: parsing for ACPI "SAPIC" table
Add kernel support for new ACPI "sapic" tables that contain 16-bit APICIDs.
This patch simply adds parsing of an optional SAPIC table if present.
Otherwise, the traditional local APIC table is used.
Note: the SAPIC table is not a new ACPI table - it exists on other architectures
but is not currently recognized by x86_64.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 05878ac934db..b33ebf6ea4f1 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -265,6 +265,24 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) | |||
265 | } | 265 | } |
266 | 266 | ||
267 | static int __init | 267 | static int __init |
268 | acpi_parse_sapic(struct acpi_subtable_header *header, const unsigned long end) | ||
269 | { | ||
270 | struct acpi_madt_local_sapic *processor = NULL; | ||
271 | |||
272 | processor = (struct acpi_madt_local_sapic *)header; | ||
273 | |||
274 | if (BAD_MADT_ENTRY(processor, end)) | ||
275 | return -EINVAL; | ||
276 | |||
277 | acpi_table_print_madt_entry(header); | ||
278 | |||
279 | mp_register_lapic((processor->id << 8) | processor->eid,/* APIC ID */ | ||
280 | processor->lapic_flags & ACPI_MADT_ENABLED); /* Enabled? */ | ||
281 | |||
282 | return 0; | ||
283 | } | ||
284 | |||
285 | static int __init | ||
268 | acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, | 286 | acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header, |
269 | const unsigned long end) | 287 | const unsigned long end) |
270 | { | 288 | { |
@@ -757,8 +775,12 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
757 | 775 | ||
758 | mp_register_lapic_address(acpi_lapic_addr); | 776 | mp_register_lapic_address(acpi_lapic_addr); |
759 | 777 | ||
760 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_parse_lapic, | 778 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_SAPIC, |
761 | MAX_APICS); | 779 | acpi_parse_sapic, MAX_APICS); |
780 | |||
781 | if (!count) | ||
782 | count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, | ||
783 | acpi_parse_lapic, MAX_APICS); | ||
762 | if (!count) { | 784 | if (!count) { |
763 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); | 785 | printk(KERN_ERR PREFIX "No LAPIC entries present\n"); |
764 | /* TBD: Cleanup to allow fallback to MPS */ | 786 | /* TBD: Cleanup to allow fallback to MPS */ |