All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Agarwal <ajayagarwal@google.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"David E. Box" <david.e.box@linux.intel.com>,
	"Johan Hovold" <johan+linaro@kernel.org>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Manu Gautam" <manugautam@google.com>,
	"Sajid Dalvi" <sdalvi@google.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Vidya Sagar" <vidyas@nvidia.com>,
	"Shuai Xue" <xueshuai@linux.alibaba.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v2] PCI/ASPM: Disable L1 before disabling L1ss
Date: Mon, 7 Oct 2024 08:51:23 +0530	[thread overview]
Message-ID: <ZwNTswQatCdb62FT@google.com> (raw)
In-Reply-To: <20241004231928.GA366846@bhelgaas>

On Fri, Oct 04, 2024 at 06:19:28PM -0500, Bjorn Helgaas wrote:
> On Thu, Oct 03, 2024 at 06:55:03PM +0530, Ajay Agarwal wrote:
> > The current sequence in the driver for L1ss update is as follows.
> > 
> > Disable L1ss
> > Disable L1
> > Enable L1ss as required
> > Enable L1 if required
> > 
> > With this sequence, a bus hang is observed during the L1ss
> > disable sequence when the RC CPU attempts to clear the RC L1ss
> > register after clearing the EP L1ss register. It looks like the
> > RC attempts to enter L1ss again and at the same time, access to
> > RC L1ss register fails because aux clk is still not active.
> >
> > PCIe spec r6.2, section 5.5.4, recommends that setting either
> > or both of the enable bits for ASPM L1 PM Substates must be done
> > while ASPM L1 is disabled. My interpretation here is that
> > clearing L1ss should also be done when L1 is disabled. Thereby,
> > change the sequence as follows.
> > 
> > Disable L1
> > Disable L1ss
> > Enable L1ss as required
> > Enable L1 if required
> 
> I think we also write the L1.2 enable bits in PCI_L1SS_CTL1 in
> aspm_calc_l12_info() when ASPM L1 may be enabled:
> 
>   pcie_aspm_init_link_state
>     pcie_aspm_cap_init
>       pcie_capability_read_word(PCI_EXP_LNKCTL)
>       aspm_l1ss_init
>         aspm_calc_l12_info
>           pci_clear_and_set_config_dword(PCI_L1SS_CTL1, PCI_L1SS_CTL1_L1_2_MASK)
> 
> That looks like another path where we should make a similar change.
> What do you think?
>
I agree. We should make a similar change there. Thanks for pointing out.
Will make the change in the next version.
> Bjorn

      reply	other threads:[~2024-10-07  3:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 13:25 [PATCH v2] PCI/ASPM: Disable L1 before disabling L1ss Ajay Agarwal
2024-10-03 17:01 ` Bjorn Helgaas
2024-10-03 17:23   ` Ajay Agarwal
2024-10-03 20:23     ` Bjorn Helgaas
2024-10-04  3:00       ` Ajay Agarwal
2024-10-04 23:19 ` Bjorn Helgaas
2024-10-07  3:21   ` Ajay Agarwal [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=ZwNTswQatCdb62FT@google.com \
    --to=ajayagarwal@google.com \
    --cc=bhelgaas@google.com \
    --cc=david.e.box@linux.intel.com \
    --cc=helgaas@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=johan+linaro@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=manugautam@google.com \
    --cc=sdalvi@google.com \
    --cc=vidyas@nvidia.com \
    --cc=xueshuai@linux.alibaba.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.