diff options
Diffstat (limited to 'drivers/pci/setup-res.c')
-rw-r--r-- | drivers/pci/setup-res.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 577f4b55c46d..ab78e4bbdd83 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -40,8 +40,9 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) | |||
40 | 40 | ||
41 | pcibios_resource_to_bus(dev, ®ion, res); | 41 | pcibios_resource_to_bus(dev, ®ion, res); |
42 | 42 | ||
43 | pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for " | 43 | pr_debug(" got res [%llx:%llx] bus [%lx:%lx] flags %lx for " |
44 | "BAR %d of %s\n", res->start, res->end, | 44 | "BAR %d of %s\n", (unsigned long long)res->start, |
45 | (unsigned long long)res->end, | ||
45 | region.start, region.end, res->flags, resno, pci_name(dev)); | 46 | region.start, region.end, res->flags, resno, pci_name(dev)); |
46 | 47 | ||
47 | new = region.start | (res->flags & PCI_REGION_FLAG_MASK); | 48 | new = region.start | (res->flags & PCI_REGION_FLAG_MASK); |
@@ -104,10 +105,12 @@ pci_claim_resource(struct pci_dev *dev, int resource) | |||
104 | err = insert_resource(root, res); | 105 | err = insert_resource(root, res); |
105 | 106 | ||
106 | if (err) { | 107 | if (err) { |
107 | printk(KERN_ERR "PCI: %s region %d of %s %s [%lx:%lx]\n", | 108 | printk(KERN_ERR "PCI: %s region %d of %s %s [%llx:%llx]\n", |
108 | root ? "Address space collision on" : | 109 | root ? "Address space collision on" : |
109 | "No parent found for", | 110 | "No parent found for", |
110 | resource, dtype, pci_name(dev), res->start, res->end); | 111 | resource, dtype, pci_name(dev), |
112 | (unsigned long long)res->start, | ||
113 | (unsigned long long)res->end); | ||
111 | } | 114 | } |
112 | 115 | ||
113 | return err; | 116 | return err; |
@@ -118,7 +121,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
118 | { | 121 | { |
119 | struct pci_bus *bus = dev->bus; | 122 | struct pci_bus *bus = dev->bus; |
120 | struct resource *res = dev->resource + resno; | 123 | struct resource *res = dev->resource + resno; |
121 | unsigned long size, min, align; | 124 | resource_size_t size, min, align; |
122 | int ret; | 125 | int ret; |
123 | 126 | ||
124 | size = res->end - res->start + 1; | 127 | size = res->end - res->start + 1; |
@@ -145,9 +148,11 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
145 | } | 148 | } |
146 | 149 | ||
147 | if (ret) { | 150 | if (ret) { |
148 | printk(KERN_ERR "PCI: Failed to allocate %s resource #%d:%lx@%lx for %s\n", | 151 | printk(KERN_ERR "PCI: Failed to allocate %s resource " |
149 | res->flags & IORESOURCE_IO ? "I/O" : "mem", | 152 | "#%d:%llx@%llx for %s\n", |
150 | resno, size, res->start, pci_name(dev)); | 153 | res->flags & IORESOURCE_IO ? "I/O" : "mem", |
154 | resno, (unsigned long long)size, | ||
155 | (unsigned long long)res->start, pci_name(dev)); | ||
151 | } else if (resno < PCI_BRIDGE_RESOURCES) { | 156 | } else if (resno < PCI_BRIDGE_RESOURCES) { |
152 | pci_update_resource(dev, res, resno); | 157 | pci_update_resource(dev, res, resno); |
153 | } | 158 | } |
@@ -204,7 +209,7 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |||
204 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | 209 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { |
205 | struct resource *r; | 210 | struct resource *r; |
206 | struct resource_list *list, *tmp; | 211 | struct resource_list *list, *tmp; |
207 | unsigned long r_align; | 212 | resource_size_t r_align; |
208 | 213 | ||
209 | r = &dev->resource[i]; | 214 | r = &dev->resource[i]; |
210 | r_align = r->end - r->start; | 215 | r_align = r->end - r->start; |
@@ -213,13 +218,14 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |||
213 | continue; | 218 | continue; |
214 | if (!r_align) { | 219 | if (!r_align) { |
215 | printk(KERN_WARNING "PCI: Ignore bogus resource %d " | 220 | printk(KERN_WARNING "PCI: Ignore bogus resource %d " |
216 | "[%lx:%lx] of %s\n", | 221 | "[%llx:%llx] of %s\n", |
217 | i, r->start, r->end, pci_name(dev)); | 222 | i, (unsigned long long)r->start, |
223 | (unsigned long long)r->end, pci_name(dev)); | ||
218 | continue; | 224 | continue; |
219 | } | 225 | } |
220 | r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start; | 226 | r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start; |
221 | for (list = head; ; list = list->next) { | 227 | for (list = head; ; list = list->next) { |
222 | unsigned long align = 0; | 228 | resource_size_t align = 0; |
223 | struct resource_list *ln = list->next; | 229 | struct resource_list *ln = list->next; |
224 | int idx; | 230 | int idx; |
225 | 231 | ||