archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/ACPI: Always advertise ASPM support if CONFIG_PCIEASPM=y
@ 2022-04-25  7:06 Yicong Yang
  2022-05-03 22:38 ` Bjorn Helgaas
  0 siblings, 1 reply; 7+ messages in thread
From: Yicong Yang @ 2022-04-25  7:06 UTC (permalink / raw)
  To: bhelgaas, rafael, linux-pci, linux-acpi
  Cc: lenb, linux-kernel, yangyicong, linuxarm

When we have CONFIG_PCIEASPM enabled it means OS can always support ASPM no
matter user have disabled it through pcie_aspm=off or not. But currently we
won't advertise ASPM support in _OSC negotiation if user disables it, which
doesn't match the fact. This will also have side effects that other PCIe
services like AER and hotplug will be disabled as ASPM support is required
and we won't negotiate other services if ASPM support is absent.

So this patch makes OS always advertising ASPM support if CONFIG_PCIEASPM=y.
It intends no functional change to pcie_aspm=off as it will still mark
aspm_disabled=1 and aspm_support_enabled=false, driver will check these
status before configuring ASPM.

Tested this patch with pcie_aspm=off:
estuary:/$ dmesg | egrep -i "aspm|osc"
[    0.000000] PCIe ASPM is disabled
[    8.706961] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM
ClockPM Segments MSI EDR HPX-Type3]
[    8.726032] acpi PNP0A08:00: _OSC: platform does not support [LTR]
[    8.742818] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME
AER PCIeCapability DPC]
estuary:/sys/module/pcie_aspm/parameters$ cat policy
[default] performance powersave powersupersave
estuary:/sys/module/pcie_aspm/parameters$ echo powersave > policy
bash: echo: write error: Operation not permitted

Cc: Rafael J. Wysocki <>
Suggested-by: Bjorn Helgaas <>
Signed-off-by: Yicong Yang <>
 drivers/acpi/pci_root.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 6f9e75d14808..17e78582e633 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -393,7 +393,7 @@ static u32 calculate_support(void)
 	support |= OSC_PCI_HPX_TYPE_3_SUPPORT;
 	if (pci_ext_cfg_avail())
-	if (pcie_aspm_support_enabled())
 	if (pci_msi_enabled())
 		support |= OSC_PCI_MSI_SUPPORT;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-27 12:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25  7:06 [PATCH] PCI/ACPI: Always advertise ASPM support if CONFIG_PCIEASPM=y Yicong Yang
2022-05-03 22:38 ` Bjorn Helgaas
2022-05-05 12:36   ` Yicong Yang
2022-05-05 18:41     ` Bjorn Helgaas
2022-05-09 12:20       ` Yicong Yang
2022-06-25 19:01         ` Bjorn Helgaas
2022-06-27 12:35           ` Yicong Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).