Skip to contentSkip to conversation

pcie/aspm: Enable all advertised ASPM states by default

RFC PATCH Superseded Thomas Falcon 2 participants 7 messages Apr 29 – Apr 30

Subsystems (5)
Documentation x86 ACPI PCI +1 more subsystems

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover pcie/aspm: Enable all advertised ASPM states by default

Hi Bjorn, Rafael, all,

This series follows up on the discussion from August 2025 about ASPM default behavior and enabling all advertised link power states by default [1].

Today, ASPM behavior is influenced first by build-time configuration (CONFIG_PCIEASPM_*), along with firmware-provided defaults. The reliance on Kconfig for policy selection and the current two-phase configuration model (initial safe setup followed by a later, more aggressive driver-triggered configuration) complicate both usage and maintenance.

The direction discussed was to move toward a model where the OS enables all supported ASPM states by default, while still respecting platform policy (FADT, _OSC), driver constraints, and user overrides.

This series is an RFC to explore that direction and gather feedback.

Specifically, it:

Enables all advertised ASPM states by default via the existing policy framework, which respects capability masks, blacklist restrictions, and user configuration.
Consolidates ASPM configuration into a single initialization step, instead of the current two-phase model (pre-driver “safe” init followed by driver-probe adjustments). This simplifies behavior and reduces maintenance complexity.
Adds detailed debug instrumentation to make ASPM configuration decisions and transitions more visible, helping to evaluate impact and identify mismatches with firmware expectations. Limits the default behavior change to newer systems using a DMI BIOS year check (>= 2025). This is intended to reduce risk on legacy platforms where firmware expectations or device behavior may not tolerate more aggressive ASPM enablement.
Removes CONFIG_PCIEASPM_* policy selections in favor of runtime policy selection, simplifying configuration and making behavior more consistent.

This RFC is not intended for immediate upstreaming, but to evaluate the feasibility and impact of this approach.

This does not address synthetic PCIe hierarchies (e.g. VMD), which may lack valid firmware policy entirely. Those cases likely require targeted handling and are left for follow-on work so that the core defaulting model can be evaluated independently.

Feedback is especially welcome on:

The DMI-based gating approach for limiting rollout risk Whether this correctly captures “enable all advertised states” The removal of Kconfig-based policy selection
The shift from a two-phase to single-phase configuration model

[1] https://lore.kernel.org/linux-pci/20250828204345.GA958461@bhelgaas/

Thomas Falcon (4):
pcie/aspm: Add debug logging for aspm policy config pcie/aspm: Enable all power-saving states during link state
initialization
pcie/aspm: Enable all hardware power-saving states by default pcie/aspm: Remove CONFIG_PCIEASPM_* policy definitions

 Documentation/arch/x86/amd-debugging.rst |  5 +-
 arch/mips/configs/bmips_stb_defconfig    |  1 -
 arch/mips/configs/loongson2k_defconfig   |  1 -
 drivers/pci/pci-acpi.c                   |  4 +-
 drivers/pci/pcie/Kconfig                 | 33 ---------
 drivers/pci/pcie/aspm.c                  | 87 +++++++++++++++++++-----
 include/linux/pci.h                      |  1 +
 7 files changed, 77 insertions(+), 55 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

RFC PATCH 1/4 pcie/aspm: Add debug logging for aspm policy config

Include additional logging for ASPM and Clock PM state changes keeping track of code flow and enabled power saving states.

Example output after enabling powersupersave policy:

[  130.179249] pcieport 0000:80:1b.0: Updating ASPM state
[  130.179256] igc 0000:81:00.0: ASPM: Disabling ASPM on this device before disabling parent
[  130.179368] pcieport 0000:80:1b.0: ASPM: Disabling ASPM before applying configuration
[  130.179373] pcieport 0000:80:1b.0: ASPM: Configure L1 substates
[  130.179391] pcieport 0000:80:1b.0: ASPM: Configure ASPM state on upstream device
[  130.179395] igc 0000:81:00.0: ASPM: Configure ASPM state on downstream device
[  130.179401] pcieport 0000:80:1b.0: ASPM: enabled states: L1 ASPM-L1.1 PCI-PM-L1.1 PCI-PM-L1.2
[  130.179416] pcieport 0000:00:06.0: Updating ASPM state
[  130.179418] nvme 0000:01:00.0: ASPM: Disabling ASPM on this device before disabling parent
[  130.179422] pcieport 0000:00:06.0: ASPM: Disabling ASPM before applying configuration
[  130.179425] pcieport 0000:00:06.0: ASPM: Configure L1 substates
[  130.179435] pcieport 0000:00:06.0: ASPM: Configure ASPM state on upstream device
[  130.179438] nvme 0000:01:00.0: ASPM: Configure ASPM state on downstream device
[  130.179442] pcieport 0000:00:06.0: ASPM: enabled states: L1 ASPM-L1.1 ASPM-L1.2 PCI-PM-L1.1 PCI-PM-L1.2
---
 drivers/pci/pcie/aspm.c | 34 ++++++++++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 4 deletions(-)
