linux-stable/drivers/pci
Bjorn Helgaas 02bfeb4842 PCI/portdrv: Simplify PCIe feature permission checking
Some PCIe features (AER, DPC, hotplug, PME) can be managed by either the
platform firmware or the OS, so the host bridge driver may have to request
permission from the platform before using them.  On ACPI systems, this is
done by negotiate_os_control() in acpi_pci_root_add().

The PCIe port driver later uses pcie_port_platform_notify() and
pcie_port_acpi_setup() to figure out whether it can use these features.
But all we need is a single bit for each service, so these interfaces are
needlessly complicated.

Simplify this by adding bits in the struct pci_host_bridge to show when the
OS has permission to use each feature:

  + unsigned int native_aer:1;       /* OS may use PCIe AER */
  + unsigned int native_hotplug:1;   /* OS may use PCIe hotplug */
  + unsigned int native_pme:1;       /* OS may use PCIe PME */

These are set when we create a host bridge, and the host bridge driver can
clear the bits corresponding to any feature the platform doesn't want us to
use.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-03-30 17:26:54 -05:00
..
cadence PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller 2018-01-31 11:13:27 +00:00
dwc Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
endpoint Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
host pci-v4.16-changes 2018-02-06 09:59:40 -08:00
hotplug PCI/portdrv: Merge pcieport_if.h into portdrv.h 2018-03-09 11:42:01 -06:00
pcie PCI/portdrv: Simplify PCIe feature permission checking 2018-03-30 17:26:54 -05:00
switch vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
access.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
ats.c PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
bus.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
ecam.c PCI: Add SPDX GPL-2.0 to replace GPL v2 boilerplate 2018-01-28 15:48:29 -06:00
host-bridge.c PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
iov.c pci-v4.16-changes 2018-02-06 09:59:40 -08:00
irq.c PCI: Add wrappers for dev_printk() 2018-01-18 12:55:24 -06:00
Kconfig Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
Makefile PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller 2018-01-31 11:13:27 +00:00
mmap.c PCI: Add SPDX GPL-2.0 to replace GPL v2 boilerplate 2018-01-28 15:48:29 -06:00
msi.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
of.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
pci-acpi.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
pci-driver.c PCI/portdrv: Remove pcie_port_bus_type link order dependency 2018-03-30 17:26:53 -05:00
pci-label.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-mid.c PCI: Add SPDX GPL-2.0 to replace GPL v2 boilerplate 2018-01-28 15:48:29 -06:00
pci-stub.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
pci-sysfs.c Merge branch 'pci/virtualization' into next 2018-01-31 10:13:09 -06:00
pci.c PCI/PM: Move pcie_clear_root_pme_status() to core 2018-03-12 09:15:39 -05:00
pci.h PCI/PM: Move pcie_clear_root_pme_status() to core 2018-03-12 09:15:39 -05:00
probe.c PCI/portdrv: Simplify PCIe feature permission checking 2018-03-30 17:26:54 -05:00
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quirks.c Merge branch 'pci/virtualization' into next 2018-01-31 10:13:09 -06:00
remove.c PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
rom.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
search.c PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
setup-bus.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
setup-irq.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
setup-res.c PCI: Add wrappers for dev_printk() 2018-01-18 12:55:24 -06:00
slot.c PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
syscall.c PCI: Deprecate pci_get_bus_and_slot() 2018-01-17 08:16:46 -06:00
vc.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
vpd.c PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
xen-pcifront.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00