summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie/aspm.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-02-03 10:18:13 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-02-17 09:22:03 -0800
commitad71c96213a68dfe6d761e3ff7ac7ac267fd612a (patch)
treee1586751c7249035c128de60a5721aafa997e2d5 /drivers/pci/pcie/aspm.c
parentf67fd55fa96f7d7295b43ffbc4a97d8f55e473aa (diff)
downloadblackbird-op-linux-ad71c96213a68dfe6d761e3ff7ac7ac267fd612a.tar.gz
blackbird-op-linux-ad71c96213a68dfe6d761e3ff7ac7ac267fd612a.zip
PCI: pcie: Add support for setting default ASPM policy
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> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie/aspm.c')
-rw-r--r--drivers/pci/pcie/aspm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 1cfbf228fbb1..a0de5e123046 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",
OpenPOWER on IntegriCloud