From: Greg KH <gregkh@linuxfoundation.org>
To: Macpaul Lin <macpaul.lin@mediatek.com>
Cc: patches@lists.linux.dev, stable@vger.kernel.org,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Ajay Agarwal" <ajayagarwal@google.com>,
"Daniel Stodden" <daniel.stodden@gmail.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
"Deren Wu" <Deren.Wu@mediatek.com>,
"Ramax Lo" <ramax.lo@mediatek.com>,
"Macpaul Lin" <macpaul@gmail.com>,
"MediaTek Chromebook Upstream"
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"Johnny-CC Chang" <Johnny-CC.Chang@mediatek.com>
Subject: Re: [PATCH 6.11 1/1] PCI/ASPM: Disable L1 before disabling L1 PM Substates
Date: Sat, 7 Jun 2025 11:57:30 +0200 [thread overview]
Message-ID: <2025060702-deviate-faceted-bd57@gregkh> (raw)
In-Reply-To: <20250606015738.2724220-1-macpaul.lin@mediatek.com>
On Fri, Jun 06, 2025 at 09:57:38AM +0800, Macpaul Lin wrote:
> From: Ajay Agarwal <ajayagarwal@google.com>
>
> [ Upstream commit 7447990137bf06b2aeecad9c6081e01a9f47f2aa ]
>
> PCIe r6.2, sec 5.5.4, requires that:
>
> If setting either or both of the enable bits for ASPM L1 PM Substates,
> both ports must be configured as described in this section while ASPM L1
> is disabled.
>
> Previously, pcie_config_aspm_l1ss() assumed that "setting enable bits"
> meant "setting them to 1", and it configured L1SS as follows:
>
> - Clear L1SS enable bits
> - Disable L1
> - Configure L1SS enable bits as required
> - Enable L1 if required
>
> With this sequence, when disabling L1SS on an ARM A-core with a Synopsys
> DesignWare PCIe core, the CPU occasionally hangs when reading
> PCI_L1SS_CTL1, leading to a reboot when the CPU watchdog expires.
>
> Move the L1 disable to the caller (pcie_config_aspm_link(), where L1 was
> already enabled) so L1 is always disabled while updating the L1SS bits:
>
> - Disable L1
> - Clear L1SS enable bits
> - Configure L1SS enable bits as required
> - Enable L1 if required
>
> Change pcie_aspm_cap_init() similarly.
>
> Link: https://lore.kernel.org/r/20241007032917.872262-1-ajayagarwal@google.com
> Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
> [bhelgaas: comments, commit log, compute L1SS setting before config access]
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> Tested-by: Johnny-CC Chang <Johnny-CC.Chang@mediatek.com>
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> ---
> drivers/pci/pcie/aspm.c | 92 ++++++++++++++++++++++-------------------
> 1 file changed, 50 insertions(+), 42 deletions(-)
6.11.y is long end-of-life, sorry. See the front page of www.kernel.org
for the list of currently supported kernels.
thanks,
greg k-h
prev parent reply other threads:[~2025-06-07 9:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 1:57 [PATCH 6.11 1/1] PCI/ASPM: Disable L1 before disabling L1 PM Substates Macpaul Lin
2025-06-07 9:57 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025060702-deviate-faceted-bd57@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Deren.Wu@mediatek.com \
--cc=Johnny-CC.Chang@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=ajayagarwal@google.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bhelgaas@google.com \
--cc=daniel.stodden@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=macpaul.lin@mediatek.com \
--cc=macpaul@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=patches@lists.linux.dev \
--cc=ramax.lo@mediatek.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).