Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/4] i2o: Use pci_bus_alloc_resource()
@ 2014-02-26 19:08 Bjorn Helgaas
  2014-02-26 19:09 ` [PATCH 1/4] i2o: Fix I/O space allocation copy/paste error Bjorn Helgaas
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2014-02-26 19:08 UTC (permalink / raw)
  To: linux-pci; +Cc: Markus Lidel, linux-kernel

i20 currently uses pci_find_parent_resource() followed by
allocate_resource() to allocate PCI space.  The problem is that this won't
work reliably because before we allocate the space, we don't know its
address, and therefore we can't find the parent resource.  Even if we know
the *type* of space we want, in some cases there are multiple possibilities
(root buses with multiple apertures to them, prefetchable or
non-prefetchable apertures, etc.)

This changes it to use pci_bus_alloc_resource(), which takes care of those
details.

This also fixes some things that look like copy/paste errors, e.g., trying
to allocate an I/O space with 1MB alignment.

I don't have hardware to test these changes, but I don't think these
allocation paths actually worked before, this shouldn't be any worse than
what we have today.

---

Bjorn Helgaas (4):
      i2o: Fix I/O space allocation copy/paste error
      i2o: Fix I/O space alignment requirement
      i2o: Refactor i2o_iop_systab_set() PCI space allocation
      i2o: Use pci_bus_alloc_resource(), not allocate_resource() directly


 drivers/message/i2o/iop.c |   85 ++++++++++++++++++++++-----------------------
 1 file changed, 42 insertions(+), 43 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-04 20:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-26 19:08 [PATCH 0/4] i2o: Use pci_bus_alloc_resource() Bjorn Helgaas
2014-02-26 19:09 ` [PATCH 1/4] i2o: Fix I/O space allocation copy/paste error Bjorn Helgaas
2014-02-26 19:09 ` [PATCH 2/4] i2o: Fix I/O space alignment requirement Bjorn Helgaas
2014-02-26 19:09 ` [PATCH 3/4] i2o: Refactor i2o_iop_systab_set() PCI space allocation Bjorn Helgaas
2014-02-26 19:09 ` [PATCH 4/4] i2o: Use pci_bus_alloc_resource(), not allocate_resource() directly Bjorn Helgaas
2014-02-26 22:48   ` One Thousand Gnomes
2014-02-26 23:47     ` Bjorn Helgaas
2014-03-04 20:52 ` [PATCH 0/4] i2o: Use pci_bus_alloc_resource() Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox