Skip to content

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

Open
Jianping (Jianping-Li) wants to merge 1 commit into
qualcomm-linux:tech/mm/fastrpcfrom
Jianping-Li:drop_notice
Open

UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit notification#1698
Jianping (Jianping-Li) wants to merge 1 commit into
qualcomm-linux:tech/mm/fastrpcfrom
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

@qcomlnxci
qcomlnxci requested review from a team, Chenna Kesava Raju (Chennak-quic) and Ekansh Gupta (ekanshibu) and removed request for a team August 17, 2026 08:34
@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1698

PR: #1698
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/32011036417

# Error File:Line PR-introduced? Root Cause
1 Merge conflict during automerge drivers/misc/fastrpc.c No The PR modifies drivers/misc/fastrpc.c in an area that conflicts with changes already present in the integration baseline (commit 49dbe0dae5cfb7a1eb3434cde6fc7ba37924fe94) or another topic branch. This is an integration conflict, not a code defect.

Verdict

This is not a compilation failure. The build failed during the pre-merge automerge phase due to a merge conflict in drivers/misc/fastrpc.c. The PR code itself is syntactically correct; the conflict indicates overlapping changes in the integration baseline that require manual resolution.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1698

PR: #1698
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/32011036417

# Error File:Line PR-introduced? Root Cause
1 Merge conflict during automerge drivers/misc/fastrpc.c N/A The PR modifies regions of drivers/misc/fastrpc.c that have divergent changes in the target integration branch (qcom-next). The conflict occurs in two areas: (1) macro definitions near FASTRPC_CTXID_MASK where the PR adds FASTRPC_DSP_PD_NOTIFY_CTX, and (2) the fastrpc_rpmsg_callback() function where the PR adds a PD notification check.

Verdict

This is not a compilation failure. The build failed during the pre-build automerge/integration phase due to a merge conflict in drivers/misc/fastrpc.c. The conflict must be resolved before compilation can proceed.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

PR #1698 — validate-patch

PR: #1698

Verdict Issues Detailed Report
0 Full report

Final Summary

  1. Lore link present: No — PR links to git.kernel.org commit URL instead of lore.kernel.org; upstream has lore link https://patch.msgid.link/20260729094352.111065-11-srini@kernel.org
  2. Lore link matches PR commits: N/A — no lore link in PR to compare; git commit link points to correct upstream SHA
  3. Upstream patch status: ✅ Upstreamed — merged into linux-next as 5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5, signed off by Greg Kroah-Hartman (char-misc maintainer)
  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: #1698 - 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/?id=5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream Subject identical (with UPSTREAM: prefix added)
Body preserves rationale Commit message body is identical to upstream
Fixes tag present/correct No Fixes tag in upstream or PR (not a bug fix)
Authorship preserved CRITICAL: Author changed from Shawn Guo to Jianping Li
Backport note (if applicable) N/A Not a backport - commit is in linux-next

Diff

File Status Notes
drivers/misc/fastrpc.c Code changes are functionally identical; context line numbers differ due to tree state

Issues

  1. Author mismatch (CRITICAL FAIL): The PR commit lists From: Jianping Li <jianping.li@oss.qualcomm.com> but the upstream commit author is Shawn Guo <shengchao.guo@oss.qualcomm.com>. For UPSTREAM: prefix commits, the original author must be preserved. This violates kernel contribution attribution rules.

  2. Missing Signed-off-by chain: The PR only includes Jianping Li's Signed-off-by, but the upstream commit has a complete sign-off chain:

  3. Missing review tags: The upstream commit includes:

    These should be preserved to maintain the review history.

  4. Link tag mismatch: The PR links to the git commit URL, but the upstream uses the canonical lore message-ID link: https://patch.msgid.link/20260729094352.111065-11-srini@kernel.org. The lore link is preferred for traceability.

Verdict

Do not merge. The commit must be amended to preserve the original author (Shawn Guo) and include the complete Signed-off-by chain. Use:

git commit --amend --author="Shawn Guo <shengchao.guo@oss.qualcomm.com>"

Then update the commit message to include all upstream tags (Assisted-by, Reviewed-by, Signed-off-by chain) and optionally update the Link to the lore message-ID.

