Skip to content

PCI: Fix deadlocks when enabling ASPM

Johan Hovold linux-arm-msm linux-pci lkml regressions stable 2 versions – Applied

Status from this message: Applied to for-linus for v6.7, thanks, Johan!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 16 repliesApplied
  2. v16 patches 17 repliesSuperseded

Changes in v2 from the cover letter

- fix up the function name in a kernel doc comment as reported by the kernel test robot <[email protected]>

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6PCI/ASPM: Add locked helper for enabling link statedrivers/pci/pcie/aspm.c include/linux/pci.h+43 -1310 replies
2/6PCI: vmd: Fix deadlock when enabling ASPMdrivers/pci/controller/vmd.c+1 -10 replies
3/6PCI: qcom: Fix deadlock when enabling ASPMdrivers/pci/controller/dwc/pcie-qcom.c+1 -10 replies
4/6PCI: qcom: Clean up ASPM commentdrivers/pci/controller/dwc/pcie-qcom.c+4 -10 replies
5/6PCI/ASPM: Clean up disable link state parameterdrivers/pci/pcie/aspm.c+5 -50 replies
6/6PCI/ASPM: Add lockdep assert to link state helperdrivers/pci/pcie/aspm.c+2 -00 replies

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchManivannan Sadhasivam
1/6R-b
2/6R-b
3/6R-b
4/6
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM

The pci_enable_link_state() helper is currently only called from pci_walk_bus(), something which can lead to a deadlock as both helpers take a pci_bus_sem read lock.

Add a new locked helper which can be called with the read lock held and fix up the two current users (the second is new in 6.7-rc1).

Note that there are no users left of the original unlocked variant after this series, but I decided to leave it in place for now (e.g. to mirror the corresponding helpers to disable link states).

Included are also a couple of related cleanups.

Johan

Changes in v2
- fix up the function name in a kernel doc comment as reported by the kernel test robot <[email protected]>

Johan Hovold (6):
PCI/ASPM: Add locked helper for enabling link state
PCI: vmd: Fix deadlock when enabling ASPM
PCI: qcom: Fix deadlock when enabling ASPM
PCI: qcom: Clean up ASPM comment
PCI/ASPM: Clean up disable link state parameter PCI/ASPM: Add lockdep assert to link state helper

 drivers/pci/controller/dwc/pcie-qcom.c |  7 ++-
 drivers/pci/controller/vmd.c           |  2 +-
 drivers/pci/pcie/aspm.c                | 65 +++++++++++++++++++-------
 include/linux/pci.h                    |  3 ++
 4 files changed, 56 insertions(+), 21 deletions(-)
Signature · 1 line
2.41.0