]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
PCI/ASPM: Add sysfs attributes for controlling ASPM link states
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 10 Mar 2020 01:48:34 +0000 (09:48 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 20 Mar 2020 22:24:35 +0000 (17:24 -0500)
commitb5364e6bf1ca0cc61d5580e721eed4f5b2081fd8
tree4bf90184e2a57d9bf5f94f0f408814c929c70337
parent0a5cfbe05b7e9cd5c612023e9fd2602662203edd
PCI/ASPM: Add sysfs attributes for controlling ASPM link states

BugLink: https://bugs.launchpad.net/ubuntu/bugs/1836030
Add sysfs attributes to Endpoints and other Upstream Ports to control ASPM,
Clock PM, and L1 PM Substates.  The new attributes are:

  /sys/devices/pci*/.../link/clkpm
  /sys/devices/pci*/.../link/l0s_aspm
  /sys/devices/pci*/.../link/l1_aspm
  /sys/devices/pci*/.../link/l1_1_aspm
  /sys/devices/pci*/.../link/l1_2_aspm
  /sys/devices/pci*/.../link/l1_1_pcipm
  /sys/devices/pci*/.../link/l1_2_pcipm

An attribute is only visible if both ends of the Link leading to the device
support the state.  Writing y/1/on to the file enables the state; n/0/off
disables it.

These attributes can be used to tune the power/performance tradeoff for
individual devices.

[bhelgaas: commit log, rename directory to "link"]
Link: https://lore.kernel.org/r/b1c83f8a-9bf6-eac5-82d0-cf5b90128fbf@gmail.com
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit 72ea91afbfb08619696ccde610ee4d0d29cf4a1d)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Documentation/ABI/testing/sysfs-bus-pci
drivers/pci/pci-sysfs.c
drivers/pci/pci.h
drivers/pci/pcie/aspm.c