From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Maulik Shah <maulik.shah@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
"Raju P.L.S.S.S.N" <quic_rplsssn@quicinc.com>
Subject: Re: [PATCH v4 3/3] soc: qcom: rpmh-rsc: Output debug information from RSC
Date: Mon, 21 Sep 2026 11:57:19 +0200 [thread overview]
Message-ID: <c24937ff-e88c-4e64-8eda-0b13a8e52f79@oss.qualcomm.com> (raw)
In-Reply-To: <20260913-rpmh-timeout-debug-v1-v4-3-e94d3e416ea1@oss.qualcomm.com>
On 9/13/26 2:54 PM, Maulik Shah wrote:
> From: "Raju P.L.S.S.S.N" <rplsssn@codeaurora.org>
>
> When an RPMh transfer times out there is no visibility into which
> TCS was stuck, what commands it was carrying, or whether the
> completion IRQ was pending at the GIC. Add rpmh_rsc_debug() to
> capture this state at timeout:
Some feedback from GPT
[...]
> +print_tcs_data:
> + /* All TCSes on a given RSC have the same number of commands per TCS. */
> + for_each_set_bit(i, &cmds_enabled, drv->tcs[0].ncpt) {
> + addr = read_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_ADDR], tcs_id, i);
> + data = read_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_DATA], tcs_id, i);
> + msgid = read_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_MSGID], tcs_id, i);
> + sts = read_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_STATUS], tcs_id, i);
> + cmd_db_read_name(addr, rname, sizeof(rname));
This call may fail and must be checked
[...]
> +void rpmh_rsc_debug(struct rsc_drv *drv, struct completion *compl)
> +{
> + struct irq_data *rsc_irq_data = irq_get_irq_data(drv->irq);
> + bool gic_irq_sts, aoss_irq_sts = false;
> + int i, busy = 0;
> +
> + dev_err(drv->dev, "Timeout on RSC %s\n", drv->name);
> +
> + for (i = 0; i < drv->num_tcs; i++) {
> + if (!test_bit(i, drv->tcs_in_use))
> + continue;
> + busy++;
> + print_tcs_info(drv, i, &aoss_irq_sts);
2. P2 — Patch 3 retains only the last TCS’s AOSS completion state
rpmh_rsc_debug() iterates all in-use TCSes, but print_tcs_info() assigns
rather than accumulates:
*aoss_irq_sts = !!(irq_sts & BIT(tcs_id));
> + }
> +
> + if (!rsc_irq_data) {
> + dev_err(drv->dev, "No IRQ data for RSC:%s\n", drv->name);
> + return;
> + }
> +
> + irq_get_irqchip_state(drv->irq, IRQCHIP_STATE_PENDING, &gic_irq_sts);
This call can reportedly also fail
Konrad
next prev parent reply other threads:[~2026-09-21 9:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 12:54 [PATCH v4 0/3] " Maulik Shah
2026-09-13 12:54 ` [PATCH v4 1/3] soc: qcom: cmd-db: export RPMh accelerator type string helper Maulik Shah
2026-09-13 12:54 ` [PATCH v4 2/3] soc: qcom: cmd-db: add reverse address-to-name lookup Maulik Shah
2026-09-13 12:54 ` [PATCH v4 3/3] soc: qcom: rpmh-rsc: Output debug information from RSC Maulik Shah
2026-09-21 9:57 ` Konrad Dybcio [this message]
2026-10-05 8:46 ` Maulik Shah
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=c24937ff-e88c-4e64-8eda-0b13a8e52f79@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maulik.shah@oss.qualcomm.com \
--cc=quic_rplsssn@quicinc.com \
/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
all inboxes | Powered by JetHome®