diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/pseries/firmware.c | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 39 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 34 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/rtasd.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/scanlog.c | 23 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/smp.c | 10 |
7 files changed, 56 insertions, 88 deletions
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c index b765b7c77b65..743d494c06dd 100644 --- a/arch/powerpc/platforms/pseries/firmware.c +++ b/arch/powerpc/platforms/pseries/firmware.c | |||
@@ -27,11 +27,6 @@ | |||
27 | #include <asm/prom.h> | 27 | #include <asm/prom.h> |
28 | #include <asm/udbg.h> | 28 | #include <asm/udbg.h> |
29 | 29 | ||
30 | #ifdef DEBUG | ||
31 | #define DBG(fmt...) udbg_printf(fmt) | ||
32 | #else | ||
33 | #define DBG(fmt...) | ||
34 | #endif | ||
35 | 30 | ||
36 | typedef struct { | 31 | typedef struct { |
37 | unsigned long val; | 32 | unsigned long val; |
@@ -72,7 +67,7 @@ void __init fw_feature_init(const char *hypertas, unsigned long len) | |||
72 | const char *s; | 67 | const char *s; |
73 | int i; | 68 | int i; |
74 | 69 | ||
75 | DBG(" -> fw_feature_init()\n"); | 70 | pr_debug(" -> fw_feature_init()\n"); |
76 | 71 | ||
77 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { | 72 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { |
78 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { | 73 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { |
@@ -88,5 +83,5 @@ void __init fw_feature_init(const char *hypertas, unsigned long len) | |||
88 | } | 83 | } |
89 | } | 84 | } |
90 | 85 | ||
91 | DBG(" <- fw_feature_init()\n"); | 86 | pr_debug(" <- fw_feature_init()\n"); |
92 | } | 87 | } |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index a65c76308201..176f1f39d2d5 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -47,7 +47,6 @@ | |||
47 | 47 | ||
48 | #include "plpar_wrappers.h" | 48 | #include "plpar_wrappers.h" |
49 | 49 | ||
50 | #define DBG(fmt...) | ||
51 | 50 | ||
52 | static void tce_build_pSeries(struct iommu_table *tbl, long index, | 51 | static void tce_build_pSeries(struct iommu_table *tbl, long index, |
53 | long npages, unsigned long uaddr, | 52 | long npages, unsigned long uaddr, |
@@ -322,7 +321,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus) | |||
322 | 321 | ||
323 | dn = pci_bus_to_OF_node(bus); | 322 | dn = pci_bus_to_OF_node(bus); |
324 | 323 | ||
325 | DBG("pci_dma_bus_setup_pSeries: setting up bus %s\n", dn->full_name); | 324 | pr_debug("pci_dma_bus_setup_pSeries: setting up bus %s\n", dn->full_name); |
326 | 325 | ||
327 | if (bus->self) { | 326 | if (bus->self) { |
328 | /* This is not a root bus, any setup will be done for the | 327 | /* This is not a root bus, any setup will be done for the |
@@ -347,7 +346,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus) | |||
347 | for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling) | 346 | for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling) |
348 | children++; | 347 | children++; |
349 | 348 | ||
350 | DBG("Children: %d\n", children); | 349 | pr_debug("Children: %d\n", children); |
351 | 350 | ||
352 | /* Calculate amount of DMA window per slot. Each window must be | 351 | /* Calculate amount of DMA window per slot. Each window must be |
353 | * a power of two (due to pci_alloc_consistent requirements). | 352 | * a power of two (due to pci_alloc_consistent requirements). |
@@ -361,8 +360,8 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus) | |||
361 | 360 | ||
362 | while (pci->phb->dma_window_size * children > 0x80000000ul) | 361 | while (pci->phb->dma_window_size * children > 0x80000000ul) |
363 | pci->phb->dma_window_size >>= 1; | 362 | pci->phb->dma_window_size >>= 1; |
364 | DBG("No ISA/IDE, window size is 0x%lx\n", | 363 | pr_debug("No ISA/IDE, window size is 0x%lx\n", |
365 | pci->phb->dma_window_size); | 364 | pci->phb->dma_window_size); |
366 | pci->phb->dma_window_base_cur = 0; | 365 | pci->phb->dma_window_base_cur = 0; |
367 | 366 | ||
368 | return; | 367 | return; |
@@ -387,8 +386,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus) | |||
387 | while (pci->phb->dma_window_size * children > 0x70000000ul) | 386 | while (pci->phb->dma_window_size * children > 0x70000000ul) |
388 | pci->phb->dma_window_size >>= 1; | 387 | pci->phb->dma_window_size >>= 1; |
389 | 388 | ||
390 | DBG("ISA/IDE, window size is 0x%lx\n", pci->phb->dma_window_size); | 389 | pr_debug("ISA/IDE, window size is 0x%lx\n", pci->phb->dma_window_size); |
391 | |||
392 | } | 390 | } |
393 | 391 | ||
394 | 392 | ||
@@ -401,7 +399,8 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus) | |||
401 | 399 | ||
402 | dn = pci_bus_to_OF_node(bus); | 400 | dn = pci_bus_to_OF_node(bus); |
403 | 401 | ||
404 | DBG("pci_dma_bus_setup_pSeriesLP: setting up bus %s\n", dn->full_name); | 402 | pr_debug("pci_dma_bus_setup_pSeriesLP: setting up bus %s\n", |
403 | dn->full_name); | ||
405 | 404 | ||
406 | /* Find nearest ibm,dma-window, walking up the device tree */ | 405 | /* Find nearest ibm,dma-window, walking up the device tree */ |
407 | for (pdn = dn; pdn != NULL; pdn = pdn->parent) { | 406 | for (pdn = dn; pdn != NULL; pdn = pdn->parent) { |
@@ -411,14 +410,14 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus) | |||
411 | } | 410 | } |
412 | 411 | ||
413 | if (dma_window == NULL) { | 412 | if (dma_window == NULL) { |
414 | DBG(" no ibm,dma-window property !\n"); | 413 | pr_debug(" no ibm,dma-window property !\n"); |
415 | return; | 414 | return; |
416 | } | 415 | } |
417 | 416 | ||
418 | ppci = PCI_DN(pdn); | 417 | ppci = PCI_DN(pdn); |
419 | 418 | ||
420 | DBG(" parent is %s, iommu_table: 0x%p\n", | 419 | pr_debug(" parent is %s, iommu_table: 0x%p\n", |
421 | pdn->full_name, ppci->iommu_table); | 420 | pdn->full_name, ppci->iommu_table); |
422 | 421 | ||
423 | if (!ppci->iommu_table) { | 422 | if (!ppci->iommu_table) { |
424 | tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, | 423 | tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, |
@@ -426,7 +425,7 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus) | |||
426 | iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window, | 425 | iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window, |
427 | bus->number); | 426 | bus->number); |
428 | ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node); | 427 | ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node); |
429 | DBG(" created table: %p\n", ppci->iommu_table); | 428 | pr_debug(" created table: %p\n", ppci->iommu_table); |
430 | } | 429 | } |
431 | 430 | ||
432 | if (pdn != dn) | 431 | if (pdn != dn) |
@@ -439,7 +438,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev) | |||
439 | struct device_node *dn; | 438 | struct device_node *dn; |
440 | struct iommu_table *tbl; | 439 | struct iommu_table *tbl; |
441 | 440 | ||
442 | DBG("pci_dma_dev_setup_pSeries: %s\n", pci_name(dev)); | 441 | pr_debug("pci_dma_dev_setup_pSeries: %s\n", pci_name(dev)); |
443 | 442 | ||
444 | dn = dev->dev.archdata.of_node; | 443 | dn = dev->dev.archdata.of_node; |
445 | 444 | ||
@@ -450,7 +449,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev) | |||
450 | if (!dev->bus->self) { | 449 | if (!dev->bus->self) { |
451 | struct pci_controller *phb = PCI_DN(dn)->phb; | 450 | struct pci_controller *phb = PCI_DN(dn)->phb; |
452 | 451 | ||
453 | DBG(" --> first child, no bridge. Allocating iommu table.\n"); | 452 | pr_debug(" --> first child, no bridge. Allocating iommu table.\n"); |
454 | tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, | 453 | tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, |
455 | phb->node); | 454 | phb->node); |
456 | iommu_table_setparms(phb, dn, tbl); | 455 | iommu_table_setparms(phb, dn, tbl); |
@@ -480,7 +479,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
480 | const void *dma_window = NULL; | 479 | const void *dma_window = NULL; |
481 | struct pci_dn *pci; | 480 | struct pci_dn *pci; |
482 | 481 | ||
483 | DBG("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev)); | 482 | pr_debug("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev)); |
484 | 483 | ||
485 | /* dev setup for LPAR is a little tricky, since the device tree might | 484 | /* dev setup for LPAR is a little tricky, since the device tree might |
486 | * contain the dma-window properties per-device and not neccesarily | 485 | * contain the dma-window properties per-device and not neccesarily |
@@ -489,7 +488,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
489 | * already allocated. | 488 | * already allocated. |
490 | */ | 489 | */ |
491 | dn = pci_device_to_OF_node(dev); | 490 | dn = pci_device_to_OF_node(dev); |
492 | DBG(" node is %s\n", dn->full_name); | 491 | pr_debug(" node is %s\n", dn->full_name); |
493 | 492 | ||
494 | for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table; | 493 | for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table; |
495 | pdn = pdn->parent) { | 494 | pdn = pdn->parent) { |
@@ -504,13 +503,13 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
504 | pci_name(dev), dn? dn->full_name : "<null>"); | 503 | pci_name(dev), dn? dn->full_name : "<null>"); |
505 | return; | 504 | return; |
506 | } | 505 | } |
507 | DBG(" parent is %s\n", pdn->full_name); | 506 | pr_debug(" parent is %s\n", pdn->full_name); |
508 | 507 | ||
509 | /* Check for parent == NULL so we don't try to setup the empty EADS | 508 | /* Check for parent == NULL so we don't try to setup the empty EADS |
510 | * slots on POWER4 machines. | 509 | * slots on POWER4 machines. |
511 | */ | 510 | */ |
512 | if (dma_window == NULL || pdn->parent == NULL) { | 511 | if (dma_window == NULL || pdn->parent == NULL) { |
513 | DBG(" no dma window for device, linking to parent\n"); | 512 | pr_debug(" no dma window for device, linking to parent\n"); |
514 | dev->dev.archdata.dma_data = PCI_DN(pdn)->iommu_table; | 513 | dev->dev.archdata.dma_data = PCI_DN(pdn)->iommu_table; |
515 | return; | 514 | return; |
516 | } | 515 | } |
@@ -522,9 +521,9 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
522 | iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window, | 521 | iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window, |
523 | pci->phb->bus->number); | 522 | pci->phb->bus->number); |
524 | pci->iommu_table = iommu_init_table(tbl, pci->phb->node); | 523 | pci->iommu_table = iommu_init_table(tbl, pci->phb->node); |
525 | DBG(" created table: %p\n", pci->iommu_table); | 524 | pr_debug(" created table: %p\n", pci->iommu_table); |
526 | } else { | 525 | } else { |
527 | DBG(" found DMA window, table: %p\n", pci->iommu_table); | 526 | pr_debug(" found DMA window, table: %p\n", pci->iommu_table); |
528 | } | 527 | } |
529 | 528 | ||
530 | dev->dev.archdata.dma_data = pci->iommu_table; | 529 | dev->dev.archdata.dma_data = pci->iommu_table; |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index c34789fe535e..2cbaedb17f3e 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -19,7 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #undef DEBUG_LOW | 22 | /* Enables debugging of low-level hash table routines - careful! */ |
23 | #undef DEBUG | ||
23 | 24 | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
@@ -42,11 +43,6 @@ | |||
42 | #include "plpar_wrappers.h" | 43 | #include "plpar_wrappers.h" |
43 | #include "pseries.h" | 44 | #include "pseries.h" |
44 | 45 | ||
45 | #ifdef DEBUG_LOW | ||
46 | #define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0) | ||
47 | #else | ||
48 | #define DBG_LOW(fmt...) do { } while(0) | ||
49 | #endif | ||
50 | 46 | ||
51 | /* in hvCall.S */ | 47 | /* in hvCall.S */ |
52 | EXPORT_SYMBOL(plpar_hcall); | 48 | EXPORT_SYMBOL(plpar_hcall); |
@@ -290,15 +286,15 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group, | |||
290 | unsigned long hpte_v, hpte_r; | 286 | unsigned long hpte_v, hpte_r; |
291 | 287 | ||
292 | if (!(vflags & HPTE_V_BOLTED)) | 288 | if (!(vflags & HPTE_V_BOLTED)) |
293 | DBG_LOW("hpte_insert(group=%lx, va=%016lx, pa=%016lx, " | 289 | pr_debug("hpte_insert(group=%lx, va=%016lx, pa=%016lx, " |
294 | "rflags=%lx, vflags=%lx, psize=%d)\n", | 290 | "rflags=%lx, vflags=%lx, psize=%d)\n", |
295 | hpte_group, va, pa, rflags, vflags, psize); | 291 | hpte_group, va, pa, rflags, vflags, psize); |
296 | 292 | ||
297 | hpte_v = hpte_encode_v(va, psize, ssize) | vflags | HPTE_V_VALID; | 293 | hpte_v = hpte_encode_v(va, psize, ssize) | vflags | HPTE_V_VALID; |
298 | hpte_r = hpte_encode_r(pa, psize) | rflags; | 294 | hpte_r = hpte_encode_r(pa, psize) | rflags; |
299 | 295 | ||
300 | if (!(vflags & HPTE_V_BOLTED)) | 296 | if (!(vflags & HPTE_V_BOLTED)) |
301 | DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r); | 297 | pr_debug(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r); |
302 | 298 | ||
303 | /* Now fill in the actual HPTE */ | 299 | /* Now fill in the actual HPTE */ |
304 | /* Set CEC cookie to 0 */ | 300 | /* Set CEC cookie to 0 */ |
@@ -315,7 +311,7 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group, | |||
315 | lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, &slot); | 311 | lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, &slot); |
316 | if (unlikely(lpar_rc == H_PTEG_FULL)) { | 312 | if (unlikely(lpar_rc == H_PTEG_FULL)) { |
317 | if (!(vflags & HPTE_V_BOLTED)) | 313 | if (!(vflags & HPTE_V_BOLTED)) |
318 | DBG_LOW(" full\n"); | 314 | pr_debug(" full\n"); |
319 | return -1; | 315 | return -1; |
320 | } | 316 | } |
321 | 317 | ||
@@ -326,11 +322,11 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group, | |||
326 | */ | 322 | */ |
327 | if (unlikely(lpar_rc != H_SUCCESS)) { | 323 | if (unlikely(lpar_rc != H_SUCCESS)) { |
328 | if (!(vflags & HPTE_V_BOLTED)) | 324 | if (!(vflags & HPTE_V_BOLTED)) |
329 | DBG_LOW(" lpar err %d\n", lpar_rc); | 325 | pr_debug(" lpar err %lu\n", lpar_rc); |
330 | return -2; | 326 | return -2; |
331 | } | 327 | } |
332 | if (!(vflags & HPTE_V_BOLTED)) | 328 | if (!(vflags & HPTE_V_BOLTED)) |
333 | DBG_LOW(" -> slot: %d\n", slot & 7); | 329 | pr_debug(" -> slot: %lu\n", slot & 7); |
334 | 330 | ||
335 | /* Because of iSeries, we have to pass down the secondary | 331 | /* Because of iSeries, we have to pass down the secondary |
336 | * bucket bit here as well | 332 | * bucket bit here as well |
@@ -422,17 +418,17 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot, | |||
422 | 418 | ||
423 | want_v = hpte_encode_avpn(va, psize, ssize); | 419 | want_v = hpte_encode_avpn(va, psize, ssize); |
424 | 420 | ||
425 | DBG_LOW(" update: avpnv=%016lx, hash=%016lx, f=%x, psize: %d ... ", | 421 | pr_debug(" update: avpnv=%016lx, hash=%016lx, f=%lx, psize: %d ...", |
426 | want_v, slot, flags, psize); | 422 | want_v, slot, flags, psize); |
427 | 423 | ||
428 | lpar_rc = plpar_pte_protect(flags, slot, want_v); | 424 | lpar_rc = plpar_pte_protect(flags, slot, want_v); |
429 | 425 | ||
430 | if (lpar_rc == H_NOT_FOUND) { | 426 | if (lpar_rc == H_NOT_FOUND) { |
431 | DBG_LOW("not found !\n"); | 427 | pr_debug("not found !\n"); |
432 | return -1; | 428 | return -1; |
433 | } | 429 | } |
434 | 430 | ||
435 | DBG_LOW("ok\n"); | 431 | pr_debug("ok\n"); |
436 | 432 | ||
437 | BUG_ON(lpar_rc != H_SUCCESS); | 433 | BUG_ON(lpar_rc != H_SUCCESS); |
438 | 434 | ||
@@ -507,8 +503,8 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, | |||
507 | unsigned long lpar_rc; | 503 | unsigned long lpar_rc; |
508 | unsigned long dummy1, dummy2; | 504 | unsigned long dummy1, dummy2; |
509 | 505 | ||
510 | DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d", | 506 | pr_debug(" inval : slot=%lx, va=%016lx, psize: %d, local: %d\n", |
511 | slot, va, psize, local); | 507 | slot, va, psize, local); |
512 | 508 | ||
513 | want_v = hpte_encode_avpn(va, psize, ssize); | 509 | want_v = hpte_encode_avpn(va, psize, ssize); |
514 | lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v, &dummy1, &dummy2); | 510 | lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v, &dummy1, &dummy2); |
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c index e3078ce41518..befadd4f9524 100644 --- a/arch/powerpc/platforms/pseries/rtasd.c +++ b/arch/powerpc/platforms/pseries/rtasd.c | |||
@@ -29,11 +29,6 @@ | |||
29 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
30 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
31 | 31 | ||
32 | #if 0 | ||
33 | #define DEBUG(A...) printk(KERN_ERR A) | ||
34 | #else | ||
35 | #define DEBUG(A...) | ||
36 | #endif | ||
37 | 32 | ||
38 | static DEFINE_SPINLOCK(rtasd_log_lock); | 33 | static DEFINE_SPINLOCK(rtasd_log_lock); |
39 | 34 | ||
@@ -198,7 +193,7 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal) | |||
198 | unsigned long s; | 193 | unsigned long s; |
199 | int len = 0; | 194 | int len = 0; |
200 | 195 | ||
201 | DEBUG("logging event\n"); | 196 | pr_debug("rtasd: logging event\n"); |
202 | if (buf == NULL) | 197 | if (buf == NULL) |
203 | return; | 198 | return; |
204 | 199 | ||
@@ -409,7 +404,8 @@ static int rtasd(void *unused) | |||
409 | daemonize("rtasd"); | 404 | daemonize("rtasd"); |
410 | 405 | ||
411 | printk(KERN_DEBUG "RTAS daemon started\n"); | 406 | printk(KERN_DEBUG "RTAS daemon started\n"); |
412 | DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); | 407 | pr_debug("rtasd: will sleep for %d milliseconds\n", |
408 | (30000 / rtas_event_scan_rate)); | ||
413 | 409 | ||
414 | /* See if we have any error stored in NVRAM */ | 410 | /* See if we have any error stored in NVRAM */ |
415 | memset(logdata, 0, rtas_error_log_max); | 411 | memset(logdata, 0, rtas_error_log_max); |
@@ -428,9 +424,9 @@ static int rtasd(void *unused) | |||
428 | do_event_scan_all_cpus(1000); | 424 | do_event_scan_all_cpus(1000); |
429 | 425 | ||
430 | if (surveillance_timeout != -1) { | 426 | if (surveillance_timeout != -1) { |
431 | DEBUG("enabling surveillance\n"); | 427 | pr_debug("rtasd: enabling surveillance\n"); |
432 | enable_surveillance(surveillance_timeout); | 428 | enable_surveillance(surveillance_timeout); |
433 | DEBUG("surveillance enabled\n"); | 429 | pr_debug("rtasd: surveillance enabled\n"); |
434 | } | 430 | } |
435 | 431 | ||
436 | /* Delay should be at least one second since some | 432 | /* Delay should be at least one second since some |
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c index e5b0ea870164..bec3803f0618 100644 --- a/arch/powerpc/platforms/pseries/scanlog.c +++ b/arch/powerpc/platforms/pseries/scanlog.c | |||
@@ -38,9 +38,7 @@ | |||
38 | #define SCANLOG_HWERROR -1 | 38 | #define SCANLOG_HWERROR -1 |
39 | #define SCANLOG_CONTINUE 1 | 39 | #define SCANLOG_CONTINUE 1 |
40 | 40 | ||
41 | #define DEBUG(A...) do { if (scanlog_debug) printk(KERN_ERR "scanlog: " A); } while (0) | ||
42 | 41 | ||
43 | static int scanlog_debug; | ||
44 | static unsigned int ibm_scan_log_dump; /* RTAS token */ | 42 | static unsigned int ibm_scan_log_dump; /* RTAS token */ |
45 | static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */ | 43 | static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */ |
46 | 44 | ||
@@ -86,14 +84,14 @@ static ssize_t scanlog_read(struct file *file, char __user *buf, | |||
86 | memcpy(data, rtas_data_buf, RTAS_DATA_BUF_SIZE); | 84 | memcpy(data, rtas_data_buf, RTAS_DATA_BUF_SIZE); |
87 | spin_unlock(&rtas_data_buf_lock); | 85 | spin_unlock(&rtas_data_buf_lock); |
88 | 86 | ||
89 | DEBUG("status=%d, data[0]=%x, data[1]=%x, data[2]=%x\n", | 87 | pr_debug("scanlog: status=%d, data[0]=%x, data[1]=%x, " \ |
90 | status, data[0], data[1], data[2]); | 88 | "data[2]=%x\n", status, data[0], data[1], data[2]); |
91 | switch (status) { | 89 | switch (status) { |
92 | case SCANLOG_COMPLETE: | 90 | case SCANLOG_COMPLETE: |
93 | DEBUG("hit eof\n"); | 91 | pr_debug("scanlog: hit eof\n"); |
94 | return 0; | 92 | return 0; |
95 | case SCANLOG_HWERROR: | 93 | case SCANLOG_HWERROR: |
96 | DEBUG("hardware error reading scan log data\n"); | 94 | pr_debug("scanlog: hardware error reading data\n"); |
97 | return -EIO; | 95 | return -EIO; |
98 | case SCANLOG_CONTINUE: | 96 | case SCANLOG_CONTINUE: |
99 | /* We may or may not have data yet */ | 97 | /* We may or may not have data yet */ |
@@ -110,7 +108,8 @@ static ssize_t scanlog_read(struct file *file, char __user *buf, | |||
110 | /* Assume extended busy */ | 108 | /* Assume extended busy */ |
111 | wait_time = rtas_busy_delay_time(status); | 109 | wait_time = rtas_busy_delay_time(status); |
112 | if (!wait_time) { | 110 | if (!wait_time) { |
113 | printk(KERN_ERR "scanlog: unknown error from rtas: %d\n", status); | 111 | printk(KERN_ERR "scanlog: unknown error " \ |
112 | "from rtas: %d\n", status); | ||
114 | return -EIO; | 113 | return -EIO; |
115 | } | 114 | } |
116 | } | 115 | } |
@@ -134,15 +133,9 @@ static ssize_t scanlog_write(struct file * file, const char __user * buf, | |||
134 | 133 | ||
135 | if (buf) { | 134 | if (buf) { |
136 | if (strncmp(stkbuf, "reset", 5) == 0) { | 135 | if (strncmp(stkbuf, "reset", 5) == 0) { |
137 | DEBUG("reset scanlog\n"); | 136 | pr_debug("scanlog: reset scanlog\n"); |
138 | status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, 0, 0); | 137 | status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, 0, 0); |
139 | DEBUG("rtas returns %d\n", status); | 138 | pr_debug("scanlog: rtas returns %d\n", status); |
140 | } else if (strncmp(stkbuf, "debugon", 7) == 0) { | ||
141 | printk(KERN_ERR "scanlog: debug on\n"); | ||
142 | scanlog_debug = 1; | ||
143 | } else if (strncmp(stkbuf, "debugoff", 8) == 0) { | ||
144 | printk(KERN_ERR "scanlog: debug off\n"); | ||
145 | scanlog_debug = 0; | ||
146 | } | 139 | } |
147 | } | 140 | } |
148 | return count; | 141 | return count; |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index f66aa9c3b135..65e87951eda3 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -70,11 +70,6 @@ | |||
70 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
71 | #include "pseries.h" | 71 | #include "pseries.h" |
72 | 72 | ||
73 | #ifdef DEBUG | ||
74 | #define DBG(fmt...) udbg_printf(fmt) | ||
75 | #else | ||
76 | #define DBG(fmt...) | ||
77 | #endif | ||
78 | 73 | ||
79 | int fwnmi_active; /* TRUE if an FWNMI handler is present */ | 74 | int fwnmi_active; /* TRUE if an FWNMI handler is present */ |
80 | 75 | ||
@@ -326,7 +321,7 @@ static int pseries_set_xdabr(unsigned long dabr) | |||
326 | */ | 321 | */ |
327 | static void __init pSeries_init_early(void) | 322 | static void __init pSeries_init_early(void) |
328 | { | 323 | { |
329 | DBG(" -> pSeries_init_early()\n"); | 324 | pr_debug(" -> pSeries_init_early()\n"); |
330 | 325 | ||
331 | if (firmware_has_feature(FW_FEATURE_LPAR)) | 326 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
332 | find_udbg_vterm(); | 327 | find_udbg_vterm(); |
@@ -338,7 +333,7 @@ static void __init pSeries_init_early(void) | |||
338 | 333 | ||
339 | iommu_init_early_pSeries(); | 334 | iommu_init_early_pSeries(); |
340 | 335 | ||
341 | DBG(" <- pSeries_init_early()\n"); | 336 | pr_debug(" <- pSeries_init_early()\n"); |
342 | } | 337 | } |
343 | 338 | ||
344 | /* | 339 | /* |
@@ -383,7 +378,7 @@ static int __init pSeries_probe(void) | |||
383 | of_flat_dt_is_compatible(root, "IBM,CBEA")) | 378 | of_flat_dt_is_compatible(root, "IBM,CBEA")) |
384 | return 0; | 379 | return 0; |
385 | 380 | ||
386 | DBG("pSeries detected, looking for LPAR capability...\n"); | 381 | pr_debug("pSeries detected, looking for LPAR capability...\n"); |
387 | 382 | ||
388 | /* Now try to figure out if we are running on LPAR */ | 383 | /* Now try to figure out if we are running on LPAR */ |
389 | of_scan_flat_dt(pSeries_probe_hypertas, NULL); | 384 | of_scan_flat_dt(pSeries_probe_hypertas, NULL); |
@@ -393,8 +388,8 @@ static int __init pSeries_probe(void) | |||
393 | else | 388 | else |
394 | hpte_init_native(); | 389 | hpte_init_native(); |
395 | 390 | ||
396 | DBG("Machine is%s LPAR !\n", | 391 | pr_debug("Machine is%s LPAR !\n", |
397 | (powerpc_firmware_features & FW_FEATURE_LPAR) ? "" : " not"); | 392 | (powerpc_firmware_features & FW_FEATURE_LPAR) ? "" : " not"); |
398 | 393 | ||
399 | return 1; | 394 | return 1; |
400 | } | 395 | } |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index ea4c65917a64..e9bc2a528e5d 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -51,12 +51,6 @@ | |||
51 | #include "plpar_wrappers.h" | 51 | #include "plpar_wrappers.h" |
52 | #include "pseries.h" | 52 | #include "pseries.h" |
53 | 53 | ||
54 | #ifdef DEBUG | ||
55 | #include <asm/udbg.h> | ||
56 | #define DBG(fmt...) udbg_printf(fmt) | ||
57 | #else | ||
58 | #define DBG(fmt...) | ||
59 | #endif | ||
60 | 54 | ||
61 | /* | 55 | /* |
62 | * The primary thread of each non-boot processor is recorded here before | 56 | * The primary thread of each non-boot processor is recorded here before |
@@ -231,7 +225,7 @@ static void __init smp_init_pseries(void) | |||
231 | { | 225 | { |
232 | int i; | 226 | int i; |
233 | 227 | ||
234 | DBG(" -> smp_init_pSeries()\n"); | 228 | pr_debug(" -> smp_init_pSeries()\n"); |
235 | 229 | ||
236 | /* Mark threads which are still spinning in hold loops. */ | 230 | /* Mark threads which are still spinning in hold loops. */ |
237 | if (cpu_has_feature(CPU_FTR_SMT)) { | 231 | if (cpu_has_feature(CPU_FTR_SMT)) { |
@@ -255,7 +249,7 @@ static void __init smp_init_pseries(void) | |||
255 | smp_ops->take_timebase = pSeries_take_timebase; | 249 | smp_ops->take_timebase = pSeries_take_timebase; |
256 | } | 250 | } |
257 | 251 | ||
258 | DBG(" <- smp_init_pSeries()\n"); | 252 | pr_debug(" <- smp_init_pSeries()\n"); |
259 | } | 253 | } |
260 | 254 | ||
261 | #ifdef CONFIG_MPIC | 255 | #ifdef CONFIG_MPIC |