FROMLIST: PCI/ASPM: Mask ASPM states based on Devicetree properties - #1594
FROMLIST: PCI/ASPM: Mask ASPM states based on Devicetree properties#1594ayyappakk wants to merge 1 commit into
Conversation
🔨 Build Failure Analysis — PR #1594PR: #1594
VerdictThis is NOT a compilation failure. The build failed during the integration/merge phase before compilation could begin. The merge conflict in 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #1594PR: #1594
VerdictThis is not a compilation failure. The build failed during the integration merge phase due to a pre-existing conflict in a devicetree file that the PR does not modify. Zero compilation errors are introduced by this PR. 📎 Detailed analysis: Full report |
PR #1594 — validate-patchPR: #1594
Final Summary
|
PR #1594 — checker-log-analyzerPR: #1594
Detailed report: Full report
|
🔨 Build Failure Analysis — PR #1594PR: #1594
VerdictThe build failed during merge/integration before compilation. However, the PR contains 2 compilation errors that would prevent successful build: undeclared variable 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #1594PR: #1594
Verdict2 of 3 errors are introduced by this PR; 1 is pre-existing. The build never reached compilation due to the merge conflict, so the PR-introduced compilation errors were not detected by CI. 📎 Detailed analysis: Full report |
PR #1594 — validate-patchPR: #1594
Final Summary
|
PR #1594 — checker-log-analyzerPR: #1594
Detailed report: Full report
|
🔨 Build Failure Analysis — PR #1594PR: #1594
Verdict0 of 1 errors are introduced by this PR; 1 is pre-existing. The build failed during the merge/integration phase before compilation started. The PR changes are isolated to PCI ASPM code and do not cause this merge conflict. 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #1594PR: #1594
Verdict1 of 2 errors is introduced by this PR; the merge conflict is pre-existing and unrelated to PR changes. The build never reached compilation, so the undefined variable error was not caught by the CI run. 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #1594PR: #1594
Verdict0 of 1 errors are introduced by this PR; 1 is a pre-existing integration conflict. The PR modifies only 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #1594PR: #1594
VerdictThe build failure is not caused by this PR. The failure occurred during the automerge/integration step when merging the topic branch 📎 Detailed analysis: Full report |
PR #1594 — validate-patchPR: #1594
Final Summary
Required action: Add the lore.kernel.org link to the commit message in the format: If this patch has not yet been posted to the upstream mailing list, the prefix should be changed from
|
PR #1594 — checker-log-analyzerPR: #1594
Detailed report: Full report
|
Some platforms require selectively disabling specific ASPM states on a
given PCIe link to avoid link instability or functional failures caused
by board-level connectivity constraints such as PCB routing, connectors,
slots, or external cabling.
Devicetree supports disabling ASPM L0s, L1, and L1 PM Substates via the
'aspm-no-l0s', 'aspm-no-l1' [1], and 'aspm-no-l1ss' [2] properties.
However, the ASPM driver does not currently honor these properties when
initializing the default link state.
When firmware enables L1 PM Substates before the kernel takes over,
masking aspm_support alone is insufficient to disable them in hardware.
pcie_config_aspm_link() guards L1SS configuration behind a check on
aspm_capable, which is derived from aspm_support. Once aspm_support is
masked, pcie_config_aspm_l1ss() is never called, leaving
firmware-enabled L1SS substates active in hardware.
Fix this by introducing pcie_link_has_aspm_override() to check for DT
override properties on either endpoint of the link. In
pcie_aspm_override_default_link_state(), use it to:
- Mask aspm_support, aspm_default, and aspm_enabled for any disabled
state, so software's view of the link stays in sync with what is
actually programmed in hardware. Leaving aspm_enabled stale would
make pcie_aspm_enabled() and the aspm sysfs attributes report a
state as active even after it has been masked, and could cause
pcie_config_aspm_link()'s "already in requested state" check to
skip reprogramming hardware to match.
- Explicitly call pcie_config_aspm_l1ss(link, 0) before masking
aspm_support when firmware has L1SS active and DT requests disabling
L1 or L1SS, since pcie_config_aspm_link() will no longer do so once
aspm_capable is derived from the masked aspm_support.
Move the aspm_default initialization and
pcie_aspm_override_default_link_state() call in pcie_aspm_cap_init() to
before the "Restore L0s/L1" block. pcie_aspm_cap_init() disables L1 in
hardware prior to aspm_l1ss_init() and re-enables it only in the
restore block. Calling pcie_config_aspm_l1ss() while L1 is already
disabled satisfies its precondition ("Caller must disable L1 first"),
whereas the previous placement after the restore violated it.
Since the restore block writes back the parent_lnkctl/child_lnkctl
snapshot taken from hardware before the DT override ran, mask the L0s
and L1 enable bits out of that snapshot for any state the override has
just disabled in aspm_support. Otherwise the restore step would
unconditionally reprogram the link back to firmware's original L0s/L1
configuration, defeating the Devicetree override it is meant to
enforce.
Move pcie_config_aspm_l1ss() earlier in the file so it can be called
from pcie_aspm_override_default_link_state().
Link [1]: devicetree-org/dt-schema#188
Link [2]: devicetree-org/dt-schema#190
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Signed-off-by: Ayyappakumar Kagita <ayyappakumar.kagita@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260721-aspm-v5-1-58860c48d0c7@oss.qualcomm.com/
🔨 Build Failure Analysis — PR #1594PR: #1594
Verdict0 of 1 errors are introduced by this PR; 1 is pre-existing. The build failed during the integration/automerge phase before compilation began. The merge conflict is in a devicetree file that the PR does not modify. 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #1594PR: #1594
VerdictThis is NOT a build failure caused by the PR. The failure occurred during the integration merge step when combining the topic branch with the baseline. The PR only modifies 📎 Detailed analysis: Full report |
PR #1594 — validate-patchPR: #1594
Final Summary
|
PR #1594 — checker-log-analyzerPR: #1594
Detailed report: Full report
|
Some platforms require selectively disabling specific ASPM states on a given PCIe link to avoid link instability or functional failures caused by board-level connectivity constraints such as PCB routing, connectors, slots, or external cabling.
Devicetree supports disabling ASPM L0s, L1, and L1 PM Substates via the 'aspm-no-l0s', 'aspm-no-l1' [1], and 'aspm-no-l1ss' [2] properties. However, the ASPM driver does not currently honor these properties when initializing the default link state.
When firmware enables L1 PM Substates before the kernel takes over, masking aspm_support alone is insufficient to disable them in hardware. pcie_config_aspm_link() guards L1SS configuration behind a check on aspm_capable, which is derived from aspm_support. Once aspm_support is masked, pcie_config_aspm_l1ss() is never called, leaving firmware-enabled L1SS substates active in hardware.
Fix this by introducing pcie_link_has_aspm_override() to check for DT override properties on either endpoint of the link. In pcie_aspm_override_default_link_state(), use it to:
Move the aspm_default initialization and
pcie_aspm_override_default_link_state() call in pcie_aspm_cap_init() to before the "Restore L0s/L1" block. pcie_aspm_cap_init() disables L1 in hardware prior to aspm_l1ss_init() and re-enables it only in the restore block. Calling pcie_config_aspm_l1ss() while L1 is already disabled satisfies its precondition ("Caller must disable L1 first"), whereas the previous placement after the restore violated it.
Since the restore block writes back the parent_lnkctl/child_lnkctl snapshot taken from hardware before the DT override ran, mask the L0s and L1 enable bits out of that snapshot for any state the override has just disabled in aspm_support. Otherwise the restore step would unconditionally reprogram the link back to firmware's original L0s/L1 configuration, defeating the Devicetree override it is meant to enforce.
Move pcie_config_aspm_l1ss() earlier in the file so it can be called from pcie_aspm_override_default_link_state().
Link [1]: devicetree-org/dt-schema#188
Link [2]: devicetree-org/dt-schema#190
CRs-Fixed: 4490067