X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Fprocessor_core.c;h=8e683f8cc573c2129ec3869dcada94507d7e6829;hb=478c6a43fcbc6c11609f8cee7c7b57223907754f;hp=fa2f7422d23de1e2bec5ee3702fa15e2a5ca284c;hpb=5fba0925fd6b67d94181055b7222e3d934b4efee;p=linux-2.6-omap-h63xx.git diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index fa2f7422d23..8e683f8cc57 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -426,6 +426,29 @@ static int map_lapic_id(struct acpi_subtable_header *entry, return 0; } +static int map_x2apic_id(struct acpi_subtable_header *entry, + int device_declaration, u32 acpi_id, int *apic_id) +{ + struct acpi_madt_local_x2apic *apic = + (struct acpi_madt_local_x2apic *)entry; + u32 tmp = apic->local_apic_id; + + /* Only check enabled APICs*/ + if (!(apic->lapic_flags & ACPI_MADT_ENABLED)) + return 0; + + /* Device statement declaration type */ + if (device_declaration) { + if (apic->uid == acpi_id) + goto found; + } + + return 0; +found: + *apic_id = tmp; + return 1; +} + static int map_lsapic_id(struct acpi_subtable_header *entry, int device_declaration, u32 acpi_id, int *apic_id) { @@ -475,6 +498,9 @@ static int map_madt_entry(int type, u32 acpi_id) if (header->type == ACPI_MADT_TYPE_LOCAL_APIC) { if (map_lapic_id(header, acpi_id, &apic_id)) break; + } else if (header->type == ACPI_MADT_TYPE_LOCAL_X2APIC) { + if (map_x2apic_id(header, type, acpi_id, &apic_id)) + break; } else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) { if (map_lsapic_id(header, type, acpi_id, &apic_id)) break;