Skip to content

Add support for the BAM-DMUX WWAN modem data path on Shikra.#703

Open
quic-vishsant wants to merge 4 commits into
qualcomm-linux:qcom-6.18.yfrom
quic-vishsant:for-shikra-bam-dmux-6.18
Open

Add support for the BAM-DMUX WWAN modem data path on Shikra.#703
quic-vishsant wants to merge 4 commits into
qualcomm-linux:qcom-6.18.yfrom
quic-vishsant:for-shikra-bam-dmux-6.18

Conversation

@quic-vishsant

@quic-vishsant quic-vishsant commented Jun 11, 2026

Copy link
Copy Markdown
  • Fix SMSM default host count: upstream default of 3 allocates wrong
    size for Shikra modem firmware which expects num_hosts=5, causing
    modem boot crash "smsm.c: Bad pointer from smem_alloc"

  • Fix BAM DMA IRQ trigger: driver hardcodes IRQF_TRIGGER_HIGH,
    overriding the DT-specified edge trigger needed by Shikra A2 BAM

  • Add shikra.dtsi nodes: bam_dmux_dma (inside soc) and bam-dmux
    (root level, before clocks)

  • Enable CONFIG_QCOM_BAM_DMUX=m in defconfig

Lore links:
https://lore.kernel.org/all/20260611-qcom-smsm-default-num-hosts-v1-1-423b8a25945a@oss.qualcomm.com/
https://lore.kernel.org/all/20260611-qcom-bam-dma-irq-trigger-v1-1-21c216e00b2a@oss.qualcomm.com/
https://lore.kernel.org/all/20260611-qcom-shikra-dts-bam-dmux-v1-1-43d0b43d41ef@oss.qualcomm.com/
https://lore.kernel.org/all/20260611-qcom-arm64-defconfig-bam-dmux-v1-1-599190f17fc9@oss.qualcomm.com/

CRs-Fixed: 4569396

SMEM_SMSM_SIZE_INFO (id 419) is not populated by the boot firmware on
Qualcomm Shikra SoC. The SMSM driver falls back to
SMSM_DEFAULT_NUM_HOSTS when this segment is absent, which causes
SMEM_SMSM_CPU_INTR_MASK (id 333) to be allocated with the wrong size.

SMEM_SMSM_CPU_INTR_MASK is sized as SMSM_DEFAULT_NUM_ENTRIES *
SMSM_DEFAULT_NUM_HOSTS * sizeof(u32). With SMSM_DEFAULT_NUM_ENTRIES
fixed at 8, the current SMSM_DEFAULT_NUM_HOSTS of 3 allocates 96
bytes. Qualcomm Shikra SoC modem firmware expects 160 bytes,
requiring SMSM_DEFAULT_NUM_HOSTS to be 5. The size mismatch causes
the modem to crash on boot with "smsm.c: Bad pointer from smem_alloc".

Increase SMSM_DEFAULT_NUM_HOSTS to 5 to match the modem firmware
expectation and prevent the boot crash.

Co-developed-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Signed-off-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260611-qcom-smsm-default-num-hosts-v1-1-423b8a25945a@oss.qualcomm.com
…tree

The driver hardcodes IRQF_TRIGGER_HIGH when registering the BAM
interrupt, which overrides the trigger type specified in the device
tree. On Qualcomm Shikra SoC, the A2 BAM signals an edge interrupt
to the apps processor; registering it as level-high causes the
interrupt to not fire, resulting in missed DMA completions.

Use IRQF_TRIGGER_NONE instead, which causes the kernel to use the
trigger type already configured by platform_get_irq() when it parsed
the device tree interrupts property. This makes the driver
platform-agnostic.

Fixes: e7c0fe2 ("dmaengine: add Qualcomm BAM dma driver")
Co-developed-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Signed-off-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260611-qcom-bam-dma-irq-trigger-v1-1-21c216e00b2a@oss.qualcomm.com
Add required nodes to enable the upstream BAM-DMUX WWAN driver on
Qualcomm Shikra SoC.

The SMSM (Shared Memory State Machine) node provides the power
control signaling between the AP and modem for BAM-DMUX. The
BAM DMA controller node describes the A2 modem BAM hardware as a
standard DMA controller. The BAM-DMUX node references the DMA
channels and the pc/pc-ack interrupt lines from the modem SMSM
entry for power control signaling.

Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260611-qcom-shikra-dts-bam-dmux-v1-1-43d0b43d41ef@oss.qualcomm.com
Enable the BAM Data Multiplexer WWAN driver as a module to support
modem data channels on Qualcomm Shikra SoC. The driver is also used
by other platforms with A2 BAM hardware such as MSM8916 and MSM8939.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260611-qcom-arm64-defconfig-bam-dmux-v1-1-599190f17fc9@oss.qualcomm.com
@quic-vishsant quic-vishsant requested review from a team, quicAspratap, sgaud-quic and trsoni June 11, 2026 11:14
@psarma-qcom

