linux/drivers/pci/pcie
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
..
aer PCI/portdrv: Merge pcieport_if.h into portdrv.h 2018-03-09 11:42:01 -06:00
aspm.c Merge branch 'pci/misc' into next 2018-01-31 10:10:32 -06:00
Kconfig Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00
Makefile PCI/portdrv: Simplify PCIe feature permission checking 2018-03-30 17:26:54 -05:00
pcie-dpc.c PCI/portdrv: Merge pcieport_if.h into portdrv.h 2018-03-09 11:42:01 -06:00
pme.c PCI/portdrv: Merge pcieport_if.h into portdrv.h 2018-03-09 11:42:01 -06:00
portdrv.h PCI/portdrv: Simplify PCIe feature permission checking 2018-03-30 17:26:54 -05:00
portdrv_acpi.c PCI/portdrv: Remove unused PCIE_PORT_SERVICE_VC 2018-03-30 17:26:54 -05:00
portdrv_core.c PCI/portdrv: Simplify PCIe feature permission checking 2018-03-30 17:26:54 -05:00
portdrv_pci.c PCI/portdrv: Remove pcie_port_bus_type link order dependency 2018-03-30 17:26:53 -05:00
ptm.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00