msm: ssr: Panic on concurrent subsystem_restart()
Before "msm: SSR: Pull struct restart_wq_data into struct
subsys_device" we would allocate a work struct for every instance
of a subsystem_restart() call. After that change, we only
allocate one instance of the work during intialization and we
serialize calls to queue_work() with a restarting flag in the
subsys_device structure. This has the unfortunate side effect of
silently ignoring a subsystem_restart() call made while a
subsystem is in the process of restarting (i.e. hasn't reached
the end of subsystem_restart_wq_func().
Add a refcount around the wake lock so that the system stays out
of suspend for as long as any restart work item is being processed.
Then queue the work unconditionally so that the work queue
function can determine that a subsystem restart is happening
while the subsystem is powering up.
Change-Id: Ide5627a29a0df7c1c102cf508ce577ce4f751140
Signed-off-by:
Stephen Boyd <sboyd@codeaurora.org>
Loading
Please register or sign in to comment