devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] firmware: qcom: scm: suppress download mode error
@ 2024-10-02 10:01 Johan Hovold
  2024-10-02 10:01 ` [PATCH 1/2] " Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Johan Hovold @ 2024-10-02 10:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Mukesh Ojha,
	linux-arm-msm, devicetree, linux-kernel, Johan Hovold

When booting 6.12-rc1 on x1e80100 I noticed a new error in the boot log,
which I had previously also seen on reboots.

Turns out the scm driver is incorrectly logging the fact that the
download mode feature is not available as an error on both boot and
shutdown even when the user has not requested the system to enable dump
mode.

The second patch enables the download mode feature on x1e80100, which
from 6.12-rc1 specifically results in a reboot instead of entering crash
dump mode after a hypervisor reset on the x1e80100 CRD by default.

Johan


Johan Hovold (2):
  firmware: qcom: scm: suppress download mode error
  arm64: dts: qcom: x1e80100: describe tcsr download mode register

 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 1 +
 drivers/firmware/qcom/qcom_scm.c       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] firmware: qcom: scm: suppress download mode error
  2024-10-02 10:01 [PATCH 0/2] firmware: qcom: scm: suppress download mode error Johan Hovold
@ 2024-10-02 10:01 ` Johan Hovold
  2024-10-04 21:49   ` Mukesh Ojha
  2024-10-02 10:01 ` [PATCH 2/2] arm64: dts: qcom: x1e80100: describe tcsr download mode register Johan Hovold
  2024-10-07 14:25 ` (subset) [PATCH 0/2] firmware: qcom: scm: suppress download mode error Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2024-10-02 10:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Mukesh Ojha,
	linux-arm-msm, devicetree, linux-kernel, Johan Hovold, stable

Stop spamming the logs with errors about missing mechanism for setting
the so called download (or dump) mode for users that have not requested
that feature to be enabled in the first place.

This avoids the follow error being logged on boot as well as on
shutdown when the feature it not available and download mode has not
been enabled on the kernel command line:

	qcom_scm firmware:scm: No available mechanism for setting download mode

Fixes: 79cb2cb8d89b ("firmware: qcom: scm: Disable SDI and write no dump to dump mode")
Fixes: 781d32d1c970 ("firmware: qcom_scm: Clear download bit during reboot")
Cc: Mukesh Ojha <quic_mojha@quicinc.com>
Cc: stable@vger.kernel.org	# 6.4
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/firmware/qcom/qcom_scm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 10986cb11ec0..e2ac595902ed 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -545,7 +545,7 @@ static void qcom_scm_set_download_mode(u32 dload_mode)
 	} else if (__qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_BOOT,
 						QCOM_SCM_BOOT_SET_DLOAD_MODE)) {
 		ret = __qcom_scm_set_dload_mode(__scm->dev, !!dload_mode);
-	} else {
+	} else if (dload_mode) {
 		dev_err(__scm->dev,
 			"No available mechanism for setting download mode\n");
 	}
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] arm64: dts: qcom: x1e80100: describe tcsr download mode register
  2024-10-02 10:01 [PATCH 0/2] firmware: qcom: scm: suppress download mode error Johan Hovold
  2024-10-02 10:01 ` [PATCH 1/2] " Johan Hovold
@ 2024-10-02 10:01 ` Johan Hovold
  2024-10-04  9:49   ` Konrad Dybcio
  2024-10-07 14:25 ` (subset) [PATCH 0/2] firmware: qcom: scm: suppress download mode error Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2024-10-02 10:01 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Mukesh Ojha,
	linux-arm-msm, devicetree, linux-kernel, Johan Hovold

Describe the TCSR download mode register to enable download mode
control.

This specifically allows the OS to disable download mode in case the
boot firmware has left it enabled to avoid entering the crash dump mode
after a hypervisor reset by default.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 7241bf0b1fa2..359156161a26 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -310,6 +310,7 @@ scm: scm {
 			compatible = "qcom,scm-x1e80100", "qcom,scm";
 			interconnects = <&aggre2_noc MASTER_CRYPTO QCOM_ICC_TAG_ALWAYS
 					 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+			qcom,dload-mode = <&tcsr 0x19000>;
 		};
 
 		scmi {
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: x1e80100: describe tcsr download mode register
  2024-10-02 10:01 ` [PATCH 2/2] arm64: dts: qcom: x1e80100: describe tcsr download mode register Johan Hovold
