linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David E. Box" <david.e.box@linux.intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: "Johan Hovold" <johan+linaro@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Nirmal Patel" <nirmal.patel@linux.intel.com>,
	"Jonathan Derrick" <jonathan.derrick@linux.dev>,
	linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>
Subject: Re: [PATCH v2 1/6] PCI/ASPM: Add locked helper for enabling link state
Date: Wed, 13 Dec 2023 11:48:41 -0800	[thread overview]
Message-ID: <970144d9b5c3d36dbd0d50f01c1c4355cd42de89.camel@linux.intel.com> (raw)
In-Reply-To: <20231212212707.GA1021099@bhelgaas>

On Tue, 2023-12-12 at 15:27 -0600, Bjorn Helgaas wrote:
> On Tue, Dec 12, 2023 at 11:48:27AM +0800, Kai-Heng Feng wrote:
> > On Fri, Dec 8, 2023 at 4:47 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > ...
> 
> > > I hope we can obsolete this whole idea someday.  Using pci_walk_bus()
> > > in qcom and vmd to enable ASPM is an ugly hack to work around this
> > > weird idea that "the OS isn't allowed to enable more ASPM states than
> > > the BIOS did because the BIOS might have left ASPM disabled because it
> > > knows about hardware issues."  More history at
> > > https://lore.kernel.org/linux-pci/20230615070421.1704133-1-kai.heng.feng@canonical.com/T/#u
> > > 
> > > I think we need to get to a point where Linux enables all supported
> > > ASPM features by default.  If we really think x86 BIOS assumes an
> > > implicit contract that the OS will never enable ASPM more
> > > aggressively, we might need some kind of arch quirk for that.
> > 
> > The reality is that PC ODM toggles ASPM to workaround hardware
> > defects, assuming that OS will honor what's set by the BIOS.
> > If ASPM gets enabled for all devices, many devices will break.
> 
> That's why I mentioned some kind of arch quirk.  Maybe we're forced to
> do that for x86, for instance.  But even that is a stop-gap.
> 
> The idea that the BIOS ASPM config is some kind of handoff protocol is
> really unsupportable.

To be clear, you are not talking about a situation where ACPI_FADT_NO_ASPM or
_OSC PCIe disallow OS ASPM control, right? Everyone agrees that this should be
honored? The question is what to do by default when the OS is not restricted by
these mechanisms?

Reading the mentioned thread, I too think that using the BIOS config as the
default would be the safest option, but only to avoid breaking systems, not
because of an implied contract between the BIOS and OS. However, enabling all
capable ASPM features is the ideal option. If the OS isn't limited by
ACPI_FADT_NO_ASPM or _OSC PCIe, then ASPM enabling is fully under its control.
If this doesn't work for some devices then they are broken and need a quirk.

David

  reply	other threads:[~2023-12-13 19:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28  8:15 [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM Johan Hovold
2023-11-28  8:15 ` [PATCH v2 1/6] PCI/ASPM: Add locked helper for enabling link state Johan Hovold
2023-12-07 20:47   ` Bjorn Helgaas
2023-12-08  8:00     ` Johan Hovold
2023-12-08 17:39       ` Bjorn Helgaas
2023-12-12  9:25         ` Ilpo Järvinen
2023-12-12  3:48     ` Kai-Heng Feng
2023-12-12 21:27       ` Bjorn Helgaas
2023-12-13 19:48         ` David E. Box [this message]
2023-12-13 20:45           ` Bjorn Helgaas
2023-12-13 23:39             ` David E. Box
2023-12-14 17:28               ` Bjorn Helgaas
2023-11-28  8:15 ` [PATCH v2 2/6] PCI: vmd: Fix deadlock when enabling ASPM Johan Hovold
2023-11-28  8:15 ` [PATCH v2 3/6] PCI: qcom: " Johan Hovold
2023-11-28  8:15 ` [PATCH v2 4/6] PCI: qcom: Clean up ASPM comment Johan Hovold
2023-11-28  8:15 ` [PATCH v2 5/6] PCI/ASPM: Clean up disable link state parameter Johan Hovold
2023-11-28  8:15 ` [PATCH v2 6/6] PCI/ASPM: Add lockdep assert to link state helper Johan Hovold
2023-12-07 13:25 ` [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM Johan Hovold
2023-12-10 12:35   ` Linux regression tracking #update (Thorsten Leemhuis)
2023-12-08 17:53 ` Bjorn Helgaas
2023-12-11 17:35   ` Johan Hovold
2023-12-11 18:11     ` Bjorn Helgaas
2023-12-11 20:13       ` Johan Hovold

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=970144d9b5c3d36dbd0d50f01c1c4355cd42de89.camel@linux.intel.com \
    --to=david.e.box@linux.intel.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=jonathan.derrick@linux.dev \
    --cc=kai.heng.feng@canonical.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=nirmal.patel@linux.intel.com \
    --cc=robh@kernel.org \
    --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).