Skip to content

UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit notification - #962

Open
Jianping (Jianping-Li) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
Jianping-Li:drop_notice
Open

UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit notification#962
Jianping (Jianping-Li) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
Jianping-Li:drop_notice

Conversation

@Jianping-Li

Copy link
Copy Markdown

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.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/misc/fastrpc.c?id=5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5
CRs-Fixed: 4633198

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.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/misc/fastrpc.c?id=5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5
Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com>
@qlijarvis

Copy link
Copy Markdown

PR #962 — validate-patch

PR: #962

Verdict Issues Detailed Report
0 Full report

Final Summary

  1. Lore link present: No — PR links to git.kernel.org commit in linux-next (5533bb4), not lore.kernel.org. However, the upstream commit message contains a lore link: https://patch.msgid.link/20260729094352.111065-11-srini@kernel.org

  2. Lore link matches PR commits: N/A — PR does not link to lore; it links directly to the git commit. The diff content is functionally identical to upstream, with only context line number differences due to applying to an older base tree.

  3. Upstream patch status: ✅ ACKed — merged into linux-next as commit 5533bb4bc53c with sign-offs from Srinivas Kandagatla (maintainer) and Greg Kroah-Hartman (char-misc subsystem maintainer). Commit dated 2026-07-29, likely queued for mainline in the next merge window.

  4. PR present in qcom-next/topics: Yes - all 1 commit(s) are present in qcom-next or topics

Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #962 - UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit notification
Upstream commit: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/misc/fastrpc.c?id=5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream Subject identical (UPSTREAM: prefix added correctly)
Body preserves rationale Full commit message body preserved verbatim
Fixes tag present/correct N/A No Fixes tag in upstream (new feature/fix, not regression fix)
Authorship preserved CRITICAL: PR author is Jianping Li <jianping.li@oss.qualcomm.com> but upstream author is Shawn Guo <shengchao.guo@oss.qualcomm.com>. For UPSTREAM: commits, the From: field must match the original author.
Backport note (if applicable) N/A Not a backport to stable; this is a forward-port from linux-next

Diff

File Status Notes
drivers/misc/fastrpc.c ⚠️ Code logic identical; context differs (PR applies to older tree without FASTRPC_CTXID_SEQ_* defines). This is acceptable for integration into an older base, but the line numbers differ: upstream adds at line 51, PR adds at line 48.

Issues

  1. Author mismatch (FAIL): The PR's From: field shows Jianping Li but the upstream commit author is Shawn Guo. For UPSTREAM: commits, the original author must be preserved. Fix with:

    git commit --amend --author="Shawn Guo <shengchao.guo@oss.qualcomm.com>"
  2. Missing upstream trailers (WARNING): The PR is missing the following trailers from the upstream commit:

    • 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> (original author)
    • Signed-off-by: Srinivas Kandagatla <srini@kernel.org> (maintainer)
    • Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (subsystem maintainer)

    At minimum, the original author's Signed-off-by must be present. The maintainer sign-offs can be omitted as they represent the upstream merge path, but the original author's SoB is mandatory.

  3. Context adaptation (ACCEPTABLE): The diff context differs because the PR applies to an older kernel tree that lacks the FASTRPC_CTXID_SEQ_SHIFT and FASTRPC_CTXID_SEQ_MASK defines present in linux-next. The code logic is identical and correctly adapted.

Verdict

Do not merge until the author field is corrected to Shawn Guo <shengchao.guo@oss.qualcomm.com> and the original author's Signed-off-by is added to the commit message. The current PR incorrectly attributes the patch to Jianping Li, which violates kernel authorship conventions for UPSTREAM: commits.

Final Summary

  1. Lore link present: No — PR links to git.kernel.org commit in linux-next (5533bb4), not lore.kernel.org. However, the upstream commit message contains a lore link: https://patch.msgid.link/20260729094352.111065-11-srini@kernel.org

  2. Lore link matches PR commits: N/A — PR does not link to lore; it links directly to the git commit. The diff content is functionally identical to upstream, with only context line number differences due to applying to an older base tree.

  3. Upstream patch status: ✅ ACKed — merged into linux-next as commit 5533bb4bc53c with sign-offs from Srinivas Kandagatla (maintainer) and Greg Kroah-Hartman (char-misc subsystem maintainer). Commit dated 2026-07-29, likely queued for mainline in the next merge window.

  4. PR present in qcom-next/topics: Yes — per integration_presence_report.md: "present - all checked added lines are present" in topics (topics/early/hwe/eliza, topics/early/hwe/nord-next)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 21f58ca3b79427e34eafb4c18ff916d8bb95f7ea
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/1 [PATCH] UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit partial - subject or partial tree evidence found, but full change was not verified present - all checked added lines are present present

Final Status

overall_status: PASS
present_commits: 1/1
partial_commits: 0/1
missing_commits: 0/1
topics_checked_for_commits: 1/1
final_summary: PR present in qcom-next/topics: Yes - all 1 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #962 — checker-log-analyzer

PR: #962
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/32020037254

Checker Result Summary
Checker Result Summary
checkpatch No style issues
dt-binding-check ⏭️ Skipped (no binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check No sparse warnings
check-uapi-headers No UAPI changes
check-patch-compliance Invalid Link URL format
tag-check Subject has valid UPSTREAM: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #962 - UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit notification
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/32020037254
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch No style issues
dt-binding-check ⏭️ Skipped (no binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check No sparse warnings
check-uapi-headers No UAPI changes
check-patch-compliance Invalid Link URL format
tag-check Subject has valid UPSTREAM: prefix

❌ check-patch-compliance

Root cause: The Link: trailer points to a git.kernel.org cgit web URL instead of a lore.kernel.org mbox URL, which b4 am cannot fetch.

Failure details:

Checking commit: UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit notification
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/misc/fastrpc.c?id=5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5

The commit message contains:

Link: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/misc/fastrpc.c?id=5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5

This is a cgit web interface URL. The check-patch-compliance checker uses b4 am to fetch and compare patches, which requires a lore.kernel.org URL (e.g., https://lore.kernel.org/...) or a message-ID.

Fix: Replace the git.kernel.org cgit URL with the corresponding lore.kernel.org URL for the patch submission.

  1. Search for the patch on lore.kernel.org using the commit ID or subject:

    # Search by commit ID
    lei q -o /tmp/search "id:5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5"
    # OR search by subject
    lei q -o /tmp/search "s:misc fastrpc Drop unhandled DSP PD exit notification"
  2. Once you find the lore URL (it will look like https://lore.kernel.org/linux-arm-msm/<message-id>/), update the commit:

    git rebase -i bfeb0e5567c0   # base of qcom-6.18.y
    # mark the commit as 'edit'
    git commit --amend
    # In the editor, replace the Link: line with the lore.kernel.org URL
    git rebase --continue
  3. If the patch was never posted to a mailing list (only merged directly to linux-next), you have two options:

    • Option A (preferred): Find the original mailing list submission that led to the linux-next merge and use that lore URL
    • Option B: Use the mainline commit URL format: Link: https://git.kernel.org/linus/5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5 (if merged to mainline)

Reproduce locally:

# This will fail with the current cgit URL:
b4 am --single-message -C -l -3 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/misc/fastrpc.c?id=5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5

# After fixing to a lore URL, it should succeed:
b4 am --single-message -C -l -3 https://lore.kernel.org/linux-arm-msm/<message-id>/

Verdict

1 blocker to fix before merge: The Link: trailer must point to a lore.kernel.org URL (or a valid mainline commit URL format) instead of the cgit web interface URL. All other checkers passed or were correctly skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants