On 06/27/2013 02:07 PM, Graeme Gregory wrote:
Hi Hanjun,
This looks like a good start for cpu support.
I have a query about the terminology, a lot of your comments still refer to APIC is this correct terminology on arm?
Thanks
Graeme
Which do we want to give preference to? You're right -- ARM does not use the term "APIC." On the other hand, the ACPI spec does, even with the reduced HW profile. My gut reaction is to be consistent with the kernel source, even if it does say APIC...
On 06/27/2013 12:18 PM, Hanjun Guo wrote:
Here is the first part of cpu topology and cpu-hotplug code for RFC.
In this part of code, MADT is being parsed and the cpu possible map and cpu present map are prefilled.
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.
Without this patch set, CPU possible map is equal to the cpus found in FDT, and cpu possible map is the same as cpu present map with no hotplugble cpus.
Boot information with this patch (with --cores=4):
ACPI: GIC (acpi_id[0x0000] gic_id[0x0000] enabled) // MADT was parsed ACPI: GIC (acpi_id[0x0001] gic_id[0x0001] enabled) ACPI: GIC (acpi_id[0x0002] gic_id[0x0002] disabled) ACPI: GIC (acpi_id[0x0003] gic_id[0x0003] disabled) ACPI: GIC (acpi_id[0x0004] gic_id[0x0004] disabled) ACPI: GIC (acpi_id[0x0005] gic_id[0x0005] disabled) ACPI: GIC (acpi_id[0x0006] gic_id[0x0006] disabled) ACPI: GIC (acpi_id[0x0007] gic_id[0x0007] disabled) 2 CPUs available, 8 CPUs total //find 2 enabled cpus which // is the same as MADT described ACPI: GIC Distributor (id[0x0000] address[0x2c001000] gsi_base[0]) // IOAPIC(GIC distributor is also parsed) Using ACPI (MADT) for SMP configuration information SMP: limits to 4 CPUs // the foundation model supports only 4 four cpus SMP: Allowing 4 CPUs, 2 hotplug CPUs // so limits to 4 cpus, and 2 disabled in MADT can be hotpluged PERCPU: Embedded 10 pages/cpu @ffffffc03ffa7000 s11520 r8192 d21248 u40960 [....] CPU1: Booted secondary processor Brought up 2 CPUs SMP: Total of 2 processors activated (400.00 BogoMIPS).
Because only 2 cpus is enabled in MADT, so the system will up 2 cpus in despite of --cores=4.
Next step will prototype cpu topology code for ACPI driver.
This is the RFC version only, will updated and rebased on the new acpi branch.
Hanjun Guo (3): ARM / ACPI: MADT for armv8 foundation model ARM / ACPI: Core functions for MADT parse ARM / ACPI: Prefill cpu possible and present map when boot with MADT
arch/arm64/boot/asl/foundation-v8.acpi/apic.asl | 175 ++++++++------- arch/arm64/include/asm/acpi.h | 3 + arch/arm64/kernel/setup.c | 6 + arch/arm64/kernel/smp.c | 2 + drivers/acpi/plat/arm/boot.c | 261 ++++++++++++++++++++++- drivers/acpi/tables.c | 21 ++ 6 files changed, 374 insertions(+), 94 deletions(-)
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi