diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2023-11-28 09:15:12 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-12-11 19:09:23 +0100 |
commit | 7ff2b7a1821b61c324626ad57c3664398fb0083d (patch) | |
tree | cd363579757503cb395699fe776c82362aa2bb82 /drivers/pci/pcie/aspm.c | |
parent | PCI/ASPM: Clean up __pci_disable_link_state() 'sem' parameter (diff) | |
download | linux-7ff2b7a1821b61c324626ad57c3664398fb0083d.tar.xz linux-7ff2b7a1821b61c324626ad57c3664398fb0083d.zip |
PCI/ASPM: Add pci_disable_link_state_locked() lockdep assert
Add a lockdep assert to pci_disable_link_state_locked() which should only
be called with a pci_bus_sem read lock held.
Link: https://lore.kernel.org/r/20231128081512.19387-7-johan+linaro@kernel.org
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
[bhelgaas: include function name in subject, commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/pci/pcie/aspm.c')
-rw-r--r-- | drivers/pci/pcie/aspm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index d7a3ca555cc1..5dab531c8654 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -1090,6 +1090,8 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool locked int pci_disable_link_state_locked(struct pci_dev *pdev, int state) { + lockdep_assert_held_read(&pci_bus_sem); + return __pci_disable_link_state(pdev, state, true); } EXPORT_SYMBOL(pci_disable_link_state_locked); |