mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Guo <shengchao.guo@oss.qualcomm.com>
To: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] misc: fastrpc: Drop unhandled DSP PD exit notification
Date: Wed, 29 Jul 2026 09:41:31 +0800	[thread overview]
Message-ID: <amlaS4fj_UMfDxKu@QCOM-aGQu4IUr3Y> (raw)
In-Reply-To: <7761fab5-089a-463a-8de9-1922da2ff602@oss.qualcomm.com>

On Tue, Jul 28, 2026 at 04:06:50PM +0100, Srinivas Kandagatla wrote:
> 
> 
> On 7/28/26 8:38 AM, Shawn Guo wrote:
> > Newer DSP firmware implements a PD (Protection Domain) notification
> > framework that sends PD state notifications upon request. The PD exit
> > notification is unconditionally sent by the DSP with a fixed sentinel
> > 0xABCDABCD in the context field.
> > 
> > fastrpc_rpmsg_callback() treats every inbound message as an invoke
> > response, so the sentinel is masked and shifted like any real response
> > ((0xABCDABCD & 0xFF0) >> 4 == 188) and looked up in the channel's
> > context idr.
> > 
> > This is not merely cosmetic. In the common case idr slot 188 is empty,
> > the lookup fails, and the driver only logs a spurious "No context ID
> > matches response" error on every teardown. But the context idr is shared
> > by every protection domain and the listener thread on the channel and is
> > filled cyclically over [1, FASTRPC_CTX_MAX]. If slot 188 holds a live
> > context when the sentinel arrives, the sentinel's return value is written
> > into that unrelated in-flight invocation and it is completed early.
> > 
> > Since neither the fastrpc library nor the driver supports the DSP PD
> > notification framework, it is safe to drop the PD exit notification
> > before it is ever turned into a context lookup. This removes both the
> > log spam and the mis-completion race. A genuine response can never be
> > masked: a real context is (idr_index << 4) | pd (at most 0xFF3) and
> > can never equal the sentinel.
> > 
> > Assisted-by: Claude:claude-opus-4-8
> > Reviewed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
> > Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
> > ---
> 
> Does not apply to linux-next, can you rebase it pl.

Hmm, the patch was based on next-20260727 and still applies to
next-20260728. I pushed a branch based on next-20260728 for your
reference here [1].

Shawn

[1] https://github.com/shawngsc/linux/commits/next-20260728-nord-fastrpc-v2

      reply	other threads:[~2026-07-29  1:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  7:38 Shawn Guo
2026-07-28 15:06 ` Srinivas Kandagatla
2026-07-29  1:41   ` Shawn Guo [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=amlaS4fj_UMfDxKu@QCOM-aGQu4IUr3Y \
    --to=shengchao.guo@oss.qualcomm.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ekansh.gupta@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srini@kernel.org \
    --cc=srinivas.kandagatla@oss.qualcomm.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®