All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	"Gavin Shan" <gwshan@linux.vnet.ibm.com>,
	"Marek Kordík" <kordikmarek@gmail.com>,
	zermond@gmail.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: Clear bridge MEM_64 flag if one child does not support it
Date: Tue, 09 Dec 2014 10:00:03 +1100	[thread overview]
Message-ID: <1418079603.13358.12.camel@kernel.crashing.org> (raw)
In-Reply-To: <1418079372.13358.9.camel@kernel.crashing.org>

On Tue, 2014-12-09 at 09:56 +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2014-12-08 at 13:52 -0800, Yinghai Lu wrote:
> > 2. or scan the children resource other than ROM to clear bridge MEM_64
> >    for mmio pref.
> > 
> > The patch is using second way so will keep child mmio pref into bridge
> > mmio pref range.
> 
> That means that having a single ROM BAR that is 32-bit and prefetchable
> will downgrade the entire window to 32-bit ? That's not going to work
> either.
> 
> I have GPUs with 16G BARs for example... suddenly they don't fit
> anaymore because we downgraded the window to 32 bit because somewhere
> there's a 32-bit pref resource ?
> 
> That will break more than it fixes...

I think an option would be to keep track of whether the PCI host bridge
can do 64-bit pref above 4G.

If it can't then we know 64-bit pref is always fair game for 32-bit
resources and we can thus downgrade all the bridges 64-pref to 32-perf.

If it can, then we probably do need to leave it there do real 64-bit
pref, and shoot anything that is 32-bit only down the non-pref windows.

We *could* try to be smart and scan first to check if anything under the
bridge actually has large/64-bit BARs but that's going to be a heuristic
at best and isn't going to do any good with hotplug.

I tend to think that treating anything 32-bit pref as non-pref is in
fact the best solution unless we know that the platform doesn't do
>32-bit pref anyway in which case we leave them alone.

Ben.



  reply	other threads:[~2014-12-08 23:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 21:52 [PATCH] PCI: Clear bridge MEM_64 flag if one child does not support it Yinghai Lu
2014-12-08 22:56 ` Benjamin Herrenschmidt
2014-12-08 23:00   ` Benjamin Herrenschmidt [this message]
2014-12-09  0:09     ` Yinghai Lu
2014-12-09 21:39       ` Yinghai Lu
2014-12-08 23:59   ` Yinghai Lu
2014-12-09  0:11     ` Gavin Shan
2014-12-09  2:26       ` Wei Yang
2014-12-09  7:20         ` Yinghai Lu
2014-12-09  7:56           ` Wei Yang
2014-12-09 18:21             ` Bjorn Helgaas
2014-12-10  9:42               ` Wei Yang
2014-12-09 19:49             ` Yinghai Lu
2014-12-09 18:07           ` Marek Kordík
2014-12-09 18:22             ` Bjorn Helgaas
2014-12-09 19:42               ` Yinghai Lu
2014-12-09 22:15                 ` Marek Kordík
2014-12-09 23:16                   ` Yinghai Lu
2014-12-09  1:08     ` Gavin Shan
2014-12-09  1:38       ` Yinghai Lu

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=1418079603.13358.12.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=kordikmarek@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=yinghai@kernel.org \
    --cc=zermond@gmail.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.