lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba9128b499b243f5c08f855018a37cd1484211b6.camel@linux.intel.com>
Date:   Tue, 01 Mar 2022 05:31:51 -0800
From:   "David E. Box" <david.e.box@...ux.intel.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     nirmal.patel@...ux.intel.com, jonathan.derrick@...ux.dev,
        lorenzo.pieralisi@....com, kw@...ux.com, robh@...nel.org,
        bhelgaas@...gle.com, michael.a.bottini@...ux.intel.com,
        rafael@...nel.org, me@...ityamohan.in, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V6 1/3] PCI/ASPM: Add pci_enable_default_link_state()

On Tue, 2022-03-01 at 00:13 -0800, Christoph Hellwig wrote:
> On Mon, Feb 28, 2022 at 08:19:41PM -0800, David E. Box wrote:
> > +	down_read(&pci_bus_sem);
> > +	mutex_lock(&aspm_lock);
> > +	link->aspm_default = 0;
> > +	if (state & PCIE_LINK_STATE_L0S)
> > +		link->aspm_default |= ASPM_STATE_L0S;
> > +	if (state & PCIE_LINK_STATE_L1)
> > +		/* L1 PM substates require L1 */
> > +		link->aspm_default |= ASPM_STATE_L1 | ASPM_STATE_L1SS;
> > +	if (state & PCIE_LINK_STATE_L1_1)
> > +		link->aspm_default |= ASPM_STATE_L1_1;
> > +	if (state & PCIE_LINK_STATE_L1_2)
> > +		link->aspm_default |= ASPM_STATE_L1_2;
> > +	if (state & PCIE_LINK_STATE_L1_1_PCIPM)
> > +		link->aspm_default |= ASPM_STATE_L1_1_PCIPM;
> > +	if (state & PCIE_LINK_STATE_L1_2_PCIPM)
> > +		link->aspm_default |= ASPM_STATE_L1_2_PCIPM;
> > +	pcie_config_aspm_link(link, policy_to_aspm_state(link));
> 
> Is there any reason the ASPM_* values aren't passed directly to this
> function?

The ASPM_* macors aren't visible outside of aspm.c whereas the
PCIE_LINK_STATE_* macros are defined in pci.h. This is similar to what
is done for pci_disable_link_state().

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