OSDN Git Service

PCI: Set resource size directly in adjust_bridge_window()
authorNicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
Mon, 6 Jan 2020 15:47:46 +0000 (15:47 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 29 Jan 2020 22:57:28 +0000 (16:57 -0600)
commitae4611f1d7e99eda6916bbc5fc8df26516edf95e
treed5fab11937c023158404e45c687edf686bfdefa8
parent1e58f4e1cb47de03988f8b14f07f6941acc7e669
PCI: Set resource size directly in adjust_bridge_window()

Change adjust_bridge_window() to set resource size directly instead of
using additional resource lists.

Because additional resource lists are optional resources, any algorithm
that requires guaranteed allocation that uses them cannot be guaranteed to
work.

Remove the resource from add_list, as a zero-sized additional resource is
redundant.

Update comment in pci_bus_distribute_available_resources() to reflect the
above changes.

Link: https://lore.kernel.org/r/PSXP216MB04386BA48874B56BC5CB0292803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM
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