linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM
@ 2023-11-28  8:15 Johan Hovold
  2023-11-28  8:15 ` [PATCH v2 1/6] PCI/ASPM: Add locked helper for enabling link state Johan Hovold
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Johan Hovold @ 2023-11-28  8:15 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Krzysztof Wilczyński, Bjorn Helgaas
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Manivannan Sadhasivam,
	Rob Herring, Nirmal Patel, Jonathan Derrick, linux-arm-msm,
	linux-pci, linux-kernel, Johan Hovold

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 <lkp@intel.com>


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(-)

-- 
2.41.0


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

end of thread, other threads:[~2023-12-14 17:28 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28  8:15 [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM Johan Hovold
2023-11-28  8:15 ` [PATCH v2 1/6] PCI/ASPM: Add locked helper for enabling link state Johan Hovold
2023-12-07 20:47   ` Bjorn Helgaas
2023-12-08  8:00     ` Johan Hovold
2023-12-08 17:39       ` Bjorn Helgaas
2023-12-12  9:25         ` Ilpo Järvinen
2023-12-12  3:48     ` Kai-Heng Feng
2023-12-12 21:27       ` Bjorn Helgaas
2023-12-13 19:48         ` David E. Box
2023-12-13 20:45           ` Bjorn Helgaas
2023-12-13 23:39             ` David E. Box
2023-12-14 17:28               ` Bjorn Helgaas
2023-11-28  8:15 ` [PATCH v2 2/6] PCI: vmd: Fix deadlock when enabling ASPM Johan Hovold
2023-11-28  8:15 ` [PATCH v2 3/6] PCI: qcom: " Johan Hovold
2023-11-28  8:15 ` [PATCH v2 4/6] PCI: qcom: Clean up ASPM comment Johan Hovold
2023-11-28  8:15 ` [PATCH v2 5/6] PCI/ASPM: Clean up disable link state parameter Johan Hovold
2023-11-28  8:15 ` [PATCH v2 6/6] PCI/ASPM: Add lockdep assert to link state helper Johan Hovold
2023-12-07 13:25 ` [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM Johan Hovold
2023-12-10 12:35   ` Linux regression tracking #update (Thorsten Leemhuis)
2023-12-08 17:53 ` Bjorn Helgaas
2023-12-11 17:35   ` Johan Hovold
2023-12-11 18:11     ` Bjorn Helgaas
2023-12-11 20:13       ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).