* [PATCH 3/3] pcie: Add support for setting default ASPM policy
[not found] <1328282293-16551-1-git-send-email-mjg@redhat.com>
@ 2012-02-03 15:18 ` Matthew Garrett
2012-02-10 20:31 ` Jesse Barnes
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Garrett @ 2012-02-03 15:18 UTC (permalink / raw)
To: linux-kernel; +Cc: Matthew Garrett, linux-pci, jbarnes
Distributions may wish to provide different defaults for PCIE ASPM
depending on their target audience. Provide a configuration option for
choosing the default policy.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: linux-pci@vger.kernel.org
Cc: jbarnes@virtuousgeek.org
---
drivers/pci/pcie/Kconfig | 25 +++++++++++++++++++++++++
drivers/pci/pcie/aspm.c | 8 ++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index 72962cc..6c8bc58 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -55,6 +55,31 @@ config PCIEASPM_DEBUG
This enables PCI Express ASPM debug support. It will add per-device
interface to control ASPM.
+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_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_RUNTIME && EXPERIMENTAL && ACPI
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 1cfbf22..a0de5e1 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -76,7 +76,15 @@ static LIST_HEAD(link_list);
#define POLICY_DEFAULT 0 /* BIOS default setting */
#define POLICY_PERFORMANCE 1 /* high performance */
#define POLICY_POWERSAVE 2 /* high power saving */
+
+#ifdef CONFIG_PCIEASPM_PERFORMANCE
+static int aspm_policy = POLICY_PERFORMANCE;
+#elif defined CONFIG_PCIEASPM_POWERSAVE
+static int aspm_policy = POLICY_POWERSAVE;
+#else
static int aspm_policy;
+#endif
+
static const char *policy_str[] = {
[POLICY_DEFAULT] = "default",
[POLICY_PERFORMANCE] = "performance",
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] pcie: Add support for setting default ASPM policy
2012-02-03 15:18 ` [PATCH 3/3] pcie: Add support for setting default ASPM policy Matthew Garrett
@ 2012-02-10 20:31 ` Jesse Barnes
0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2012-02-10 20:31 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-kernel, linux-pci
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
On Fri, 3 Feb 2012 10:18:13 -0500
Matthew Garrett <mjg@redhat.com> wrote:
> Distributions may wish to provide different defaults for PCIE ASPM
> depending on their target audience. Provide a configuration option for
> choosing the default policy.
>
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> Cc: linux-pci@vger.kernel.org
> Cc: jbarnes@virtuousgeek.org
Applied to -next, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-10 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1328282293-16551-1-git-send-email-mjg@redhat.com>
2012-02-03 15:18 ` [PATCH 3/3] pcie: Add support for setting default ASPM policy Matthew Garrett
2012-02-10 20:31 ` Jesse Barnes
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).