diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-08-02 21:52:49 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-08-13 21:23:18 +0200 |
commit | 2103f6cba61a8b8bea3fc1b63661d830a2125e76 (patch) | |
tree | ecc5f6e4df5631932b38e9eb1d8dd7cd8251ed2b /arch/arm/kernel/smp.c | |
parent | ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock (diff) | |
download | linux-2103f6cba61a8b8bea3fc1b63661d830a2125e76.tar.xz linux-2103f6cba61a8b8bea3fc1b63661d830a2125e76.zip |
ARM: 7807/1: kexec: validate CPU hotplug support
Architectures should fully validate whether kexec is possible as part of
machine_kexec_prepare(), so that user-space's kexec_load() operation can
report any problems. Performing validation in machine_kexec() itself is
too late, since it is not allowed to return.
Prior to this patch, ARM's machine_kexec() was testing after-the-fact
whether machine_kexec_prepare() was able to disable all but one CPU.
Instead, modify machine_kexec_prepare() to validate all conditions
necessary for machine_kexec_prepare()'s to succeed. BUG if the validation
succeeded, yet disabling the CPUs didn't actually work.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index c2b4f8f0be9a..2dc19349eb19 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -145,6 +145,16 @@ int boot_secondary(unsigned int cpu, struct task_struct *idle) return -ENOSYS; } +int platform_can_cpu_hotplug(void) +{ +#ifdef CONFIG_HOTPLUG_CPU + if (smp_ops.cpu_kill) + return 1; +#endif + + return 0; +} + #ifdef CONFIG_HOTPLUG_CPU static void percpu_timer_stop(void); |