From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Jie Gan <jie.gan@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Mike Leach <mike.leach@linaro.org>,
James Clark <james.clark@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: qcs615: fix a crash issue caused by infinite loop for Coresight
Date: Thu, 22 May 2025 16:54:05 +0100 [thread overview]
Message-ID: <e92a61a9-0244-4509-ad81-8ef26700dca5@arm.com> (raw)
In-Reply-To: <20250522005016.2148-1-jie.gan@oss.qualcomm.com>
On 22/05/2025 01:50, Jie Gan wrote:
> An infinite loop has been created by the Coresight devices. When only a
> source device is enabled, the coresight_find_activated_sysfs_sink function
> is recursively invoked in an attempt to locate an active sink device,
> ultimately leading to a stack overflow and system crash. Therefore, disable
> the replicator1 to break the infinite loop and prevent a potential stack
> overflow.
>
> replicator1_out -> funnel_swao_in6 -> tmc_etf_swao_in -> tmc_etf_swao_out
> | |
> replicator1_in replicator_swao_in
> | |
> replicator0_out1 replicator_swao_out0
> | |
> replicator0_in funnel_in1_in3
> | |
> tmc_etf_out <- tmc_etf_in <- funnel_merg_out <- funnel_merg_in1 <- funnel_in1_out
>
> [call trace]
> dump_backtrace+0x9c/0x128
> show_stack+0x20/0x38
> dump_stack_lvl+0x48/0x60
> dump_stack+0x18/0x28
> panic+0x340/0x3b0
> nmi_panic+0x94/0xa0
> panic_bad_stack+0x114/0x138
> handle_bad_stack+0x34/0xb8
> __bad_stack+0x78/0x80
> coresight_find_activated_sysfs_sink+0x28/0xa0 [coresight]
> coresight_find_activated_sysfs_sink+0x5c/0xa0 [coresight]
> coresight_find_activated_sysfs_sink+0x5c/0xa0 [coresight]
> coresight_find_activated_sysfs_sink+0x5c/0xa0 [coresight]
> coresight_find_activated_sysfs_sink+0x5c/0xa0 [coresight]
> ...
> coresight_find_activated_sysfs_sink+0x5c/0xa0 [coresight]
> coresight_enable_sysfs+0x80/0x2a0 [coresight]
>
> side effect after the change:
> Only trace data originating from AOSS can reach the ETF_SWAO and EUD sinks.
>
> Fixes: bf469630552a ("arm64: dts: qcom: qcs615: Add coresight nodes")
> Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
It is not easy to fix this in CoreSight driver. Given this is a platform
specific issue, lets fix this in the DT. I will explore the option of
fixing this in the driver.
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
next prev parent reply other threads:[~2025-05-22 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 0:50 [PATCH] arm64: dts: qcom: qcs615: fix a crash issue caused by infinite loop for Coresight Jie Gan
2025-05-22 15:06 ` Konrad Dybcio
2025-05-26 0:40 ` Jie Gan
2025-05-28 13:30 ` Mike Leach
2025-05-22 15:54 ` Suzuki K Poulose [this message]
2025-06-18 4:09 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e92a61a9-0244-4509-ad81-8ef26700dca5@arm.com \
--to=suzuki.poulose@arm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=james.clark@linaro.org \
--cc=jie.gan@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox