diff options
author | Matthew Garrett <mjg@redhat.com> | 2012-02-03 10:18:13 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-02-17 12:22:03 -0500 |
commit | ad71c96213a68dfe6d761e3ff7ac7ac267fd612a (patch) | |
tree | e1586751c7249035c128de60a5721aafa997e2d5 /drivers/pci/pcie/aspm.c | |
parent | f67fd55fa96f7d7295b43ffbc4a97d8f55e473aa (diff) |
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.c | 8 |
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); | |||
76 | #define POLICY_DEFAULT 0 /* BIOS default setting */ | 76 | #define POLICY_DEFAULT 0 /* BIOS default setting */ |
77 | #define POLICY_PERFORMANCE 1 /* high performance */ | 77 | #define POLICY_PERFORMANCE 1 /* high performance */ |
78 | #define POLICY_POWERSAVE 2 /* high power saving */ | 78 | #define POLICY_POWERSAVE 2 /* high power saving */ |
79 | |||
80 | #ifdef CONFIG_PCIEASPM_PERFORMANCE | ||
81 | static int aspm_policy = POLICY_PERFORMANCE; | ||
82 | #elif defined CONFIG_PCIEASPM_POWERSAVE | ||
83 | static int aspm_policy = POLICY_POWERSAVE; | ||
84 | #else | ||
79 | static int aspm_policy; | 85 | static int aspm_policy; |
86 | #endif | ||
87 | |||
80 | static const char *policy_str[] = { | 88 | static const char *policy_str[] = { |
81 | [POLICY_DEFAULT] = "default", | 89 | [POLICY_DEFAULT] = "default", |
82 | [POLICY_PERFORMANCE] = "performance", | 90 | [POLICY_PERFORMANCE] = "performance", |