Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106952
b: refs/heads/master
c: 5fde244
h: refs/heads/master
v: v3
  • Loading branch information
Shaohua Li authored and Jesse Barnes committed Jul 28, 2008
1 parent c4a795f commit 152f39e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce6fce4295ba727b36fdc73040e444bd1aae64cd
refs/heads/master: 5fde244d39b88625ac578d83e6625138714de031
7 changes: 7 additions & 0 deletions trunk/drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/pci-aspm.h>
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
#include <acpi/acresrc.h>
Expand Down Expand Up @@ -372,6 +373,12 @@ static int __init acpi_pci_init(void)
printk(KERN_INFO"ACPI FADT declares the system doesn't support MSI, so disable it\n");
pci_no_msi();
}

if (acpi_gbl_FADT.boot_flags & BAF_PCIE_ASPM_CONTROL) {
printk(KERN_INFO"ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
pcie_no_aspm();
}

ret = register_acpi_bus_type(&acpi_pci_bus);
if (ret)
return 0;
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/pci/pcie/aspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,11 @@ static int __init pcie_aspm_disable(char *str)

__setup("pcie_noaspm", pcie_aspm_disable);

void pcie_no_aspm(void)
{
aspm_disabled = 1;
}

#ifdef CONFIG_ACPI
#include <acpi/acpi_bus.h>
#include <linux/pci-acpi.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/include/acpi/actbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ enum acpi_prefered_pm_profiles {
#define BAF_LEGACY_DEVICES 0x0001
#define BAF_8042_KEYBOARD_CONTROLLER 0x0002
#define BAF_MSI_NOT_SUPPORTED 0x0008
#define BAF_PCIE_ASPM_CONTROL 0x0010

#define FADT2_REVISION_ID 3
#define FADT2_MINUS_REVISION_ID 2
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/pci-aspm.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extern void pcie_aspm_init_link_state(struct pci_dev *pdev);
extern void pcie_aspm_exit_link_state(struct pci_dev *pdev);
extern void pcie_aspm_pm_state_change(struct pci_dev *pdev);
extern void pci_disable_link_state(struct pci_dev *pdev, int state);
extern void pcie_no_aspm(void);
#else
static inline void pcie_aspm_init_link_state(struct pci_dev *pdev)
{
Expand All @@ -40,6 +41,10 @@ static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev)
static inline void pci_disable_link_state(struct pci_dev *pdev, int state)
{
}

static inline void pcie_no_aspm(void)
{
}
#endif

#ifdef CONFIG_PCIEASPM_DEBUG /* this depends on CONFIG_PCIEASPM */
Expand Down

0 comments on commit 152f39e

Please sign in to comment.