Commit b27759f880018b0cd43543dc94c921341b64b5ec

Authored by Rafael J. Wysocki
Committed by Jesse Barnes
1 parent 7e27d6e778

PCI/PM: Do not use native PCIe PME by default

Commit c7f486567c1d0acd2e4166c47069835b9f75e77b
(PCI PM: PCIe PME root port service driver) causes the native PCIe
PME signaling to be used by default, if the BIOS allows the kernel to
control the standard configuration registers of PCIe root ports.
However, the native PCIe PME is coupled to the native PCIe hotplug
and calling pcie_pme_acpi_setup() makes some BIOSes expect that
the native PCIe hotplug will be used as well.  That, in turn, causes
problems to appear on systems where the PCIe hotplug driver is not
loaded.  The usual symptom, as reported by Jaroslav Kameník and
others, is that the ACPI GPE associated with PCIe hotplug keeps
firing continuously causing kacpid to take substantial percentage
of CPU time.

To work around this issue, change the default so that the native
PCIe PME signaling is only used if directly requested with the help
of the pcie_pme= command line switch.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15924 , which is
a listed regression from 2.6.33.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Jaroslav Kameník <jaroslav@kamenik.cz>
Tested-by: Antoni Grzymala <antekgrzymala@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Showing 2 changed files with 16 additions and 7 deletions Side-by-side Diff

Documentation/kernel-parameters.txt
... ... @@ -2048,7 +2048,9 @@
2048 2048 WARNING: Forcing ASPM on may cause system lockups.
2049 2049  
2050 2050 pcie_pme= [PCIE,PM] Native PCIe PME signaling options:
2051   - off Do not use native PCIe PME signaling.
  2051 + Format: {auto|force}[,nomsi]
  2052 + auto Use native PCIe PME signaling if the BIOS allows the
  2053 + kernel to control PCIe config registers of root ports.
2052 2054 force Use native PCIe PME signaling even if the BIOS refuses
2053 2055 to allow the kernel to control the relevant PCIe config
2054 2056 registers.
drivers/pci/pcie/pme/pcie_pme.c
... ... @@ -34,7 +34,7 @@
34 34 * being registered. Consequently, the interrupt-based PCIe PME signaling will
35 35 * not be used by any PCIe root ports in that case.
36 36 */
37   -static bool pcie_pme_disabled;
  37 +static bool pcie_pme_disabled = true;
38 38  
39 39 /*
40 40 * The PCI Express Base Specification 2.0, Section 6.1.8, states the following:
41 41  
... ... @@ -64,12 +64,19 @@
64 64  
65 65 static int __init pcie_pme_setup(char *str)
66 66 {
67   - if (!strcmp(str, "off"))
68   - pcie_pme_disabled = true;
69   - else if (!strcmp(str, "force"))
  67 + if (!strncmp(str, "auto", 4))
  68 + pcie_pme_disabled = false;
  69 + else if (!strncmp(str, "force", 5))
70 70 pcie_pme_force_enable = true;
71   - else if (!strcmp(str, "nomsi"))
72   - pcie_pme_msi_disabled = true;
  71 +
  72 + str = strchr(str, ',');
  73 + if (str) {
  74 + str++;
  75 + str += strspn(str, " \t");
  76 + if (*str && !strcmp(str, "nomsi"))
  77 + pcie_pme_msi_disabled = true;
  78 + }
  79 +
73 80 return 1;
74 81 }
75 82 __setup("pcie_pme=", pcie_pme_setup);