Re: [PATCH v7 4/5] PCI/ASPM: Add sysfs attributes for controlling ASPM link states

From: Greg KH
Date: Sun Nov 24 2019 - 12:02:56 EST


On Thu, Nov 21, 2019 at 05:04:11PM -0600, Bjorn Helgaas wrote:
> What sort of tools would this break? There are no AER tools since the
> AER stats sysfs files don't exist yet, so I assume there are some
> generic sysfs tools or libraries.

Any normal tool that looks at sysfs attributes, like udev and friends.
They will "miss" the uevent for the subdirs and not know how to
associate anything with the "parent" struct device.

> Incidentally,
> https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html
> suggests that maybe we should be documenting these files with
> /sys/devices paths instead of the symlinks in /sys/bus/pci/devices/,
> e.g.,
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
> -What: /sys/bus/pci/devices/.../msi_bus
> -What: /sys/bus/pci/devices/.../msi_irqs/
> -What: /sys/bus/pci/devices/.../msi_irqs/<N>
> +What: /sys/devices/pci*/.../msi_bus
> +What: /sys/devices/pci*/.../msi_irqs/
> +What: /sys/devices/pci*/.../msi_irqs/<N>

Either is fine, but yes, the second one is nicer.

thanks,

greg k-h