BZ: 13779
Currently possible hang exists in mid_pmu code wait for interactive
command complete handling. In some error cases interrupt indicating
command completion doesn't occure and this causes hang without any
error messages.
We don't want to continue when hang happens because it's fatal
error. Instead of quiet hang dump out some useful information and make
it clear where hang happened.
Change-Id: I3d9356221ae7186a59578de7039ab84735178a31
Orig-Change-Id: I31c6ce97a22e6673aff892d3f4b65d8a57fd98b4
Signed-off-by: Jouni Hogander <jouni.hogander@intel.com>
Reviewed-on: http://android.intel.com:8080/29306
Reviewed-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: Mansoor, Illyas <illyas.mansoor@intel.com>
Tested-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
* powered on in SCU.
*
*/
- wait_for_completion(&mid_pmu_cxt->set_mode_complete);
+ if (!wait_for_completion_timeout(
+ &mid_pmu_cxt->set_mode_complete, 5 * HZ))
+ BUG();
pmu_set_s0ix_possible(state);
* powered on in SCU.
*
*/
- wait_for_completion(&mid_pmu_cxt->set_mode_complete);
+ if (!wait_for_completion_timeout(&mid_pmu_cxt->set_mode_complete,
+ 5 * HZ))
+ BUG();
/* In cases were gfx is not enabled
* this will enable s0ix immediately