drivers/pci/pcie/aspm.c +30 -4
index 925373b98dff..cd23c1462502 100644
@@ -372,6 +372,9 @@ static void pcie_set_clkpm(struct pcie_link_state *link, int enable)
 	/* Need nothing if the specified equals to current state */
 	if (link->clkpm_enabled == enable)
 		return;
+
+	pci_dbg(link->pdev, "%s Clock PM\n",
+		enable ? "Enabling" : "Disabling");
 	pcie_set_clkpm_nocheck(link, enable);
 }
 
@@ -961,11 +964,14 @@ static void pcie_config_aspm_link(struct pcie_link_state *link, u32 state)
 	state &= (link->aspm_capable & ~link->aspm_disable);
 
 	/* Can't enable any substates if L1 is not enabled */
-	if (!(state & PCIE_LINK_STATE_L1))
+	if (!(state & PCIE_LINK_STATE_L1)) {
+		pci_dbg(parent, "ASPM: L1 not enabled, disabling L1 substates\n");
 		state &= ~PCIE_LINK_STATE_L1SS;
+	}
 
 	/* Spec says both ports must be in D0 before enabling PCI PM substates*/
 	if (parent->current_state != PCI_D0 || child->current_state != PCI_D0) {
+		pci_dbg(parent, "ASPM: Both ports are not in D0, disable PCI PM L1 substates unless explicitly enabled\n");
 		state &= ~PCIE_LINK_STATE_L1_SS_PCIPM;
 		state |= (link->aspm_enabled & PCIE_LINK_STATE_L1_SS_PCIPM);
 	}
@@ -973,6 +979,8 @@ static void pcie_config_aspm_link(struct pcie_link_state *link, u32 state)
 	/* Nothing to do if the link is already in the requested state */
 	if (link->aspm_enabled == state)
 		return;
+	pci_dbg(parent, "Updating ASPM state\n");
+
 	/* Convert ASPM state to upstream/downstream ASPM register state */
 	if (state & PCIE_LINK_STATE_L0S_UP)
 		dwstream |= PCI_EXP_LNKCTL_ASPM_L0S;
@@ -997,16 +1005,34 @@ static void pcie_config_aspm_link(struct pcie_link_state *link, u32 state)
 	 * Sec 7.5.3.7 also recommends programming the same ASPM Control
 	 * value for all functions of a multi-function device.
 	 */
-	list_for_each_entry(child, &linkbus->devices, bus_list)
+	list_for_each_entry(child, &linkbus->devices, bus_list) {
+		pci_dbg(child, "ASPM: Disabling ASPM on this device before disabling parent\n");
 		pcie_config_aspm_dev(child, 0);
+	}
+	pci_dbg(parent, "ASPM: Disabling ASPM before applying configuration\n");
 	pcie_config_aspm_dev(parent, 0);
 
-	if (link->aspm_capable & PCIE_LINK_STATE_L1SS)
+	if (link->aspm_capable & PCIE_LINK_STATE_L1SS) {
+		pci_dbg(parent, "ASPM: Configure L1 substates\n");
 		pcie_config_aspm_l1ss(link, state);
+	}
 
+	pci_dbg(parent, "ASPM: Configure ASPM state on upstream device\n");
 	pcie_config_aspm_dev(parent, upstream);
-	list_for_each_entry(child, &linkbus->devices, bus_list)
+	list_for_each_entry(child, &linkbus->devices, bus_list) {
+		pci_dbg(child, "ASPM: Configure ASPM state on downstream device\n");
 		pcie_config_aspm_dev(child, dwstream);
+	}
+
+	pci_dbg(parent, "ASPM: enabled states:%s%s%s%s%s%s%s%s\n",
+		FLAG(state, L0S_UP, " L0s-Upstream"),
+		FLAG(state, L0S_DW, " L0s-Downstream"),
+		FLAG(state, L1, " L1"),
+		FLAG(state, L1_1, " ASPM-L1.1"),
+		FLAG(state, L1_2, " ASPM-L1.2"),
+		FLAG(state, L1_1_PCIPM, " PCI-PM-L1.1"),
+		FLAG(state, L1_2_PCIPM, " PCI-PM-L1.2"),
+		FLAG(state, CLKPM, " ClockPM"));
 
 	link->aspm_enabled = state;
 
