'struct acpi_madt_local_apic' should be 'struct acpi_madt_generic_interrupt' instead on ARM, this will lead to cpu hot add failure because of the wrong value we used.
Tested on ARMv8 foudation model and the cpu can be hot add in ACPI way.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- drivers/acpi/plat/arm/boot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 928f6c9..4891940 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -422,7 +422,7 @@ static int _acpi_map_lsapic(acpi_handle handle, int *pcpu) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *obj; - struct acpi_madt_local_apic *lapic; + struct acpi_madt_generic_interrupt *lapic; cpumask_var_t tmp_map, new_map; u8 physid; int cpu; @@ -441,15 +441,15 @@ static int _acpi_map_lsapic(acpi_handle handle, int *pcpu) return -EINVAL; }
- lapic = (struct acpi_madt_local_apic *)obj->buffer.pointer; + lapic = (struct acpi_madt_generic_interrupt *)obj->buffer.pointer;
- if (lapic->header.type != ACPI_MADT_TYPE_LOCAL_APIC || - !(lapic->lapic_flags & ACPI_MADT_ENABLED)) { + if (lapic->header.type != ACPI_MADT_TYPE_GENERIC_INTERRUPT || + !(lapic->flags & ACPI_MADT_ENABLED)) { kfree(buffer.pointer); return -EINVAL; }
- physid = lapic->id; + physid = lapic->gic_id;
kfree(buffer.pointer); buffer.length = ACPI_ALLOCATE_BUFFER;