]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
firmware: qcom: scm: Disable SDI and write no dump to dump mode
authorMukesh Ojha <quic_mojha@quicinc.com>
Mon, 8 Jul 2024 15:53:32 +0000 (21:23 +0530)
committerBjorn Andersson <andersson@kernel.org>
Thu, 15 Aug 2024 02:24:19 +0000 (21:24 -0500)
commit79cb2cb8d89b7eca87e8dac031dadea4aeafeaa7
tree740f71a87e629b8bf65b810244bc312b1c620ec5
parentdc8c4a8aee49e42cf13e32e123de127122dc516f
firmware: qcom: scm: Disable SDI and write no dump to dump mode

SDI is enabled for most of the Qualcomm SoCs and as per commit
ff4aa3bc9825 ("firmware: qcom_scm: disable SDI if required")
it was recommended to disable SDI by mentioning it in device tree
to avoid hang during watchdog or during reboot.

However, for some cases if download mode tcsr register already
configured from boot firmware to collect dumps and if SDI is
disabled via means of mentioning it in device tree we could
still end up with dump collection. Disabling SDI alone is
not completely enough to disable dump mode and we also need to
zero out the bits download bits from tcsr register.

Current commit now, unconditionally call qcom_scm_set_download_mode()
based on download_mode flag, at max if TCSR register is not mentioned
or available for a SoC it will fallback to legacy way of setting
download mode through command which may be no-ops or return error
in case current firmware does not implements QCOM_SCM_INFO_IS_CALL_AVAIL
so, at worst it does nothing if it fails.

It also does to call SDI disable call if dload mode is disabled, which
looks fine to do as intention is to disable dump collection even if
system crashes.

Fixes: ff4aa3bc9825 ("firmware: qcom_scm: disable SDI if required")
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240708155332.4056479-1-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/firmware/qcom/qcom_scm.c