From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-pci@vger.kernel.org
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Probing unconfigured PCI bridge resouces
Date: Tue, 24 Jan 2012 15:25:47 +1100 [thread overview]
Message-ID: <1327379147.19850.29.camel@pasglop> (raw)
Hi folks !
I was digging around chasing a different problem when I stumbled upon
this, I may be missing something but it still feels odd...
So from what I can tell, the only way that we set the flag for the 3
bridge resources of a P2P bridge (IORESOURCE_IO, IORESOURCE_MEM etc...)
is via pci_read_bridge_bases().
This will in turn only set those flags if the resource has a positive
size (limit >= start) ie. it wasn't closed by the firmware.
However what does that leave us in case where we either want to ignore
the firmware (reconfigure everything, which we do on various embedded
platforms) or if the bridge is plain uninitialized and happen to comes
up with closed resources ?
>From what I can tell, we don't set these, which means that we won't
either try to reallocate or reassign those windows later in the resource
assignment code. IE the code in setup-bus.c will use
find_free_bus_resource() which only works if the type has been set...
Or am I missing some important fact here ?
I suspect what's saved us so far on some of those embedded platforms is
that uninitialized bridges tend to come up "open" with a tiny window
0...2M (for memory, I think it's 4K for IO)... but I can see problems (I
had code to specifically re-open some windows on some Apple machines in
the past, which I think we lost over time and might need to be brought
back for example).
Cheers,
Ben.
next reply other threads:[~2012-01-24 4:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 4:25 Benjamin Herrenschmidt [this message]
2012-01-24 4:50 ` Probing unconfigured PCI bridge resouces Benjamin Herrenschmidt
2012-01-27 17:36 ` Jesse Barnes
2012-01-27 22:16 ` Benjamin Herrenschmidt
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=1327379147.19850.29.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--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).