aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/hotplug/cpcihp_zt5550.c9
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c10
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c5
-rw-r--r--drivers/pci/hotplug/shpchp_sysfs.c18
-rw-r--r--drivers/pci/pci.c6
-rw-r--r--drivers/pci/proc.c16
-rw-r--r--drivers/pci/setup-bus.c6
-rw-r--r--drivers/pci/setup-res.c28
8 files changed, 55 insertions, 43 deletions
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/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
693err_out: 693err_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/proc.c b/drivers/pci/proc.c
index 54b2ebc9c91a..20dfd77bd8c2 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 */
312static void *pci_seq_start(struct seq_file *m, loff_t *pos) 306static void *pci_seq_start(struct seq_file *m, loff_t *pos)
313{ 307{
@@ -358,16 +352,16 @@ static int show_device(struct seq_file *m, void *v)
358 for (i=0; i<7; i++) { 352 for (i=0; i<7; i++) {
359 u64 start, end; 353 u64 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 u64 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/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..f5ff0d3ba620 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, &region, res); 41 pcibios_resource_to_bus(dev, &region, 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;
@@ -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 }
@@ -213,8 +218,9 @@ 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;