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>
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user