]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/setup-bus.c
Merge branch 'master' of git://oak/home/sfr/kernels/iseries/work
[linux-2.6-omap-h63xx.git] / drivers / pci / setup-bus.c
index 35086e80faa91a9db5ea225b5166d29f1b88e1b4..54404917be9a5ebbaaa77d694d118eba1298a7d3 100644 (file)
@@ -55,12 +55,19 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
        list_for_each_entry(dev, &bus->devices, bus_list) {
                u16 class = dev->class >> 8;
 
-               /* Don't touch classless devices or host bridges or ioapics.  */
+               /* Don't touch classless devices or host bridges. */
                if (class == PCI_CLASS_NOT_DEFINED ||
-                   class == PCI_CLASS_BRIDGE_HOST ||
-                   class == PCI_CLASS_SYSTEM_PIC)
+                   class == PCI_CLASS_BRIDGE_HOST)
                        continue;
 
+               /* Don't touch ioapics if it has the assigned resources. */
+               if (class == PCI_CLASS_SYSTEM_PIC) {
+                       res = &dev->resource[0];
+                       if (res[0].start || res[1].start || res[2].start ||
+                           res[3].start || res[4].start || res[5].start)
+                               continue;
+               }
+
                pdev_sort_resources(dev, &head);
        }
 
@@ -357,8 +364,10 @@ pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type)
                        order = __ffs(align) - 20;
                        if (order > 11) {
                                printk(KERN_WARNING "PCI: region %s/%d "
-                                      "too large: %lx-%lx\n",
-                                      pci_name(dev), i, r->start, r->end);
+                                      "too large: %llx-%llx\n",
+                                       pci_name(dev), i,
+                                       (unsigned long long)r->start,
+                                       (unsigned long long)r->end);
                                r->flags = 0;
                                continue;
                        }