PCI: Decline to resize resources if boot config must be preserved
authorArd Biesheuvel <ardb@kernel.org>
Sat, 9 Jan 2021 09:53:53 +0000 (10:53 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 12 Jan 2021 22:39:52 +0000 (16:39 -0600)
commit729e3a669d1b62e9876a671ac03ccba399a23b68
tree68bd6e8b1ad6c4e5d683ab5363ab5701dce8312d
parent7c53f6b671f4aba70ff15e1b05148b10d58c2837
PCI: Decline to resize resources if boot config must be preserved

The _DSM #5 method in the ACPI host bridge object tells us whether the OS
must preserve the resource assignments done by firmware. If this is the
case, we should not permit drivers to resize BARs on the fly. Make
pci_resize_resource() take this into account.

Link: https://lore.kernel.org/r/20210109095353.13417-1-ardb@kernel.org
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org # v5.4+
drivers/pci/setup-res.c