aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2006-12-03 12:52:27 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:42:11 -0500
commit872455e2ca12843e3dd16ebde1ce02dccc4bf99f (patch)
tree156db3190f5f55a5a5b239b6c262d6fb021eb903 /arch/powerpc
parentf8485350c22b25f5b9804d89cb8fdf6626d0f5cb (diff)
[POWERPC] Fix debug printks for 32-bit resources in the PCI code
Cure the damage done by the former PCI debug printks fix for the case of 64-bit resources (commit 685143ac1f7a579a3fac9c7f2ac8f82e95af6864) which broke it for the plain vanilla 32-bit resources... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci_32.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index b08238f30502..2f54cd81dea5 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -100,7 +100,7 @@ pcibios_fixup_resources(struct pci_dev *dev)
100 continue; 100 continue;
101 if (res->end == 0xffffffff) { 101 if (res->end == 0xffffffff) {
102 DBG("PCI:%s Resource %d [%016llx-%016llx] 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, (u64)res->start, (u64)res->end);
104 res->end -= res->start; 104 res->end -= res->start;
105 res->start = 0; 105 res->start = 0;
106 res->flags |= IORESOURCE_UNSET; 106 res->flags |= IORESOURCE_UNSET;
@@ -116,11 +116,9 @@ pcibios_fixup_resources(struct pci_dev *dev)
116 if (offset != 0) { 116 if (offset != 0) {
117 res->start += offset; 117 res->start += offset;
118 res->end += offset; 118 res->end += offset;
119#ifdef DEBUG 119 DBG("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
120 printk("Fixup res %d (%lx) of dev %s: %llx -> %llx\n", 120 i, res->flags, pci_name(dev),
121 i, res->flags, pci_name(dev), 121 (u64)res->start - offset, (u64)res->start);
122 res->start - offset, res->start);
123#endif
124 } 122 }
125 } 123 }
126 124
@@ -256,7 +254,7 @@ pcibios_allocate_bus_resources(struct list_head *bus_list)
256 } 254 }
257 255
258 DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n", 256 DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
259 res->start, res->end, res->flags, pr); 257 (u64)res->start, (u64)res->end, res->flags, pr);
260 if (pr) { 258 if (pr) {
261 if (request_resource(pr, res) == 0) 259 if (request_resource(pr, res) == 0)
262 continue; 260 continue;
@@ -307,7 +305,7 @@ reparent_resources(struct resource *parent, struct resource *res)
307 for (p = res->child; p != NULL; p = p->sibling) { 305 for (p = res->child; p != NULL; p = p->sibling) {
308 p->parent = res; 306 p->parent = res;
309 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n", 307 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
310 p->name, p->start, p->end, res->name); 308 p->name, (u64)p->start, (u64)p->end, res->name);
311 } 309 }
312 return 0; 310 return 0;
313} 311}
@@ -363,7 +361,7 @@ pci_relocate_bridge_resource(struct pci_bus *bus, int i)
363 } 361 }
364 if (request_resource(pr, res)) { 362 if (request_resource(pr, res)) {
365 DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n", 363 DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
366 res->start, res->end); 364 (u64)res->start, (u64)res->end);
367 return -1; /* "can't happen" */ 365 return -1; /* "can't happen" */
368 } 366 }
369 update_bridge_base(bus, i); 367 update_bridge_base(bus, i);
@@ -481,14 +479,14 @@ static inline void alloc_resource(struct pci_dev *dev, int idx)
481 struct resource *pr, *r = &dev->resource[idx]; 479 struct resource *pr, *r = &dev->resource[idx];
482 480
483 DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n", 481 DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
484 pci_name(dev), idx, r->start, r->end, r->flags); 482 pci_name(dev), idx, (u64)r->start, (u64)r->end, r->flags);
485 pr = pci_find_parent_resource(dev, r); 483 pr = pci_find_parent_resource(dev, r);
486 if (!pr || request_resource(pr, r) < 0) { 484 if (!pr || request_resource(pr, r) < 0) {
487 printk(KERN_ERR "PCI: Cannot allocate resource region %d" 485 printk(KERN_ERR "PCI: Cannot allocate resource region %d"
488 " of device %s\n", idx, pci_name(dev)); 486 " of device %s\n", idx, pci_name(dev));
489 if (pr) 487 if (pr)
490 DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n", 488 DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
491 pr, pr->start, pr->end, pr->flags); 489 pr, (u64)pr->start, (u64)pr->end, pr->flags);
492 /* We'll assign a new address later */ 490 /* We'll assign a new address later */
493 r->flags |= IORESOURCE_UNSET; 491 r->flags |= IORESOURCE_UNSET;
494 r->end -= r->start; 492 r->end -= r->start;
@@ -961,7 +959,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
961 res->flags = IORESOURCE_IO; 959 res->flags = IORESOURCE_IO;
962 res->start = ranges[2]; 960 res->start = ranges[2];
963 DBG("PCI: IO 0x%llx -> 0x%llx\n", 961 DBG("PCI: IO 0x%llx -> 0x%llx\n",
964 res->start, res->start + size - 1); 962 (u64)res->start, (u64)res->start + size - 1);
965 break; 963 break;
966 case 2: /* memory space */ 964 case 2: /* memory space */
967 memno = 0; 965 memno = 0;
@@ -983,7 +981,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose,
983 res->flags |= IORESOURCE_PREFETCH; 981 res->flags |= IORESOURCE_PREFETCH;
984 res->start = ranges[na+2]; 982 res->start = ranges[na+2];
985 DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno, 983 DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
986 res->start, res->start + size - 1); 984 (u64)res->start, (u64)res->start + size - 1);
987 } 985 }
988 break; 986 break;
989 } 987 }