Skip to content

FROMLIST: PCI: Add support for PCIe WAKE# interrupt#788

Open
ziyuezhang-123 wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
ziyuezhang-123:for-6.18/pci-add-support-for-pcie-wake-interrupt
Open

FROMLIST: PCI: Add support for PCIe WAKE# interrupt#788
ziyuezhang-123 wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
ziyuezhang-123:for-6.18/pci-add-support-for-pcie-wake-interrupt

Conversation

@ziyuezhang-123

@ziyuezhang-123 ziyuezhang-123 commented Jun 30, 2026

Copy link
Copy Markdown

According to the PCI Express specification (PCIe r7.0, Section 5.3.3.2),
two link wakeup mechanisms are defined: Beacon and WAKE#. Beacon is a
hardware-only mechanism and is invisible to software (PCIe r7.0,
Section 4.2.7.8.1). This change adds support for the WAKE# mechanism
in the PCI core.

According to the PCIe specification, multiple WAKE# signals can exist in
a system or each component in the hierarchy could share a single WAKE#
signal. In configurations involving a PCIe switch, each downstream port
(DSP) of the switch may be connected to a separate WAKE# line, allowing
each endpoint to signal WAKE# independently. From figure 5.4 in sec
5.3.3.2, WAKE# can also be terminated at the switch itself. Such topologies
are typically not described in Device Tree, therefore it is out of scope
for this series.

To support this, the WAKE# should be described in the device tree node of
the endpoint/bridge. If all endpoints share a single WAKE# line, then each
endpoint node shall describe the same WAKE# signal or a single WAKE# in
the Root Port node.

In pci_device_add(), PCI framework will search for the WAKE# in device
node. Once found, register for the wake IRQ through
dev_pm_set_dedicated_wake_irq() associates a wakeup IRQ with a device
and requests it, but the PM core keeps the IRQ disabled by default. The
IRQ is enabled by the PM core, only when the device is permitted to wake
the system, i.e. during system suspend and after runtime suspend, and
only when device wakeup is enabled.

If the same WAKE# GPIO is described in multiple device tree nodes, only the
first device that successfully registers the wake IRQ will succeed, while
subsequent registrations may fail. This limitation does not affect
functional correctness, since WAKE# is only used to bring the link to D0,
and endpoint-specific wakeup handling is resolved later through
PME detection (PME_EN is set in suspend path by PCI core by default).

When the wake IRQ fires, the wakeirq handler invokes pm_runtime_resume() to
bring the device back to an active power state, such as transitioning from
D3cold to D0. Once the device is active and the link is usable, the
endpoint may generate a PME, which is then handled by the PCI core through
PME polling or the PCIe PME service driver to complete the wakeup of the
endpoint.

WAKE# is added in dts schema and merged based on below links.

Link: https://lore.kernel.org/all/20250515090517.3506772-1-krishna.chundru@oss.qualcomm.com/
Link: devicetree-org/dt-schema#170
Reviewed-by: Linus Walleij linus.walleij@linaro.org
Acked-by: Manivannan Sadhasivam mani@kernel.org
Signed-off-by: Krishna Chaitanya Chundru krishna.chundru@oss.qualcomm.com
Signed-off-by: Ziyue Zhang ziyue.zhang@oss.qualcomm.com

Link: https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/
CRs-Fixed: 4542930

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

According to the PCI Express specification (PCIe r7.0, Section 5.3.3.2),
two link wakeup mechanisms are defined: Beacon and WAKE#. Beacon is a
hardware-only mechanism and is invisible to software (PCIe r7.0,
Section 4.2.7.8.1). This change adds support for the WAKE# mechanism
in the PCI core.

According to the PCIe specification, multiple WAKE# signals can exist in
a system or each component in the hierarchy could share a single WAKE#
signal. In configurations involving a PCIe switch, each downstream port
(DSP) of the switch may be connected to a separate WAKE# line, allowing
each endpoint to signal WAKE# independently. From figure 5.4 in sec
5.3.3.2, WAKE# can also be terminated at the switch itself. Such topologies
are typically not described in Device Tree, therefore it is out of scope
for this series.

To support this, the WAKE# should be described in the device tree node of
the endpoint/bridge. If all endpoints share a single WAKE# line, then each
endpoint node shall describe the same WAKE# signal or a single WAKE# in
the Root Port node.

In pci_device_add(), PCI framework will search for the WAKE# in device
node. Once found, register for the wake IRQ through
dev_pm_set_dedicated_wake_irq() associates a wakeup IRQ with a device
and requests it, but the PM core keeps the IRQ disabled by default. The
IRQ is enabled by the PM core, only when the device is permitted to wake
the system, i.e. during system suspend and after runtime suspend, and
only when device wakeup is enabled.

If the same WAKE# GPIO is described in multiple device tree nodes, only the
first device that successfully registers the wake IRQ will succeed, while
subsequent registrations may fail. This limitation does not affect
functional correctness, since WAKE# is only used to bring the link to D0,
and endpoint-specific wakeup handling is resolved later through
PME detection (PME_EN is set in suspend path by PCI core by default).

When the wake IRQ fires, the wakeirq handler invokes pm_runtime_resume() to
bring the device back to an active power state, such as transitioning from
D3cold to D0. Once the device is active and the link is usable, the
endpoint may generate a PME, which is then handled by the PCI core through
PME polling or the PCIe PME service driver to complete the wakeup of the
endpoint.

WAKE# is added in dts schema and merged based on below links.

Link: https://lore.kernel.org/all/20250515090517.3506772-1-krishna.chundru@oss.qualcomm.com/
Link: devicetree-org/dt-schema#170
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>

Link: https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/
Signed-off-by: Ziyue Zhang <ziyue.zhang@oss.qualcomm.com>
@ziyuezhang-123 ziyuezhang-123 force-pushed the for-6.18/pci-add-support-for-pcie-wake-interrupt branch from 0b83255 to 818a439 Compare July 6, 2026 08:07
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4542930 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4542930
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

1 similar comment
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4542930 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4542930
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qlijarvis

Copy link
Copy Markdown

PR #788 — validate-patch

PR: #788

Verdict Issues Detailed Report
⚠️ 2 Full report

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/ (v11 revision)
  2. Lore link matches PR commits: Cannot verify — network access restricted; manual comparison recommended
  3. Upstream patch status: ⏳ In review — FROMLIST: prefix indicates not yet merged; strong review signals present (Reviewed-by: Linus Walleij, Acked-by: Manivannan Sadhasivam) suggest likely acceptance
  4. PR present in qcom-next: Cannot determine — repository search operations timed out; function name pci_configure_of_wake_gpio not found in limited search
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #788 - FROMLIST: PCI: Add support for PCIe WAKE# interrupt
Upstream commit: https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/
Verdict: ⚠️ PARTIAL (network restrictions prevented full lore comparison)

Commit Message

Check Status Note
Subject matches upstream ⏭️ Cannot verify - network access restricted
Body preserves rationale Comprehensive description of WAKE# mechanism, implementation details, and limitations
Fixes tag present/correct N/A New feature, not a bug fix
Authorship preserved Original author (Krishna Chaitanya Chundru) in From: and first Signed-off-by:; submitter (Ziyue Zhang) in second Signed-off-by: - correct for FROMLIST:
Backport note (if applicable) N/A Not a backport
Co-developed-by usage Not used
Review tags present Reviewed-by: Linus Walleij, Acked-by: Manivannan Sadhasivam

Diff

File Status Notes
drivers/pci/of.c ⏭️ Cannot compare to lore - network restricted; adds pci_configure_of_wake_gpio() and pci_remove_of_wake_gpio()
drivers/pci/pci.c ⏭️ Cannot compare to lore - network restricted; adds platform wrappers
drivers/pci/pci.h ⏭️ Cannot compare to lore - network restricted; adds function declarations
drivers/pci/probe.c ⏭️ Cannot compare to lore - network restricted; calls platform_pci_configure_wake() in pci_device_add()
drivers/pci/remove.c ⏭️ Cannot compare to lore - network restricted; calls platform_pci_remove_wake() in pci_destroy_dev()
include/linux/of_pci.h ⏭️ Cannot compare to lore - network restricted; adds public API declarations
include/linux/pci.h ⏭️ Cannot compare to lore - network restricted; adds wake gpio_desc pointer to struct pci_dev

