Commit eaddd715 authored by David E. Box's avatar David E. Box Committed by Sushrut Shree Trivedi
Browse files

BACKPORT: 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 dbbfadf2 ("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: default avatarBjorn 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: default avatarDavid E. Box <david.e.box@linux.intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>

BUG: 371115070
Change-Id: If61407263095c0bff496c71dc1f559012965de9f
(cherry picked from commit 1e11b549)
[sushrut: In contrast to upstream, we are enabling save/restore
only when CONFIG_PCIEASPM is enabled to avoid making changes in
pci_dev struct. Added required inline prototypes for save_ltr()
and restore_ltr() APIs when CONFIG_PCIEASPM is disabled.]
Signed-off-by: default avatarSushrut Shree Trivedi <quic_sushruts@quicinc.com>
parent 41ff0c19
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment