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

Commit 1ba5d3ee authored by Mahesh Sivasubramanian's avatar Mahesh Sivasubramanian
Browse files

cpuidle: lpm-levels: Flush L2 cache when hotplug happens before probe



If CPU hotplug is initiated before probe, the L2 of the cluster is not
configured for any low power mode and is not flushed. This results in data
incoherencies in ramdumps in particular, if the system crashed after.

To ensure that L2 is flushed, flush L2 during hotplug until lpm-levels
module is probed

CRs-fixed: 715757
Change-Id: I0fb203da68e78d4f0c4acf96db9e5863268d1f52
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
parent ca82d9c0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -992,9 +992,14 @@ enum msm_pm_l2_scm_flag lpm_cpu_pre_pc_cb(unsigned int cpu)

	/*
	 * No need to acquire the lock if probe isn't completed yet
	 * In the event of the hotplug happening before lpm probe, we want to
	 * flush the cache to make sure that L2 is flushed. In particular, this
	 * could cause incoherencies for a cluster architecture. This wouldn't
	 * affect the idle case as the idle driver wouldn't be registered
	 * before the probe function
	 */
	if (!cluster)
		return retflag;
		return MSM_SCM_L2_OFF;

	/*
	 * Assumes L2 only. What/How parameters gets passed into TZ will