diff options
author | chenhui zhao <chenhui.zhao@freescale.com> | 2015-11-20 12:14:01 +0300 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-03-05 08:56:31 +0300 |
commit | 2f4f1f815bc6d03ea42d4f67dd1e284525e7524e (patch) | |
tree | 3cbc7c754e6f206ffcbc776f2c9e23a8edf05177 /arch/powerpc/kernel/smp.c | |
parent | 56f1ba280719469bffc870b6b2d935f3a3019ea4 (diff) | |
download | linux-2f4f1f815bc6d03ea42d4f67dd1e284525e7524e.tar.xz |
powerpc/mpc85xx: Add hotplug support on E5500 and E500MC cores
Freescale E500MC and E5500 core-based platforms, like P4080, T1040,
support disabling/enabling CPU dynamically.
This patch adds this feature on those platforms.
Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Signed-off-by: Tang Yuantian <Yuantian.Tang@feescale.com>
[scottwood: removed unused pr_fmt]
Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r-- | arch/powerpc/kernel/smp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index ec9ec2058d2d..8575d044775d 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -427,7 +427,7 @@ void generic_cpu_die(unsigned int cpu) for (i = 0; i < 100; i++) { smp_rmb(); - if (per_cpu(cpu_state, cpu) == CPU_DEAD) + if (is_cpu_dead(cpu)) return; msleep(100); } @@ -454,6 +454,11 @@ int generic_check_cpu_restart(unsigned int cpu) return per_cpu(cpu_state, cpu) == CPU_UP_PREPARE; } +int is_cpu_dead(unsigned int cpu) +{ + return per_cpu(cpu_state, cpu) == CPU_DEAD; +} + static bool secondaries_inhibited(void) { return kvm_hv_mode_active(); |