Hi Hanjun,
These look good to me, I think we should push to ACPI tree before Connect so you can use them in discussion with other groups.
I have a small "hack" on top of these patches to make armv7 compile again, basically just copy same changes to armv7 version of acpi.h
Graeme
On 03/07/13 12:15, Hanjun Guo wrote:
Here is the first version of prototype for cpu-hotplug on ARM64.
The first part is patch 1~3 for MADT parse. MADT is being parsed and the cpu possible map and cpu present map are prefilled.
I kept the terminology consistent with x86 as Al and Andrea's advice.
CPU possible map is equal to the GIC entries in MADT no matter enabled or disabled, and cpu present map limits to the enabled cpu in MADT. This is the base for cpu hot-plug.
The second part is patch 4~10 for ACPI cpu hot-plug drivers. ACPI driver for CPU hot-plug is implemented in this part, when the cpu logical online/offline is ready, the cpu hot-plug can work on arm64.
Please give some comments, thanks.
Hanjun Guo (10): ARM64 / ACPI: MADT for armv8 foundation model ARM64 / ACPI: Core functions for MADT parse ARM64 / ACPI: Prefill cpu possible and present maps and map logical cpu id to APIC id ARM64 / ACPI: Declare processors in ACPI namespace in the DSDT ARM64 / ACPI: Introduce map_gic_id() to get apic id from MADT or _MAT method ARM64 / ACPI: Get logic cpu id to see if the cpu is a new added cpu ARM64 / ACPI: Implement acpi_map/unmap_lsapic for cpu hot-plug ARM64 / ACPI: Fix the variable declared but not defined ARM64 / ACPI: Introduce arch_register/unregister_cpu() for arm64 ARM64 / CPU hot-plug: Skeleton logic cpu online/offline for cpu hot-plug
arch/arm64/Kconfig | 7 + arch/arm64/boot/asl/foundation-v8.acpi/apic.asl | 165 +++++++------ arch/arm64/boot/asl/foundation-v8.acpi/dsdt.asl | 205 +++++++++++++++- arch/arm64/include/asm/acpi.h | 12 + arch/arm64/include/asm/cpu.h | 5 + arch/arm64/include/asm/smp.h | 3 + arch/arm64/kernel/setup.c | 16 +- arch/arm64/kernel/smp.c | 23 ++ arch/arm64/kernel/topology.c | 26 +++ drivers/acpi/plat/arm/boot.c | 286 +++++++++++++++++++++-- drivers/acpi/processor_core.c | 50 ++-- drivers/acpi/tables.c | 21 ++ 12 files changed, 694 insertions(+), 125 deletions(-)