Patchwork [RFC,v2,09/21] PCI: Don't reserve memory for hotplug when enabled movable BARs

login
register
mail settings
Submitter Sergey Miroshnichenko
Date Jan. 11, 2019, 3:36 p.m.
Message ID <20190111153707.10140-10-s.miroshnichenko@yadro.com>
Download mbox | patch
Permalink /patch/697843/
State New
Headers show

Comments

Sergey Miroshnichenko - Jan. 11, 2019, 3:36 p.m.
pbus_size_mem() returns a precise amount of memory required to fit
all the requested BARs and windows of children bridges.

Signed-off-by: Sergey Miroshnichenko <s.miroshnichenko@yadro.com>
---
 drivers/pci/setup-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 99aa78668e9e..3ed13abdf937 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1266,7 +1266,7 @@  void __pci_bus_size_bridges(struct pci_bus *bus, struct list_head *realloc_head)
 
 	case PCI_CLASS_BRIDGE_PCI:
 		pci_bridge_check_ranges(bus);
-		if (bus->self->is_hotplug_bridge) {
+		if (bus->self->is_hotplug_bridge && !pci_movable_bars_enabled()) {
 			additional_io_size  = pci_hotplug_io_size;
 			additional_mem_size = pci_hotplug_mem_size;
 		}