PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume
authorDavid E. Box <david.e.box@linux.intel.com>
Mon, 7 Dec 2020 22:39:50 +0000 (14:39 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Dec 2020 20:43:54 +0000 (14:43 -0600)
commit39850ed51062f89cd46214a16aaafba5ca49fd6c
treeb8cb10061b1aecb2eb14001219f1bf8277565354
parentf8394f232b1eab649ce2df5c5f15b0e528c92091
PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume

The PCI subsystem does not currently save and restore the configuration
space for the Precision Time Measurement (PTM) Extended Capability leading
to the possibility of the feature returning disabled on S3 resume.  This
has been observed on Intel Coffee Lake desktops. Add save/restore of the
PTM control register. This saves the PTM Enable, Root Select, and Effective
Granularity bits.

Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20201207223951.19667-1-david.e.box@linux.intel.com
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/ptm.c