提交 be6723ec 编写于 作者: X Xiongfeng Wang 提交者: Zheng Zengkai

arm64: fix compile error when CONFIG_ACPI is not enabled

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: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 13af43cf
...@@ -951,12 +951,16 @@ void __init smp_prepare_cpus(unsigned int max_cpus) ...@@ -951,12 +951,16 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
if (err) if (err)
continue; continue;
if (acpi_disabled) { #ifdef CONFIG_ACPI
set_cpu_present(cpu, true); if (!acpi_disabled) {
} else {
if ((cpu_madt_gicc[cpu].flags & ACPI_MADT_ENABLED)) if ((cpu_madt_gicc[cpu].flags & ACPI_MADT_ENABLED))
set_cpu_present(cpu, true); set_cpu_present(cpu, true);
} else {
set_cpu_present(cpu, true);
} }
#else
set_cpu_present(cpu, true);
#endif
numa_store_cpu_info(cpu); numa_store_cpu_info(cpu);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册