[RFC PATCH v2 3/4] pcie/aspm: Enable all hardware power-saving states by default
From: Thomas Falcon
Date: Mon May 11 2026 - 17:13:40 EST
For systems with a BIOS release date starting in 2025, default
ASPM policy to powersupersave if supported in the ACPI FADT.
Provide a flag, aspm_user_policy, tracking whether a user has
requested a specific power state to give those precedence.
Do not enable all states if user has chosen a specific policy
or disabled ASPM using the pcie_aspm module parameter.
Suggested-by: David E. Box <david.e.box@xxxxxxxxxxxxxxx>
Signed-off-by: Thomas Falcon <thomas.falcon@xxxxxxxxx>
---
v2: -- Removed extra whitespace
-- Fixed unbalanced brackets
-- Replaced second dmi_bios_year_check() with pcie_aspm_legacy_config_check()
---
drivers/pci/pci-acpi.c | 3 +++
drivers/pci/pcie/aspm.c | 16 ++++++++++++++++
include/linux/pci.h | 1 +
3 files changed, 20 insertions(+)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 4d0f2cb6c695..c73a6b06fc43 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -1523,6 +1523,9 @@ static int __init acpi_pci_init(void)
if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
pcie_no_aspm();
+ } else {
+ /* If ASPM is supported, configure the default policy here. */
+ pcie_aspm_policy_config_init();
}
if (acpi_pci_disabled)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index e93b72494534..063ebe81a9cd 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -267,6 +267,8 @@ static int aspm_policy = POLICY_POWER_SUPERSAVE;
#else
static int aspm_policy;
#endif
+static int aspm_default_policy = POLICY_POWER_SUPERSAVE;
+static bool aspm_user_policy;
static const char *policy_str[] = {
[POLICY_DEFAULT] = "default",
@@ -1609,6 +1611,7 @@ static int pcie_aspm_set_policy(const char *val,
down_read(&pci_bus_sem);
mutex_lock(&aspm_lock);
aspm_policy = i;
+ aspm_user_policy = true;
list_for_each_entry(link, &link_list, sibling) {
pcie_config_aspm_link(link, policy_to_aspm_state(link));
pcie_set_clkpm(link, policy_to_clkpm_state(link));
@@ -1810,6 +1813,19 @@ static int __init pcie_aspm_disable(char *str)
__setup("pcie_aspm=", pcie_aspm_disable);
+void __init pcie_aspm_policy_config_init(void)
+{
+ /*
+ * Set ASPM policy here, enabling all power-saving states
+ * unless ASPM has been disabled or the user has already
+ * requested a policy or the systems BIOS release date
+ * is before the year 2025. Otherwise use BIOS defaults.
+ */
+ if (!aspm_disabled && !aspm_user_policy &&
+ !pcie_aspm_legacy_config_check())
+ aspm_policy = aspm_default_policy;
+}
+
void pcie_no_aspm(void)
{
/*
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 2c4454583c11..36fa5579709c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1915,6 +1915,7 @@ int pci_disable_link_state_locked(struct pci_dev *pdev, int state);
int pci_enable_link_state(struct pci_dev *pdev, int state);
int pci_enable_link_state_locked(struct pci_dev *pdev, int state);
void pcie_no_aspm(void);
+void pcie_aspm_policy_config_init(void);
bool pcie_aspm_support_enabled(void);
bool pcie_aspm_enabled(struct pci_dev *pdev);
#else
--
2.43.0