Signature · 1 line
2.43.0
#2 lore raw

RFC PATCH 2/4 pcie/aspm: Enable all power-saving states during link state initialization

In reply to Thomas Falcon

Setting powersave and powersupersave states at ASPM link state initialization allows for a simpler and more maintainable enabling flow that presumes all advertised power states work. Restrict this behavior to systems with a BIOS release during or after 2025.

---
 drivers/pci/pcie/aspm.c | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)
drivers/pci/pcie/aspm.c +24 -4
index cd23c1462502..84d49aa8a5ba 100644
@@ -24,6 +24,7 @@
 #include <linux/printk.h>
 #include <linux/slab.h>
 #include <linux/time.h>
+#include <linux/dmi.h>
 
 #include "../pci.h"
 
@@ -1057,6 +1058,23 @@ static void free_link_state(struct pcie_link_state *link)
 	kfree(link);
 }
 
+static int pcie_aspm_legacy_config_check(void)
+{
+	static bool legacy_aspm_config;
+	static bool checked;
+
+	if (checked)
+		return legacy_aspm_config;
+	if (dmi_get_bios_year() < 2025)
+		legacy_aspm_config = true;
+
+	pr_info("ASPM configuration is determined at %s time\n",
+		 legacy_aspm_config ? "build" : "boot");
+	checked = true;
+
+	return legacy_aspm_config;
+}
+
 static int pcie_aspm_sanity_check(struct pci_dev *pdev)
 {
 	struct pci_dev *child;
@@ -1196,8 +1214,9 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
 	 * the BIOS's expectation, we'll do so once pci_enable_device() is
 	 * called.
 	 */
-	if (aspm_policy != POLICY_POWERSAVE &&
-	    aspm_policy != POLICY_POWER_SUPERSAVE) {
+	if (!pcie_aspm_legacy_config_check() ||
+	    (aspm_policy != POLICY_POWERSAVE &&
+	     aspm_policy != POLICY_POWER_SUPERSAVE)) {
 		pcie_config_aspm_path(link);
 		pcie_set_clkpm(link, policy_to_clkpm_state(link));
 	}
@@ -1379,8 +1398,9 @@ void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
 	if (aspm_disabled || !link)
 		return;
 
-	if (aspm_policy != POLICY_POWERSAVE &&
-	    aspm_policy != POLICY_POWER_SUPERSAVE)
+	if (!pcie_aspm_legacy_config_check() ||
+	    (aspm_policy != POLICY_POWERSAVE &&
+	     aspm_policy != POLICY_POWER_SUPERSAVE))
 		return;
 
 	down_read(&pci_bus_sem);
Signature · 1 line
2.43.0
#3 lore raw

RFC PATCH 3/4 pcie/aspm: Enable all hardware power-saving states by default

In reply to Thomas Falcon

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.

---
 drivers/pci/pci-acpi.c  |  4 +++-
 drivers/pci/pcie/aspm.c | 17 +++++++++++++++++
 include/linux/pci.h     |  1 +
 3 files changed, 21 insertions(+), 1 deletion(-)
drivers/pci/pci-acpi.c +3 -1
index 4d0f2cb6c695..d849bc6d0c0c 100644
@@ -1523,7 +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)
 		return 0;
drivers/pci/pcie/aspm.c +17 -0
index 84d49aa8a5ba..1c81e2f2e589 100644
@@ -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,20 @@ 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 && dmi_get_bios_year() >= 2025)
+		aspm_policy = aspm_default_policy;
+}
+
 void pcie_no_aspm(void)
 {
 	/*
include/linux/pci.h +1 -0
index 2c4454583c11..36fa5579709c 100644
@@ -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
Signature · 1 line
2.43.0
#4 lore raw

Re: [RFC PATCH 3/4] pcie/aspm: Enable all hardware power-saving states by default

Quoted 20 lines · Thomas Falcon

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.

---
 drivers/pci/pci-acpi.c  |  4 +++-
 drivers/pci/pcie/aspm.c | 17 +++++++++++++++++
 include/linux/pci.h     |  1 +
 3 files changed, 21 insertions(+), 1 deletion(-)
drivers/pci/pci-acpi.c +0 -0
index 4d0f2cb6c695..d849bc6d0c0c 100644

drivers/pci/pci-acpi.c static int __init acpi_pci_init(void) · line 1528

Quoted 7 lines
drivers/pci/pci-acpi.c +3 -1
@@ -1523,7 +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();

Please balance braces (and with comment this is multiline block anyway so you should use braces even because of that).

Quoted 25 lines
drivers/pci/pci-acpi.c +0 -0
 	if (acpi_pci_disabled)
 		return 0;
drivers/pci/pcie/aspm.c +3 -0
index 84d49aa8a5ba..1c81e2f2e589 100644
@@ -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));

drivers/pci/pcie/aspm.c static int __init pcie_aspm_disable(char *str) · line 1817

Quoted 5 lines
drivers/pci/pcie/aspm.c +2 -0
@@ -1810,6 +1813,20 @@ static int __init pcie_aspm_disable(char *str)
 
 __setup("pcie_aspm=", pcie_aspm_disable);
 
+
+

Extra empty lines.

drivers/pci/pcie/aspm.c static int __init pcie_aspm_disable(char *str) · line 1826

Quoted 9 lines
drivers/pci/pcie/aspm.c +9 -0
+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 && dmi_get_bios_year() >= 2025)

Is it good to have this 2025 check in two places as literals, should there be only one function which is called by both places?

Quoted 19 lines
drivers/pci/pcie/aspm.c +3 -0
+		aspm_policy = aspm_default_policy;
+}
+
 void pcie_no_aspm(void)
 {
 	/*
include/linux/pci.h +1 -0
index 2c4454583c11..36fa5579709c 100644
@@ -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
Signature · 1 line
 i.
#5 lore raw

Re: [RFC PATCH 3/4] pcie/aspm: Enable all hardware power-saving states by default

Quoted 27 lines · Ilpo Järvinen
Quoted 25 lines · Thomas Falcon

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.

---
 drivers/pci/pci-acpi.c  |  4 +++-
 drivers/pci/pcie/aspm.c | 17 +++++++++++++++++
 include/linux/pci.h     |  1 +

 3 files changed, 21 insertions(+), 1 deletion(-)
drivers/pci/pci-acpi.c +0 -0
index 4d0f2cb6c695..d849bc6d0c0c 100644
@@ -1523,7 +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();

drivers/pci/pci-acpi.c +0 -1
-	}
Quoted 8 lines

drivers/pci/pci-acpi.c static int __init acpi_pci_init(void) · line 1528

Quoted 4 lines
drivers/pci/pci-acpi.c +2 -0
+	} else
+		/* If ASPM is supported, configure the default

policy here. */

drivers/pci/pci-acpi.c +1 -0
+		pcie_aspm_policy_config_init();

Please balance braces (and with comment this is multiline block anyway
so you should use braces even because of that).

Thanks, I will fix this in the next version.

Quoted 29 lines
Quoted 29 lines


  if (acpi_pci_disabled)
  return 0;

drivers/pci/pcie/aspm.c +2 -0
index 84d49aa8a5ba..1c81e2f2e589 100644
@@ -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",

drivers/pci/pcie/aspm.c +1 -0
@@ -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));