@ 2024-10-04  9:49   ` Konrad Dybcio
  0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2024-10-04  9:49 UTC (permalink / raw)
  To: Johan Hovold, Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Mukesh Ojha,
	linux-arm-msm, devicetree, linux-kernel

On 2.10.2024 12:01 PM, Johan Hovold wrote:
> Describe the TCSR download mode register to enable download mode
> control.
> 
> This specifically allows the OS to disable download mode in case the
> boot firmware has left it enabled to avoid entering the crash dump mode
> after a hypervisor reset by default.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] firmware: qcom: scm: suppress download mode error
  2024-10-02 10:01 ` [PATCH 1/2] " Johan Hovold
@ 2024-10-04 21:49   ` Mukesh Ojha
  0 siblings, 0 replies; 6+ messages in thread
From: Mukesh Ojha @ 2024-10-04 21:49 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel, stable

On Wed, Oct 02, 2024 at 12:01:21PM +0200, Johan Hovold wrote:
> Stop spamming the logs with errors about missing mechanism for setting
> the so called download (or dump) mode for users that have not requested
> that feature to be enabled in the first place.
> 
> This avoids the follow error being logged on boot as well as on
> shutdown when the feature it not available and download mode has not
> been enabled on the kernel command line:
> 
> 	qcom_scm firmware:scm: No available mechanism for setting download mode
> 
> Fixes: 79cb2cb8d89b ("firmware: qcom: scm: Disable SDI and write no dump to dump mode")
> Fixes: 781d32d1c970 ("firmware: qcom_scm: Clear download bit during reboot")
> Cc: Mukesh Ojha <quic_mojha@quicinc.com>
> Cc: stable@vger.kernel.org	# 6.4
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>

-Mukesh


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (subset) [PATCH 0/2] firmware: qcom: scm: suppress download mode error
  2024-10-02 10:01 [PATCH 0/2] firmware: qcom: scm: suppress download mode error Johan Hovold
  2024-10-02 10:01 ` [PATCH 1/2] " Johan Hovold
  2024-10-02 10:01 ` [PATCH 2/2] arm64: dts: qcom: x1e80100: describe tcsr download mode register Johan Hovold
@ 2024-10-07 14:25 ` Bjorn Andersson
  2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2024-10-07 14:25 UTC (permalink / raw)
  To: Konrad Dybcio, Johan Hovold
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Mukesh Ojha,
	linux-arm-msm, devicetree, linux-kernel


On Wed, 02 Oct 2024 12:01:20 +0200, Johan Hovold wrote:
> When booting 6.12-rc1 on x1e80100 I noticed a new error in the boot log,
> which I had previously also seen on reboots.
> 
> Turns out the scm driver is incorrectly logging the fact that the
> download mode feature is not available as an error on both boot and
> shutdown even when the user has not requested the system to enable dump
> mode.
> 
> [...]

Applied, thanks!

[2/2] arm64: dts: qcom: x1e80100: describe tcsr download mode register
      commit: 8beaf6e08d986ebba38d5168ec1aeef4a66082d0

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-07 14:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 10:01 [PATCH 0/2] firmware: qcom: scm: suppress download mode error Johan Hovold
2024-10-02 10:01 ` [PATCH 1/2] " Johan Hovold
2024-10-04 21:49   ` Mukesh Ojha
2024-10-02 10:01 ` [PATCH 2/2] arm64: dts: qcom: x1e80100: describe tcsr download mode register Johan Hovold
2024-10-04  9:49   ` Konrad Dybcio
2024-10-07 14:25 ` (subset) [PATCH 0/2] firmware: qcom: scm: suppress download mode error Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).