Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Robert Marko" <robimarko@gmail.com>, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/3] soc: qcom: smp2p: kick WCSS after restart when requested
Date: Thu, 26 Nov 2026 11:08:00 +0000	[thread overview]
Message-ID: <sashiko-outbox-235328@kernel.org> (raw)
In-Reply-To: <20261126105722.188103-2-robimarko@gmail.com>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] soc: qcom: smp2p: interrupt storm in qcom_smp2p_check_ssr() [1]
--

commit 4020c9b303d93a1d27eff1767bf735415220859a
Author: Ziyang Huang <hzyitc@outlook.com>

soc: qcom: smp2p: kick WCSS after restart when requested

This commit adds support for the qcom,wcss-restart-kick device-tree
property to send an outbound kick in qcom_smp2p_notify_in() when an
inbound entry reads as zero.

> diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
> index cf06a49149be1..bf11b7d450a43 100644
> --- a/drivers/soc/qcom/smp2p.c
> +++ b/drivers/soc/qcom/smp2p.c
[ ... ]
> @@ -341,6 +343,10 @@ static void qcom_smp2p_notify_in(struct qcom_smp2p *smp2p)
>  
>  		trace_smp2p_notify_in(entry, status, val);
>  
> +		/* Some WCSS firmware needs a kick after restarting. */
> +		if (smp2p->wcss_restart_kick && val == 0)
> +			qcom_smp2p_kick(smp2p);
> +
>  		/* No changes of this entry? */
>  		if (!status)
>  			continue;

[Severity: High]
This problem wasn't introduced by this patch, but does
qcom_smp2p_check_ssr() unconditionally reset entry->last_value to 0 on
every interrupt when SSR ACK is enabled [1]?

drivers/soc/qcom/smp2p.c:qcom_smp2p_check_ssr() {
	...
	restart_done = in->flags & BIT(SMP2P_FLAGS_RESTART_DONE_BIT);
	restart = restart_done != smp2p->ssr_ack;
	list_for_each_entry(entry, &smp2p->inbound, node) {
		if (!entry->value)
			continue;
		entry->last_value = 0;
	}

	return restart;
}

Because the loop is not guarded by if (restart), qcom_smp2p_notify_in()
computes status = val ^ 0 on every incoming notification and treats every
currently asserted bit as a new rising edge, firing spurious nested
interrupts.

[1] https://sashiko.dev/#/bug/linux-bc3d0c88-94cb-435f-b51e-d084030debce

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126105722.188103-1-robimarko@gmail.com?part=2

  reply	other threads:[~2026-11-26 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 10:56 [PATCH 1/3] dt-bindings: soc: qcom: smp2p: document WCSS restart kick Robert Marko
2026-11-26 10:56 ` [PATCH 2/3] soc: qcom: smp2p: kick WCSS after restart when requested Robert Marko
2026-11-26 11:08   ` sashiko-bot [this message]
2026-11-26 10:56 ` [PATCH 3/3] arm64: dts: qcom: ipq8074: add WCSS SMP2P node Robert Marko

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=sashiko-outbox-235328@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=robimarko@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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