summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-04-01 13:36:57 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-04-02 09:59:43 +0100
commitfee3fd4fd2ad136b26226346c3f8b446cc120bf5 (patch)
tree268dd284a31aa2926112aa0eb1cd28990beb045c /arch/arm/kernel/machine_kexec.c
parent045ab94e10ee17038066d71abc8fdce719ab56f9 (diff)
downloadlinux-fee3fd4fd2ad136b26226346c3f8b446cc120bf5.tar.gz
linux-fee3fd4fd2ad136b26226346c3f8b446cc120bf5.tar.bz2
linux-fee3fd4fd2ad136b26226346c3f8b446cc120bf5.zip
ARM: 8338/1: kexec: Relax SMP validation to improve DT compatibility
When trying to kexec into a new kernel on a platform where multiple CPU cores are present, but no SMP bringup code is available yet, the kexec_load system call fails with: kexec_load failed: Invalid argument The SMP test added to machine_kexec_prepare() in commit 2103f6cba61a8b8b ("ARM: 7807/1: kexec: validate CPU hotplug support") wants to prohibit kexec on SMP platforms where it cannot disable secondary CPUs. However, this test is too strict: if the secondary CPUs couldn't be enabled in the first place, there's no need to disable them later at kexec time. Hence skip the test in the absence of SMP bringup code. This allows to add all CPU cores to the DTS from the beginning, without having to implement SMP bringup first, improving DT compatibility. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/machine_kexec.c')
-rw-r--r--arch/arm/kernel/machine_kexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index de2b085ad753..8bf3b7c09888 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -46,7 +46,8 @@ int machine_kexec_prepare(struct kimage *image)
* and implements CPU hotplug for the current HW. If not, we won't be
* able to kexec reliably, so fail the prepare operation.
*/
- if (num_possible_cpus() > 1 && !platform_can_cpu_hotplug())
+ if (num_possible_cpus() > 1 && platform_can_secondary_boot() &&
+ !platform_can_cpu_hotplug())
return -EINVAL;
/*