hikey960: Fix race condition between hotplug and idles
From the hotplug testing on Hikey960, in some case cores fail to become
online in the system. When some cores are hotplugged off, if other
cores in the same cluster enter into CPU idle states at the meantime,
the cluster will be powered off. This introduces the state machine
malfunction in the power controller, thus when hotplug on the core
afterwards, it fails to boot up the core because the power controller
thinks the cluster is powered on.

This patch is to avoid race condition between hotplug and idles by
preventing cluster power off when some of cores in the cluster are
hotplugged off, if all cores in the same cluster are hotplugged off,
the cluster can be powered off.

Change-Id: Ib2feeb093357c70409a3536cb4f9da9b504fdcbe
Signed-off-by: Wei Yu <yuwei3@hisilicon.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
1 parent c48991e commit 7d76df7db2c79b37f3c2357758fb2c565d4cce6f
@Wei Yu Wei Yu authored on 6 Apr 2019
Leo Yan committed on 10 Apr 2019
Showing 3 changed files
View
plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c
View
plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.h
View
plat/hisilicon/hikey960/hikey960_pm.c