kernel_optimize_test/drivers/pci/hotplug
Bjorn Helgaas 40b960831c PCI: pciehp: Compute timeout from hotplug command start time
If we issue a hotplug command, go do something else, then come back and
wait for the command to complete, we don't have to wait the whole timeout
period, because some of it elapsed while we were doing something else.

Keep track of the time we issued the command, and wait only until the
timeout period from that point has elapsed.

For controllers with errata like Intel CF118, we previously timed out
before issuing the second hotplug command:

  At time T1 (during boot):
    - Write DLLSCE, ABPE, PDCE, etc. to Slot Control
  At time T2 (hotplug event):
    - Wait for command completion (CC) in Slot Status
    - Timeout at T2 + 1 second because CC is never set in Slot Status
    - Write PCC, PIC, etc. to Slot Control

With this change, we wait until T1 + 1 second instead of T2 + 1 second.
If the hotplug event is more than 1 second after the boot-time
initialization, we won't wait for the timeout at all.

We still emit a "Timeout on hotplug command" message if it timed out; we
should see this on the first hotplug event on every controller with this
erratum, as well as on real errors on controllers without the erratum.

Link: http://www.intel.com/content/www/us/en/processors/xeon/xeon-e7-v2-spec-update.html
Tested-by: Rajat Jain <rajatxjain@gmail.com>	(IDT 807a controller)
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
2014-06-17 15:26:11 -06:00
..
acpi_pcihp.c
acpiphp_core.c
acpiphp_glue.c PCI changes for the v3.16 merge window (part 2): 2014-06-12 13:20:24 -07:00
acpiphp_ibm.c
acpiphp.h ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges 2014-06-11 21:08:49 +02:00
cpci_hotplug_core.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpci_hotplug_pci.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpci_hotplug.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpcihp_generic.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpcihp_zt5550.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpcihp_zt5550.h
cpqphp_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
cpqphp_ctrl.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp_nvram.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp_nvram.h
cpqphp_pci.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp_sysfs.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
cpqphp.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
ibmphp_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
ibmphp_ebda.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
ibmphp_hpc.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
ibmphp_pci.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
ibmphp_res.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
ibmphp.h
Kconfig
Makefile
pci_hotplug_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp_acpi.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pciehp_core.c PCI: Prevent NULL dereference during pciehp probe 2014-06-16 11:47:37 -06:00
pciehp_ctrl.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp_hpc.c PCI: pciehp: Compute timeout from hotplug command start time 2014-06-17 15:26:11 -06:00
pciehp_pci.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
pciehp.h PCI: pciehp: Compute timeout from hotplug command start time 2014-06-17 15:26:11 -06:00
pcihp_skeleton.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pcihp_slot.c
rpadlpar_core.c
rpadlpar_sysfs.c
rpadlpar.h
rpaphp_core.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
rpaphp_pci.c
rpaphp_slot.c
rpaphp.h
s390_pci_hpc.c
sgi_hotplug.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_core.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_ctrl.c PCI changes for the v3.16 merge window (part 2): 2014-06-12 13:20:24 -07:00
shpchp_hpc.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_pci.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00
shpchp_sysfs.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
shpchp.h PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00