public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] PCI: Refactor PCIe speed validation and conversion functions
@ 2026-04-06 10:47 Hans Zhang
  2026-04-06 10:47 ` [PATCH v5 1/3] PCI: Add public pcie_valid_speed() for shared validation Hans Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Hans Zhang @ 2026-04-06 10:47 UTC (permalink / raw)
  To: bhelgaas, lpieralisi, kw, kwilczynski, mani, ilpo.jarvinen,
	jingoohan1
  Cc: robh, linux-pci, linux-kernel, Hans Zhang

This series refactors PCIe speed validation and conversion logic to
shared functions in the public header, eliminating code duplication
and ensuring consistency across drivers.

---
Changes for v5:
- Rebase to v7.0-rc1. (pci/next tree)

Changes for v4:
https://patchwork.kernel.org/project/linux-pci/patch/20251102143206.111347-1-18255117159@163.com/

- Maintain O(1) array-based lookup for speed conversion (addressing
  performance concerns from v3 feedback)
- Move pcie_valid_speed() and pci_bus_speed2lnkctl2() to pci.h
- Update dwc driver to use the shared functions
- Rebase to v6.18-rc3.

This addresses the feedback from Lukas Wunner and Manivannan Sadhasivam
on the v3 submission, ensuring no runtime performance regression while
achieving code reuse.

Changes for v3:
https://patchwork.kernel.org/project/linux-pci/patch/20250816154633.338653-1-18255117159@163.com/

- Rebase to v6.17-rc1.
- Gentle ping.

Changes for v2:
- s/PCIE_SPEED2LNKCTL2_TLS_ENC/PCIE_SPEED2LNKCTL2_TLS
- The patch commit message were modified.
---

Hans Zhang (3):
  PCI: Add public pcie_valid_speed() for shared validation
  PCI: Move pci_bus_speed2lnkctl2() to public header
  PCI: dwc: Use common speed conversion function

 drivers/pci/controller/dwc/pcie-designware.c | 17 ++-------------
 drivers/pci/pci.h                            | 22 ++++++++++++++++++++
 drivers/pci/pcie/bwctrl.c                    | 22 --------------------
 3 files changed, 24 insertions(+), 37 deletions(-)


base-commit: 525e91d84dc085492b36d4b87abb7c1cc93fcb44
-- 
2.34.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-04-07 13:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 10:47 [PATCH v5 0/3] PCI: Refactor PCIe speed validation and conversion functions Hans Zhang
2026-04-06 10:47 ` [PATCH v5 1/3] PCI: Add public pcie_valid_speed() for shared validation Hans Zhang
2026-04-06 10:47 ` [PATCH v5 2/3] PCI: Move pci_bus_speed2lnkctl2() to public header Hans Zhang
2026-04-07  8:11   ` Ilpo Järvinen
2026-04-07 12:09     ` Hans Zhang
2026-04-07 12:26       ` Ilpo Järvinen
2026-04-07 12:29         ` Hans Zhang
2026-04-07 12:48           ` Hans Zhang
2026-04-07 12:53             ` Ilpo Järvinen
2026-04-07 13:01               ` Hans Zhang
2026-04-06 10:47 ` [PATCH v5 3/3] PCI: dwc: Use common speed conversion function Hans Zhang
2026-04-06 10:54   ` Hans Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox