Thread (37 messages) flat view 37 messages, 2 authors, 2012-03-07

Re: [PATCH v3 29/34] sparc/PCI: get rid of device resource fixups

From: Bjorn Helgaas <bhelgaas@google.com>
Date: 2012-03-07 23:27:30
Also in: linux-pci, sparclinux

On Wed, Mar 7, 2012 at 3:34 PM, Bjorn Helgaas [off-list ref] wrote:
Tell the PCI core about host bridge address translation so it can take
care of bus-to-resource conversion for us.

Previously, when enumerating PCI devices from the OF device tree, sparc
used pci_resource_adjust() to perform this address fixup for P2P bridge
windows in the following places:

   pci_cfg_fake_ranges()
   apb_fake_ranges()
   of_scan_pci_bridge()

This patch replaces pci_resource_adjust() with the generic
pcibios_bus_to_resource() and the appropriate pci_add_resource_offset()
use to tell the PCI core about host bridge apertures and offsets.

Resources of non-P2P bridge devices are set in pci_parse_of_addrs() and,
as far as I can see, never converted to CPU addresses.
I'm concerned about this -- the fact that we seem to do bus-to-CPU
conversions on P2P bridge windows, but not on endpoint BARs.

Is it really the case that the OF device tree has bus addresses for
P2P windows but CPU addresses for other BARs?  That would be
surprising to me.  Or did I miss a conversion somewhere?

Help :)  Any sparc experts want to enlighten me?

Bjorn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help