Issues

  • Network restriction: Cannot fetch lore.kernel.org patch for byte-level diff comparison due to network access restrictions in the environment. Manual verification against the lore link is recommended.
  • qcom-next search timeout: Repository search operations timed out; presence in qcom-next could not be definitively determined.

Verdict

Commit message structure is correct for a FROMLIST: patch. The original author (Krishna Chaitanya Chundru) is properly preserved in From: and Signed-off-by:, and the submitter (Ziyue Zhang) correctly added their Signed-off-by: as the cherry-picker. The patch has strong upstream review signals (Reviewed-by from Linus Walleij, Acked-by from Manivannan Sadhasivam), indicating positive community reception. The lore link points to v11 of the series, suggesting this is a mature, well-reviewed patch.

Recommendation: Merge as-is, subject to manual verification that the diff content matches the lore v11 posting at the provided link. The commit message hygiene is excellent and follows kernel conventions correctly.

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/ (v11 revision)
  2. Lore link matches PR commits: Cannot verify — network access restricted; manual comparison recommended
  3. Upstream patch status: ⏳ In review — FROMLIST: prefix indicates not yet merged; strong review signals present (Reviewed-by: Linus Walleij, Acked-by: Manivannan Sadhasivam) suggest likely acceptance
  4. PR present in qcom-next: Cannot determine — repository search operations timed out; function name pci_configure_of_wake_gpio not found in limited search

@qlijarvis

Copy link
Copy Markdown

PR #788 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch No style issues
dt-binding-check ⏭️ Skipped (no DT binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check Passed (pre-existing warnings only)
check-uapi-headers No UAPI changes
check-patch-compliance Link validation failed
tag-check Subject has valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #788 - FROMLIST: PCI: Add support for PCIe WAKE# interrupt
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/28777214885
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch No style issues
dt-binding-check ⏭️ Skipped (no DT binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check Passed (pre-existing warnings only)
check-uapi-headers No UAPI changes
check-patch-compliance Link validation failed
tag-check Subject has valid FROMLIST: prefix

❌ check-patch-compliance

Root cause: Multiple Link: tags in commit message — checker validates against the first Link, but the actual patch corresponds to the second Link.

Failure details:

Checking commit: FROMLIST: PCI: Add support for PCIe WAKE# interrupt
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20250515090517.3506772-1-krishna.chundru@oss.qualcomm.com/

The commit message contains two Link: tags:

  1. Link: https://lore.kernel.org/all/20250515090517.3506772-1-krishna.chundru@oss.qualcomm.com/ (v1, May 2025)
  2. Link: https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/ (v11, June 2026)

The checker attempts to validate the patch against the first Link (v1), but the actual patch in the PR corresponds to the second Link (v11). This causes a mismatch.

Fix:

Option 1 (Recommended): Keep only the most recent upstream Link (v11) and move the older Link to the commit body as a reference:

git rebase -i a1690589c9de   # mark commit as 'edit'
# Edit commit message to:
#   - Move the first Link to the commit body (before Reviewed-by tags)
#   - Keep only the v11 Link as the primary Link: tag
git commit --amend
git rebase --continue

Example commit message structure:

FROMLIST: PCI: Add support for PCIe WAKE# interrupt

[commit body text...]

This patch is based on the v11 series. Earlier versions were posted at:
https://lore.kernel.org/all/20250515090517.3506772-1-krishna.chundru@oss.qualcomm.com/

WAKE# is added in dts schema and merged based on:
https://github.com/devicetree-org/dt-schema/pull/170

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/
Signed-off-by: Ziyue Zhang <ziyue.zhang@oss.qualcomm.com>

Option 2: If both Links are required as formal Link: tags, reorder them so the v11 Link appears first (the checker validates against the first Link: tag only).

Reproduce locally:

cd /path/to/kernel
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20250515090517.3506772-1-krishna.chundru@oss.qualcomm.com/
# This will fail or fetch v1, not v11

b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260624-wakeirq_support-v11-1-120fbfaebe59@oss.qualcomm.com/
# This will fetch the correct v11 patch

Verdict

One blocker to fix before merge: The check-patch-compliance failure must be resolved by restructuring the commit message to have a single primary Link: tag pointing to the v11 series, or by reordering the Links so the v11 Link appears first.

All other checkers passed or were correctly skipped. The commit has a valid FROMLIST: prefix as required for the qcom-6.18.y target branch.

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