PCI: Pass size + alignment to pci_bus_distribute_available_resources()
authorNicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
Mon, 6 Jan 2020 15:45:52 +0000 (15:45 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 29 Jan 2020 22:56:47 +0000 (16:56 -0600)
commitd555a50fd6e0280735cabf8581feff875f3f39d7
tree90ff0741bcb0d4b407ad53824c405562260e22be
parent053eb5c150fd732624a1ea2f456337972d52b163
PCI: Pass size + alignment to pci_bus_distribute_available_resources()

Change pci_bus_distribute_available_resources() arguments from
resource_size_t to struct resource to add more information required to get
the alignment correct for bridge windows with alignment >1M.

We require (size, alignment), instead of just (size) which is what is
currently available. The change from resource_size_t to struct resource
does just that.

Note that the struct resource arguments are passed by value and not by
reference. We do not want to pass by reference and change the resource size
of the parent bridge window. We only want the size information.

No functional change intended.

Link: https://lore.kernel.org/r/PSXP216MB0438587C47CBEDF365B1EA27803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM
[bhelgaas: split parts to other patches to reduce the size of this one]
Signed-off-by: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/setup-bus.c