Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ce2aba5b authored by Karthik Parsha's avatar Karthik Parsha
Browse files

msm: lpm: Fix race condition in entering system level power collapse



System level power collapse should only be configured from the last core
entering power collapse. Incorrect input parameters, when configuring
system level cluster power collapse, would result in the system having an
inconsistent view of the lpm status of one or more cores in a cluster.
This race condition would allow multiple cores to program the system level
cluster to enter power collapse. As part of configuring the system level
cluster to enter power collapse several operations are performed. Due to
the race condition these operations can end up being executed on a core
that is not the last core in the cluster. This duplicate execution could
result in a system state that is critical and nonrecoverable.

When configuring system level cluster power collapse, use a child mask that
identifies the current low power mode status of the children, to make sure
that the system level cluster power collapse is only configured by the last
child entering power collapse.

The check to see if the core that is attempting to configure system level
cluster for power collapse is indeed the last core, is a critical section.
Protect this check inside a spinlock.

CRs-fixed: 714779
Signed-off-by: default avatarKarthik Parsha <kparsha@codeaurora.org>
Change-Id: Ic44f1e12253ae508aa3a5d4962f77b1408b860f8
parent 613a988d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment