public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org
Subject: Re: [[RFC PATCH v1] 1/1] PCI: Add pci=nobbn to ignore ACPI _BBN method to override host bridge bus window
Date: Fri, 17 Jan 2020 10:05:02 -0600	[thread overview]
Message-ID: <20200117160502.GA92383@google.com> (raw)
In-Reply-To: <PSXP216MB043839BFAE70C02DB13DEA4A80310@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM>

[+cc Rafael, linux-acpi, start of thread at
https://lore.kernel.org/lkml/PSXP216MB0438F3D8C09957C6A45BC43D80580@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM/T/#u]

On Fri, Jan 17, 2020 at 03:00:11PM +0000, Nicholas Johnson wrote:
> On Thu, Jan 16, 2020 at 11:13:13PM +0100, Thomas Gleixner wrote:
> > Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au> writes:
> > 
> > > Add pci=nobbn kernel parameter.
> > >
> > > Override the host bridge bus resource to [bus 00-ff] when specified.
> > 
> > Fine, but you completely fail to explain why this is useful and why
> > someone would utilize this command line parameter.
>
> There are motherboards with single PCIe root complex which give 
> significantly less than [bus 00-ff] via CRS. I own one with [bus 00-7f] 
> and have seen some with significantly less.
> 
> A user who wants to use more busses than the motherboard advertises will 
> want to use this kernel parameter, for instance if they have a lot of 
> PCIe switches or Thunderbolt 3 devices.

I don't think this is a good idea.  "pci=nocrs" was mainly useful to
work around Linux defects in handling _CRS methods.  I don't think we
have comparable defects in our handling of _BBN.

In your example, the BIOS is telling us the bridge leads to [bus
00-7f].  We don't know what is at [bus 80-ff].  Maybe that range is
valid and usable, and maybe it's not.  It could be routed to a
different host bridge, it could contain devices the BIOS uses for its
own purposes, it could be completely invalid.

If we *did* decide this is a good idea, "nobbn" is a misleading name.
_BBN evaluates to a single bus number, not a range.  In your example,
BIOS is supplying _BBN=0 and _CRS that contains [bus 00-7f].  "nobbn"
suggests that'd we'd ignore _BBN.  But this patch actually ignores the
bus number range from _CRS, so it has nothing to do with _BBN.

> This is similar to how we have pci=nocrs to override motherboards with 
> issues. The bus resource is not overridden by pci=nocrs, even though it 
> will usually come from the same method. However, I believe it would be 
> unwise to change pci=nocrs to include bus resource, as detailed in my 
> original RFC.

For reference, I think this original RFC was
https://lore.kernel.org/r/PSXP216MB04385B2C1BB518E5219C30CE80580@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM

Bjorn

  reply	other threads:[~2020-01-17 16:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 21:30 [[RFC PATCH v1] 1/1] PCI: Add pci=nobbn to ignore ACPI _BBN method to override host bridge bus window Nicholas Johnson
2020-01-16 22:13 ` Thomas Gleixner
2020-01-17 15:00   ` Nicholas Johnson
2020-01-17 16:05     ` Bjorn Helgaas [this message]
2020-01-18 13:39       ` Nicholas Johnson

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=20200117160502.GA92383@google.com \
    --to=helgaas@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicholas.johnson-opensource@outlook.com.au \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@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