X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fpci%2Fsetup-res.c;h=6dfd86167e39107fe92058b92a5ade8d90784566;hb=03a667559138d47cea487823332c4712fc6fbec7;hp=ab78e4bbdd83044bc6bb6a3f32e4d7ea3834bf52;hpb=b20e481ab595e9667c33e2393bdfe9a31870d11f;p=powerpc.git diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index ab78e4bbdd..6dfd86167e 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -33,11 +33,22 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) u32 new, check, mask; int reg; - /* Ignore resources for unimplemented BARs and unused resource slots - for 64 bit BARs. */ + /* + * Ignore resources for unimplemented BARs and unused resource slots + * for 64 bit BARs. + */ if (!res->flags) return; + /* + * Ignore non-moveable resources. This might be legacy resources for + * which no functional BAR register exists or another important + * system resource we should better not move around in system address + * space. + */ + if (res->flags & IORESOURCE_PCI_FIXED) + return; + pcibios_resource_to_bus(dev, ®ion, res); pr_debug(" got res [%llx:%llx] bus [%lx:%lx] flags %lx for " @@ -90,8 +101,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) new & ~PCI_REGION_FLAG_MASK); } -int __devinit -pci_claim_resource(struct pci_dev *dev, int resource) +int pci_claim_resource(struct pci_dev *dev, int resource) { struct resource *res = &dev->resource[resource]; struct resource *root = NULL; @@ -201,8 +211,7 @@ EXPORT_SYMBOL_GPL(pci_assign_resource_fixed); #endif /* Sort resources by alignment */ -void __devinit -pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) +void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) { int i; @@ -212,6 +221,10 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) resource_size_t r_align; r = &dev->resource[i]; + + if (r->flags & IORESOURCE_PCI_FIXED) + continue; + r_align = r->end - r->start; if (!(r->flags) || r->parent)