mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maulik Shah <maulik.shah@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@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 v3 3/3] soc: qcom: rpmh-rsc: Output debug information from RSC
Date: Sun, 13 Sep 2026 17:59:27 +0530	[thread overview]
Message-ID: <f87533c8-1e37-4977-be55-00d91dc40c76@oss.qualcomm.com> (raw)
In-Reply-To: <e9288bd8-20e8-4cc7-9f51-be64c2b60e16@oss.qualcomm.com>


On 17-08-2026 19:58, Konrad Dybcio wrote:
> On 8/12/26 8:12 AM, 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:
> [...]
>
> Looking good overall, some minor comments
>
>> +static void print_tcs_info(struct rsc_drv *drv, int tcs_id,
>> +			   bool *aoss_irq_sts)
>> +{
>> +	const struct tcs_request *req = get_req_from_tcs(drv, tcs_id);
>> +	unsigned long cmds_enabled;
>> +	char rname[CMD_DB_ID_SIZE + 1];
>> +	u32 addr, data, msgid, sts, irq_sts;
>> +	bool in_use = test_bit(tcs_id, drv->tcs_in_use);
>> +	int i;
>> +
>> +	sts = read_tcs_reg(drv, drv->regs[RSC_DRV_STATUS], tcs_id);
>> +	cmds_enabled = read_tcs_reg(drv, drv->regs[RSC_DRV_CMD_ENABLE], tcs_id);
>> +	if (!cmds_enabled)
>> +		return;
>> +
>> +	if (!req)
>> +		goto print_tcs_data;
>> +
>> +	data = read_tcs_reg(drv, drv->regs[RSC_DRV_CONTROL], tcs_id);
>> +	irq_sts = readl_relaxed(drv->tcs_base + drv->regs[RSC_DRV_IRQ_STATUS]);
>> +	pr_warn("Request: tcs-in-use:%s state=%d wait_for_compl=%u\n",
> Let's use dev_foo() everywhere instead of pr_foo, you have a struct dev* in
> drv->dev
Ack.
>> +		in_use ? "YES" : "NO",
> Please use str_yes_no() here, or AI contributors will rush to "fix" it..
>
> [...]
Ack.
>
>> +/**
>> + * rpmh_rsc_debug() - Dump debug information on a transfer timeout.
>> + * @drv:   The RSC controller.
>> + * @compl: The completion object that timed out.
>> + *
>> + * Dumps TCS state for all in-use TCSes and reports which accelerators
>> + * did not respond, to aid in diagnosing RPMH timeout failures.
>> + */
>> +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;
>> +
>> +	pr_err("RSC:%s\n", drv->name);
> Let's perhaps touch this up to sth like "Timeout on RSC %s\n"

Ack. Updates in v4.

Thanks,
Maulik
>
> Konrad

      reply	other threads:[~2026-09-13 12:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  6:12 [PATCH v3 0/3] " Maulik Shah
2026-08-12  6:12 ` [PATCH v3 1/3] soc: qcom: cmd-db: export RPMh accelerator type string helper Maulik Shah
2026-08-17 14:24   ` Konrad Dybcio
2026-08-12  6:12 ` [PATCH v3 2/3] soc: qcom: cmd-db: add reverse address-to-name lookup Maulik Shah
2026-08-17 14:24   ` Konrad Dybcio
2026-08-12  6:12 ` [PATCH v3 3/3] soc: qcom: rpmh-rsc: Output debug information from RSC Maulik Shah
2026-08-17 14:28   ` Konrad Dybcio
2026-09-13 12:29     ` Maulik Shah [this message]

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=f87533c8-1e37-4977-be55-00d91dc40c76@oss.qualcomm.com \
    --to=maulik.shah@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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®