summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/ops.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-12-23 12:36:23 +0100
committerMark Brown <broonie@kernel.org>2021-12-23 14:38:24 +0100
commitfdc573b1c26a8859996de6fbae2d436511b74e00 (patch)
treef078d7c962dbe48291ceffd8ecef0286cb22cd6f /sound/soc/sof/ops.c
parentASoc: SOF: core: Update the FW boot state transition diagram (diff)
downloadlinux-fdc573b1c26a8859996de6fbae2d436511b74e00.tar.xz
linux-fdc573b1c26a8859996de6fbae2d436511b74e00.zip
ASoC: SOF: ops: Always print DSP Panic message but use different message
Never suppress the DSP panic dump as it is always originates from an assert() or panic() call within the firmware. Use different message for DSP panics when there will be recovery attempt going to be done compared to a definitive DSP panic. Suggested-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211223113628.18582-16-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ops.c')
-rw-r--r--sound/soc/sof/ops.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sound/soc/sof/ops.c b/sound/soc/sof/ops.c
index ed46f33ce72b..235e2ef72178 100644
--- a/sound/soc/sof/ops.c
+++ b/sound/soc/sof/ops.c
@@ -167,18 +167,21 @@ void snd_sof_dsp_panic(struct snd_sof_dev *sdev, u32 offset, bool non_recoverabl
__func__, sdev->dsp_oops_offset, offset);
/*
- * Only print the panic information if we have non recoverable panic or
- * if all dumps should be printed
+ * Set the fw_state to crashed only in case of non recoverable DSP panic
+ * event.
+ * Use different message within the snd_sof_dsp_dbg_dump() depending on
+ * the non_recoverable flag.
*/
- if (non_recoverable || sof_debug_check_flag(SOF_DBG_PRINT_ALL_DUMPS)) {
- /* We want to see the DSP panic! */
- sdev->dbg_dump_printed = false;
-
+ sdev->dbg_dump_printed = false;
+ if (non_recoverable) {
snd_sof_dsp_dbg_dump(sdev, "DSP panic!",
SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX);
- if (non_recoverable)
- sof_set_fw_state(sdev, SOF_FW_CRASHED);
+ sof_set_fw_state(sdev, SOF_FW_CRASHED);
snd_sof_trace_notify_for_error(sdev);
+ } else {
+ snd_sof_dsp_dbg_dump(sdev,
+ "DSP panic (recovery will be attempted)",
+ SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX);
}
}
EXPORT_SYMBOL(snd_sof_dsp_panic);