aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-12 18:18:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-27 12:23:59 -0400
commit685143ac1f7a579a3fac9c7f2ac8f82e95af6864 (patch)
tree0fb1ff8fecb7e21593c022ff458b8db6096d6da5 /arch/powerpc
parent490ab72af6a7a74b1d77e8f1b67fdfad04371876 (diff)
[PATCH] 64bit resource: fix up printks for resources in arch and core code
This is needed if we wish to change the size of the resource structures. Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com> and Andrew Morton. (tweaked by Andy Isaacson <adi@hexapodia.org>) Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andy Isaacson <adi@hexapodia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci_32.c37
-rw-r--r--arch/powerpc/platforms/83xx/pci.c5
-rw-r--r--arch/powerpc/platforms/85xx/pci.c5
-rw-r--r--arch/powerpc/platforms/chrp/pci.c4
-rw-r--r--arch/powerpc/platforms/maple/pci.c5
-rw-r--r--arch/powerpc/platforms/powermac/pci.c5
6 files changed, 33 insertions, 28 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index b5431ccf1147..d9e2506db5f7 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -99,7 +99,7 @@ pcibios_fixup_resources(struct pci_dev *dev)
99 if (!res->flags) 99 if (!res->flags)
100 continue; 100 continue;
101 if (res->end == 0xffffffff) { 101 if (res->end == 0xffffffff) {
102 DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", 102 DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
103 pci_name(dev), i, res->start, res->end); 103 pci_name(dev), i, res->start, res->end);
104 res->end -= res->start; 104 res->end -= res->start;
105 res->start = 0; 105 res->start = 0;
@@ -117,7 +117,7 @@ pcibios_fixup_resources(struct pci_dev *dev)
117 res->start += offset; 117 res->start += offset;
118 res->end += offset; 118 res->end += offset;
119#ifdef DEBUG 119#ifdef DEBUG
120 printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n", 120 printk("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
121 i, res->flags, pci_name(dev), 121 i, res->flags, pci_name(dev),
122 res->start - offset, res->start); 122 res->start - offset, res->start);
123#endif 123#endif
@@ -183,7 +183,7 @@ void pcibios_align_resource(void *data, struct resource *res, unsigned long size
183 183
184 if (size > 0x100) { 184 if (size > 0x100) {
185 printk(KERN_ERR "PCI: I/O Region %s/%d too large" 185 printk(KERN_ERR "PCI: I/O Region %s/%d too large"
186 " (%ld bytes)\n", pci_name(dev), 186 " (%lld bytes)\n", pci_name(dev),
187 dev->resource - res, size); 187 dev->resource - res, size);
188 } 188 }
189 189
@@ -255,8 +255,8 @@ pcibios_allocate_bus_resources(struct list_head *bus_list)
255 } 255 }
256 } 256 }
257 257
258 DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n", 258 DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
259 res->start, res->end, res->flags, pr); 259 res->start, res->end, res->flags, pr);
260 if (pr) { 260 if (pr) {
261 if (request_resource(pr, res) == 0) 261 if (request_resource(pr, res) == 0)
262 continue; 262 continue;
@@ -306,7 +306,7 @@ reparent_resources(struct resource *parent, struct resource *res)
306 *pp = NULL; 306 *pp = NULL;
307 for (p = res->child; p != NULL; p = p->sibling) { 307 for (p = res->child; p != NULL; p = p->sibling) {
308 p->parent = res; 308 p->parent = res;
309 DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n", 309 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
310 p->name, p->start, p->end, res->name); 310 p->name, p->start, p->end, res->name);
311 } 311 }
312 return 0; 312 return 0;
@@ -362,13 +362,14 @@ pci_relocate_bridge_resource(struct pci_bus *bus, int i)
362 try = conflict->start - 1; 362 try = conflict->start - 1;
363 } 363 }
364 if (request_resource(pr, res)) { 364 if (request_resource(pr, res)) {
365 DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n", 365 DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
366 res->start, res->end); 366 res->start, res->end);
367 return -1; /* "can't happen" */ 367 return -1; /* "can't happen" */
368 } 368 }
369 update_bridge_base(bus, i); 369 update_bridge_base(bus, i);
370 printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n", 370 printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
371 bus->number, i, res->start, res->end); 371 bus->number, i, (unsigned long long)res->start,
372 (unsigned long long)res->end);
372 return 0; 373 return 0;
373} 374}
374 375
@@ -479,14 +480,14 @@ static inline void alloc_resource(struct pci_dev *dev, int idx)
479{ 480{
480 struct resource *pr, *r = &dev->resource[idx]; 481 struct resource *pr, *r = &dev->resource[idx];
481 482
482 DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n", 483 DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
483 pci_name(dev), idx, r->start, r->end, r->flags); 484 pci_name(dev), idx, r->start, r->end, r->flags);
484 pr = pci_find_parent_resource(dev, r); 485 pr = pci_find_parent_resource(dev, r);
485 if (!pr || request_resource(pr, r) < 0) { 486 if (!pr || request_resource(pr, r) < 0) {
486 printk(KERN_ERR "PCI: Cannot allocate resource region %d" 487 printk(KERN_ERR "PCI: Cannot allocate resource region %d"
487 " of device %s\n", idx, pci_name(dev)); 488 " of device %s\n", idx, pci_name(dev));
488 if (pr) 489 if (pr)
489 DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n", 490 DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
490 pr, pr->start, pr->end, pr->flags); 491 pr, pr->start, pr->end, pr->flags);
491 /* We'll assign a new address later */ 492 /* We'll assign a new address later */
492 r->flags |= IORESOURCE_UNSET; 493 r->flags |= IORESOURCE_UNSET;
@@ -956,7 +957,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
956 res = &hose->io_resource; 957 res = &hose->io_resource;
957 res->flags = IORESOURCE_IO; 958 res->flags = IORESOURCE_IO;
958 res->start = ranges[2]; 959 res->start = ranges[2];
959 DBG("PCI: IO 0x%lx -> 0x%lx\n", 960 DBG("PCI: IO 0x%llx -> 0x%llx\n",
960 res->start, res->start + size - 1); 961 res->start, res->start + size - 1);
961 break; 962 break;
962 case 2: /* memory space */ 963 case 2: /* memory space */
@@ -978,7 +979,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
978 if(ranges[0] & 0x40000000) 979 if(ranges[0] & 0x40000000)
979 res->flags |= IORESOURCE_PREFETCH; 980 res->flags |= IORESOURCE_PREFETCH;
980 res->start = ranges[na+2]; 981 res->start = ranges[na+2];
981 DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno, 982 DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
982 res->start, res->start + size - 1); 983 res->start, res->start + size - 1);
983 } 984 }
984 break; 985 break;
@@ -1074,7 +1075,7 @@ do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga)
1074 DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge)); 1075 DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
1075 res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); 1076 res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
1076 res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); 1077 res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
1077 DBG(" IO window: %08lx-%08lx\n", res.start, res.end); 1078 DBG(" IO window: %016llx-%016llx\n", res.start, res.end);
1078 1079
1079 /* Set up the top and bottom of the PCI I/O segment for this bus. */ 1080 /* Set up the top and bottom of the PCI I/O segment for this bus. */
1080 pci_read_config_dword(bridge, PCI_IO_BASE, &l); 1081 pci_read_config_dword(bridge, PCI_IO_BASE, &l);
@@ -1223,8 +1224,8 @@ do_fixup_p2p_level(struct pci_bus *bus)
1223 continue; 1224 continue;
1224 if ((r->flags & IORESOURCE_IO) == 0) 1225 if ((r->flags & IORESOURCE_IO) == 0)
1225 continue; 1226 continue;
1226 DBG("Trying to allocate from %08lx, size %08lx from parent" 1227 DBG("Trying to allocate from %016llx, size %016llx from parent"
1227 " res %d: %08lx -> %08lx\n", 1228 " res %d: %016llx -> %016llx\n",
1228 res->start, res->end, i, r->start, r->end); 1229 res->start, res->end, i, r->start, r->end);
1229 1230
1230 if (allocate_resource(r, res, res->end + 1, res->start, max, 1231 if (allocate_resource(r, res, res->end + 1, res->start, max,
@@ -1574,8 +1575,8 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp,
1574 else 1575 else
1575 prot |= _PAGE_GUARDED; 1576 prot |= _PAGE_GUARDED;
1576 1577
1577 printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, 1578 printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev),
1578 prot); 1579 (unsigned long long)rp->start, prot);
1579 1580
1580 return __pgprot(prot); 1581 return __pgprot(prot);
1581} 1582}
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 16f7d3b30e1d..3baceb00fefa 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -91,9 +91,10 @@ int __init add_bridge(struct device_node *dev)
91 mpc83xx_pci2_busno = hose->first_busno; 91 mpc83xx_pci2_busno = hose->first_busno;
92 } 92 }
93 93
94 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " 94 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
95 "Firmware bus number: %d->%d\n", 95 "Firmware bus number: %d->%d\n",
96 rsrc.start, hose->first_busno, hose->last_busno); 96 (unsigned long long)rsrc.start, hose->first_busno,
97 hose->last_busno);
97 98
98 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 99 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
99 hose, hose->cfg_addr, hose->cfg_data); 100 hose, hose->cfg_addr, hose->cfg_data);
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
index bad290110ed1..48c8849c07ca 100644
--- a/arch/powerpc/platforms/85xx/pci.c
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -79,9 +79,10 @@ int __init add_bridge(struct device_node *dev)
79 mpc85xx_pci2_busno = hose->first_busno; 79 mpc85xx_pci2_busno = hose->first_busno;
80 } 80 }
81 81
82 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. " 82 printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. "
83 "Firmware bus number: %d->%d\n", 83 "Firmware bus number: %d->%d\n",
84 rsrc.start, hose->first_busno, hose->last_busno); 84 (unsigned long long)rsrc.start, hose->first_busno,
85 hose->last_busno);
85 86
86 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 87 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
87 hose, hose->cfg_addr, hose->cfg_data); 88 hose, hose->cfg_addr, hose->cfg_data);
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index ac224876ce59..53515daf01b1 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -143,7 +143,7 @@ hydra_init(void)
143 if (np == NULL || of_address_to_resource(np, 0, &r)) 143 if (np == NULL || of_address_to_resource(np, 0, &r))
144 return 0; 144 return 0;
145 Hydra = ioremap(r.start, r.end-r.start); 145 Hydra = ioremap(r.start, r.end-r.start);
146 printk("Hydra Mac I/O at %lx\n", r.start); 146 printk("Hydra Mac I/O at %llx\n", (unsigned long long)r.start);
147 printk("Hydra Feature_Control was %x", 147 printk("Hydra Feature_Control was %x",
148 in_le32(&Hydra->Feature_Control)); 148 in_le32(&Hydra->Feature_Control));
149 out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN | 149 out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN |
@@ -267,7 +267,7 @@ chrp_find_bridges(void)
267 bus_range[0], bus_range[1]); 267 bus_range[0], bus_range[1]);
268 printk(" controlled by %s", dev->type); 268 printk(" controlled by %s", dev->type);
269 if (!is_longtrail) 269 if (!is_longtrail)
270 printk(" at %lx", r.start); 270 printk(" at %llx", (unsigned long long)r.start);
271 printk("\n"); 271 printk("\n");
272 272
273 hose = pcibios_alloc_controller(); 273 hose = pcibios_alloc_controller();
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 9a4efc0c3b29..f7170ff86dab 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -376,9 +376,10 @@ static void __init maple_fixup_phb_resources(void)
376 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; 376 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
377 hose->io_resource.start += offset; 377 hose->io_resource.start += offset;
378 hose->io_resource.end += offset; 378 hose->io_resource.end += offset;
379 printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n", 379 printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
380 hose->global_number, 380 hose->global_number,
381 hose->io_resource.start, hose->io_resource.end); 381 (unsigned long long)hose->io_resource.start,
382 (unsigned long long)hose->io_resource.end);
382 } 383 }
383} 384}
384 385
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 80035853467b..d524a915aa86 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -939,9 +939,10 @@ static int __init add_bridge(struct device_node *dev)
939 disp_name = "Chaos"; 939 disp_name = "Chaos";
940 primary = 0; 940 primary = 0;
941 } 941 }
942 printk(KERN_INFO "Found %s PCI host bridge at 0x%08lx. " 942 printk(KERN_INFO "Found %s PCI host bridge at 0x%016llx. "
943 "Firmware bus number: %d->%d\n", 943 "Firmware bus number: %d->%d\n",
944 disp_name, rsrc.start, hose->first_busno, hose->last_busno); 944 disp_name, (unsigned long long)rsrc.start, hose->first_busno,
945 hose->last_busno);
945#endif /* CONFIG_PPC32 */ 946#endif /* CONFIG_PPC32 */
946 947
947 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", 948 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",