diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2016-02-23 10:31:41 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-02-24 17:17:45 +0000 |
commit | fce6361fe9b0caeba0c05b7d72ceda406f8780df (patch) | |
tree | d04466352864b3f0f8f3c98e003ce0ae8986ecae /arch/arm64/kernel/smp.c | |
parent | ee02a15919cf86c004142edaa05b43f7ff10edf0 (diff) | |
download | op-kernel-dev-fce6361fe9b0caeba0c05b7d72ceda406f8780df.zip op-kernel-dev-fce6361fe9b0caeba0c05b7d72ceda406f8780df.tar.gz |
arm64: Move cpu_die_early to smp.c
This patch moves cpu_die_early to smp.c, where it fits better.
No functional changes, except for adding the necessary checks
for CONFIG_HOTPLUG_CPU.
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/smp.c')
-rw-r--r-- | arch/arm64/kernel/smp.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 24cb4f8..8d09f59 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -312,6 +312,28 @@ void cpu_die(void) } #endif +/* + * Kill the calling secondary CPU, early in bringup before it is turned + * online. + */ +void cpu_die_early(void) +{ + int cpu = smp_processor_id(); + + pr_crit("CPU%d: will not boot\n", cpu); + + /* Mark this CPU absent */ + set_cpu_present(cpu, 0); + +#ifdef CONFIG_HOTPLUG_CPU + /* Check if we can park ourselves */ + if (cpu_ops[cpu] && cpu_ops[cpu]->cpu_die) + cpu_ops[cpu]->cpu_die(cpu); +#endif + + cpu_park_loop(); +} + static void __init hyp_mode_check(void) { if (is_hyp_mode_available()) |