On Wednesday, January 29, 2020 4:29:31 PM CET Sergei Miroshnichenko wrote: > When the Movable BARs feature is supported, the PCI subsystem is able to > distribute existing BARs and allocate the new ones itself, without need to > reserve gaps by BIOS. > > CC: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > Signed-off-by: Sergei Miroshnichenko <s.miroshnichenko@xxxxxxxxx> > --- > drivers/pnp/system.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c > index 6950503741eb..16cd260a609d 100644 > --- a/drivers/pnp/system.c > +++ b/drivers/pnp/system.c > @@ -12,6 +12,7 @@ > #include <linux/device.h> > #include <linux/init.h> > #include <linux/slab.h> > +#include <linux/pci.h> > #include <linux/kernel.h> > #include <linux/ioport.h> > > @@ -58,6 +59,11 @@ static void reserve_resources_of_dev(struct pnp_dev *dev) > struct resource *res; > int i; > > +#ifdef CONFIG_PCI > + if (pci_can_move_bars) > + return; > +#endif Would it be a problem to define pci_can_move_bars() as a static inline returning 'false' when CONFIG_PCI is unset? The #ifdef wouldn't be needed here then. > + > for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IO, i)); i++) { > if (res->flags & IORESOURCE_DISABLED) > continue; >