PM / devfreq: memlat: fix deadlock and pointer check in new design
We currently wait for a cpu_grp's work function (memlat_monitor_work)
to finish executing when we attempt to cancel it. However this can
result in a deadlock since we also hold mons_lock when cancelling it.
Also check that we have at least one active mon when our work function
runs to prevent reading the common PMU counters after the last mon
within a cpu_grp is stopped.
Lastly, add missing pointer check in delete_event(). This protects us
from trying to delete events that aren't defined (e.g. stall-ev).
Change-Id: I28afe1de7111984bc3d85a37fdc17d14442aa2a8
Signed-off-by:
Amir Vajid <avajid@codeaurora.org>
Loading
Please register or sign in to comment