x86: baytrail: acpi: Fix I/O APIC ID in the MADT table
authorBin Meng <bmeng.cn@gmail.com>
Thu, 26 May 2016 02:19:13 +0000 (19:19 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 30 May 2016 02:21:12 +0000 (10:21 +0800)
So far this is hardcoded to 2, but it should really be read
from the I/O APIC register.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/baytrail/acpi.c

index 1d54f7dba1a41e300000a6000b1e4473328a1b45..5ee4868cf82ae219470795d154c6ebeb218a742b 100644 (file)
@@ -155,7 +155,7 @@ u32 acpi_fill_madt(u32 current)
        current += acpi_create_madt_lapics(current);
 
        current += acpi_create_madt_ioapic((struct acpi_madt_ioapic *)current,
-                       2, IO_APIC_ADDR, 0);
+                       io_apic_read(IO_APIC_ID) >> 24, IO_APIC_ADDR, 0);
 
        current += acpi_create_madt_irq_overrides(current);