PCI/ACPI: Run _OSC only once for OSPM feature support
Previously, we ran _OSC once to tell the platform that we support PCI Segment Groups, then we ran it again if we supported any additional features (ASPM, MSI, or extended config space). I don't think it's necessary to run it twice, since we can easily build the complete mask of features we support before running _OSC the first time. We run _OSC again later when requesting control of PCIe features; that's unaffected by this change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>hifive-unleashed-5.1
parent
b8eb67fcc4
commit
1b2a7be60e
|
@ -373,23 +373,18 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
|
||||||
* PCI domains, so we indicate this in _OSC support capabilities.
|
* PCI domains, so we indicate this in _OSC support capabilities.
|
||||||
*/
|
*/
|
||||||
support = base_support = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
|
support = base_support = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
|
||||||
acpi_pci_osc_support(root, support);
|
|
||||||
|
|
||||||
if (pci_ext_cfg_avail())
|
if (pci_ext_cfg_avail())
|
||||||
support |= OSC_PCI_EXT_CONFIG_SUPPORT;
|
support |= OSC_PCI_EXT_CONFIG_SUPPORT;
|
||||||
if (pcie_aspm_support_enabled()) {
|
if (pcie_aspm_support_enabled())
|
||||||
support |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT;
|
support |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT;
|
||||||
}
|
|
||||||
if (pci_msi_enabled())
|
if (pci_msi_enabled())
|
||||||
support |= OSC_PCI_MSI_SUPPORT;
|
support |= OSC_PCI_MSI_SUPPORT;
|
||||||
if (support != base_support) {
|
status = acpi_pci_osc_support(root, support);
|
||||||
status = acpi_pci_osc_support(root, support);
|
if (ACPI_FAILURE(status)) {
|
||||||
if (ACPI_FAILURE(status)) {
|
dev_info(&device->dev, "ACPI _OSC support "
|
||||||
dev_info(&device->dev, "ACPI _OSC support "
|
"notification failed, disabling PCIe ASPM\n");
|
||||||
"notification failed, disabling PCIe ASPM\n");
|
*no_aspm = 1;
|
||||||
*no_aspm = 1;
|
support = base_support;
|
||||||
support = base_support;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pcie_ports_disabled
|
if (!pcie_ports_disabled
|
||||||
|
|
Loading…
Reference in New Issue