[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 03 Mar 2016 10:54:07 -0600
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: linux-pci@...r.kernel.org
Cc: Matthew Garrett <mjg59@...f.ucam.org>,
Tony Luck <tony.luck@...el.com>,
DRI <dri-devel@...ts.freedesktop.org>,
Fenghua Yu <fenghua.yu@...el.com>,
Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
linux-kernel@...r.kernel.org, Ralf Baechle <ralf@...ux-mips.org>,
Andy Lutomirski <luto@...capital.net>,
Bruno Prémont <bonbons@...ux-vserver.org>,
Daniel Stone <daniel@...ishbar.org>,
Alex Deucher <alexdeucher@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>
Subject: [PATCH v1 02/12] PCI: Don't assign or reassign immutable resources
IORESOURCE_PCI_FIXED means the resource can't be moved, so if it's set,
don't bother trying to assign or reassign the resource.
Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
---
drivers/pci/setup-res.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 604011e..66c4d8f 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -276,6 +276,9 @@ int pci_assign_resource(struct pci_dev *dev, int resno)
resource_size_t align, size;
int ret;
+ if (res->flags & IORESOURCE_PCI_FIXED)
+ return 0;
+
res->flags |= IORESOURCE_UNSET;
align = pci_resource_alignment(dev, res);
if (!align) {
@@ -321,6 +324,9 @@ int pci_reassign_resource(struct pci_dev *dev, int resno, resource_size_t addsiz
resource_size_t new_size;
int ret;
+ if (res->flags & IORESOURCE_PCI_FIXED)
+ return 0;
+
flags = res->flags;
res->flags |= IORESOURCE_UNSET;
if (!res->parent) {
Powered by blists - more mailing lists