lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] PCI: Make d3cold_allowed sysfs attribute read only
From
On 10/10/2023 11:33, Bjorn Helgaas wrote:
> On Thu, Oct 05, 2023 at 01:56:27PM -0500, Mario Limonciello wrote:
>> On 10/5/2023 13:53, Bjorn Helgaas wrote:
>>> On Wed, Oct 04, 2023 at 09:47:31AM -0500, Mario Limonciello wrote:
>>>> Before d3cold was stable userspace was allowed to influence the kernel's
>>>> decision of whether to enable d3cold for a device by a sysfs file
>>>> `d3cold_allowed`. This potentially allows userspace to break the suspend
>>>> for the system.
>>>
>>> Is "Before d3cold was stable" referring to a "d3cold" read-only
>>> variable, or to Linux functionality of using D3cold, or ...?
>>
>> I was referring to the previous thread's comments when I asked about the
>> history on it.
>>
>>> In what sense does the `d3cold_allowed` sysfs file break suspend?
>>
>> SoCs might not be able to get into their deepest sleep state if userspace
>> messes with it.
>>
>>>> For debugging purposes `pci_port_pm=` can be used to control whether
>>>> a PCI port will go into D3cold and runtime PM can be turned off by
>>>> sysfs on PCI end points.
>>>
>>> I guess this should be "pcie_port_pm=", which affects *all* PCIe
>>> ports?
>>
>> Yes.
>>
>>> Which sysfs file turns off runtime PM for endpoints?
>>
>> /sys/bus/pci/devices/*/power/control
>
> To close the loop on this, I think these are questions that should be
> answered in the commit log (actually, that's usually the case when I
> have questions, because future readers of the git history may have the
> same questions, and it's not practical to dig the answers out of the
> lore archive).
>
> Bjorn

OK thanks, sometimes it's unclear if you just want to know more or want
it in the commit message.

I'll respin a v2 with the commit message adjusted.

\
 
 \ /
  Last update: 2023-10-10 18:36    [W:0.057 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site