From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3.11-rc] pci: mvebu: disable prefetchable memory support in PCI-to-PCI bridge
Date: Fri, 2 Aug 2013 11:43:50 -0600 [thread overview]
Message-ID: <20130802174350.GA15787@obsidianresearch.com> (raw)
In-Reply-To: <1375364659-3228-1-git-send-email-thomas.petazzoni@free-electrons.com>
On Thu, Aug 01, 2013 at 03:44:19PM +0200, Thomas Petazzoni wrote:
> The Marvell PCIe driver uses an emulated PCI-to-PCI bridge to be able
> to dynamically set up MBus address decoding windows for PCI I/O and
> memory regions depending on the PCI devices enumerated by Linux.
>
> However, this emulated PCI-to-PCI bridge logic makes the Linux PCI
> core believe that prefetchable memory regions are supported (because
> the registers are read/write), while in fact no adress decoding window
> is ever created for such regions. Since the Marvell MBus address
> decoding windows do not distinguish memory regions and prefetchable
> memory regions, this patch takes a simple approach: change the
> PCI-to-PCI bridge emulation to let the Linux PCI core know that we
> don't support prefetchable memory regions.
>
> To achieve this, we simply make the prefetchable memory base a
> read-only register that always returns 0. Reading/writing all the
> other prefetchable memory related registers has no effect.
Looks good to me. It is very good that you were able to merge the
downstream prefetchable BARs into the normal MMIO window.
Though looking at the original thread I really wonder if something
else is wrong here as well. The ethernet should not have only
prefetchable BARs.
For instance, I found this link:
https://bugzilla.redhat.com/show_bug.cgi?id=448712
Which shows a more resonable arrangement:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
Region 0: I/O ports at e800 [size=256]
Region 2: Memory at dffff000 (64-bit, non-prefetchable) [size=4K]
Region 4: Memory at deff0000 (64-bit, prefetchable) [size=64K]
Expansion ROM at dffc0000 [disabled] [size=128K]
vs Finn's:
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev)
Subsystem: Realtek Semiconductor Co., Ltd. TEG-ECTX Gigabit PCI-E Adapter [Trendnet]
Flags: bus master, fast devsel, latency 0, IRQ 9
I/O ports at 10000 [size=256]
Memory at e0014000 (64-bit, prefetchable) [size=4K]
Memory at e0010000 (64-bit, prefetchable) [size=16K]
Regards,
Jason
next prev parent reply other threads:[~2013-08-02 17:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 13:44 [PATCH 3.11-rc] pci: mvebu: disable prefetchable memory support in PCI-to-PCI bridge Thomas Petazzoni
2013-08-01 16:53 ` Bjorn Helgaas
2013-08-01 17:59 ` Thomas Petazzoni
2013-08-01 20:51 ` Bjorn Helgaas
2013-08-02 17:43 ` Jason Gunthorpe [this message]
2013-08-06 10:36 ` Thomas Petazzoni
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=20130802174350.GA15787@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=linux-arm-kernel@lists.infradead.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).