public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ACPI: Fix the incorrect behavior of the disabled ASPM on Haswell CPU
@ 2014-03-10  9:56 Adrian Huang12
  2014-03-10 15:45 ` Matthew Garrett
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Huang12 @ 2014-03-10  9:56 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown; +Cc: Adrian Huang12, linux-acpi@vger.kernel.org

On the Haswell-based server (Grantley platform), there are two PCI
root bridges. One is the PCI-express root bridge (HID: PNP0A08)
for processor IIO devices, and the other is the PCI root bridge
(HID: PNP0A03) for the processor uncore devices.

Some BIOSes do not implement the _OSC object for PCI root bridge
(PNP0A03) since it is the optional object described on the page 286
of ACPI spec 5.0. This causes the variable no_aspm is set to 1 when
evaluating the undefined _OSC object of the PCI root bridge. It
turns out that the ASPM policy cannot be changed even though the
PCI-express root bridge on the Haswell-based server platform is
evaluated successfully. Here is the example:

$ cat /sys/module/pcie_aspm/parameters/policy
[default] performance powersave
$ echo performance | sudo tee /sys/module/pcie_aspm/parameters/policy
performance
tee: /sys/module/pcie_aspm/parameters/policy: Operation not permitted

To fix the above-mentioned issue, this patch does not set the
variable no_aspm to 1 if the returned status is AE_NOT_FOUND and
the bridge is the PCI root bridge.

After applying this patch, the ASPM policy can be changed correctly.
And, the corresponding reaction works correctly after changing a
policy.

Tested on the Grantley platform and v3.14-rc6.

Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
---
 drivers/acpi/pci_root.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index c1c4102..cfb3bca 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -446,6 +446,13 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
 	decode_osc_support(root, "OS supports", support);
 	status = acpi_pci_osc_support(root, support);
 	if (ACPI_FAILURE(status)) {
+		if (status == AE_NOT_FOUND &&
+		    !strcmp(acpi_device_hid(device), PCI_ROOT_HID_STRING)) {
+			dev_info(&device->dev,
+				 "No _OSC; skip ASPM configuration\n");
+			return;
+		}
+
 		dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n",
 			 acpi_format_exception(status));
 		*no_aspm = 1;
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-13 12:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10  9:56 [PATCH 1/1] ACPI: Fix the incorrect behavior of the disabled ASPM on Haswell CPU Adrian Huang12
2014-03-10 15:45 ` Matthew Garrett
2014-03-10 16:17   ` Adrian Huang12
2014-03-10 16:24     ` Matthew Garrett
2014-03-13 12:22       ` Adrian Huang12

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox