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: <20240201165025.GA637154@bhelgaas>
Date: Thu, 1 Feb 2024 10:50:25 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Frank Li <Frank.Li@....com>
Cc: bhelgaas@...gle.com, devicetree@...r.kernel.org,
	gustavo.pimentel@...opsys.com, imx@...ts.linux.dev, kw@...ux.com,
	leoyang.li@....com, linux-arm-kernel@...ts.infradead.org,
	linux-imx@....com, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org, lorenzo.pieralisi@....com,
	lpieralisi@...nel.org, mani@...nel.org,
	manivannan.sadhasivam@...aro.org, minghuan.lian@....com,
	mingkai.hu@....com, robh+dt@...nel.org, roy.zang@....com,
	shawnguo@...nel.org, zhiqiang.hou@....com
Subject: Re: [PATCH v12 2/3] PCI: dwc: Implement general suspend/resume
 functionality for L2/L3 transitions

On Mon, Aug 21, 2023 at 02:48:14PM -0400, Frank Li wrote:
> Introduce helper function dw_pcie_get_ltssm() to retrieve SMLH_LTSS_STATE.
> ...

> diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
> index 615660640801..91d13f9b21b1 100644
> --- a/drivers/pci/controller/dwc/pcie-designware.h
> +++ b/drivers/pci/controller/dwc/pcie-designware.h

> @@ -364,6 +375,7 @@ struct dw_pcie_ops {
>  	void    (*write_dbi2)(struct dw_pcie *pcie, void __iomem *base, u32 reg,
>  			      size_t size, u32 val);
>  	int	(*link_up)(struct dw_pcie *pcie);
> +	enum dw_pcie_ltssm (*get_ltssm)(struct dw_pcie *pcie);

This has already been applied as
https://git.kernel.org/linus/4774faf854f5 ("PCI: dwc: Implement
generic suspend/resume functionality"), but this .get_ltssm() pointer
doesn't seem to be used anywhere.  Should we remove it until we need
it?

> +static inline enum dw_pcie_ltssm dw_pcie_get_ltssm(struct dw_pcie *pci)
> +{
> +	u32 val;
> +
> +	if (pci->ops && pci->ops->get_ltssm)
> +		return pci->ops->get_ltssm(pci);
> +
> +	val = dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG0);
> +
> +	return (enum dw_pcie_ltssm)FIELD_GET(PORT_LOGIC_LTSSM_STATE_MASK, val);
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