From: Chuck Tuffli <ctuffli@gmail.com>
To: linux-pci@vger.kernel.org
Subject: Re: Error assigning BAR 0 to hotplugged device
Date: Wed, 16 Jul 2014 10:19:06 -0700 [thread overview]
Message-ID: <CAKAYmMLhPhukBbR8NhPk3EigmvwiX+DEGj-Mod7zpHMnZKRsLw@mail.gmail.com> (raw)
In-Reply-To: <CAKAYmMLfxkmaVxaPDd6z=B0ESQ3mR=dUG4OFFgEoy0295qLYgg@mail.gmail.com>
On Tue, Jul 8, 2014 at 12:37 PM, Chuck Tuffli <ctuffli@gmail.com> wrote:
> On a system with a recent Fedora kernel (3.14.9-200.fc20.x86_64), a
> hotplugged PCI device is unable to get memory mapped IO:
> ...
> [ 183.247377] pcieport 0000:9a:00.0: BAR 15: can't assign mem pref
> (size 0x100000)
> [ 183.247384] pcieport 0000:9b:15.0: BAR 14: can't assign mem (size 0x100000)
> [ 183.247388] pcieport 0000:9b:15.0: BAR 15: can't assign mem pref
> (size 0x100000)
> [ 183.247394] pci 0000:a5:00.0: BAR 6: can't assign mem pref (size 0x10000)
> [ 183.247397] pci 0000:a5:00.0: BAR 0: can't assign mem (size 0x4000)
>
> The device is connected to a switch supporting hotplug (i.e. SltCap
> includes HotPlug+) and I have added
> pci=realloc,hpmemsize=16M
> to the kernel boot parameters. This appears to have increased the
> prefetchable memory but not the memory mapped IO:
Further investigation suggests that pbus_size_mem() never really gets
a chance to increase the bridge aperture by the hpmemsize value
because find_free_bus_resource() returns NULL. This apparently happens
because the function "skip[s] the bus resources which have already
been assigned (that is, have non-NULL parent resource)". Specifically,
it checks
if (r && (r->flags & type_mask) == type && !r->parent)
and in my configuration, finds that r->parent != NULL for the memory
mapped IO resource. Wouldn't r->parent be non-NULL in most cases other
than for bridges in the root complex? If so, does that imply hpmemsize
would only be used for bridges advertising hot plug in the root
complex?
--chuck
next prev parent reply other threads:[~2014-07-16 17:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 19:37 Error assigning BAR 0 to hotplugged device Chuck Tuffli
2014-07-16 17:19 ` Chuck Tuffli [this message]
2014-07-16 18:54 ` Bjorn Helgaas
2014-07-16 20:55 ` Yinghai Lu
2014-07-16 23:47 ` Yinghai Lu
2014-07-16 23:49 ` Yinghai Lu
2014-07-17 1:00 ` Chuck Tuffli
2014-07-17 2:15 ` Yinghai Lu
2014-07-17 15:08 ` Chuck Tuffli
2014-07-17 16:33 ` Yinghai Lu
2014-07-17 16:47 ` Chuck Tuffli
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=CAKAYmMLhPhukBbR8NhPk3EigmvwiX+DEGj-Mod7zpHMnZKRsLw@mail.gmail.com \
--to=ctuffli@gmail.com \
--cc=linux-pci@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).