Skip to content

[PW_SID:1092037] PCI: dwc: Cache PCIe capability offset and simplify drivers#1898

Closed
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw1092037
Closed

[PW_SID:1092037] PCI: dwc: Cache PCIe capability offset and simplify drivers#1898
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw1092037

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1092037 applied to workflow__riscv__fixes

Name: PCI: dwc: Cache PCIe capability offset and simplify drivers
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1092037
Version: 1

Linux RISC-V bot and others added 4 commits May 2, 2026 08:13
Add a pcie_cap field to struct dw_pcie to store the offset of the
PCI Express Capability structure. Provide a helper dw_pcie_get_pcie_cap()
which performs the capability search on first call and caches the result.

This is a preparatory step for replacing repetitive capability searches
in both core and platform drivers.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Modify the DWC core functions to use the cached pcie_cap offset instead
of calling dw_pcie_find_capability() each time.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Replace explicit dw_pcie_find_capability(pci, PCI_CAP_ID_EXP) calls
with the cached pci->pcie_cap in all DWC-based platform drivers:

- i.MX6, Layerscape EP, Meson
- Rockchip (also remove redundant NULL check and fix typo)
- Eswin, Fu740
- Intel Gateway, Qualcomm EP, Qualcomm RC
- Sophgo, Spacemit-k1, Spear13xx
- Tegra194 (remove private pcie_cap_base)

For drivers that need the offset before the core caches it (e.g.,
ls_pcie_ep_probe), use dw_pcie_get_pcie_cap() to ensure caching.

Adjust variable types from u16 to u8 where appropriate.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1128.37 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1682.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.37 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 88.46 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/3] PCI: dwc: Add pcie_cap field and helper in designware header"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 2.43 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.49 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1135.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1684.37 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 86.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
kdoc
Desc: Detects for kdoc errors
Duration: 2.05 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
module-param
Desc: Detect module_param changes
Duration: 0.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/3] PCI: dwc: Use cached PCIe capability offset in core"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 140.35 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1131.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1689.06 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.10 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 87.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
module-param
Desc: Detect module_param changes
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[3/3] PCI: dwc: Simplify platform drivers using cached capability offset"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from 2d4fcdd to cd9d421 Compare May 14, 2026 08:49
@linux-riscv-bot linux-riscv-bot deleted the pw1092037 branch May 17, 2026 02:15
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.

1 participant