From 015f6d7e4a19b326a5c5a20b92feb0b7ad50a383 Mon Sep 17 00:00:00 2001 From: Xiongfeng Wang Date: Wed, 28 Aug 2019 11:27:26 +0800 Subject: [PATCH] arm64: set all the CPU as present for dtb booting with 'CONFIG_ACPI' enabled hulk inclusion category: bugfix bugzilla: 20799 CVE: NA --------------------------- The following patch didn't consider the situation when we boot the system using device tree but 'CONFIG_ACPI' is enabled. In this situation, we also need to set all the CPU as present CPU. Fixes: 280637f70ab5 ("arm64: mark all the GICC nodes in MADT as possible cpu") Signed-off-by: Xiongfeng Wang Reviewed-by: Yang Yingliang Signed-off-by: Yang Yingliang --- arch/arm64/kernel/smp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index b694fff735be..52787a83de55 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -762,8 +762,12 @@ void __init smp_prepare_cpus(unsigned int max_cpus) if (err) continue; #ifdef CONFIG_ACPI - if ((cpu_madt_gicc[cpu].flags & ACPI_MADT_ENABLED)) + 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 -- GitLab