PCI: Use multi-pass resource claiming in pci_bus_allocate_dev_resources()

This brings the generic resource claiming code a few steps
closer to x86 (and to some extent powerpc) by using a multi-pass
mechanism that will prefer enabled resources in the first pass
and will claim non-IOV resources before IOV resources.

The remaining differences with x86 are:

 - The code to disable ROM BARs will come later

 - We claim ROM resources (in pass 1 only). This will have to eventually
   be moved elsewhere so x86 can control it the way it does today.

 - We check for r->flags being 0 (x86 doesn't for some reason)


Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 file changed