From be6723ec216d058fb3133a78d4b900f34aae5354 Mon Sep 17 00:00:00 2001 From: Xiongfeng Wang Date: Thu, 25 Feb 2021 20:15:08 +0800 Subject: [PATCH] arm64: fix compile error when CONFIG_ACPI is not enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hulk inclusion category: bugfix bugzilla: 47994 CVE: NA ------------------------------------------------------------------------- Fix the following compile error when CONFIG_ACPI is not enabled. arch/arm64/kernel/smp.c: In function ‘smp_prepare_cpus’: arch/arm64/kernel/smp.c:785:9: error: ‘cpu_madt_gicc’ undeclared (first use in this function); did you mean ‘bpf_map_inc’? if ((cpu_madt_gicc[cpu].flags & ACPI_MADT_ENABLED)) ^~~~~~~~~~~~~ bpf_map_inc arch/arm64/kernel/smp.c:785:9: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [arch/arm64/kernel/smp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... Signed-off-by: Xiongfeng Wang Reviewed-by: Hanjun Guo Signed-off-by: Zheng Zengkai --- arch/arm64/kernel/smp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index a1e2da0c971b..644bbd71787b 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -951,12 +951,16 @@ void __init smp_prepare_cpus(unsigned int max_cpus) if (err) continue; - if (acpi_disabled) { - set_cpu_present(cpu, true); - } else { +#ifdef CONFIG_ACPI + if (!acpi_disabled) { if ((cpu_madt_gicc[cpu].flags & ACPI_MADT_ENABLED)) set_cpu_present(cpu, true); + } else { + set_cpu_present(cpu, true); } +#else + set_cpu_present(cpu, true); +#endif numa_store_cpu_info(cpu); } -- GitLab