drivers/pci/pcie/aspm.c +0 -0
@@ -1810,6 +1813,20 @@ static int __init pcie_aspm_disable(char
Quoted 8 lines

drivers/pci/pcie/aspm.c

Quoted 6 lines
drivers/pci/pcie/aspm.c +0 -0
 *str)


 __setup("pcie_aspm=", pcie_aspm_disable);

drivers/pci/pcie/aspm.c +2 -0
+
+

Extra empty lines.

Oops, I will fix in v2.

Quoted 15 lines
Quoted 11 lines
drivers/pci/pcie/aspm.c +9 -0
+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 &&

dmi_get_bios_year() >= 2025)

Is it good to have this 2025 check in two places as literals, should there
be only one function which is called by both places?

Ok, might be able to use pcie_aspm_legacy_config_check from the previous patch here. I will fix in v2.

Thanks,
Tom

Quoted 22 lines
Quoted 21 lines
drivers/pci/pcie/aspm.c +3 -0
+		aspm_policy = aspm_default_policy;
+}
+

 void pcie_no_aspm(void)
 {
  /*

include/linux/pci.h +1 -0
index 2c4454583c11..36fa5579709c 100644
@@ -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

#6 lore raw

RFC PATCH 4/4 pcie/aspm: Remove CONFIG_PCIEASPM_* policy definitions

In reply to Thomas Falcon

ASPM policy now defaults to POLICY_POWER_SUPERSAVE for new systems and POLICY_DEFAULT for others while allowing the user to change policy using the existing pcie_aspm module parameter. Safely remove CONFIG_PCIEASPM_* policy settings.

---
 Documentation/arch/x86/amd-debugging.rst |  5 ++--
 arch/mips/configs/bmips_stb_defconfig    |  1 -
 arch/mips/configs/loongson2k_defconfig   |  1 -
 drivers/pci/pcie/Kconfig                 | 33 ------------------------
 drivers/pci/pcie/aspm.c                  |  8 ------
 5 files changed, 2 insertions(+), 46 deletions(-)
Documentation/arch/x86/amd-debugging.rst +2 -3
index d92bf59d62c7..3f346a46357a 100644
@@ -260,9 +260,8 @@ of the devices.
 ASPM
 ----
 For the best runtime power consumption, ASPM should be programmed as intended
-by the BIOS from the hardware vendor.  To accomplish this the Linux kernel
-should be compiled with ``CONFIG_PCIEASPM_DEFAULT`` set to ``y`` and the
-sysfs file ``/sys/module/pcie_aspm/parameters/policy`` should not be modified.
+by the BIOS from the hardware vendor.  To accomplish this the sysfs file
+``/sys/module/pcie_aspm/parameters/policy`` should not be modified.
 
 Most notably, if L1.2 is not configured properly for any devices, the SoC
 will not be able to enter the deepest idle state.
arch/mips/configs/bmips_stb_defconfig +0 -1
index ecfa7f777efa..bb19073986a8 100644
@@ -22,7 +22,6 @@ CONFIG_RD_XZ=y
 # CONFIG_RD_LZ4 is not set
 CONFIG_PCI=y
 CONFIG_PCI_MSI=y
-CONFIG_PCIEASPM_POWERSAVE=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCIE_BRCMSTB=y
 CONFIG_CPU_FREQ=y
arch/mips/configs/loongson2k_defconfig +0 -1
index ca534a6b66de..0a2c123eee69 100644
@@ -88,7 +88,6 @@ CONFIG_RFKILL=m
 CONFIG_RFKILL_INPUT=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_HOTPLUG_PCI_PCIE=y
-CONFIG_PCIEASPM_PERFORMANCE=y
 CONFIG_HOTPLUG_PCI=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
drivers/pci/pcie/Kconfig +0 -33
index 207c2deae35f..069058870506 100644
@@ -81,39 +81,6 @@ config PCIEASPM
 
 	  When in doubt, say Y.
 
-choice
-	prompt "Default ASPM policy"
-	default PCIEASPM_DEFAULT
-	depends on PCIEASPM
-
-config PCIEASPM_DEFAULT
-	bool "BIOS default"
-	depends on PCIEASPM
-	help
-	  Use the BIOS defaults for PCI Express ASPM.
-
-config PCIEASPM_POWERSAVE
-	bool "Powersave"
-	depends on PCIEASPM
-	help
-	  Enable PCI Express ASPM L0s and L1 where possible, even if the
-	  BIOS did not.
-
-config PCIEASPM_POWER_SUPERSAVE
-	bool "Power Supersave"
-	depends on PCIEASPM
-	help
-	  Same as PCIEASPM_POWERSAVE, except it also enables L1 substates where
-	  possible. This would result in higher power savings while staying in L1
-	  where the components support it.
-
-config PCIEASPM_PERFORMANCE
-	bool "Performance"
-	depends on PCIEASPM
-	help
-	  Disable PCI Express ASPM L0s and L1, even if the BIOS enabled them.
-endchoice
-
 config PCIE_PME
 	def_bool y
 	depends on PCIEPORTBUS && PM
drivers/pci/pcie/aspm.c +0 -8
index 1c81e2f2e589..112904a75a4c 100644
@@ -258,15 +258,7 @@ static LIST_HEAD(link_list);
 #define POLICY_POWERSAVE 2	/* high power saving */
 #define POLICY_POWER_SUPERSAVE 3 /* possibly even more power saving */
 
-#ifdef CONFIG_PCIEASPM_PERFORMANCE
-static int aspm_policy = POLICY_PERFORMANCE;
-#elif defined CONFIG_PCIEASPM_POWERSAVE
-static int aspm_policy = POLICY_POWERSAVE;
-#elif defined CONFIG_PCIEASPM_POWER_SUPERSAVE
-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;
 
Signature · 1 line
2.43.0