Final Summary

  1. Lore link present: No — PR links to git.kernel.org commit URL instead of lore.kernel.org; upstream has lore link https://patch.msgid.link/20260729094352.111065-11-srini@kernel.org
  2. Lore link matches PR commits: N/A — no lore link in PR to compare; git commit link points to correct upstream SHA
  3. Upstream patch status: ✅ Upstreamed — merged into linux-next as 5533bb4bc53c6cd401b9b329d7e26802fd5aa1f5, signed off by Greg Kroah-Hartman (char-misc maintainer)
  4. PR present in qcom-next/topics: Yes — present in topics branches (topics/early/hwe/eliza, topics/early/hwe/nord-next) per integration_presence_report.md

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: 49dbe0dae5cfb7a1eb3434cde6fc7ba37924fe94
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 #1698 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ⏭️ Skipped - automerge conflict
dt-binding-check ⏭️ Skipped - automerge conflict
dtb-check ⏭️ Skipped - automerge conflict
sparse-check ⏭️ Skipped - automerge conflict
check-uapi-headers ⏭️ Skipped - automerge conflict
check-patch-compliance ⏭️ Skipped - automerge conflict
tag-check PASS - commit has valid UPSTREAM: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1698 - UPSTREAM: misc: fastrpc: Drop unhandled DSP PD exit notification
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/32011033361

Checker Result Summary
checkpatch ⏭️ Skipped - automerge conflict
dt-binding-check ⏭️ Skipped - automerge conflict
dtb-check ⏭️ Skipped - automerge conflict
sparse-check ⏭️ Skipped - automerge conflict
check-uapi-headers ⏭️ Skipped - automerge conflict
check-patch-compliance ⏭️ Skipped - automerge conflict
tag-check PASS - commit has valid UPSTREAM: prefix

⚠️ Automerge Conflict (Infrastructure Issue)

Root cause: The PR modifies drivers/misc/fastrpc.c which conflicts with the existing topic/tech/mm/fastrpc topic branch during the CI automerge phase.

Failure details:

** Merging topic branch: topic/tech/mm/fastrpc
Auto-merging drivers/misc/fastrpc.c
CONFLICT (content): Merge conflict in drivers/misc/fastrpc.c
Automatic merge failed; fix conflicts and then commit the result.
automerge returned non-zero; check logs for conflicts

Impact: All checker jobs failed during the automerge setup phase before any actual code quality checks could run. This is an infrastructure/integration issue, not a code quality defect in the PR itself.

Analysis:

  • The PR adds a new FASTRPC_DSP_PD_NOTIFY_CTX constant and logic to drop DSP PD exit notifications in fastrpc_rpmsg_callback()
  • The topic/tech/mm/fastrpc branch likely contains overlapping changes to the same file/function
  • The conflict occurs at the integration layer (merging multiple topic branches), not in the PR's code

Resolution options:

  1. Rebase the PR on the latest integration branch that includes topic/tech/mm/fastrpc:

    git fetch origin
    git rebase origin/<integration-branch>
    # Resolve conflicts manually
    git push --force-with-lease
  2. Coordinate with the topic/tech/mm/fastrpc maintainer to determine merge order or refactor overlapping changes

  3. Re-trigger CI after the conflicting topic branch is merged or removed from the integration

Note: The commit itself follows proper conventions:

  • ✅ Has valid UPSTREAM: prefix
  • ✅ Includes upstream Link trailer
  • ✅ Proper commit message format
  • ✅ Changes are localized to drivers/misc/fastrpc.c

✅ tag-check

Status: PASS

The commit subject starts with UPSTREAM:, which is a valid prefix indicating the patch is merged into Linus's mainline tree. The Link trailer confirms this:

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

Verdict

Cannot assess code quality — all checkers were blocked by an automerge conflict with topic/tech/mm/fastrpc.

Recommended action:

  1. Resolve the merge conflict with topic/tech/mm/fastrpc by rebasing the PR
  2. Re-trigger CI to run the full checker suite
  3. The commit itself appears well-formed and follows upstream conventions

Blocker: Merge conflict in drivers/misc/fastrpc.c must be resolved before checkers can run.

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>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20260729094352.111065-11-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com>
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.

3 participants