Skip to content

Commit

Permalink
ARM: rockchip: ensure CPU to enter WFI/WFE state
Browse files Browse the repository at this point in the history
The patch can ensure that v7_exit_coherency_flush() in rockchip_cpu_die()
executed in time.
The mdelay(1) has enough time to fix the problem of CPU offlining.
That's a workaround way in rockchip hotplug code,
At least, we haven't a better way to solve it. Who know,
that maybe fixed by chip (hardware) in the future.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
  • Loading branch information
Caesar Wang authored and Heiko Stuebner committed Jul 5, 2015
1 parent fe4407c commit e306bc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/arm/mach-rockchip/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
#ifdef CONFIG_HOTPLUG_CPU
static int rockchip_cpu_kill(unsigned int cpu)
{
/*
* We need a delay here to ensure that the dying CPU can finish
* executing v7_coherency_exit() and reach the WFI/WFE state
* prior to having the power domain disabled.
*/
mdelay(1);

pmu_set_power_domain(0 + cpu, false);
return 1;
}
Expand Down

0 comments on commit e306bc1

Please sign in to comment.