PCI/ASPM: Move pci_save_ltr_state() to aspm.c
authorDavid E. Box <david.e.box@linux.intel.com>
Fri, 23 Feb 2024 20:58:49 +0000 (14:58 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 7 Mar 2024 20:29:21 +0000 (14:29 -0600)
commit1e11b5494c3dbb1e5fce7e95021c1698799c7288
tree66d8930a3bd724679d37005243c6dbf578682866
parentf3994bba8200b49e3eacbe5914cd13f228e0db37
PCI/ASPM: Move pci_save_ltr_state() to aspm.c

Even when CONFIG_PCIEASPM is not set, we save and restore the LTR
Capability so that if ASPM L1.2 and LTR were configured by the platform,
ASPM L1.2 will still work after suspend/resume, when that platform
configuration may be lost. See dbbfadf23190 ("PCI/ASPM: Save LTR Capability
for suspend/resume").

Since ASPM L1.2 depends on the LTR Capability, move the save/restore code
to the part of aspm.c that is always compiled regardless of
CONFIG_PCIEASPM.  No functional change intended.

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20240128233212.1139663-5-david.e.box@linux.intel.com
[bhelgaas: commit log, reorder to make this a pure move]
Link: https://lore.kernel.org/r/20240223205851.114931-4-helgaas@kernel.org
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/pcie/aspm.c