aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-27 15:48:22 -0400
committerPaul Mackerras <paulus@samba.org>2008-11-05 06:11:53 -0500
commitb0494bc8ee449f0534afa92a51e2e3bb27bab69b (patch)
treef83d79bf689b1247935c506bbf71fbf384359d03 /arch/powerpc
parent25d6e2d7c58ddc4a3b614fc5381591c0cfe66556 (diff)
powerpc/pci: Cleanup debug printk's
This removes the various DBG() macro from the powerpc PCI code and makes it use the standard pr_debug instead. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci-common.c77
-rw-r--r--arch/powerpc/kernel/pci_32.c12
-rw-r--r--arch/powerpc/kernel/pci_64.c90
3 files changed, 82 insertions, 97 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 607b43191206..09ac98e2a502 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -38,13 +38,6 @@
38#include <asm/ppc-pci.h> 38#include <asm/ppc-pci.h>
39#include <asm/firmware.h> 39#include <asm/firmware.h>
40 40
41#ifdef DEBUG
42#include <asm/udbg.h>
43#define DBG(fmt...) printk(fmt)
44#else
45#define DBG(fmt...)
46#endif
47
48static DEFINE_SPINLOCK(hose_spinlock); 41static DEFINE_SPINLOCK(hose_spinlock);
49 42
50/* XXX kill that some day ... */ 43/* XXX kill that some day ... */
@@ -215,8 +208,8 @@ void __devinit pcibios_setup_new_device(struct pci_dev *dev)
215 208
216 sd->of_node = pci_device_to_OF_node(dev); 209 sd->of_node = pci_device_to_OF_node(dev);
217 210
218 DBG("PCI: device %s OF node: %s\n", pci_name(dev), 211 pr_debug("PCI: device %s OF node: %s\n", pci_name(dev),
219 sd->of_node ? sd->of_node->full_name : "<none>"); 212 sd->of_node ? sd->of_node->full_name : "<none>");
220 213
221 sd->dma_ops = pci_dma_ops; 214 sd->dma_ops = pci_dma_ops;
222#ifdef CONFIG_PPC32 215#ifdef CONFIG_PPC32
@@ -253,7 +246,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
253 return -1; 246 return -1;
254#endif 247#endif
255 248
256 DBG("Try to map irq for %s...\n", pci_name(pci_dev)); 249 pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev));
257 250
258#ifdef DEBUG 251#ifdef DEBUG
259 memset(&oirq, 0xff, sizeof(oirq)); 252 memset(&oirq, 0xff, sizeof(oirq));
@@ -277,26 +270,26 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
277 line == 0xff || line == 0) { 270 line == 0xff || line == 0) {
278 return -1; 271 return -1;
279 } 272 }
280 DBG(" -> no map ! Using line %d (pin %d) from PCI config\n", 273 pr_debug(" No map ! Using line %d (pin %d) from PCI config\n",
281 line, pin); 274 line, pin);
282 275
283 virq = irq_create_mapping(NULL, line); 276 virq = irq_create_mapping(NULL, line);
284 if (virq != NO_IRQ) 277 if (virq != NO_IRQ)
285 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); 278 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
286 } else { 279 } else {
287 DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n", 280 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
288 oirq.size, oirq.specifier[0], oirq.specifier[1], 281 oirq.size, oirq.specifier[0], oirq.specifier[1],
289 oirq.controller->full_name); 282 oirq.controller->full_name);
290 283
291 virq = irq_create_of_mapping(oirq.controller, oirq.specifier, 284 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
292 oirq.size); 285 oirq.size);
293 } 286 }
294 if(virq == NO_IRQ) { 287 if(virq == NO_IRQ) {
295 DBG(" -> failed to map !\n"); 288 pr_debug(" Failed to map !\n");
296 return -1; 289 return -1;
297 } 290 }
298 291
299 DBG(" -> mapped to linux irq %d\n", virq); 292 pr_debug(" Mapped to linux irq %d\n", virq);
300 293
301 pci_dev->irq = virq; 294 pci_dev->irq = virq;
302 295
@@ -452,8 +445,8 @@ pgprot_t pci_phys_mem_access_prot(struct file *file,
452 pci_dev_put(pdev); 445 pci_dev_put(pdev);
453 } 446 }
454 447
455 DBG("non-PCI map for %llx, prot: %lx\n", 448 pr_debug("PCI: Non-PCI map for %llx, prot: %lx\n",
456 (unsigned long long)offset, prot); 449 (unsigned long long)offset, prot);
457 450
458 return __pgprot(prot); 451 return __pgprot(prot);
459} 452}
@@ -1196,10 +1189,10 @@ static int __init reparent_resources(struct resource *parent,
1196 *pp = NULL; 1189 *pp = NULL;
1197 for (p = res->child; p != NULL; p = p->sibling) { 1190 for (p = res->child; p != NULL; p = p->sibling) {
1198 p->parent = res; 1191 p->parent = res;
1199 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n", 1192 pr_debug("PCI: Reparented %s [%llx..%llx] under %s\n",
1200 p->name, 1193 p->name,
1201 (unsigned long long)p->start, 1194 (unsigned long long)p->start,
1202 (unsigned long long)p->end, res->name); 1195 (unsigned long long)p->end, res->name);
1203 } 1196 }
1204 return 0; 1197 return 0;
1205} 1198}
@@ -1269,14 +1262,14 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1269 } 1262 }
1270 } 1263 }
1271 1264
1272 DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx " 1265 pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
1273 "[0x%x], parent %p (%s)\n", 1266 "[0x%x], parent %p (%s)\n",
1274 bus->self ? pci_name(bus->self) : "PHB", 1267 bus->self ? pci_name(bus->self) : "PHB",
1275 bus->number, i, 1268 bus->number, i,
1276 (unsigned long long)res->start, 1269 (unsigned long long)res->start,
1277 (unsigned long long)res->end, 1270 (unsigned long long)res->end,
1278 (unsigned int)res->flags, 1271 (unsigned int)res->flags,
1279 pr, (pr && pr->name) ? pr->name : "nil"); 1272 pr, (pr && pr->name) ? pr->name : "nil");
1280 1273
1281 if (pr && !(pr->flags & IORESOURCE_UNSET)) { 1274 if (pr && !(pr->flags & IORESOURCE_UNSET)) {
1282 if (request_resource(pr, res) == 0) 1275 if (request_resource(pr, res) == 0)
@@ -1303,11 +1296,11 @@ static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
1303{ 1296{
1304 struct resource *pr, *r = &dev->resource[idx]; 1297 struct resource *pr, *r = &dev->resource[idx];
1305 1298
1306 DBG("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n", 1299 pr_debug("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n",
1307 pci_name(dev), idx, 1300 pci_name(dev), idx,
1308 (unsigned long long)r->start, 1301 (unsigned long long)r->start,
1309 (unsigned long long)r->end, 1302 (unsigned long long)r->end,
1310 (unsigned int)r->flags); 1303 (unsigned int)r->flags);
1311 1304
1312 pr = pci_find_parent_resource(dev, r); 1305 pr = pci_find_parent_resource(dev, r);
1313 if (!pr || (pr->flags & IORESOURCE_UNSET) || 1306 if (!pr || (pr->flags & IORESOURCE_UNSET) ||
@@ -1315,10 +1308,11 @@ static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
1315 printk(KERN_WARNING "PCI: Cannot allocate resource region %d" 1308 printk(KERN_WARNING "PCI: Cannot allocate resource region %d"
1316 " of device %s, will remap\n", idx, pci_name(dev)); 1309 " of device %s, will remap\n", idx, pci_name(dev));
1317 if (pr) 1310 if (pr)
1318 DBG("PCI: parent is %p: %016llx-%016llx [%x]\n", pr, 1311 pr_debug("PCI: parent is %p: %016llx-%016llx [%x]\n",
1319 (unsigned long long)pr->start, 1312 pr,
1320 (unsigned long long)pr->end, 1313 (unsigned long long)pr->start,
1321 (unsigned int)pr->flags); 1314 (unsigned long long)pr->end,
1315 (unsigned int)pr->flags);
1322 /* We'll assign a new address later */ 1316 /* We'll assign a new address later */
1323 r->flags |= IORESOURCE_UNSET; 1317 r->flags |= IORESOURCE_UNSET;
1324 r->end -= r->start; 1318 r->end -= r->start;
@@ -1356,7 +1350,8 @@ static void __init pcibios_allocate_resources(int pass)
1356 * but keep it unregistered. 1350 * but keep it unregistered.
1357 */ 1351 */
1358 u32 reg; 1352 u32 reg;
1359 DBG("PCI: Switching off ROM of %s\n", pci_name(dev)); 1353 pr_debug("PCI: Switching off ROM of %s\n",
1354 pci_name(dev));
1360 r->flags &= ~IORESOURCE_ROM_ENABLE; 1355 r->flags &= ~IORESOURCE_ROM_ENABLE;
1361 pci_read_config_dword(dev, dev->rom_base_reg, &reg); 1356 pci_read_config_dword(dev, dev->rom_base_reg, &reg);
1362 pci_write_config_dword(dev, dev->rom_base_reg, 1357 pci_write_config_dword(dev, dev->rom_base_reg,
@@ -1381,7 +1376,7 @@ void __init pcibios_resource_survey(void)
1381 } 1376 }
1382 1377
1383 if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { 1378 if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
1384 DBG("PCI: Assigning unassigned resouces...\n"); 1379 pr_debug("PCI: Assigning unassigned resouces...\n");
1385 pci_assign_unassigned_resources(); 1380 pci_assign_unassigned_resources();
1386 } 1381 }
1387 1382
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 131b1dfa68c6..fdcc898e58db 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -26,12 +26,6 @@
26 26
27#undef DEBUG 27#undef DEBUG
28 28
29#ifdef DEBUG
30#define DBG(x...) printk(x)
31#else
32#define DBG(x...)
33#endif
34
35unsigned long isa_io_base = 0; 29unsigned long isa_io_base = 0;
36unsigned long pci_dram_offset = 0; 30unsigned long pci_dram_offset = 0;
37int pcibios_assign_bus_offset = 1; 31int pcibios_assign_bus_offset = 1;
@@ -275,14 +269,14 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn)
275 if (!have_of) 269 if (!have_of)
276 return NULL; 270 return NULL;
277 271
278 DBG("pci_busdev_to_OF_node(%d,0x%x)\n", bus->number, devfn); 272 pr_debug("pci_busdev_to_OF_node(%d,0x%x)\n", bus->number, devfn);
279 parent = scan_OF_for_pci_bus(bus); 273 parent = scan_OF_for_pci_bus(bus);
280 if (parent == NULL) 274 if (parent == NULL)
281 return NULL; 275 return NULL;
282 DBG(" parent is %s\n", parent ? parent->full_name : "<NULL>"); 276 pr_debug(" parent is %s\n", parent ? parent->full_name : "<NULL>");
283 np = scan_OF_for_pci_dev(parent, devfn); 277 np = scan_OF_for_pci_dev(parent, devfn);
284 of_node_put(parent); 278 of_node_put(parent);
285 DBG(" result is %s\n", np ? np->full_name : "<NULL>"); 279 pr_debug(" result is %s\n", np ? np->full_name : "<NULL>");
286 280
287 /* XXX most callers don't release the returned node 281 /* XXX most callers don't release the returned node
288 * mostly because ppc64 doesn't increase the refcount, 282 * mostly because ppc64 doesn't increase the refcount,
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index b771e3a20132..ffada88a4484 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -32,13 +32,6 @@
32#include <asm/machdep.h> 32#include <asm/machdep.h>
33#include <asm/ppc-pci.h> 33#include <asm/ppc-pci.h>
34 34
35#ifdef DEBUG
36#include <asm/udbg.h>
37#define DBG(fmt...) printk(fmt)
38#else
39#define DBG(fmt...)
40#endif
41
42unsigned long pci_probe_only = 1; 35unsigned long pci_probe_only = 1;
43 36
44/* pci_io_base -- the base address from which io bars are offsets. 37/* pci_io_base -- the base address from which io bars are offsets.
@@ -102,7 +95,7 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
102 addrs = of_get_property(node, "assigned-addresses", &proplen); 95 addrs = of_get_property(node, "assigned-addresses", &proplen);
103 if (!addrs) 96 if (!addrs)
104 return; 97 return;
105 DBG(" parse addresses (%d bytes) @ %p\n", proplen, addrs); 98 pr_debug(" parse addresses (%d bytes) @ %p\n", proplen, addrs);
106 for (; proplen >= 20; proplen -= 20, addrs += 5) { 99 for (; proplen >= 20; proplen -= 20, addrs += 5) {
107 flags = pci_parse_of_flags(addrs[0]); 100 flags = pci_parse_of_flags(addrs[0]);
108 if (!flags) 101 if (!flags)
@@ -112,8 +105,9 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
112 if (!size) 105 if (!size)
113 continue; 106 continue;
114 i = addrs[0] & 0xff; 107 i = addrs[0] & 0xff;
115 DBG(" base: %llx, size: %llx, i: %x\n", 108 pr_debug(" base: %llx, size: %llx, i: %x\n",
116 (unsigned long long)base, (unsigned long long)size, i); 109 (unsigned long long)base,
110 (unsigned long long)size, i);
117 111
118 if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) { 112 if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) {
119 res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2]; 113 res = &dev->resource[(i - PCI_BASE_ADDRESS_0) >> 2];
@@ -144,7 +138,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
144 if (type == NULL) 138 if (type == NULL)
145 type = ""; 139 type = "";
146 140
147 DBG(" create device, devfn: %x, type: %s\n", devfn, type); 141 pr_debug(" create device, devfn: %x, type: %s\n", devfn, type);
148 142
149 dev->bus = bus; 143 dev->bus = bus;
150 dev->sysdata = node; 144 dev->sysdata = node;
@@ -165,8 +159,8 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
165 dev->class = get_int_prop(node, "class-code", 0); 159 dev->class = get_int_prop(node, "class-code", 0);
166 dev->revision = get_int_prop(node, "revision-id", 0); 160 dev->revision = get_int_prop(node, "revision-id", 0);
167 161
168 DBG(" class: 0x%x\n", dev->class); 162 pr_debug(" class: 0x%x\n", dev->class);
169 DBG(" revision: 0x%x\n", dev->revision); 163 pr_debug(" revision: 0x%x\n", dev->revision);
170 164
171 dev->current_state = 4; /* unknown power state */ 165 dev->current_state = 4; /* unknown power state */
172 dev->error_state = pci_channel_io_normal; 166 dev->error_state = pci_channel_io_normal;
@@ -187,7 +181,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
187 181
188 pci_parse_of_addrs(node, dev); 182 pci_parse_of_addrs(node, dev);
189 183
190 DBG(" adding to system ...\n"); 184 pr_debug(" adding to system ...\n");
191 185
192 pci_device_add(dev, bus); 186 pci_device_add(dev, bus);
193 187
@@ -203,11 +197,12 @@ void __devinit of_scan_bus(struct device_node *node,
203 int reglen, devfn; 197 int reglen, devfn;
204 struct pci_dev *dev; 198 struct pci_dev *dev;
205 199
206 DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number); 200 pr_debug("of_scan_bus(%s) bus no %d... \n",
201 node->full_name, bus->number);
207 202
208 /* Scan direct children */ 203 /* Scan direct children */
209 for_each_child_of_node(node, child) { 204 for_each_child_of_node(node, child) {
210 DBG(" * %s\n", child->full_name); 205 pr_debug(" * %s\n", child->full_name);
211 reg = of_get_property(child, "reg", &reglen); 206 reg = of_get_property(child, "reg", &reglen);
212 if (reg == NULL || reglen < 20) 207 if (reg == NULL || reglen < 20)
213 continue; 208 continue;
@@ -217,7 +212,7 @@ void __devinit of_scan_bus(struct device_node *node,
217 dev = of_create_pci_dev(child, bus, devfn); 212 dev = of_create_pci_dev(child, bus, devfn);
218 if (!dev) 213 if (!dev)
219 continue; 214 continue;
220 DBG(" dev header type: %x\n", dev->hdr_type); 215 pr_debug(" dev header type: %x\n", dev->hdr_type);
221 } 216 }
222 217
223 /* Ally all fixups */ 218 /* Ally all fixups */
@@ -245,7 +240,7 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
245 unsigned int flags; 240 unsigned int flags;
246 u64 size; 241 u64 size;
247 242
248 DBG("of_scan_pci_bridge(%s)\n", node->full_name); 243 pr_debug("of_scan_pci_bridge(%s)\n", node->full_name);
249 244
250 /* parse bus-range property */ 245 /* parse bus-range property */
251 busrange = of_get_property(node, "bus-range", &len); 246 busrange = of_get_property(node, "bus-range", &len);
@@ -309,12 +304,12 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
309 } 304 }
310 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), 305 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
311 bus->number); 306 bus->number);
312 DBG(" bus name: %s\n", bus->name); 307 pr_debug(" bus name: %s\n", bus->name);
313 308
314 mode = PCI_PROBE_NORMAL; 309 mode = PCI_PROBE_NORMAL;
315 if (ppc_md.pci_probe_mode) 310 if (ppc_md.pci_probe_mode)
316 mode = ppc_md.pci_probe_mode(bus); 311 mode = ppc_md.pci_probe_mode(bus);
317 DBG(" probe mode: %d\n", mode); 312 pr_debug(" probe mode: %d\n", mode);
318 313
319 if (mode == PCI_PROBE_DEVTREE) 314 if (mode == PCI_PROBE_DEVTREE)
320 of_scan_bus(node, bus); 315 of_scan_bus(node, bus);
@@ -329,7 +324,8 @@ void __devinit scan_phb(struct pci_controller *hose)
329 struct device_node *node = hose->dn; 324 struct device_node *node = hose->dn;
330 int i, mode; 325 int i, mode;
331 326
332 DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>"); 327 pr_debug("PCI: Scanning PHB %s\n",
328 node ? node->full_name : "<NO NAME>");
333 329
334 /* Create an empty bus for the toplevel */ 330 /* Create an empty bus for the toplevel */
335 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node); 331 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node);
@@ -345,26 +341,26 @@ void __devinit scan_phb(struct pci_controller *hose)
345 pcibios_map_io_space(bus); 341 pcibios_map_io_space(bus);
346 342
347 /* Wire up PHB bus resources */ 343 /* Wire up PHB bus resources */
348 DBG("PCI: PHB IO resource = %016lx-%016lx [%lx]\n", 344 pr_debug("PCI: PHB IO resource = %016lx-%016lx [%lx]\n",
349 hose->io_resource.start, hose->io_resource.end, 345 hose->io_resource.start, hose->io_resource.end,
350 hose->io_resource.flags); 346 hose->io_resource.flags);
351 bus->resource[0] = &hose->io_resource; 347 bus->resource[0] = &hose->io_resource;
352 for (i = 0; i < 3; ++i) { 348 for (i = 0; i < 3; ++i) {
353 DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i, 349 pr_debug("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i,
354 hose->mem_resources[i].start, 350 hose->mem_resources[i].start,
355 hose->mem_resources[i].end, 351 hose->mem_resources[i].end,
356 hose->mem_resources[i].flags); 352 hose->mem_resources[i].flags);
357 bus->resource[i+1] = &hose->mem_resources[i]; 353 bus->resource[i+1] = &hose->mem_resources[i];
358 } 354 }
359 DBG("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset); 355 pr_debug("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset);
360 DBG("PCI: PHB IO offset = %08lx\n", 356 pr_debug("PCI: PHB IO offset = %08lx\n",
361 (unsigned long)hose->io_base_virt - _IO_BASE); 357 (unsigned long)hose->io_base_virt - _IO_BASE);
362 358
363 /* Get probe mode and perform scan */ 359 /* Get probe mode and perform scan */
364 mode = PCI_PROBE_NORMAL; 360 mode = PCI_PROBE_NORMAL;
365 if (node && ppc_md.pci_probe_mode) 361 if (node && ppc_md.pci_probe_mode)
366 mode = ppc_md.pci_probe_mode(bus); 362 mode = ppc_md.pci_probe_mode(bus);
367 DBG(" probe mode: %d\n", mode); 363 pr_debug(" probe mode: %d\n", mode);
368 if (mode == PCI_PROBE_DEVTREE) { 364 if (mode == PCI_PROBE_DEVTREE) {
369 bus->subordinate = hose->last_busno; 365 bus->subordinate = hose->last_busno;
370 of_scan_bus(node, bus); 366 of_scan_bus(node, bus);
@@ -427,8 +423,8 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
427 if (bus->self) { 423 if (bus->self) {
428 struct resource *res = bus->resource[0]; 424 struct resource *res = bus->resource[0];
429 425
430 DBG("IO unmapping for PCI-PCI bridge %s\n", 426 pr_debug("IO unmapping for PCI-PCI bridge %s\n",
431 pci_name(bus->self)); 427 pci_name(bus->self));
432 428
433 __flush_hash_table_range(&init_mm, res->start + _IO_BASE, 429 __flush_hash_table_range(&init_mm, res->start + _IO_BASE,
434 res->end + _IO_BASE + 1); 430 res->end + _IO_BASE + 1);
@@ -442,8 +438,8 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
442 if (hose->io_base_alloc == 0) 438 if (hose->io_base_alloc == 0)
443 return 0; 439 return 0;
444 440
445 DBG("IO unmapping for PHB %s\n", hose->dn->full_name); 441 pr_debug("IO unmapping for PHB %s\n", hose->dn->full_name);
446 DBG(" alloc=0x%p\n", hose->io_base_alloc); 442 pr_debug(" alloc=0x%p\n", hose->io_base_alloc);
447 443
448 /* This is a PHB, we fully unmap the IO area */ 444 /* This is a PHB, we fully unmap the IO area */
449 vunmap(hose->io_base_alloc); 445 vunmap(hose->io_base_alloc);
@@ -468,11 +464,11 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
468 * thus HPTEs will be faulted in when needed 464 * thus HPTEs will be faulted in when needed
469 */ 465 */
470 if (bus->self) { 466 if (bus->self) {
471 DBG("IO mapping for PCI-PCI bridge %s\n", 467 pr_debug("IO mapping for PCI-PCI bridge %s\n",
472 pci_name(bus->self)); 468 pci_name(bus->self));
473 DBG(" virt=0x%016lx...0x%016lx\n", 469 pr_debug(" virt=0x%016lx...0x%016lx\n",
474 bus->resource[0]->start + _IO_BASE, 470 bus->resource[0]->start + _IO_BASE,
475 bus->resource[0]->end + _IO_BASE); 471 bus->resource[0]->end + _IO_BASE);
476 return 0; 472 return 0;
477 } 473 }
478 474
@@ -501,11 +497,11 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
501 hose->io_base_virt = (void __iomem *)(area->addr + 497 hose->io_base_virt = (void __iomem *)(area->addr +
502 hose->io_base_phys - phys_page); 498 hose->io_base_phys - phys_page);
503 499
504 DBG("IO mapping for PHB %s\n", hose->dn->full_name); 500 pr_debug("IO mapping for PHB %s\n", hose->dn->full_name);
505 DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n", 501 pr_debug(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n",
506 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc); 502 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
507 DBG(" size=0x%016lx (alloc=0x%016lx)\n", 503 pr_debug(" size=0x%016lx (alloc=0x%016lx)\n",
508 hose->pci_io_size, size_page); 504 hose->pci_io_size, size_page);
509 505
510 /* Establish the mapping */ 506 /* Establish the mapping */
511 if (__ioremap_at(phys_page, area->addr, size_page, 507 if (__ioremap_at(phys_page, area->addr, size_page,
@@ -517,8 +513,8 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
517 hose->io_resource.start += io_virt_offset; 513 hose->io_resource.start += io_virt_offset;
518 hose->io_resource.end += io_virt_offset; 514 hose->io_resource.end += io_virt_offset;
519 515
520 DBG(" hose->io_resource=0x%016lx...0x%016lx\n", 516 pr_debug(" hose->io_resource=0x%016lx...0x%016lx\n",
521 hose->io_resource.start, hose->io_resource.end); 517 hose->io_resource.start, hose->io_resource.end);
522 518
523 return 0; 519 return 0;
524} 520}