drivers: qcom: lpm-stats: reset CPU stats from that CPU

Currently when the LPM stats are reset, they are saved stats are reset
without synchronizing with the idle state of the CPU. As a result, CPUs
that are currently idle when the stats are reset may throw a wrench into
the accounting by adding the sleep time from before the point of reset.

Fix this by waking up each CPU and resetting the CPU's stats from that
CPU when the stats are reset. This behavior is only supported when the
stats are reset from the overall stats.

echo reset > /sys/kernel/debug/lpm_stats/stats

Change-Id: I2751bf0fb8d9ce9cb79c2429b5b59dd7b9681adb
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
1 file changed