diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/bus.c | 10 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpcihp_zt5550.c | 9 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpqphp_core.c | 10 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 5 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_sysfs.c | 18 | ||||
-rw-r--r-- | drivers/pci/msi.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci.h | 6 | ||||
-rw-r--r-- | drivers/pci/proc.c | 20 | ||||
-rw-r--r-- | drivers/pci/rom.c | 10 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 6 | ||||
-rw-r--r-- | drivers/pci/setup-res.c | 34 |
13 files changed, 78 insertions, 66 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 723092682023..5f7db9d2436e 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -34,11 +34,11 @@ | |||
34 | */ | 34 | */ |
35 | int | 35 | int |
36 | pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 36 | pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, |
37 | unsigned long size, unsigned long align, unsigned long min, | 37 | resource_size_t size, resource_size_t align, |
38 | unsigned int type_mask, | 38 | resource_size_t min, unsigned int type_mask, |
39 | void (*alignf)(void *, struct resource *, | 39 | void (*alignf)(void *, struct resource *, resource_size_t, |
40 | unsigned long, unsigned long), | 40 | resource_size_t), |
41 | void *alignf_data) | 41 | void *alignf_data) |
42 | { | 42 | { |
43 | int i, ret = -ENOMEM; | 43 | int i, ret = -ENOMEM; |
44 | 44 | ||
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index f7cb00da38df..1ec165df8522 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c | |||
@@ -95,8 +95,8 @@ static int zt5550_hc_config(struct pci_dev *pdev) | |||
95 | 95 | ||
96 | hc_dev = pdev; | 96 | hc_dev = pdev; |
97 | dbg("hc_dev = %p", hc_dev); | 97 | dbg("hc_dev = %p", hc_dev); |
98 | dbg("pci resource start %lx", pci_resource_start(hc_dev, 1)); | 98 | dbg("pci resource start %llx", (unsigned long long)pci_resource_start(hc_dev, 1)); |
99 | dbg("pci resource len %lx", pci_resource_len(hc_dev, 1)); | 99 | dbg("pci resource len %llx", (unsigned long long)pci_resource_len(hc_dev, 1)); |
100 | 100 | ||
101 | if(!request_mem_region(pci_resource_start(hc_dev, 1), | 101 | if(!request_mem_region(pci_resource_start(hc_dev, 1), |
102 | pci_resource_len(hc_dev, 1), MY_NAME)) { | 102 | pci_resource_len(hc_dev, 1), MY_NAME)) { |
@@ -108,8 +108,9 @@ static int zt5550_hc_config(struct pci_dev *pdev) | |||
108 | hc_registers = | 108 | hc_registers = |
109 | ioremap(pci_resource_start(hc_dev, 1), pci_resource_len(hc_dev, 1)); | 109 | ioremap(pci_resource_start(hc_dev, 1), pci_resource_len(hc_dev, 1)); |
110 | if(!hc_registers) { | 110 | if(!hc_registers) { |
111 | err("cannot remap MMIO region %lx @ %lx", | 111 | err("cannot remap MMIO region %llx @ %llx", |
112 | pci_resource_len(hc_dev, 1), pci_resource_start(hc_dev, 1)); | 112 | (unsigned long long)pci_resource_len(hc_dev, 1), |
113 | (unsigned long long)pci_resource_start(hc_dev, 1)); | ||
113 | ret = -ENODEV; | 114 | ret = -ENODEV; |
114 | goto exit_release_region; | 115 | goto exit_release_region; |
115 | } | 116 | } |
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index 9bc1deb8df52..f8658d63f077 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c | |||
@@ -1089,8 +1089,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | dbg("pdev = %p\n", pdev); | 1091 | dbg("pdev = %p\n", pdev); |
1092 | dbg("pci resource start %lx\n", pci_resource_start(pdev, 0)); | 1092 | dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0)); |
1093 | dbg("pci resource len %lx\n", pci_resource_len(pdev, 0)); | 1093 | dbg("pci resource len %llx\n", (unsigned long long)pci_resource_len(pdev, 0)); |
1094 | 1094 | ||
1095 | if (!request_mem_region(pci_resource_start(pdev, 0), | 1095 | if (!request_mem_region(pci_resource_start(pdev, 0), |
1096 | pci_resource_len(pdev, 0), MY_NAME)) { | 1096 | pci_resource_len(pdev, 0), MY_NAME)) { |
@@ -1102,9 +1102,9 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1102 | ctrl->hpc_reg = ioremap(pci_resource_start(pdev, 0), | 1102 | ctrl->hpc_reg = ioremap(pci_resource_start(pdev, 0), |
1103 | pci_resource_len(pdev, 0)); | 1103 | pci_resource_len(pdev, 0)); |
1104 | if (!ctrl->hpc_reg) { | 1104 | if (!ctrl->hpc_reg) { |
1105 | err("cannot remap MMIO region %lx @ %lx\n", | 1105 | err("cannot remap MMIO region %llx @ %llx\n", |
1106 | pci_resource_len(pdev, 0), | 1106 | (unsigned long long)pci_resource_len(pdev, 0), |
1107 | pci_resource_start(pdev, 0)); | 1107 | (unsigned long long)pci_resource_start(pdev, 0)); |
1108 | rc = -ENODEV; | 1108 | rc = -ENODEV; |
1109 | goto err_free_mem_region; | 1109 | goto err_free_mem_region; |
1110 | } | 1110 | } |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index d77138ecb098..11f7858f0064 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -1398,8 +1398,9 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) | |||
1398 | 1398 | ||
1399 | for ( rc = 0; rc < DEVICE_COUNT_RESOURCE; rc++) | 1399 | for ( rc = 0; rc < DEVICE_COUNT_RESOURCE; rc++) |
1400 | if (pci_resource_len(pdev, rc) > 0) | 1400 | if (pci_resource_len(pdev, rc) > 0) |
1401 | dbg("pci resource[%d] start=0x%lx(len=0x%lx)\n", rc, | 1401 | dbg("pci resource[%d] start=0x%llx(len=0x%llx)\n", rc, |
1402 | pci_resource_start(pdev, rc), pci_resource_len(pdev, rc)); | 1402 | (unsigned long long)pci_resource_start(pdev, rc), |
1403 | (unsigned long long)pci_resource_len(pdev, rc)); | ||
1403 | 1404 | ||
1404 | info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, | 1405 | info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, |
1405 | pdev->subsystem_vendor, pdev->subsystem_device); | 1406 | pdev->subsystem_vendor, pdev->subsystem_device); |
diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c index f5cfbf2c047c..620e1139e607 100644 --- a/drivers/pci/hotplug/shpchp_sysfs.c +++ b/drivers/pci/hotplug/shpchp_sysfs.c | |||
@@ -51,8 +51,10 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha | |||
51 | res = bus->resource[index]; | 51 | res = bus->resource[index]; |
52 | if (res && (res->flags & IORESOURCE_MEM) && | 52 | if (res && (res->flags & IORESOURCE_MEM) && |
53 | !(res->flags & IORESOURCE_PREFETCH)) { | 53 | !(res->flags & IORESOURCE_PREFETCH)) { |
54 | out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", | 54 | out += sprintf(out, "start = %8.8llx, " |
55 | res->start, (res->end - res->start)); | 55 | "length = %8.8llx\n", |
56 | (unsigned long long)res->start, | ||
57 | (unsigned long long)(res->end - res->start)); | ||
56 | } | 58 | } |
57 | } | 59 | } |
58 | out += sprintf(out, "Free resources: prefetchable memory\n"); | 60 | out += sprintf(out, "Free resources: prefetchable memory\n"); |
@@ -60,16 +62,20 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha | |||
60 | res = bus->resource[index]; | 62 | res = bus->resource[index]; |
61 | if (res && (res->flags & IORESOURCE_MEM) && | 63 | if (res && (res->flags & IORESOURCE_MEM) && |
62 | (res->flags & IORESOURCE_PREFETCH)) { | 64 | (res->flags & IORESOURCE_PREFETCH)) { |
63 | out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", | 65 | out += sprintf(out, "start = %8.8llx, " |
64 | res->start, (res->end - res->start)); | 66 | "length = %8.8llx\n", |
67 | (unsigned long long)res->start, | ||
68 | (unsigned long long)(res->end - res->start)); | ||
65 | } | 69 | } |
66 | } | 70 | } |
67 | out += sprintf(out, "Free resources: IO\n"); | 71 | out += sprintf(out, "Free resources: IO\n"); |
68 | for (index = 0; index < PCI_BUS_NUM_RESOURCES; index++) { | 72 | for (index = 0; index < PCI_BUS_NUM_RESOURCES; index++) { |
69 | res = bus->resource[index]; | 73 | res = bus->resource[index]; |
70 | if (res && (res->flags & IORESOURCE_IO)) { | 74 | if (res && (res->flags & IORESOURCE_IO)) { |
71 | out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", | 75 | out += sprintf(out, "start = %8.8llx, " |
72 | res->start, (res->end - res->start)); | 76 | "length = %8.8llx\n", |
77 | (unsigned long long)res->start, | ||
78 | (unsigned long long)(res->end - res->start)); | ||
73 | } | 79 | } |
74 | } | 80 | } |
75 | out += sprintf(out, "Free resources: bus numbers\n"); | 81 | out += sprintf(out, "Free resources: bus numbers\n"); |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 7f8429284fab..76d023d8a33b 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -429,12 +429,12 @@ static void irq_handler_init(int cap_id, int pos, int mask) | |||
429 | 429 | ||
430 | spin_lock_irqsave(&irq_desc[pos].lock, flags); | 430 | spin_lock_irqsave(&irq_desc[pos].lock, flags); |
431 | if (cap_id == PCI_CAP_ID_MSIX) | 431 | if (cap_id == PCI_CAP_ID_MSIX) |
432 | irq_desc[pos].handler = &msix_irq_type; | 432 | irq_desc[pos].chip = &msix_irq_type; |
433 | else { | 433 | else { |
434 | if (!mask) | 434 | if (!mask) |
435 | irq_desc[pos].handler = &msi_irq_wo_maskbit_type; | 435 | irq_desc[pos].chip = &msi_irq_wo_maskbit_type; |
436 | else | 436 | else |
437 | irq_desc[pos].handler = &msi_irq_w_maskbit_type; | 437 | irq_desc[pos].chip = &msi_irq_w_maskbit_type; |
438 | } | 438 | } |
439 | spin_unlock_irqrestore(&irq_desc[pos].lock, flags); | 439 | spin_unlock_irqrestore(&irq_desc[pos].lock, flags); |
440 | } | 440 | } |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index bc405c035ce3..606f9b6f70eb 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -87,7 +87,7 @@ resource_show(struct device * dev, struct device_attribute *attr, char * buf) | |||
87 | char * str = buf; | 87 | char * str = buf; |
88 | int i; | 88 | int i; |
89 | int max = 7; | 89 | int max = 7; |
90 | u64 start, end; | 90 | resource_size_t start, end; |
91 | 91 | ||
92 | if (pci_dev->subordinate) | 92 | if (pci_dev->subordinate) |
93 | max = DEVICE_COUNT_RESOURCE; | 93 | max = DEVICE_COUNT_RESOURCE; |
@@ -365,7 +365,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, | |||
365 | struct device, kobj)); | 365 | struct device, kobj)); |
366 | struct resource *res = (struct resource *)attr->private; | 366 | struct resource *res = (struct resource *)attr->private; |
367 | enum pci_mmap_state mmap_type; | 367 | enum pci_mmap_state mmap_type; |
368 | u64 start, end; | 368 | resource_size_t start, end; |
369 | int i; | 369 | int i; |
370 | 370 | ||
371 | for (i = 0; i < PCI_ROM_RESOURCE; i++) | 371 | for (i = 0; i < PCI_ROM_RESOURCE; i++) |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 23d3b17c8cad..cf57d7de3765 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -691,10 +691,12 @@ int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name) | |||
691 | return 0; | 691 | return 0; |
692 | 692 | ||
693 | err_out: | 693 | err_out: |
694 | printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%lx@%lx for device %s\n", | 694 | printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%llx@%llx " |
695 | "for device %s\n", | ||
695 | pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem", | 696 | pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem", |
696 | bar + 1, /* PCI BAR # */ | 697 | bar + 1, /* PCI BAR # */ |
697 | pci_resource_len(pdev, bar), pci_resource_start(pdev, bar), | 698 | (unsigned long long)pci_resource_len(pdev, bar), |
699 | (unsigned long long)pci_resource_start(pdev, bar), | ||
698 | pci_name(pdev)); | 700 | pci_name(pdev)); |
699 | return -EBUSY; | 701 | return -EBUSY; |
700 | } | 702 | } |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 29bdeca031a8..9cc842b666eb 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -6,10 +6,10 @@ extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); | |||
6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); | 6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); |
7 | extern void pci_cleanup_rom(struct pci_dev *dev); | 7 | extern void pci_cleanup_rom(struct pci_dev *dev); |
8 | extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 8 | extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, |
9 | unsigned long size, unsigned long align, | 9 | resource_size_t size, resource_size_t align, |
10 | unsigned long min, unsigned int type_mask, | 10 | resource_size_t min, unsigned int type_mask, |
11 | void (*alignf)(void *, struct resource *, | 11 | void (*alignf)(void *, struct resource *, |
12 | unsigned long, unsigned long), | 12 | resource_size_t, resource_size_t), |
13 | void *alignf_data); | 13 | void *alignf_data); |
14 | /* Firmware callbacks */ | 14 | /* Firmware callbacks */ |
15 | extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); | 15 | extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); |
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 54b2ebc9c91a..99cf33379769 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -302,12 +302,6 @@ static struct file_operations proc_bus_pci_operations = { | |||
302 | #endif /* HAVE_PCI_MMAP */ | 302 | #endif /* HAVE_PCI_MMAP */ |
303 | }; | 303 | }; |
304 | 304 | ||
305 | #if BITS_PER_LONG == 32 | ||
306 | #define LONG_FORMAT "\t%08lx" | ||
307 | #else | ||
308 | #define LONG_FORMAT "\t%16lx" | ||
309 | #endif | ||
310 | |||
311 | /* iterator */ | 305 | /* iterator */ |
312 | static void *pci_seq_start(struct seq_file *m, loff_t *pos) | 306 | static void *pci_seq_start(struct seq_file *m, loff_t *pos) |
313 | { | 307 | { |
@@ -356,18 +350,18 @@ static int show_device(struct seq_file *m, void *v) | |||
356 | dev->irq); | 350 | dev->irq); |
357 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ | 351 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ |
358 | for (i=0; i<7; i++) { | 352 | for (i=0; i<7; i++) { |
359 | u64 start, end; | 353 | resource_size_t start, end; |
360 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | 354 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); |
361 | seq_printf(m, LONG_FORMAT, | 355 | seq_printf(m, "\t%16llx", |
362 | ((unsigned long)start) | | 356 | (unsigned long long)(start | |
363 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); | 357 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK))); |
364 | } | 358 | } |
365 | for (i=0; i<7; i++) { | 359 | for (i=0; i<7; i++) { |
366 | u64 start, end; | 360 | resource_size_t start, end; |
367 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | 361 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); |
368 | seq_printf(m, LONG_FORMAT, | 362 | seq_printf(m, "\t%16llx", |
369 | dev->resource[i].start < dev->resource[i].end ? | 363 | dev->resource[i].start < dev->resource[i].end ? |
370 | (unsigned long)(end - start) + 1 : 0); | 364 | (unsigned long long)(end - start) + 1 : 0); |
371 | } | 365 | } |
372 | seq_putc(m, '\t'); | 366 | seq_putc(m, '\t'); |
373 | if (drv) | 367 | if (drv) |
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 598a115cd00e..cbb69cf41311 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
@@ -80,8 +80,8 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) | |||
80 | } else { | 80 | } else { |
81 | if (res->flags & IORESOURCE_ROM_COPY) { | 81 | if (res->flags & IORESOURCE_ROM_COPY) { |
82 | *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); | 82 | *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); |
83 | return (void __iomem *)pci_resource_start(pdev, | 83 | return (void __iomem *)(unsigned long) |
84 | PCI_ROM_RESOURCE); | 84 | pci_resource_start(pdev, PCI_ROM_RESOURCE); |
85 | } else { | 85 | } else { |
86 | /* assign the ROM an address if it doesn't have one */ | 86 | /* assign the ROM an address if it doesn't have one */ |
87 | if (res->parent == NULL && | 87 | if (res->parent == NULL && |
@@ -170,11 +170,11 @@ void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size) | |||
170 | return rom; | 170 | return rom; |
171 | 171 | ||
172 | res->end = res->start + *size; | 172 | res->end = res->start + *size; |
173 | memcpy_fromio((void*)res->start, rom, *size); | 173 | memcpy_fromio((void*)(unsigned long)res->start, rom, *size); |
174 | pci_unmap_rom(pdev, rom); | 174 | pci_unmap_rom(pdev, rom); |
175 | res->flags |= IORESOURCE_ROM_COPY; | 175 | res->flags |= IORESOURCE_ROM_COPY; |
176 | 176 | ||
177 | return (void __iomem *)res->start; | 177 | return (void __iomem *)(unsigned long)res->start; |
178 | } | 178 | } |
179 | 179 | ||
180 | /** | 180 | /** |
@@ -227,7 +227,7 @@ void pci_cleanup_rom(struct pci_dev *pdev) | |||
227 | { | 227 | { |
228 | struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; | 228 | struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; |
229 | if (res->flags & IORESOURCE_ROM_COPY) { | 229 | if (res->flags & IORESOURCE_ROM_COPY) { |
230 | kfree((void*)res->start); | 230 | kfree((void*)(unsigned long)res->start); |
231 | res->flags &= ~IORESOURCE_ROM_COPY; | 231 | res->flags &= ~IORESOURCE_ROM_COPY; |
232 | res->start = 0; | 232 | res->start = 0; |
233 | res->end = 0; | 233 | res->end = 0; |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 35086e80faa9..47c1071ad84e 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -357,8 +357,10 @@ pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type) | |||
357 | order = __ffs(align) - 20; | 357 | order = __ffs(align) - 20; |
358 | if (order > 11) { | 358 | if (order > 11) { |
359 | printk(KERN_WARNING "PCI: region %s/%d " | 359 | printk(KERN_WARNING "PCI: region %s/%d " |
360 | "too large: %lx-%lx\n", | 360 | "too large: %llx-%llx\n", |
361 | pci_name(dev), i, r->start, r->end); | 361 | pci_name(dev), i, |
362 | (unsigned long long)r->start, | ||
363 | (unsigned long long)r->end); | ||
362 | r->flags = 0; | 364 | r->flags = 0; |
363 | continue; | 365 | continue; |
364 | } | 366 | } |
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 | ||