linux_dsm_epyc7002/drivers/pci
Lukas Wunner a0d2a959d3 PCI: Avoid unnecessary resume after direct-complete
Commit 58a1fbbb2e ("PM / PCI / ACPI: Kick devices that might have been
reset by firmware") added a runtime resume for devices that were runtime
suspended when the system entered sleep.

The motivation was that devices might be in a reset-power-on state after
waking from system sleep, so their power state as perceived by Linux
(stored in pci_dev->current_state) would no longer reflect reality.  By
resuming such devices, we allow them to return to a low-power state via
autosuspend and also bring their current_state in sync with reality.

However for devices that are *not* in a reset-power-on state, doing an
unconditional resume wastes energy.  A more refined approach is called for
which issues a runtime resume only if the power state after direct-complete
is shallower than it was before. To achieve this, update the device's
current_state and compare it to its pre-sleep value.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-09-28 11:49:21 -05:00
..
host Merge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-dra7xx', 'pci/host-hv', 'pci/host-vmd' and 'pci/host-xilinx' into next 2016-08-01 12:32:13 -05:00
hotplug ACPI / hotplug / PCI: Runtime resume bridges before bus rescans 2016-08-04 21:33:58 -04:00
pcie Merge branches 'pci/aspm', 'pci/dpc', 'pci/hotplug', 'pci/misc', 'pci/msi', 'pci/pm' and 'pci/virtualization' into next 2016-08-01 12:23:31 -05:00
access.c PCI: Add pci_set_vpd_size() to set VPD size 2016-04-15 13:00:11 -05:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c Merge branches 'pci/demodularize-hosts' and 'pci/host-request-windows' into next 2016-08-01 12:23:57 -05:00
ecam.c tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c PCI: Remove unnecessary __ref annotations 2014-04-29 17:36:44 -06:00
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
irq.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Kconfig PCI/MSI: irqchip: Fix PCI_MSI dependencies 2016-06-15 15:47:33 -05:00
Makefile x86/platform/intel-mid: Add Power Management Unit driver 2016-06-15 10:10:49 +02:00
msi.c PCI: Spread interrupt vectors in pci_alloc_irq_vectors() 2016-07-21 15:57:03 -05:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c PCI: Query platform firmware for device power state 2016-09-28 11:46:51 -05:00
pci-driver.c PCI: Avoid unnecessary resume after direct-complete 2016-09-28 11:49:21 -05:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-mid.c x86/platform/intel-mid: Add Power Management Unit driver 2016-06-15 10:10:49 +02:00
pci-stub.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-sysfs.c PCI: Put PCIe ports into D3 during suspend 2016-06-13 14:57:36 -05:00
pci.c PCI: Recognize D3cold in pci_update_current_state() 2016-09-28 11:47:38 -05:00
pci.h PCI: Query platform firmware for device power state 2016-09-28 11:46:51 -05:00
probe.c Merge branches 'pci/aspm', 'pci/dpc', 'pci/hotplug', 'pci/misc', 'pci/msi', 'pci/pm' and 'pci/virtualization' into next 2016-08-01 12:23:31 -05:00
proc.c PCI: Ignore write combining when mapping I/O port space 2016-06-17 14:43:33 -05:00
quirks.c PCI: Add ACS quirk for Solarflare SFC9220 2016-07-29 17:28:24 -05:00
remove.c PCI: Put PCIe ports into D3 during suspend 2016-06-13 14:57:36 -05:00
rom.c PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY 2016-03-12 06:00:29 -06:00
search.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
setup-bus.c PCI changes for the v4.8 merge window: 2016-08-02 17:12:29 -04:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Don't assign or reassign immutable resources 2016-03-08 12:14:31 -06:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
vc.c PCI: Fix unaligned accesses in VC code 2016-06-20 13:24:20 -05:00
vpd.c
xen-pcifront.c treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00