Copy link
Copy Markdown

"qli-2.0 GA Critical Fix"

@qlijarvis

Copy link
Copy Markdown

PR #703 — validate-patch

PR: #703

Verdict Issues Detailed Report
⚠️ 1 Full report

Final Summary

  1. Lore link present: Yes — all 4 patches include Link: tags pointing to lore.kernel.org message-IDs
  2. Lore link matches PR commits: Cannot verify — patches posted today (2026-06-11); lore.kernel.org has not yet indexed them (returns empty responses)
  3. Upstream patch status: In review — patches posted to mailing list today; FROMLIST: prefix indicates they are pending upstream acceptance
  4. PR present in qcom-next: Not checked — patches are FROMLIST (pending upstream), not yet merged to any tree

Note: The lore links are well-formed and follow the standard message-ID format. The patches appear to have been posted to the mailing list within the last few hours, so lore.kernel.org indexing delay is expected. Once indexed, the links should resolve correctly.

Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #703 (4 patches: BAM-DMUX support for Shikra SoC)
Upstream commit: N/A — patches posted to mailing list today (2026-06-11), not yet merged
Verdict: ⚠️ PARTIAL — One missing Fixes tag, otherwise well-formed


Patch 1/4: FROMLIST: soc: qcom: smsm: Increase SMSM_DEFAULT_NUM_HOSTS to 5

Commit Message

Check Status Note
Subject format FROMLIST: prefix correct; clear, concise subject
Body preserves rationale Excellent technical detail: size calculation, root cause, impact
Fixes tag present/correct ⚠️ Missing — fixes modem boot crash; should reference commit introducing SMSM_DEFAULT_NUM_HOSTS
Authorship preserved Vishnu Santhosh (author)
Co-developed-by chain Deepak Kumar Singh properly tagged with matching Signed-off-by

Diff

File Status Notes
drivers/soc/qcom/smsm.c Minimal change: 3 → 5 for SMSM_DEFAULT_NUM_HOSTS constant

Issues

  • Missing Fixes tag: This patch fixes a modem boot crash ("Bad pointer from smem_alloc"). Should include Fixes: tag referencing the commit that introduced SMSM_DEFAULT_NUM_HOSTS or the original SMSM driver commit.

Patch 2/4: FROMLIST: dmaengine: qcom: bam_dma: Defer IRQ trigger type to device tree

Commit Message

Check Status Note
Subject format FROMLIST: prefix correct; clear, actionable subject
Body preserves rationale Clear problem, platform impact, solution, and rationale
Fixes tag present/correct Fixes: e7c0fe2a5c84 ("dmaengine: add Qualcomm BAM dma driver")
Authorship preserved Vishnu Santhosh (author)
Co-developed-by chain Deepak Kumar Singh properly tagged

Diff

File Status Notes
drivers/dma/qcom/bam_dma.c Minimal change: IRQF_TRIGGER_HIGH → IRQF_TRIGGER_NONE

Issues

  • None. Well-formed patch with proper Fixes tag.

Patch 3/4: FROMLIST: arm64: dts: qcom: shikra: Add BAM-DMUX support

Commit Message

Check Status Note
Subject format FROMLIST: prefix correct; standard DT addition subject
Body preserves rationale Clear component descriptions for SMSM, BAM DMA, BAM-DMUX nodes
Fixes tag present/correct N/A New feature addition; no Fixes tag expected
Authorship preserved Vishnu Santhosh (author)
Backport note N/A Not a backport

Diff

File Status Notes
arch/arm64/boot/dts/qcom/shikra.dtsi Adds 3 new nodes: bam_dmux, smsm, bam_dmux_dma (50 lines)

Issues

  • None. Standard device tree addition.

Patch 4/4: FROMLIST: arm64: defconfig: Enable Qualcomm BAM-DMUX WWAN driver

Commit Message

Check Status Note
Subject format FROMLIST: prefix correct; standard defconfig subject
Body preserves rationale Clear purpose and additional platform context (MSM8916, MSM8939)
Fixes tag present/correct N/A New feature enablement; no Fixes tag expected
Authorship preserved Vishnu Santhosh (author)
Reviewed-by tag Krzysztof Kozlowski review present

Diff

File Status Notes
arch/arm64/configs/defconfig Single line addition: CONFIG_QCOM_BAM_DMUX=m (alphabetically correct)

Issues

  • None. Standard defconfig addition with maintainer review.

Overall Issues

Patch 1/4 only:

  • Missing Fixes: tag for a patch that fixes a modem boot crash. Should reference the commit that introduced SMSM_DEFAULT_NUM_HOSTS or the original SMSM driver.

All other patches (2/4, 3/4, 4/4):

  • No issues identified. Well-formed patches following kernel conventions.

Verdict

Recommendation: Request author add Fixes tag to patch 1/4 before merging. Patches 2/4, 3/4, 4/4 are ready to merge.

Rationale:

  • Patch 1/4 fixes a regression (modem crash) and should carry a Fixes tag for stable backport tracking
  • Patch 2/4 correctly includes Fixes tag for the IRQ trigger issue
  • Patches 3/4 and 4/4 are new feature additions (no Fixes tag needed)
  • All patches have proper authorship, sign-off chains, and lore links
  • Commit messages are clear, technical, and follow kernel style

Final Summary

  1. Lore link present: Yes — all 4 patches include Link: tags pointing to lore.kernel.org message-IDs
  2. Lore link matches PR commits: Cannot verify — patches posted today (2026-06-11); lore.kernel.org has not yet indexed them (returns empty responses)
  3. Upstream patch status: In review — patches posted to mailing list today; FROMLIST: prefix indicates they are pending upstream acceptance
  4. PR present in qcom-next: Not checked — patches are FROMLIST (pending upstream), not yet merged to any tree

Note: The lore links are well-formed and follow the standard message-ID format. The patches appear to have been posted to the mailing list within the last few hours, so lore.kernel.org indexing delay is expected. Once indexed, the links should resolve correctly.

@qlijarvis

Copy link
Copy Markdown

PR #703 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch All 4 commits passed with no style issues
dt-binding-check ⏭️ Skipped - no changes in Documentation/devicetree/bindings
dtb-check All Shikra DTBs validated successfully
sparse-check Sparse static analysis passed
check-uapi-headers ⏭️ Skipped - no UAPI header changes
check-patch-compliance Patch mismatch detected for commit 3/4
tag-check N/A Not applicable for this branch
qcom-next-check All commits properly tagged with FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #703 - BAM-DMUX support for Qualcomm Shikra SoC
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/27343568955

Checker Result Summary
checkpatch All 4 commits passed with no style issues
dt-binding-check ⏭️ Skipped - no changes in Documentation/devicetree/bindings
dtb-check All Shikra DTBs validated successfully
sparse-check Sparse static analysis passed
check-uapi-headers ⏭️ Skipped - no UAPI header changes
check-patch-compliance Patch mismatch detected for commit 3/4
tag-check N/A Not applicable for this branch
qcom-next-check All commits properly tagged with FROMLIST: prefix

❌ check-patch-compliance

Root cause: Commit a4a9273264cf ("FROMLIST: arm64: dts: qcom: shikra: Add BAM-DMUX support") differs from the upstream patch referenced in its Link tag.

Failure details:

Checking commit: FROMLIST: arm64: dts: qcom: shikra: Add BAM-DMUX support
Change is different from the one mentioned in Link

The commit references:

Link: https://lore.kernel.org/r/20260611-qcom-shikra-dts-bam-dmux-v1-1-43d0b43d41ef@oss.qualcomm.com

However, the actual patch content in the PR does not match what was posted to the mailing list at that URL. This typically happens when:

  • The patch was modified after being posted to lore (e.g., addressing review comments locally without posting a v2)
  • The Link tag points to the wrong message-id
  • The commit was amended after the Link tag was added

Fix:

Option 1 (Recommended): If the patch was modified after posting to lore, post a v2 to the mailing list and update the Link tag:

# Update the commit message Link tag to point to the v2 posting
git commit --amend
# Update Link: to the new v2 message-id

Option 2: If the Link tag is incorrect, update it to match the actual lore posting:

git rebase -i HEAD~4
# Mark commit 3/4 for 'reword'
# Update the Link: tag to the correct message-id

Option 3: If the PR patch is correct and should replace what's on lore, remove the Link tag until the correct version is posted:

git rebase -i HEAD~4
# Mark commit 3/4 for 'reword'
# Remove the Link: tag line

Reproduce locally:

cd /path/to/kernel
git fetch origin pull/703/head:pr-703
git checkout pr-703

# Clone the checker scripts
git clone https://github.com/qualcomm-linux/kernel-checkers.git

# Run the compliance check
bash kernel-checkers/check-patch-compliance.sh \
  --kernel-src . \
  --base 3e60f57805301f9670e961897f98e7eb4d66b430 \
  --head 37ce5e170a255267e54a56fbe71432f9c51ab5c9

Verdict

1 blocker to fix: The check-patch-compliance failure must be resolved before merge. The patch content must match the lore.kernel.org posting referenced in the Link tag, or the Link tag must be updated/removed to reflect the actual state of the patch.

All other checkers passed successfully. Once the Link tag mismatch is resolved, this PR will be ready to merge.

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.

4 participants