* [RFC/PATCH 1/4] powerpc: Register udbg_console for early debugging
2006-05-01 0:53 [RFC/PATCH 0/4] powerpc: Use pr_debug() for debugging Michael Ellerman
@ 2006-05-01 0:53 ` Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 2/4] powerpc: Convert DBG to pr_debug in arch/powerpc/kernel Michael Ellerman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2006-05-01 0:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
If we have early debugging enabled, then register the udbg console, so we
can use printk rather than udbg_printf.
I'm not sure about the jiggering with console_loglevel, but without it you
need to add "loglevel=8" to the command line, which I think might annoy people.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/udbg.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
Index: to-merge/arch/powerpc/kernel/udbg.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/udbg.c
+++ to-merge/arch/powerpc/kernel/udbg.c
@@ -14,6 +14,7 @@
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/console.h>
+#include <linux/kernel.h>
#include <asm/processor.h>
#include <asm/udbg.h>
@@ -30,18 +31,23 @@ void __init udbg_early_init(void)
#if defined(CONFIG_PPC_EARLY_DEBUG_LPAR)
/* For LPAR machines that have an HVC console on vterm 0 */
udbg_init_debug_lpar();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_G5)
/* For use on Apple G5 machines */
udbg_init_pmac_realmode();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS)
/* RTAS panel debug */
udbg_init_rtas();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE)
/* Maple real mode debug */
udbg_init_maple_realmode();
+ register_early_udbg_console();
#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
/* For iSeries - hit Ctrl-x Ctrl-x to see the output */
udbg_init_iseries();
+ register_early_udbg_console();
#endif
}
@@ -141,12 +147,11 @@ static int early_console_initialized;
void __init disable_early_printk(void)
{
-#if 1
if (!early_console_initialized)
return;
unregister_console(&udbg_console);
+ console_loglevel = default_console_loglevel;
early_console_initialized = 0;
-#endif
}
/* called by setup_system */
@@ -155,6 +160,7 @@ void register_early_udbg_console(void)
if (early_console_initialized)
return;
early_console_initialized = 1;
+ console_loglevel = 8;
register_console(&udbg_console);
}
^ permalink raw reply [flat|nested] 5+ messages in thread* [RFC/PATCH 2/4] powerpc: Convert DBG to pr_debug in arch/powerpc/kernel
2006-05-01 0:53 [RFC/PATCH 0/4] powerpc: Use pr_debug() for debugging Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 1/4] powerpc: Register udbg_console for early debugging Michael Ellerman
@ 2006-05-01 0:53 ` Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 3/4] powerpc: Convert DBG to pr_debug in arch/powerpc/platforms Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 4/4] powerpc: Convert DBG to pr_debug for the rest of arch/powerpc Michael Ellerman
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2006-05-01 0:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Convert DBG to pr_debug in arch/powerpc/kernel.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/crash.c | 6 ---
arch/powerpc/kernel/crash_dump.c | 12 +------
arch/powerpc/kernel/iommu.c | 22 ++++++-------
arch/powerpc/kernel/legacy_serial.c | 58 ++++++++++++++++--------------------
arch/powerpc/kernel/pci_32.c | 40 ++++++++++--------------
arch/powerpc/kernel/pci_64.c | 43 +++++++++++---------------
arch/powerpc/kernel/prom.c | 53 ++++++++++++++------------------
arch/powerpc/kernel/prom_parse.c | 28 ++++++-----------
arch/powerpc/kernel/setup-common.c | 21 ++++---------
arch/powerpc/kernel/setup_32.c | 4 +-
arch/powerpc/kernel/setup_64.c | 28 ++++++-----------
arch/powerpc/kernel/smp.c | 15 ++-------
arch/powerpc/kernel/vdso.c | 20 ++++--------
13 files changed, 140 insertions(+), 210 deletions(-)
Index: to-merge/arch/powerpc/kernel/crash.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/crash.c
+++ to-merge/arch/powerpc/kernel/crash.c
@@ -31,13 +31,7 @@
#include <asm/lmb.h>
#include <asm/firmware.h>
#include <asm/smp.h>
-
-#ifdef DEBUG
#include <asm/udbg.h>
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
/* This keeps a track of which one is crashing cpu. */
int crashing_cpu = -1;
Index: to-merge/arch/powerpc/kernel/crash_dump.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/crash_dump.c
+++ to-merge/arch/powerpc/kernel/crash_dump.c
@@ -11,6 +11,7 @@
#undef DEBUG
+#include <linux/kernel.h>
#include <linux/crash_dump.h>
#include <linux/bootmem.h>
#include <asm/kdump.h>
@@ -18,13 +19,6 @@
#include <asm/firmware.h>
#include <asm/uaccess.h>
-#ifdef DEBUG
-#include <asm/udbg.h>
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
static void __init create_trampoline(unsigned long addr)
{
/* The maximum range of a single instruction branch, is the current
@@ -43,7 +37,7 @@ void __init kdump_setup(void)
{
unsigned long i;
- DBG(" -> kdump_setup()\n");
+ pr_debug(" -> kdump_setup()\n");
for (i = KDUMP_TRAMPOLINE_START; i < KDUMP_TRAMPOLINE_END; i += 8) {
create_trampoline(i);
@@ -52,7 +46,7 @@ void __init kdump_setup(void)
create_trampoline(__pa(system_reset_fwnmi) - PHYSICAL_START);
create_trampoline(__pa(machine_check_fwnmi) - PHYSICAL_START);
- DBG(" <- kdump_setup()\n");
+ pr_debug(" <- kdump_setup()\n");
}
#ifdef CONFIG_PROC_VMCORE
Index: to-merge/arch/powerpc/kernel/iommu.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/iommu.c
+++ to-merge/arch/powerpc/kernel/iommu.c
@@ -22,7 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#undef DEBUG
+#include <linux/kernel.h>
#include <linux/config.h>
#include <linux/init.h>
#include <linux/types.h>
@@ -39,8 +41,6 @@
#include <asm/pci-bridge.h>
#include <asm/machdep.h>
-#define DBG(...)
-
#ifdef CONFIG_IOMMU_VMERGE
static int novmerge = 0;
#else
@@ -270,7 +270,7 @@ int iommu_map_sg(struct device *dev, str
/* Init first segment length for backout at failure */
outs->dma_length = 0;
- DBG("mapping %d elements:\n", nelems);
+ pr_debug("mapping %d elements:\n", nelems);
spin_lock_irqsave(&(tbl->it_lock), flags);
@@ -289,7 +289,7 @@ int iommu_map_sg(struct device *dev, str
npages >>= PAGE_SHIFT;
entry = iommu_range_alloc(tbl, npages, &handle, mask >> PAGE_SHIFT, 0);
- DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen);
+ pr_debug(" - vaddr: %lx, size: %lx\n", vaddr, slen);
/* Handle failure */
if (unlikely(entry == DMA_ERROR_CODE)) {
@@ -304,7 +304,7 @@ int iommu_map_sg(struct device *dev, str
dma_addr = entry << PAGE_SHIFT;
dma_addr |= s->offset;
- DBG(" - %lx pages, entry: %lx, dma_addr: %lx\n",
+ pr_debug(" - %lx pages, entry: %lx, dma_addr: %lx\n",
npages, entry, dma_addr);
/* Insert into HW table */
@@ -312,7 +312,7 @@ int iommu_map_sg(struct device *dev, str
/* If we are in an open segment, try merging */
if (segstart != s) {
- DBG(" - trying merge...\n");
+ pr_debug(" - trying merge...\n");
/* We cannot merge if:
* - allocated dma_addr isn't contiguous to previous allocation
*/
@@ -320,16 +320,16 @@ int iommu_map_sg(struct device *dev, str
/* Can't merge: create a new segment */
segstart = s;
outcount++; outs++;
- DBG(" can't merge, new segment.\n");
+ pr_debug(" can't merge, new segment.\n");
} else {
outs->dma_length += s->length;
- DBG(" merged, new len: %lx\n", outs->dma_length);
+ pr_debug(" merged, new len: %lx\n", outs->dma_length);
}
}
if (segstart == s) {
/* This is a new segment, fill entries */
- DBG(" - filling new segment.\n");
+ pr_debug(" - filling new segment.\n");
outs->dma_address = dma_addr;
outs->dma_length = slen;
}
@@ -337,7 +337,7 @@ int iommu_map_sg(struct device *dev, str
/* Calculate next page pointer for contiguous check */
dma_next = dma_addr + slen;
- DBG(" - dma next is: %lx\n", dma_next);
+ pr_debug(" - dma next is: %lx\n", dma_next);
}
/* Flush/invalidate TLB caches if necessary */
@@ -346,7 +346,7 @@ int iommu_map_sg(struct device *dev, str
spin_unlock_irqrestore(&(tbl->it_lock), flags);
- DBG("mapped %d elements:\n", outcount);
+ pr_debug("mapped %d elements:\n", outcount);
/* For the sake of iommu_unmap_sg, we clear out the length in the
* next entry of the sglist if we didn't fill the list completely
Index: to-merge/arch/powerpc/kernel/legacy_serial.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/legacy_serial.c
+++ to-merge/arch/powerpc/kernel/legacy_serial.c
@@ -1,3 +1,5 @@
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/serial.h>
@@ -13,14 +15,6 @@
#include <asm/pci-bridge.h>
#include <asm/ppc-pci.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(fmt...) do { printk(fmt); } while(0)
-#else
-#define DBG(fmt...) do { } while(0)
-#endif
-
#define MAX_LEGACY_SERIAL_PORTS 8
static struct plat_serial8250_port
@@ -249,7 +243,7 @@ static void __init setup_legacy_serial_c
return;
if (info->speed == 0)
info->speed = udbg_probe_uart_speed(addr, info->clock);
- DBG("default console speed = %d\n", info->speed);
+ pr_debug("default console speed = %d\n", info->speed);
udbg_init_uart(addr, info->speed, info->clock);
}
@@ -268,16 +262,16 @@ void __init find_legacy_serial_ports(voi
char *path;
int index;
- DBG(" -> find_legacy_serial_port()\n");
+ pr_debug(" -> find_legacy_serial_port()\n");
/* Now find out if one of these is out firmware console */
path = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
if (path != NULL) {
stdout = of_find_node_by_path(path);
if (stdout)
- DBG("stdout is %s\n", stdout->full_name);
+ pr_debug("stdout is %s\n", stdout->full_name);
} else {
- DBG(" no linux,stdout-path !\n");
+ pr_debug(" no linux,stdout-path !\n");
}
/* First fill our array with SOC ports */
@@ -334,10 +328,10 @@ void __init find_legacy_serial_ports(voi
}
#endif
- DBG("legacy_serial_console = %d\n", legacy_serial_console);
+ pr_debug("legacy_serial_console = %d\n", legacy_serial_console);
if (legacy_serial_console >= 0)
setup_legacy_serial_console(legacy_serial_console);
- DBG(" <- find_legacy_serial_port()\n");
+ pr_debug(" <- find_legacy_serial_port()\n");
}
static struct platform_device serial_device = {
@@ -352,12 +346,12 @@ static void __init fixup_port_irq(int in
struct device_node *np,
struct plat_serial8250_port *port)
{
- DBG("fixup_port_irq(%d)\n", index);
+ pr_debug("fixup_port_irq(%d)\n", index);
/* Check for interrupts in that node */
if (np->n_intrs > 0) {
port->irq = np->intrs[0].line;
- DBG(" port %d (%s), irq=%d\n",
+ pr_debug(" port %d (%s), irq=%d\n",
index, np->full_name, port->irq);
return;
}
@@ -369,7 +363,7 @@ static void __init fixup_port_irq(int in
if (np->n_intrs > 0) {
port->irq = np->intrs[0].line;
- DBG(" port %d (%s), irq=%d\n",
+ pr_debug(" port %d (%s), irq=%d\n",
index, np->full_name, port->irq);
}
of_node_put(np);
@@ -382,7 +376,7 @@ static void __init fixup_port_pio(int in
#ifdef CONFIG_PCI
struct pci_controller *hose;
- DBG("fixup_port_pio(%d)\n", index);
+ pr_debug("fixup_port_pio(%d)\n", index);
hose = pci_find_hose_for_OF_device(np);
if (hose) {
@@ -392,7 +386,7 @@ static void __init fixup_port_pio(int in
#else
isa_io_base;
#endif
- DBG("port %d, IO %lx -> %lx\n",
+ pr_debug("port %d, IO %lx -> %lx\n",
index, port->iobase, port->iobase + offset);
port->iobase += offset;
}
@@ -403,7 +397,7 @@ static void __init fixup_port_mmio(int i
struct device_node *np,
struct plat_serial8250_port *port)
{
- DBG("fixup_port_mmio(%d)\n", index);
+ pr_debug("fixup_port_mmio(%d)\n", index);
port->membase = ioremap(port->mapbase, 0x100);
}
@@ -432,7 +426,7 @@ static int __init serial_dev_init(void)
* Before we register the platfrom serial devices, we need
* to fixup their interrutps and their IO ports.
*/
- DBG("Fixing serial ports interrupts and IO ports ...\n");
+ pr_debug("Fixing serial ports interrupts and IO ports ...\n");
for (i = 0; i < legacy_serial_count; i++) {
struct plat_serial8250_port *port = &legacy_serial_ports[i];
@@ -446,7 +440,7 @@ static int __init serial_dev_init(void)
fixup_port_mmio(i, np, port);
}
- DBG("Registering platform serial ports\n");
+ pr_debug("Registering platform serial ports\n");
return platform_device_register(&serial_device);
}
@@ -468,40 +462,40 @@ static int __init check_legacy_serial_co
char *name;
u32 *spd;
- DBG(" -> check_legacy_serial_console()\n");
+ pr_debug(" -> check_legacy_serial_console()\n");
/* The user has requested a console so this is already set up. */
if (strstr(saved_command_line, "console=")) {
- DBG(" console was specified !\n");
+ pr_debug(" console was specified !\n");
return -EBUSY;
}
if (!of_chosen) {
- DBG(" of_chosen is NULL !\n");
+ pr_debug(" of_chosen is NULL !\n");
return -ENODEV;
}
if (legacy_serial_console < 0) {
- DBG(" legacy_serial_console not found !\n");
+ pr_debug(" legacy_serial_console not found !\n");
return -ENODEV;
}
/* We are getting a weird phandle from OF ... */
/* ... So use the full path instead */
name = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
if (name == NULL) {
- DBG(" no linux,stdout-path !\n");
+ pr_debug(" no linux,stdout-path !\n");
return -ENODEV;
}
prom_stdout = of_find_node_by_path(name);
if (!prom_stdout) {
- DBG(" can't find stdout package %s !\n", name);
+ pr_debug(" can't find stdout package %s !\n", name);
return -ENODEV;
}
- DBG("stdout is %s\n", prom_stdout->full_name);
+ pr_debug("stdout is %s\n", prom_stdout->full_name);
name = (char *)get_property(prom_stdout, "name", NULL);
if (!name) {
- DBG(" stdout package has no name !\n");
+ pr_debug(" stdout package has no name !\n");
goto not_found;
}
spd = (u32 *)get_property(prom_stdout, "current-speed", NULL);
@@ -535,7 +529,7 @@ static int __init check_legacy_serial_co
goto not_found;
of_node_put(prom_stdout);
- DBG("Found serial console at ttyS%d\n", offset);
+ pr_debug("Found serial console at ttyS%d\n", offset);
if (speed) {
static char __initdata opt[16];
@@ -545,7 +539,7 @@ static int __init check_legacy_serial_co
return add_preferred_console("ttyS", offset, NULL);
not_found:
- DBG("No preferred console found !\n");
+ pr_debug("No preferred console found !\n");
of_node_put(prom_stdout);
return -ENODEV;
}
Index: to-merge/arch/powerpc/kernel/pci_32.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/pci_32.c
+++ to-merge/arch/powerpc/kernel/pci_32.c
@@ -2,6 +2,8 @@
* Common pmac/prep/chrp pci routines. -- Cort
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/pci.h>
@@ -23,14 +25,6 @@
#include <asm/uaccess.h>
#include <asm/machdep.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
unsigned long isa_io_base = 0;
unsigned long isa_mem_base = 0;
unsigned long pci_dram_offset = 0;
@@ -99,7 +93,7 @@ pcibios_fixup_resources(struct pci_dev *
if (!res->flags)
continue;
if (res->end == 0xffffffff) {
- DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n",
+ pr_debug("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n",
pci_name(dev), i, res->start, res->end);
res->end -= res->start;
res->start = 0;
@@ -255,7 +249,7 @@ pcibios_allocate_bus_resources(struct li
}
}
- DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n",
+ pr_debug("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n",
res->start, res->end, res->flags, pr);
if (pr) {
if (request_resource(pr, res) == 0)
@@ -306,7 +300,7 @@ reparent_resources(struct resource *pare
*pp = NULL;
for (p = res->child; p != NULL; p = p->sibling) {
p->parent = res;
- DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n",
+ pr_debug(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n",
p->name, p->start, p->end, res->name);
}
return 0;
@@ -362,7 +356,7 @@ pci_relocate_bridge_resource(struct pci_
try = conflict->start - 1;
}
if (request_resource(pr, res)) {
- DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n",
+ pr_debug(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n",
res->start, res->end);
return -1; /* "can't happen" */
}
@@ -469,7 +463,7 @@ update_bridge_base(struct pci_bus *bus,
pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit);
} else {
- DBG(KERN_ERR "PCI: ugh, bridge %s res %d has flags=%lx\n",
+ pr_debug(KERN_ERR "PCI: ugh, bridge %s res %d has flags=%lx\n",
pci_name(dev), i, res->flags);
}
pci_write_config_word(dev, PCI_COMMAND, cmd);
@@ -479,14 +473,14 @@ static inline void alloc_resource(struct
{
struct resource *pr, *r = &dev->resource[idx];
- DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n",
+ pr_debug("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n",
pci_name(dev), idx, r->start, r->end, r->flags);
pr = pci_find_parent_resource(dev, r);
if (!pr || request_resource(pr, r) < 0) {
printk(KERN_ERR "PCI: Cannot allocate resource region %d"
" of device %s\n", idx, pci_name(dev));
if (pr)
- DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n",
+ pr_debug("PCI: parent is %p: %08lx-%08lx (f=%lx)\n",
pr, pr->start, pr->end, pr->flags);
/* We'll assign a new address later */
r->flags |= IORESOURCE_UNSET;
@@ -524,7 +518,7 @@ pcibios_allocate_resources(int pass)
if (r->flags & IORESOURCE_ROM_ENABLE) {
/* Turn the ROM off, leave the resource region, but keep it unregistered. */
u32 reg;
- DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
+ pr_debug("PCI: Switching off ROM of %s\n", pci_name(dev));
r->flags &= ~IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, dev->rom_base_reg, ®);
pci_write_config_dword(dev, dev->rom_base_reg,
@@ -956,7 +950,7 @@ pci_process_bridge_OF_ranges(struct pci_
res = &hose->io_resource;
res->flags = IORESOURCE_IO;
res->start = ranges[2];
- DBG("PCI: IO 0x%lx -> 0x%lx\n",
+ pr_debug("PCI: IO 0x%lx -> 0x%lx\n",
res->start, res->start + size - 1);
break;
case 2: /* memory space */
@@ -978,7 +972,7 @@ pci_process_bridge_OF_ranges(struct pci_
if(ranges[0] & 0x40000000)
res->flags |= IORESOURCE_PREFETCH;
res->start = ranges[na+2];
- DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno,
+ pr_debug("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno,
res->start, res->start + size - 1);
}
break;
@@ -1071,10 +1065,10 @@ do_update_p2p_io_resource(struct pci_bus
return;
res = *(bus->resource[0]);
- DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
+ pr_debug("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
- DBG(" IO window: %08lx-%08lx\n", res.start, res.end);
+ pr_debug(" IO window: %08lx-%08lx\n", res.start, res.end);
/* Set up the top and bottom of the PCI I/O segment for this bus. */
pci_read_config_dword(bridge, PCI_IO_BASE, &l);
@@ -1222,13 +1216,13 @@ do_fixup_p2p_level(struct pci_bus *bus)
continue;
if ((r->flags & IORESOURCE_IO) == 0)
continue;
- DBG("Trying to allocate from %08lx, size %08lx from parent"
+ pr_debug("Trying to allocate from %08lx, size %08lx from parent"
" res %d: %08lx -> %08lx\n",
res->start, res->end, i, r->start, r->end);
if (allocate_resource(r, res, res->end + 1, res->start, max,
res->end + 1, NULL, NULL) < 0) {
- DBG("Failed !\n");
+ pr_debug("Failed !\n");
continue;
}
do_update_p2p_io_resource(b, found_vga);
@@ -1624,7 +1618,7 @@ pgprot_t pci_phys_mem_access_prot(struct
pci_dev_put(pdev);
}
- DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
+ pr_debug("non-PCI map for %lx, prot: %lx\n", offset, prot);
return __pgprot(prot);
}
Index: to-merge/arch/powerpc/kernel/pci_64.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/pci_64.c
+++ to-merge/arch/powerpc/kernel/pci_64.c
@@ -32,13 +32,6 @@
#include <asm/machdep.h>
#include <asm/ppc-pci.h>
-#ifdef DEBUG
-#include <asm/udbg.h>
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
unsigned long pci_probe_only = 1;
int pci_assign_all_buses = 0;
@@ -320,7 +313,7 @@ static void pci_parse_of_addrs(struct de
addrs = (u32 *) get_property(node, "assigned-addresses", &proplen);
if (!addrs)
return;
- DBG(" parse addresses (%d bytes) @ %p\n", proplen, addrs);
+ pr_debug(" parse addresses (%d bytes) @ %p\n", proplen, addrs);
for (; proplen >= 20; proplen -= 20, addrs += 5) {
flags = pci_parse_of_flags(addrs[0]);
if (!flags)
@@ -330,7 +323,7 @@ static void pci_parse_of_addrs(struct de
if (!size)
continue;
i = addrs[0] & 0xff;
- DBG(" base: %llx, size: %llx, i: %x\n",
+ pr_debug(" base: %llx, size: %llx, i: %x\n",
(unsigned long long)base, (unsigned long long)size, i);
if (PCI_BASE_ADDRESS_0 <= i && i <= PCI_BASE_ADDRESS_5) {
@@ -363,7 +356,7 @@ struct pci_dev *of_create_pci_dev(struct
if (type == NULL)
type = "";
- DBG(" create device, devfn: %x, type: %s\n", devfn, type);
+ pr_debug(" create device, devfn: %x, type: %s\n", devfn, type);
memset(dev, 0, sizeof(struct pci_dev));
dev->bus = bus;
@@ -384,7 +377,7 @@ struct pci_dev *of_create_pci_dev(struct
dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
dev->class = get_int_prop(node, "class-code", 0);
- DBG(" class: 0x%x\n", dev->class);
+ pr_debug(" class: 0x%x\n", dev->class);
dev->current_state = 4; /* unknown power state */
@@ -407,7 +400,7 @@ struct pci_dev *of_create_pci_dev(struct
pci_parse_of_addrs(node, dev);
- DBG(" adding to system ...\n");
+ pr_debug(" adding to system ...\n");
pci_device_add(dev, bus);
@@ -425,10 +418,10 @@ void __devinit of_scan_bus(struct device
int reglen, devfn;
struct pci_dev *dev;
- DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number);
+ pr_debug("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number);
while ((child = of_get_next_child(node, child)) != NULL) {
- DBG(" * %s\n", child->full_name);
+ pr_debug(" * %s\n", child->full_name);
reg = (u32 *) get_property(child, "reg", ®len);
if (reg == NULL || reglen < 20)
continue;
@@ -438,7 +431,7 @@ void __devinit of_scan_bus(struct device
dev = of_create_pci_dev(child, bus, devfn);
if (!dev)
continue;
- DBG("dev header type: %x\n", dev->hdr_type);
+ pr_debug("dev header type: %x\n", dev->hdr_type);
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
@@ -459,7 +452,7 @@ void __devinit of_scan_pci_bridge(struct
unsigned int flags;
u64 size;
- DBG("of_scan_pci_bridge(%s)\n", node->full_name);
+ pr_debug("of_scan_pci_bridge(%s)\n", node->full_name);
/* parse bus-range property */
busrange = (u32 *) get_property(node, "bus-range", &len);
@@ -524,12 +517,12 @@ void __devinit of_scan_pci_bridge(struct
}
sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
bus->number);
- DBG(" bus name: %s\n", bus->name);
+ pr_debug(" bus name: %s\n", bus->name);
mode = PCI_PROBE_NORMAL;
if (ppc_md.pci_probe_mode)
mode = ppc_md.pci_probe_mode(bus);
- DBG(" probe mode: %d\n", mode);
+ pr_debug(" probe mode: %d\n", mode);
if (mode == PCI_PROBE_DEVTREE)
of_scan_bus(node, bus);
@@ -546,7 +539,7 @@ void __devinit scan_phb(struct pci_contr
int i, mode;
struct resource *res;
- DBG("Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
+ pr_debug("Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
bus = pci_create_bus(NULL, hose->first_busno, hose->ops, node);
if (bus == NULL) {
@@ -574,7 +567,7 @@ void __devinit scan_phb(struct pci_contr
#ifdef CONFIG_PPC_MULTIPLATFORM
if (node && ppc_md.pci_probe_mode)
mode = ppc_md.pci_probe_mode(bus);
- DBG(" probe mode: %d\n", mode);
+ pr_debug(" probe mode: %d\n", mode);
if (mode == PCI_PROBE_DEVTREE) {
bus->subordinate = hose->last_busno;
of_scan_bus(node, bus);
@@ -847,7 +840,7 @@ pgprot_t pci_phys_mem_access_prot(struct
pci_dev_put(pdev);
}
- DBG("non-PCI map for %lx, prot: %lx\n", offset, prot);
+ pr_debug("non-PCI map for %lx, prot: %lx\n", offset, prot);
return __pgprot(prot);
}
@@ -1047,7 +1040,7 @@ void __devinit pci_process_bridge_OF_ran
res = &hose->io_resource;
res->flags = IORESOURCE_IO;
res->start = pci_addr;
- DBG("phb%d: IO 0x%lx -> 0x%lx\n", hose->global_number,
+ pr_debug("phb%d: IO 0x%lx -> 0x%lx\n", hose->global_number,
res->start, res->start + size - 1);
break;
case 2: /* memory space */
@@ -1061,7 +1054,7 @@ void __devinit pci_process_bridge_OF_ran
res = &hose->mem_resources[memno];
res->flags = IORESOURCE_MEM;
res->start = cpu_phys_addr;
- DBG("phb%d: MEM 0x%lx -> 0x%lx\n", hose->global_number,
+ pr_debug("phb%d: MEM 0x%lx -> 0x%lx\n", hose->global_number,
res->start, res->start + size - 1);
}
break;
@@ -1084,7 +1077,7 @@ void __init pci_setup_phb_io(struct pci_
struct device_node *isa_dn;
hose->io_base_virt = reserve_phb_iospace(size);
- DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n",
+ pr_debug("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n",
hose->global_number, hose->io_base_phys,
(unsigned long) hose->io_base_virt);
@@ -1114,7 +1107,7 @@ void __devinit pci_setup_phb_io_dynamic(
hose->io_base_virt = __ioremap(hose->io_base_phys, size,
_PAGE_NO_CACHE | _PAGE_GUARDED);
- DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n",
+ pr_debug("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n",
hose->global_number, hose->io_base_phys,
(unsigned long) hose->io_base_virt);
Index: to-merge/arch/powerpc/kernel/prom.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/prom.c
+++ to-merge/arch/powerpc/kernel/prom.c
@@ -51,13 +51,6 @@
#include <asm/pSeries_reconfig.h>
#include <asm/pci-bridge.h>
-#ifdef DEBUG
-#define DBG(fmt...) printk(KERN_ERR fmt)
-#else
-#define DBG(fmt...)
-#endif
-
-
static int __initdata dt_root_addr_cells;
static int __initdata dt_root_size_cells;
@@ -470,7 +463,7 @@ void __init finish_device_tree(void)
{
unsigned long start, end, size = 0;
- DBG(" -> finish_device_tree\n");
+ pr_debug(" -> finish_device_tree\n");
#ifdef CONFIG_PPC64
/* Initialize virtual IRQ map */
@@ -500,7 +493,7 @@ void __init finish_device_tree(void)
finish_node(allnodes, &end, 0);
BUG_ON(end != start + size);
- DBG(" <- finish_device_tree\n");
+ pr_debug(" <- finish_device_tree\n");
}
static inline char *find_flat_dt_string(u32 offset)
@@ -716,7 +709,7 @@ static unsigned long __init unflatten_dt
strcpy(p, dad->full_name);
#ifdef DEBUG
if ((strlen(p) + l + 1) != allocl) {
- DBG("%s: p: %d, l: %d, a: %d\n",
+ pr_debug("%s: p: %d, l: %d, a: %d\n",
pathp, (int)strlen(p), l, allocl);
}
#endif
@@ -811,7 +804,7 @@ static unsigned long __init unflatten_dt
prev_pp = &pp->next;
memcpy(pp->value, ps, sz - 1);
((char *)pp->value)[sz - 1] = 0;
- DBG("fixed up name for %s -> %s\n", pathp, pp->value);
+ pr_debug("fixed up name for %s -> %s\n", pathp, pp->value);
}
}
if (allnextpp) {
@@ -848,7 +841,7 @@ void __init unflatten_device_tree(void)
unsigned long start, mem, size;
struct device_node **allnextp = &allnodes;
- DBG(" -> unflatten_device_tree()\n");
+ pr_debug(" -> unflatten_device_tree()\n");
/* First pass, scan for size */
start = ((unsigned long)initial_boot_params) +
@@ -856,7 +849,7 @@ void __init unflatten_device_tree(void)
size = unflatten_dt_node(0, &start, NULL, NULL, 0);
size = (size | 3) + 1;
- DBG(" size is %lx, allocating...\n", size);
+ pr_debug(" size is %lx, allocating...\n", size);
/* Allocate memory for the expanded device tree */
mem = lmb_alloc(size + 4, __alignof__(struct device_node));
@@ -864,7 +857,7 @@ void __init unflatten_device_tree(void)
((u32 *)mem)[size / 4] = 0xdeadbeef;
- DBG(" unflattening %lx...\n", mem);
+ pr_debug(" unflattening %lx...\n", mem);
/* Second pass, do actual unflattening */
start = ((unsigned long)initial_boot_params) +
@@ -882,7 +875,7 @@ void __init unflatten_device_tree(void)
if (of_chosen == NULL)
of_chosen = of_find_node_by_path("/chosen@0");
- DBG(" <- unflatten_device_tree()\n");
+ pr_debug(" <- unflatten_device_tree()\n");
}
static int __init early_init_dt_scan_cpus(unsigned long node,
@@ -947,7 +940,7 @@ static int __init early_init_dt_scan_cpu
}
if (found) {
- DBG("boot cpu: logical %d physical %d\n", logical_cpuid,
+ pr_debug("boot cpu: logical %d physical %d\n", logical_cpuid,
intserv[i]);
boot_cpuid = logical_cpuid;
set_hard_smp_processor_id(boot_cpuid, intserv[i]);
@@ -986,7 +979,7 @@ static int __init early_init_dt_scan_cho
unsigned long l;
char *p;
- DBG("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
+ pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
if (depth != 1 ||
(strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))
@@ -1051,7 +1044,7 @@ static int __init early_init_dt_scan_cho
strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#endif /* CONFIG_CMDLINE */
- DBG("Command line is: %s\n", cmd_line);
+ pr_debug("Command line is: %s\n", cmd_line);
if (strstr(cmd_line, "mem=")) {
char *p, *q;
@@ -1078,11 +1071,11 @@ static int __init early_init_dt_scan_roo
prop = of_get_flat_dt_prop(node, "#size-cells", NULL);
dt_root_size_cells = (prop == NULL) ? 1 : *prop;
- DBG("dt_root_size_cells = %x\n", dt_root_size_cells);
+ pr_debug("dt_root_size_cells = %x\n", dt_root_size_cells);
prop = of_get_flat_dt_prop(node, "#address-cells", NULL);
dt_root_addr_cells = (prop == NULL) ? 2 : *prop;
- DBG("dt_root_addr_cells = %x\n", dt_root_addr_cells);
+ pr_debug("dt_root_addr_cells = %x\n", dt_root_addr_cells);
/* break now */
return 1;
@@ -1138,7 +1131,7 @@ static int __init early_init_dt_scan_mem
endp = reg + (l / sizeof(cell_t));
- DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n",
+ pr_debug("memory scan node %s, reg size %ld, data: %x %x %x %x,\n",
uname, l, reg[0], reg[1], reg[2], reg[3]);
while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
@@ -1149,7 +1142,7 @@ static int __init early_init_dt_scan_mem
if (size == 0)
continue;
- DBG(" - %lx , %lx\n", base, size);
+ pr_debug(" - %lx , %lx\n", base, size);
#ifdef CONFIG_PPC64
if (iommu_is_off) {
if (base >= 0x80000000ul)
@@ -1184,7 +1177,7 @@ static void __init early_reserve_mem(voi
size_32 = *(reserve_map_32++);
if (size_32 == 0)
break;
- DBG("reserving: %x -> %x\n", base_32, size_32);
+ pr_debug("reserving: %x -> %x\n", base_32, size_32);
lmb_reserve(base_32, size_32);
}
return;
@@ -1195,19 +1188,19 @@ static void __init early_reserve_mem(voi
size = *(reserve_map++);
if (size == 0)
break;
- DBG("reserving: %llx -> %llx\n", base, size);
+ pr_debug("reserving: %llx -> %llx\n", base, size);
lmb_reserve(base, size);
}
#if 0
- DBG("memory reserved, lmbs :\n");
+ pr_debug("memory reserved, lmbs :\n");
lmb_dump_all();
#endif
}
void __init early_init_devtree(void *params)
{
- DBG(" -> early_init_devtree()\n");
+ pr_debug(" -> early_init_devtree()\n");
/* Setup flat device-tree pointer */
initial_boot_params = params;
@@ -1225,7 +1218,7 @@ void __init early_init_devtree(void *par
lmb_enforce_memory_limit(memory_limit);
lmb_analyze();
- DBG("Phys. mem: %lx\n", lmb_phys_mem_size());
+ pr_debug("Phys. mem: %lx\n", lmb_phys_mem_size());
/* Reserve LMB regions used by kernel, initrd, dt, etc... */
lmb_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START);
@@ -1234,14 +1227,14 @@ void __init early_init_devtree(void *par
#endif
early_reserve_mem();
- DBG("Scanning CPUs ...\n");
+ pr_debug("Scanning CPUs ...\n");
/* Retreive CPU related informations from the flat tree
* (altivec support, boot CPU ID, ...)
*/
of_scan_flat_dt(early_init_dt_scan_cpus, NULL);
- DBG(" <- early_init_devtree()\n");
+ pr_debug(" <- early_init_devtree()\n");
}
#undef printk
@@ -2004,7 +1997,7 @@ void kdump_move_device_tree(void)
initial_boot_params = new;
- DBG("Flat device tree blob moved to %p\n", initial_boot_params);
+ pr_debug("Flat device tree blob moved to %p\n", initial_boot_params);
/* XXX should we unreserve the old DT? */
}
Index: to-merge/arch/powerpc/kernel/prom_parse.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/prom_parse.c
+++ to-merge/arch/powerpc/kernel/prom_parse.c
@@ -8,12 +8,6 @@
#include <asm/prom.h>
#include <asm/pci-bridge.h>
-#ifdef DEBUG
-#define DBG(fmt...) do { printk(fmt); } while(0)
-#else
-#define DBG(fmt...) do { } while(0)
-#endif
-
#ifdef CONFIG_PPC64
#define PRu64 "%lx"
#else
@@ -81,7 +75,7 @@ static u64 of_bus_default_map(u32 *addr,
s = of_read_addr(range + na + pna, ns);
da = of_read_addr(addr, na);
- DBG("OF: default map, cp="PRu64", s="PRu64", da="PRu64"\n",
+ pr_debug("OF: default map, cp="PRu64", s="PRu64", da="PRu64"\n",
cp, s, da);
if (da < cp || da >= (cp + s))
@@ -139,7 +133,7 @@ static u64 of_bus_pci_map(u32 *addr, u32
s = of_read_addr(range + na + pna, ns);
da = of_read_addr(addr + 1, na - 1);
- DBG("OF: PCI map, cp="PRu64", s="PRu64", da="PRu64"\n", cp, s, da);
+ pr_debug("OF: PCI map, cp="PRu64", s="PRu64", da="PRu64"\n", cp, s, da);
if (da < cp || da >= (cp + s))
return OF_BAD_ADDR;
@@ -199,7 +193,7 @@ static u64 of_bus_isa_map(u32 *addr, u32
s = of_read_addr(range + na + pna, ns);
da = of_read_addr(addr + 1, na - 1);
- DBG("OF: ISA map, cp="PRu64", s="PRu64", da="PRu64"\n", cp, s, da);
+ pr_debug("OF: ISA map, cp="PRu64", s="PRu64", da="PRu64"\n", cp, s, da);
if (da < cp || da >= (cp + s))
return OF_BAD_ADDR;
@@ -297,11 +291,11 @@ static int of_translate_one(struct devic
if (ranges == NULL || rlen == 0) {
offset = of_read_addr(addr, na);
memset(addr, 0, pna * 4);
- DBG("OF: no ranges, 1:1 translation\n");
+ pr_debug("OF: no ranges, 1:1 translation\n");
goto finish;
}
- DBG("OF: walking ranges...\n");
+ pr_debug("OF: walking ranges...\n");
/* Now walk through the ranges */
rlen /= 4;
@@ -312,14 +306,14 @@ static int of_translate_one(struct devic
break;
}
if (offset == OF_BAD_ADDR) {
- DBG("OF: not found !\n");
+ pr_debug("OF: not found !\n");
return 1;
}
memcpy(addr, ranges + na, 4 * pna);
finish:
of_dump_addr("OF: parent translation for:", addr, pna);
- DBG("OF: with offset: "PRu64"\n", offset);
+ pr_debug("OF: with offset: "PRu64"\n", offset);
/* Translate it into parent bus space */
return pbus->translate(addr, offset, pna);
@@ -344,7 +338,7 @@ u64 of_translate_address(struct device_n
int na, ns, pna, pns;
u64 result = OF_BAD_ADDR;
- DBG("OF: ** translation for device %s **\n", dev->full_name);
+ pr_debug("OF: ** translation for device %s **\n", dev->full_name);
/* Increase refcount at current level */
of_node_get(dev);
@@ -364,7 +358,7 @@ u64 of_translate_address(struct device_n
}
memcpy(addr, in_addr, na * 4);
- DBG("OF: bus is %s (na=%d, ns=%d) on %s\n",
+ pr_debug("OF: bus is %s (na=%d, ns=%d) on %s\n",
bus->name, na, ns, parent->full_name);
of_dump_addr("OF: translating address:", addr, na);
@@ -377,7 +371,7 @@ u64 of_translate_address(struct device_n
/* If root, we have finished */
if (parent == NULL) {
- DBG("OF: reached root node\n");
+ pr_debug("OF: reached root node\n");
result = of_read_addr(addr, na);
break;
}
@@ -391,7 +385,7 @@ u64 of_translate_address(struct device_n
break;
}
- DBG("OF: parent bus is %s (na=%d, ns=%d) on %s\n",
+ pr_debug("OF: parent bus is %s (na=%d, ns=%d) on %s\n",
pbus->name, pna, pns, parent->full_name);
/* Apply bus translation */
Index: to-merge/arch/powerpc/kernel/setup-common.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/setup-common.c
+++ to-merge/arch/powerpc/kernel/setup-common.c
@@ -61,13 +61,6 @@
#include "setup.h"
-#ifdef DEBUG
-#include <asm/udbg.h>
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
/* The main machine-dep calls structure
*/
struct machdep_calls ppc_md;
@@ -307,7 +300,7 @@ void __init check_for_initrd(void)
#ifdef CONFIG_BLK_DEV_INITRD
unsigned long *prop;
- DBG(" -> check_for_initrd()\n");
+ pr_debug(" -> check_for_initrd()\n");
if (of_chosen) {
prop = (unsigned long *)get_property(of_chosen,
@@ -336,7 +329,7 @@ void __init check_for_initrd(void)
if (initrd_start)
printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
- DBG(" <- check_for_initrd()\n");
+ pr_debug(" <- check_for_initrd()\n");
#endif /* CONFIG_BLK_DEV_INITRD */
}
@@ -495,22 +488,22 @@ void probe_machine(void)
* Iterate all ppc_md structures until we find the proper
* one for the current machine type
*/
- DBG("Probing machine type ...\n");
+ pr_debug("Probing machine type ...\n");
for (machine_id = &__machine_desc_start;
machine_id < &__machine_desc_end;
machine_id++) {
- DBG(" %s ...", machine_id->name);
+ pr_debug(" %s ...", machine_id->name);
memcpy(&ppc_md, machine_id, sizeof(struct machdep_calls));
if (ppc_md.probe()) {
- DBG(" match !\n");
+ pr_debug(" match !\n");
break;
}
- DBG("\n");
+ pr_debug("\n");
}
/* What can we do if we didn't find ? */
if (machine_id >= &__machine_desc_end) {
- DBG("No suitable machine found !\n");
+ pr_debug("No suitable machine found !\n");
for (;;);
}
Index: to-merge/arch/powerpc/kernel/setup_32.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/setup_32.c
+++ to-merge/arch/powerpc/kernel/setup_32.c
@@ -2,6 +2,8 @@
* Common prep/pmac/chrp boot and setup code.
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/module.h>
#include <linux/string.h>
@@ -44,8 +46,6 @@
#include "setup.h"
-#define DBG(fmt...)
-
#if defined CONFIG_KGDB
#include <asm/kgdb.h>
#endif
Index: to-merge/arch/powerpc/kernel/setup_64.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/setup_64.c
+++ to-merge/arch/powerpc/kernel/setup_64.c
@@ -65,12 +65,6 @@
#include "setup.h"
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
int have_of = 1;
int boot_cpuid = 0;
dev_t boot_dev;
@@ -179,7 +173,7 @@ void __init early_setup(unsigned long dt
/* Enable early debugging if any specified (see udbg.h) */
udbg_early_init();
- DBG(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr);
+ pr_debug(" -> early_setup(), dt_ptr: 0x%lx\n", dt_ptr);
/*
* Do early initializations using the flattened device
@@ -203,7 +197,7 @@ void __init early_setup(unsigned long dt
kdump_setup();
#endif
- DBG("Found, Initializing memory management...\n");
+ pr_debug("Found, Initializing memory management...\n");
/*
* Initialize the MMU Hash table and create the linear mapping
@@ -220,7 +214,7 @@ void __init early_setup(unsigned long dt
else if (!firmware_has_feature(FW_FEATURE_ISERIES))
stab_initialize(get_paca()->stab_real);
- DBG(" <- early_setup()\n");
+ pr_debug(" <- early_setup()\n");
}
#ifdef CONFIG_SMP
@@ -252,7 +246,7 @@ void smp_release_cpus(void)
extern unsigned long __secondary_hold_spinloop;
unsigned long *ptr;
- DBG(" -> smp_release_cpus()\n");
+ pr_debug(" -> smp_release_cpus()\n");
/* All secondary cpus are spinning on a common spinloop, release them
* all now so they can start to spin on their individual paca
@@ -266,7 +260,7 @@ void smp_release_cpus(void)
*ptr = 1;
mb();
- DBG(" <- smp_release_cpus()\n");
+ pr_debug(" <- smp_release_cpus()\n");
}
#endif /* CONFIG_SMP || CONFIG_KEXEC */
@@ -282,7 +276,7 @@ static void __init initialize_cache_info
struct device_node *np;
unsigned long num_cpus = 0;
- DBG(" -> initialize_cache_info()\n");
+ pr_debug(" -> initialize_cache_info()\n");
for (np = NULL; (np = of_find_node_by_type(np, "cpu"));) {
num_cpus += 1;
@@ -314,7 +308,7 @@ static void __init initialize_cache_info
if (lsizep != NULL)
lsize = *lsizep;
if (sizep == 0 || lsizep == 0)
- DBG("Argh, can't find dcache properties ! "
+ pr_debug("Argh, can't find dcache properties ! "
"sizep: %p, lsizep: %p\n", sizep, lsizep);
ppc64_caches.dsize = size;
@@ -331,7 +325,7 @@ static void __init initialize_cache_info
if (lsizep != NULL)
lsize = *lsizep;
if (sizep == 0 || lsizep == 0)
- DBG("Argh, can't find icache properties ! "
+ pr_debug("Argh, can't find icache properties ! "
"sizep: %p, lsizep: %p\n", sizep, lsizep);
ppc64_caches.isize = size;
@@ -341,7 +335,7 @@ static void __init initialize_cache_info
}
}
- DBG(" <- initialize_cache_info()\n");
+ pr_debug(" <- initialize_cache_info()\n");
}
@@ -351,7 +345,7 @@ static void __init initialize_cache_info
*/
void __init setup_system(void)
{
- DBG(" -> setup_system()\n");
+ pr_debug(" -> setup_system()\n");
#ifdef CONFIG_KEXEC
kdump_move_device_tree();
@@ -453,7 +447,7 @@ void __init setup_system(void)
#endif
printk("-----------------------------------------------------\n");
- DBG(" <- setup_system()\n");
+ pr_debug(" <- setup_system()\n");
}
static int ppc64_panic_event(struct notifier_block *this,
Index: to-merge/arch/powerpc/kernel/smp.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/smp.c
+++ to-merge/arch/powerpc/kernel/smp.c
@@ -50,13 +50,6 @@
#include <asm/paca.h>
#endif
-#ifdef DEBUG
-#include <asm/udbg.h>
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
int smp_hw_index[NR_CPUS];
struct thread_info *secondary_ti;
@@ -83,11 +76,11 @@ int __init smp_mpic_probe(void)
{
int nr_cpus;
- DBG("smp_mpic_probe()...\n");
+ pr_debug("smp_mpic_probe()...\n");
nr_cpus = cpus_weight(cpu_possible_map);
- DBG("nr_cpus: %d\n", nr_cpus);
+ pr_debug("nr_cpus: %d\n", nr_cpus);
if (nr_cpus > 1)
mpic_request_ipis();
@@ -346,7 +339,7 @@ void __init smp_prepare_cpus(unsigned in
{
unsigned int cpu;
- DBG("smp_prepare_cpus\n");
+ pr_debug("smp_prepare_cpus\n");
/*
* setup_cpu may need to be called on the boot cpu. We havent
@@ -483,7 +476,7 @@ int __devinit __cpu_up(unsigned int cpu)
smp_mb();
/* wake up cpus */
- DBG("smp: kicking cpu %d\n", cpu);
+ pr_debug("smp: kicking cpu %d\n", cpu);
smp_ops->kick_cpu(cpu);
/*
Index: to-merge/arch/powerpc/kernel/vdso.c
===================================================================
--- to-merge.orig/arch/powerpc/kernel/vdso.c
+++ to-merge/arch/powerpc/kernel/vdso.c
@@ -8,6 +8,8 @@
* 2 of the License, or (at your option) any later version.
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/module.h>
#include <linux/errno.h>
@@ -37,14 +39,6 @@
#include <asm/vdso.h>
#include <asm/vdso_datapage.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
/* Max supported size for symbol names */
#define MAX_SYMNAME 64
@@ -187,7 +181,7 @@ static struct page * vdso_vma_nopage(str
void *vbase = vdso32_kbase;
#endif
- DBG("vdso_vma_nopage(current: %s, address: %016lx, off: %lx)\n",
+ pr_debug("vdso_vma_nopage(current: %s, address: %016lx, off: %lx)\n",
current->comm, address, offset);
if (address < vma->vm_start || address > vma->vm_end)
@@ -202,7 +196,7 @@ static struct page * vdso_vma_nopage(str
pg = virt_to_page(vbase + offset);
get_page(pg);
- DBG(" ->page count: %d\n", page_count(pg));
+ pr_debug(" ->page count: %d\n", page_count(pg));
return pg;
}
@@ -584,7 +578,7 @@ static __init int vdso_fixup_alt_funcs(s
if (!match)
continue;
- DBG("replacing %s with %s...\n", patch->gen_name,
+ pr_debug("replacing %s with %s...\n", patch->gen_name,
patch->fix_name ? "NONE" : patch->fix_name);
/*
@@ -685,7 +679,7 @@ void __init vdso_init(void)
* Calculate the size of the 64 bits vDSO
*/
vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT;
- DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages);
+ pr_debug("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages);
#endif /* CONFIG_PPC64 */
@@ -693,7 +687,7 @@ void __init vdso_init(void)
* Calculate the size of the 32 bits vDSO
*/
vdso32_pages = (&vdso32_end - &vdso32_start) >> PAGE_SHIFT;
- DBG("vdso32_kbase: %p, 0x%x pages\n", vdso32_kbase, vdso32_pages);
+ pr_debug("vdso32_kbase: %p, 0x%x pages\n", vdso32_kbase, vdso32_pages);
/*
^ permalink raw reply [flat|nested] 5+ messages in thread* [RFC/PATCH 3/4] powerpc: Convert DBG to pr_debug in arch/powerpc/platforms
2006-05-01 0:53 [RFC/PATCH 0/4] powerpc: Use pr_debug() for debugging Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 1/4] powerpc: Register udbg_console for early debugging Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 2/4] powerpc: Convert DBG to pr_debug in arch/powerpc/kernel Michael Ellerman
@ 2006-05-01 0:53 ` Michael Ellerman
2006-05-01 0:53 ` [RFC/PATCH 4/4] powerpc: Convert DBG to pr_debug for the rest of arch/powerpc Michael Ellerman
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2006-05-01 0:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Convert DBG to pr_debug in arch/powerpc/platforms.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/83xx/pci.c | 14 ++-------
arch/powerpc/platforms/85xx/pci.c | 14 ++-------
arch/powerpc/platforms/cell/setup.c | 11 ++-----
arch/powerpc/platforms/cell/smp.c | 10 +-----
arch/powerpc/platforms/iseries/setup.c | 12 ++------
arch/powerpc/platforms/maple/pci.c | 12 ++------
arch/powerpc/platforms/maple/setup.c | 14 ++-------
arch/powerpc/platforms/maple/time.c | 6 ----
arch/powerpc/platforms/powermac/cpufreq_64.c | 18 ++++--------
arch/powerpc/platforms/powermac/feature.c | 11 ++-----
arch/powerpc/platforms/powermac/nvram.c | 39 +++++++++++----------------
arch/powerpc/platforms/powermac/pci.c | 26 ++++++------------
arch/powerpc/platforms/powermac/pfunc_base.c | 25 ++++++-----------
arch/powerpc/platforms/powermac/pfunc_core.c | 29 ++++++++------------
arch/powerpc/platforms/powermac/smp.c | 6 ----
arch/powerpc/platforms/powermac/time.c | 11 ++-----
arch/powerpc/platforms/pseries/firmware.c | 10 +-----
arch/powerpc/platforms/pseries/iommu.c | 33 +++++++++++++---------
arch/powerpc/platforms/pseries/lpar.c | 26 ++++++------------
arch/powerpc/platforms/pseries/setup.c | 14 ++-------
arch/powerpc/platforms/pseries/smp.c | 11 +------
21 files changed, 121 insertions(+), 231 deletions(-)
Index: to-merge/arch/powerpc/platforms/83xx/pci.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/83xx/pci.c
+++ to-merge/arch/powerpc/platforms/83xx/pci.c
@@ -9,6 +9,8 @@
* option) any later version.
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
@@ -26,14 +28,6 @@
#include <asm/prom.h>
#include <sysdev/fsl_soc.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
int mpc83xx_pci2_busno;
int mpc83xx_exclude_device(u_char bus, u_char devfn)
@@ -55,7 +49,7 @@ int __init add_bridge(struct device_node
int primary = 1, has_address = 0;
phys_addr_t immr = get_immrbase();
- DBG("Adding PCI host bridge %s\n", dev->full_name);
+ pr_debug("Adding PCI host bridge %s\n", dev->full_name);
/* Fetch host bridge registers address */
has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
@@ -95,7 +89,7 @@ int __init add_bridge(struct device_node
"Firmware bus number: %d->%d\n",
rsrc.start, hose->first_busno, hose->last_busno);
- DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+ pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
hose, hose->cfg_addr, hose->cfg_data);
/* Interpret the "ranges" property */
Index: to-merge/arch/powerpc/platforms/85xx/pci.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/85xx/pci.c
+++ to-merge/arch/powerpc/platforms/85xx/pci.c
@@ -9,6 +9,8 @@
* option) any later version.
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
@@ -26,14 +28,6 @@
#include <asm/prom.h>
#include <sysdev/fsl_soc.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
int mpc85xx_pci2_busno = 0;
#ifdef CONFIG_PCI
@@ -46,7 +40,7 @@ int __init add_bridge(struct device_node
int primary = 1, has_address = 0;
phys_addr_t immr = get_immrbase();
- DBG("Adding PCI host bridge %s\n", dev->full_name);
+ pr_debug("Adding PCI host bridge %s\n", dev->full_name);
/* Fetch host bridge registers address */
has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
@@ -83,7 +77,7 @@ int __init add_bridge(struct device_node
"Firmware bus number: %d->%d\n",
rsrc.start, hose->first_busno, hose->last_busno);
- DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+ pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
hose, hose->cfg_addr, hose->cfg_data);
/* Interpret the "ranges" property */
Index: to-merge/arch/powerpc/platforms/cell/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/cell/setup.c
+++ to-merge/arch/powerpc/platforms/cell/setup.c
@@ -12,6 +12,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
+
#undef DEBUG
#include <linux/config.h>
@@ -51,12 +52,6 @@
#include "iommu.h"
#include "pervasive.h"
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
static void cell_show_cpuinfo(struct seq_file *m)
{
struct device_node *root;
@@ -181,7 +176,7 @@ static void __init cell_setup_arch(void)
*/
static void __init cell_init_early(void)
{
- DBG(" -> cell_init_early()\n");
+ pr_debug(" -> cell_init_early()\n");
hpte_init_native();
@@ -191,7 +186,7 @@ static void __init cell_init_early(void)
cell_spumem_init(1);
- DBG(" <- cell_init_early()\n");
+ pr_debug(" <- cell_init_early()\n");
}
Index: to-merge/arch/powerpc/platforms/cell/smp.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/cell/smp.c
+++ to-merge/arch/powerpc/platforms/cell/smp.c
@@ -46,12 +46,6 @@
#include "interrupt.h"
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
/*
* The primary thread of each non-boot processor is recorded here before
* smp init.
@@ -200,7 +194,7 @@ void __init smp_init_cell(void)
{
int i;
- DBG(" -> smp_init_cell()\n");
+ pr_debug(" -> smp_init_cell()\n");
smp_ops = &bpa_iic_smp_ops;
@@ -226,5 +220,5 @@ void __init smp_init_cell(void)
smp_ops->take_timebase = cell_take_timebase;
}
- DBG(" <- smp_init_cell()\n");
+ pr_debug(" <- smp_init_cell()\n");
}
Index: to-merge/arch/powerpc/platforms/iseries/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/iseries/setup.c
+++ to-merge/arch/powerpc/platforms/iseries/setup.c
@@ -65,12 +65,6 @@
#include "call_sm.h"
#include "call_hpt.h"
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
/* Function Prototypes */
static unsigned long build_iSeries_Memory_Map(void);
static void iseries_shared_idle(void);
@@ -298,7 +292,7 @@ static void __init iSeries_get_cmdline(v
static void __init iSeries_init_early(void)
{
- DBG(" -> iSeries_init_early()\n");
+ pr_debug(" -> iSeries_init_early()\n");
ppc64_interrupt_controller = IC_ISERIES;
@@ -354,7 +348,7 @@ static void __init iSeries_init_early(vo
initrd_start = initrd_end = 0;
#endif /* CONFIG_BLK_DEV_INITRD */
- DBG(" <- iSeries_init_early()\n");
+ pr_debug(" <- iSeries_init_early()\n");
}
struct mschunks_map mschunks_map = {
@@ -749,7 +743,7 @@ void dt_init(struct iseries_flat_dt *dt)
void dt_check_blob(struct blob *b)
{
if (b->next >= (unsigned long)&b->next) {
- DBG("Ran out of space in flat device tree blob!\n");
+ pr_debug("Ran out of space in flat device tree blob!\n");
BUG();
}
}
Index: to-merge/arch/powerpc/platforms/maple/pci.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/maple/pci.c
+++ to-merge/arch/powerpc/platforms/maple/pci.c
@@ -27,12 +27,6 @@
#include "maple.h"
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
static struct pci_controller *u3_agp, *u3_ht;
static int __init fixup_one_level_bus_range(struct device_node *node, int higher)
@@ -317,7 +311,7 @@ static int __init add_bridge(struct devi
int *bus_range;
int primary = 1;
- DBG("Adding PCI host bridge %s\n", dev->full_name);
+ pr_debug("Adding PCI host bridge %s\n", dev->full_name);
bus_range = (int *) get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) {
@@ -360,12 +354,12 @@ void __init maple_pcibios_fixup(void)
{
struct pci_dev *dev = NULL;
- DBG(" -> maple_pcibios_fixup\n");
+ pr_debug(" -> maple_pcibios_fixup\n");
for_each_pci_dev(dev)
pci_read_irq_line(dev);
- DBG(" <- maple_pcibios_fixup\n");
+ pr_debug(" <- maple_pcibios_fixup\n");
}
static void __init maple_fixup_phb_resources(void)
Index: to-merge/arch/powerpc/platforms/maple/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/maple/setup.c
+++ to-merge/arch/powerpc/platforms/maple/setup.c
@@ -65,12 +65,6 @@
#include "maple.h"
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
static unsigned long maple_find_nvram_base(void)
{
struct device_node *rtcs;
@@ -197,7 +191,7 @@ void __init maple_setup_arch(void)
*/
static void __init maple_init_early(void)
{
- DBG(" -> maple_init_early\n");
+ pr_debug(" -> maple_init_early\n");
/* Initialize hash table, from now on, we can take hash faults
* and call ioremap
@@ -209,7 +203,7 @@ static void __init maple_init_early(void
iommu_init_early_dart();
- DBG(" <- maple_init_early\n");
+ pr_debug(" <- maple_init_early\n");
}
@@ -222,7 +216,7 @@ static __init void maple_init_IRQ(void)
unsigned char senses[128];
int n;
- DBG(" -> maple_init_IRQ\n");
+ pr_debug(" -> maple_init_IRQ\n");
/* XXX: Non standard, replace that with a proper openpic/mpic node
* in the device-tree. Find the Open PIC if present */
@@ -247,7 +241,7 @@ static __init void maple_init_IRQ(void)
BUG_ON(mpic == NULL);
mpic_init(mpic);
- DBG(" <- maple_init_IRQ\n");
+ pr_debug(" <- maple_init_IRQ\n");
}
static void __init maple_progress(char *s, unsigned short hex)
Index: to-merge/arch/powerpc/platforms/maple/time.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/maple/time.c
+++ to-merge/arch/powerpc/platforms/maple/time.c
@@ -36,12 +36,6 @@
#include "maple.h"
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
extern void GregorianDay(struct rtc_time * tm);
static int maple_rtc_addr;
Index: to-merge/arch/powerpc/platforms/powermac/cpufreq_64.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ to-merge/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -10,6 +10,8 @@
* that is iMac G5 and latest single CPU desktop.
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
@@ -31,14 +33,6 @@
#include <asm/smu.h>
#include <asm/pmac_pfunc.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
/* see 970FX user manual */
#define SCOM_PCR 0x0aa001 /* PCR scom addr */
@@ -415,7 +409,7 @@ static int __init g5_neo2_cpufreq_init(s
/* Check 970FX for now */
valp = (u32 *)get_property(cpunode, "cpu-version", NULL);
if (!valp) {
- DBG("No cpu-version property !\n");
+ pr_debug("No cpu-version property !\n");
goto bail_noprops;
}
pvr_hi = (*valp) >> 16;
@@ -427,7 +421,7 @@ static int __init g5_neo2_cpufreq_init(s
/* Look for the powertune data in the device-tree */
g5_pmode_data = (u32 *)get_property(cpunode, "power-mode-data",&psize);
if (!g5_pmode_data) {
- DBG("No power-mode-data !\n");
+ pr_debug("No power-mode-data !\n");
goto bail_noprops;
}
g5_pmode_max = psize / sizeof(u32) - 1;
@@ -573,7 +567,7 @@ static int __init g5_pm72_cpufreq_init(s
goto bail;
}
- DBG("cpufreq: i2c clock chip found: %s\n", hwclock->full_name);
+ pr_debug("cpufreq: i2c clock chip found: %s\n", hwclock->full_name);
/* Now get all the platform functions */
pfunc_cpu_getfreq =
@@ -704,7 +698,7 @@ static int __init g5_cpufreq_init(void)
cpus = of_find_node_by_path("/cpus");
if (cpus == NULL) {
- DBG("No /cpus node !\n");
+ pr_debug("No /cpus node !\n");
return -ENODEV;
}
Index: to-merge/arch/powerpc/platforms/powermac/feature.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/feature.c
+++ to-merge/arch/powerpc/platforms/powermac/feature.c
@@ -16,6 +16,9 @@
* - Split split split...
*
*/
+
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/types.h>
#include <linux/init.h>
@@ -41,14 +44,6 @@
#include <asm/pci-bridge.h>
#include <asm/pmac_low_i2c.h>
-#undef DEBUG_FEATURE
-
-#ifdef DEBUG_FEATURE
-#define DBG(fmt...) printk(KERN_DEBUG fmt)
-#else
-#define DBG(fmt...)
-#endif
-
#ifdef CONFIG_6xx
extern int powersave_lowspeed;
#endif
Index: to-merge/arch/powerpc/platforms/powermac/nvram.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/nvram.c
+++ to-merge/arch/powerpc/platforms/powermac/nvram.c
@@ -8,6 +8,9 @@
*
* Todo: - add support for the OF persistent properties
*/
+
+#define DEBUG
+
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -30,14 +33,6 @@
#include <asm/machdep.h>
#include <asm/nvram.h>
-#define DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
#define NVRAM_SIZE 0x2000 /* 8kB of non-volatile RAM */
#define CORE99_SIGNATURE 0x5a
@@ -266,15 +261,15 @@ static u32 core99_check(u8* datas)
struct core99_header* hdr99 = (struct core99_header*)datas;
if (hdr99->hdr.signature != CORE99_SIGNATURE) {
- DBG("Invalid signature\n");
+ pr_debug("Invalid signature\n");
return 0;
}
if (hdr99->hdr.cksum != chrp_checksum(&hdr99->hdr)) {
- DBG("Invalid checksum\n");
+ pr_debug("Invalid checksum\n");
return 0;
}
if (hdr99->adler != core99_calc_adler(datas)) {
- DBG("Invalid adler\n");
+ pr_debug("Invalid adler\n");
return 0;
}
return hdr99->generation;
@@ -287,7 +282,7 @@ static int sm_erase_bank(int bank)
u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
- DBG("nvram: Sharp/Micron Erasing bank %d...\n", bank);
+ pr_debug("nvram: Sharp/Micron Erasing bank %d...\n", bank);
out_8(base, SM_FLASH_CMD_ERASE_SETUP);
out_8(base, SM_FLASH_CMD_ERASE_CONFIRM);
@@ -319,7 +314,7 @@ static int sm_write_bank(int bank, u8* d
u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
- DBG("nvram: Sharp/Micron Writing bank %d...\n", bank);
+ pr_debug("nvram: Sharp/Micron Writing bank %d...\n", bank);
for (i=0; i<NVRAM_SIZE; i++) {
out_8(base+i, SM_FLASH_CMD_WRITE_SETUP);
@@ -354,7 +349,7 @@ static int amd_erase_bank(int bank)
u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
- DBG("nvram: AMD Erasing bank %d...\n", bank);
+ pr_debug("nvram: AMD Erasing bank %d...\n", bank);
/* Unlock 1 */
out_8(base+0x555, 0xaa);
@@ -401,7 +396,7 @@ static int amd_write_bank(int bank, u8*
u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank*NVRAM_SIZE;
- DBG("nvram: AMD Writing bank %d...\n", bank);
+ pr_debug("nvram: AMD Writing bank %d...\n", bank);
for (i=0; i<NVRAM_SIZE; i++) {
/* Unlock 1 */
@@ -470,9 +465,9 @@ static void __init lookup_partitions(voi
nvram_partitions[pmac_nvram_XPRAM] = 0x1300;
nvram_partitions[pmac_nvram_NR] = 0x1400;
}
- DBG("nvram: OF partition at 0x%x\n", nvram_partitions[pmac_nvram_OF]);
- DBG("nvram: XP partition at 0x%x\n", nvram_partitions[pmac_nvram_XPRAM]);
- DBG("nvram: NR partition at 0x%x\n", nvram_partitions[pmac_nvram_NR]);
+ pr_debug("nvram: OF partition at 0x%x\n", nvram_partitions[pmac_nvram_OF]);
+ pr_debug("nvram: XP partition at 0x%x\n", nvram_partitions[pmac_nvram_XPRAM]);
+ pr_debug("nvram: NR partition at 0x%x\n", nvram_partitions[pmac_nvram_NR]);
}
static void core99_nvram_sync(void)
@@ -488,7 +483,7 @@ static void core99_nvram_sync(void)
NVRAM_SIZE))
goto bail;
- DBG("Updating nvram...\n");
+ pr_debug("Updating nvram...\n");
hdr99 = (struct core99_header*)nvram_image;
hdr99->generation++;
@@ -529,14 +524,14 @@ static int __init core99_nvram_setup(str
nvram_data = ioremap(addr, NVRAM_SIZE*2);
nvram_naddrs = 1; /* Make sure we get the correct case */
- DBG("nvram: Checking bank 0...\n");
+ pr_debug("nvram: Checking bank 0...\n");
gen_bank0 = core99_check((u8 *)nvram_data);
gen_bank1 = core99_check((u8 *)nvram_data + NVRAM_SIZE);
core99_bank = (gen_bank0 < gen_bank1) ? 1 : 0;
- DBG("nvram: gen0=%d, gen1=%d\n", gen_bank0, gen_bank1);
- DBG("nvram: Active bank is: %d\n", core99_bank);
+ pr_debug("nvram: gen0=%d, gen1=%d\n", gen_bank0, gen_bank1);
+ pr_debug("nvram: Active bank is: %d\n", core99_bank);
for (i=0; i<NVRAM_SIZE; i++)
nvram_image[i] = nvram_data[i + core99_bank*NVRAM_SIZE];
Index: to-merge/arch/powerpc/platforms/powermac/pci.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/pci.c
+++ to-merge/arch/powerpc/platforms/powermac/pci.c
@@ -10,6 +10,8 @@
* 2 of the License, or (at your option) any later version.
*/
+#undef DEBUG
+
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/delay.h>
@@ -29,14 +31,6 @@
#include <asm/ppc-pci.h>
#endif
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
static int add_bridge(struct device_node *dev);
/* XXX Could be per-controller, but I don't think we risk anything by
@@ -626,7 +620,7 @@ static void __init init_p2pbridge(void)
|| strcmp(p2pbridge->parent->name, "pci") != 0)
return;
if (pci_device_from_OF_node(p2pbridge, &bus, &devfn) < 0) {
- DBG("Can't find PCI infos for PCI<->PCI bridge\n");
+ pr_debug("Can't find PCI infos for PCI<->PCI bridge\n");
return;
}
/* Warning: At this point, we have not yet renumbered all busses.
@@ -634,7 +628,7 @@ static void __init init_p2pbridge(void)
*/
hose = pci_find_hose_for_OF_device(p2pbridge);
if (!hose) {
- DBG("Can't find hose for PCI<->PCI bridge\n");
+ pr_debug("Can't find hose for PCI<->PCI bridge\n");
return;
}
if (early_read_config_word(hose, bus, devfn,
@@ -803,7 +797,7 @@ static void __init setup_u3_ht(struct pc
other = u4_pcie;
if (other == NULL) {
- DBG("U3/4 has no AGP/PCIE, using full resource range\n");
+ pr_debug("U3/4 has no AGP/PCIE, using full resource range\n");
return;
}
@@ -828,14 +822,14 @@ static void __init setup_u3_ht(struct pc
* direction
*/
if (hose->mem_resources[cur].start == res->start) {
- DBG("U3/HT: shrink start of %d, %08lx -> %08lx\n",
+ pr_debug("U3/HT: shrink start of %d, %08lx -> %08lx\n",
cur, hose->mem_resources[cur].start,
res->end + 1);
hose->mem_resources[cur].start = res->end + 1;
continue;
}
if (hose->mem_resources[cur].end == res->end) {
- DBG("U3/HT: shrink end of %d, %08lx -> %08lx\n",
+ pr_debug("U3/HT: shrink end of %d, %08lx -> %08lx\n",
cur, hose->mem_resources[cur].end,
res->start - 1);
hose->mem_resources[cur].end = res->start - 1;
@@ -852,7 +846,7 @@ static void __init setup_u3_ht(struct pc
continue;
}
cur++;
- DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n",
+ pr_debug("U3/HT: hole, %d end at %08lx, %d start at %08lx\n",
cur-1, res->start - 1, cur, res->end + 1);
hose->mem_resources[cur].name = np->full_name;
hose->mem_resources[cur].flags = IORESOURCE_MEM;
@@ -877,7 +871,7 @@ static int __init add_bridge(struct devi
int *bus_range;
int primary = 1, has_address = 0;
- DBG("Adding PCI host bridge %s\n", dev->full_name);
+ pr_debug("Adding PCI host bridge %s\n", dev->full_name);
/* Fetch host bridge registers address */
has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
@@ -944,7 +938,7 @@ static int __init add_bridge(struct devi
disp_name, rsrc.start, hose->first_busno, hose->last_busno);
#endif /* CONFIG_PPC32 */
- DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+ pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
hose, hose->cfg_addr, hose->cfg_data);
/* Interpret the "ranges" property */
Index: to-merge/arch/powerpc/platforms/powermac/pfunc_base.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/pfunc_base.c
+++ to-merge/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -1,3 +1,5 @@
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/types.h>
#include <linux/init.h>
@@ -9,13 +11,6 @@
#include <asm/pmac_feature.h>
#include <asm/pmac_pfunc.h>
-#undef DEBUG
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs)
{
pmf_do_irq(data);
@@ -55,7 +50,7 @@ static int macio_do_gpio_write(PMF_STD_A
spin_lock_irqsave(&feature_lock, flags);
tmp = readb(addr);
tmp = (tmp & ~mask) | (value & mask);
- DBG("Do write 0x%02x to GPIO %s (%p)\n",
+ pr_debug("Do write 0x%02x to GPIO %s (%p)\n",
tmp, func->node->full_name, addr);
writeb(tmp, addr);
spin_unlock_irqrestore(&feature_lock, flags);
@@ -108,7 +103,7 @@ static void macio_gpio_init_one(struct m
if (gparent == NULL)
return;
- DBG("Installing GPIO functions for macio %s\n",
+ pr_debug("Installing GPIO functions for macio %s\n",
macio->of_node->full_name);
/*
@@ -130,7 +125,7 @@ static void macio_gpio_init_one(struct m
pmf_register_driver(gp, &macio_gpio_handlers, (void *)offset);
}
- DBG("Calling initial GPIO functions for macio %s\n",
+ pr_debug("Calling initial GPIO functions for macio %s\n",
macio->of_node->full_name);
/* And now we run all the init ones */
@@ -268,7 +263,7 @@ static struct pmf_handlers macio_mmio_ha
static void macio_mmio_init_one(struct macio_chip *macio)
{
- DBG("Installing MMIO functions for macio %s\n",
+ pr_debug("Installing MMIO functions for macio %s\n",
macio->of_node->full_name);
pmf_register_driver(macio->of_node, &macio_mmio_handlers, macio);
@@ -299,7 +294,7 @@ static void uninorth_install_pfunc(void)
{
struct device_node *np;
- DBG("Installing functions for UniN %s\n",
+ pr_debug("Installing functions for UniN %s\n",
uninorth_node->full_name);
/*
@@ -318,7 +313,7 @@ static void uninorth_install_pfunc(void)
break;
}
if (unin_hwclock) {
- DBG("Installing functions for UniN clock %s\n",
+ pr_debug("Installing functions for UniN clock %s\n",
unin_hwclock->full_name);
pmf_register_driver(unin_hwclock, &unin_mmio_handlers, NULL);
pmf_do_functions(unin_hwclock, NULL, 0, PMF_FLAGS_ON_INIT,
@@ -339,7 +334,7 @@ int __init pmac_pfunc_base_install(void)
if (!machine_is(powermac))
return 0;
- DBG("Installing base platform functions...\n");
+ pr_debug("Installing base platform functions...\n");
/*
* Locate mac-io chips and install handlers
@@ -361,7 +356,7 @@ int __init pmac_pfunc_base_install(void)
if (uninorth_node && uninorth_base)
uninorth_install_pfunc();
- DBG("All base functions installed\n");
+ pr_debug("All base functions installed\n");
return 0;
}
Index: to-merge/arch/powerpc/platforms/powermac/pfunc_core.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/pfunc_core.c
+++ to-merge/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -5,6 +5,8 @@
* FIXME: LOCKING !!!
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/init.h>
#include <linux/delay.h>
@@ -21,13 +23,6 @@
#define LOG_ERROR(fmt...) printk(fmt)
#define LOG_BLOB(t,b,c)
-#undef DEBUG
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
/* Command numbers */
#define PMF_CMD_LIST 0
#define PMF_CMD_WRITE_GPIO 1
@@ -639,7 +634,7 @@ static int pmf_add_function_prop(struct
int count = 0;
struct pmf_function *func = NULL;
- DBG("pmf: Adding functions for platform-do-%s\n", name);
+ pr_debug("pmf: Adding functions for platform-do-%s\n", name);
while (length >= 12) {
/* Allocate a structure */
@@ -658,7 +653,7 @@ static int pmf_add_function_prop(struct
func->data = data;
func->length = length;
func->dev = dev;
- DBG("pmf: idx %d: flags=%08x, phandle=%08x "
+ pr_debug("pmf: idx %d: flags=%08x, phandle=%08x "
" %d bytes remaining, parsing...\n",
count+1, func->flags, func->phandle, length);
if (pmf_parse_one(func, NULL, NULL, NULL)) {
@@ -672,7 +667,7 @@ static int pmf_add_function_prop(struct
count++;
}
bail:
- DBG("pmf: Added %d functions\n", count);
+ pr_debug("pmf: Added %d functions\n", count);
return count;
}
@@ -709,20 +704,20 @@ int pmf_register_driver(struct device_no
if (handlers == NULL)
return -EINVAL;
- DBG("pmf: registering driver for node %s\n", np->full_name);
+ pr_debug("pmf: registering driver for node %s\n", np->full_name);
spin_lock_irqsave(&pmf_lock, flags);
dev = pmf_find_device(np);
spin_unlock_irqrestore(&pmf_lock, flags);
if (dev != NULL) {
- DBG("pmf: already there !\n");
+ pr_debug("pmf: already there !\n");
pmf_put_device(dev);
return -EBUSY;
}
dev = kzalloc(sizeof(struct pmf_device), GFP_KERNEL);
if (dev == NULL) {
- DBG("pmf: no memory !\n");
+ pr_debug("pmf: no memory !\n");
return -ENOMEM;
}
kref_init(&dev->ref);
@@ -732,7 +727,7 @@ int pmf_register_driver(struct device_no
rc = pmf_add_functions(dev, driverdata);
if (rc == 0) {
- DBG("pmf: no functions, disposing.. \n");
+ pr_debug("pmf: no functions, disposing.. \n");
of_node_put(np);
kfree(dev);
return -ENODEV;
@@ -782,12 +777,12 @@ void pmf_unregister_driver(struct device
struct pmf_device *dev;
unsigned long flags;
- DBG("pmf: unregistering driver for node %s\n", np->full_name);
+ pr_debug("pmf: unregistering driver for node %s\n", np->full_name);
spin_lock_irqsave(&pmf_lock, flags);
dev = pmf_find_device(np);
if (dev == NULL) {
- DBG("pmf: not such driver !\n");
+ pr_debug("pmf: not such driver !\n");
spin_unlock_irqrestore(&pmf_lock, flags);
return;
}
@@ -921,7 +916,7 @@ int pmf_call_one(struct pmf_function *fu
void *instdata = NULL;
int rc = 0;
- DBG(" ** pmf_call_one(%s/%s) **\n", dev->node->full_name, func->name);
+ pr_debug(" ** pmf_call_one(%s/%s) **\n", dev->node->full_name, func->name);
if (dev->handlers->begin)
instdata = dev->handlers->begin(func, args);
Index: to-merge/arch/powerpc/platforms/powermac/smp.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/smp.c
+++ to-merge/arch/powerpc/platforms/powermac/smp.c
@@ -56,12 +56,6 @@
#define DEBUG
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
extern void __secondary_start_pmac_0(void);
extern int pmac_pfunc_base_install(void);
Index: to-merge/arch/powerpc/platforms/powermac/time.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/powermac/time.c
+++ to-merge/arch/powerpc/platforms/powermac/time.c
@@ -9,6 +9,9 @@
* Copyright (C) 2003-2005 Benjamin Herrenschmidt.
*
*/
+
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
@@ -35,14 +38,6 @@
#include <asm/nvram.h>
#include <asm/smu.h>
-#undef DEBUG
-
-#ifdef DEBUG
-#define DBG(x...) printk(x)
-#else
-#define DBG(x...)
-#endif
-
/* Apparently the RTC stores seconds since 1 Jan 1904 */
#define RTC_OFFSET 2082844800
Index: to-merge/arch/powerpc/platforms/pseries/firmware.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/pseries/firmware.c
+++ to-merge/arch/powerpc/platforms/pseries/firmware.c
@@ -26,12 +26,6 @@
#include <asm/firmware.h>
#include <asm/prom.h>
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
typedef struct {
unsigned long val;
char * name;
@@ -71,7 +65,7 @@ void __init fw_feature_init(void)
char *hypertas, *s;
int len, i;
- DBG(" -> fw_feature_init()\n");
+ pr_debug(" -> fw_feature_init()\n");
dn = of_find_node_by_path("/rtas");
if (dn == NULL) {
@@ -99,5 +93,5 @@ void __init fw_feature_init(void)
out:
of_node_put(dn);
- DBG(" <- fw_feature_init()\n");
+ pr_debug(" <- fw_feature_init()\n");
}
Index: to-merge/arch/powerpc/platforms/pseries/iommu.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/pseries/iommu.c
+++ to-merge/arch/powerpc/platforms/pseries/iommu.c
@@ -23,6 +23,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/init.h>
#include <linux/types.h>
@@ -47,8 +49,6 @@
#include "plpar_wrappers.h"
-#define DBG(fmt...)
-
static void tce_build_pSeries(struct iommu_table *tbl, long index,
long npages, unsigned long uaddr,
enum dma_data_direction direction)
@@ -334,7 +334,8 @@ static void iommu_bus_setup_pSeries(stru
struct pci_dn *pci;
int children;
- DBG("iommu_bus_setup_pSeries, bus %p, bus->self %p\n", bus, bus->self);
+ pr_debug("iommu_bus_setup_pSeries, bus %p, bus->self %p\n",
+ bus, bus->self);
dn = pci_bus_to_OF_node(bus);
pci = PCI_DN(dn);
@@ -365,7 +366,7 @@ static void iommu_bus_setup_pSeries(stru
if (get_property(tmp, "class-code", NULL))
children++;
- DBG("Children: %d\n", children);
+ pr_debug("Children: %d\n", children);
/* Calculate amount of DMA window per slot. Each window must be
* a power of two (due to pci_alloc_consistent requirements).
@@ -379,7 +380,7 @@ static void iommu_bus_setup_pSeries(stru
while (pci->phb->dma_window_size * children > 0x80000000ul)
pci->phb->dma_window_size >>= 1;
- DBG("No ISA/IDE, window size is 0x%lx\n",
+ pr_debug("No ISA/IDE, window size is 0x%lx\n",
pci->phb->dma_window_size);
pci->phb->dma_window_base_cur = 0;
@@ -404,7 +405,7 @@ static void iommu_bus_setup_pSeries(stru
while (pci->phb->dma_window_size * children > 0x70000000ul)
pci->phb->dma_window_size >>= 1;
- DBG("ISA/IDE, window size is 0x%lx\n", pci->phb->dma_window_size);
+ pr_debug("ISA/IDE, window size is 0x%lx\n", pci->phb->dma_window_size);
}
@@ -416,7 +417,8 @@ static void iommu_bus_setup_pSeriesLP(st
struct pci_dn *ppci;
unsigned int *dma_window = NULL;
- DBG("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n", bus, bus->self);
+ pr_debug("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n",
+ bus, bus->self);
dn = pci_bus_to_OF_node(bus);
@@ -428,7 +430,8 @@ static void iommu_bus_setup_pSeriesLP(st
}
if (dma_window == NULL) {
- DBG("iommu_bus_setup_pSeriesLP: bus %s seems to have no ibm,dma-window property\n", dn->full_name);
+ pr_debug("iommu_bus_setup_pSeriesLP: bus %s seems to have "
+ "no ibm,dma-window property\n", dn->full_name);
return;
}
@@ -458,7 +461,7 @@ static void iommu_dev_setup_pSeries(stru
struct device_node *dn, *mydn;
struct iommu_table *tbl;
- DBG("iommu_dev_setup_pSeries, dev %p (%s)\n", dev, pci_name(dev));
+ pr_debug("iommu_dev_setup_pSeries, dev %p (%s)\n", dev, pci_name(dev));
mydn = dn = pci_device_to_OF_node(dev);
@@ -467,7 +470,7 @@ static void iommu_dev_setup_pSeries(stru
* the window sizes already.
*/
if (!dev->bus->self) {
- DBG(" --> first child, no bridge. Allocating iommu table.\n");
+ pr_debug("first child, no bridge. Allocating iommu table.\n");
tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL);
iommu_table_setparms(PCI_DN(dn)->phb, dn, tbl);
PCI_DN(mydn)->iommu_table = iommu_init_table(tbl);
@@ -485,7 +488,8 @@ static void iommu_dev_setup_pSeries(stru
if (dn && PCI_DN(dn)) {
PCI_DN(mydn)->iommu_table = PCI_DN(dn)->iommu_table;
} else {
- DBG("iommu_dev_setup_pSeries, dev %p (%s) has no iommu table\n", dev, pci_name(dev));
+ pr_debug("iommu_dev_setup_pSeries, dev %p (%s) has no "
+ "iommu table\n", dev, pci_name(dev));
}
}
@@ -519,7 +523,8 @@ static void iommu_dev_setup_pSeriesLP(st
int *dma_window = NULL;
struct pci_dn *pci;
- DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, pci_name(dev));
+ pr_debug("iommu_dev_setup_pSeriesLP, dev %p (%s)\n",
+ dev, pci_name(dev));
/* dev setup for LPAR is a little tricky, since the device tree might
* contain the dma-window properties per-device and not neccesarily
@@ -541,11 +546,11 @@ static void iommu_dev_setup_pSeriesLP(st
* slots on POWER4 machines.
*/
if (dma_window == NULL || pdn->parent == NULL) {
- DBG("No dma window for device, linking to parent\n");
+ pr_debug("No dma window for device, linking to parent\n");
PCI_DN(dn)->iommu_table = PCI_DN(pdn)->iommu_table;
return;
} else {
- DBG("Found DMA window, allocating table\n");
+ pr_debug("Found DMA window, allocating table\n");
}
pci = PCI_DN(pdn);
Index: to-merge/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/pseries/lpar.c
+++ to-merge/arch/powerpc/platforms/pseries/lpar.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#undef DEBUG_LOW
+#undef DEBUG /* warning: leads to _lots_ of output */
#include <linux/config.h>
#include <linux/kernel.h>
@@ -43,12 +43,6 @@
#include "plpar_wrappers.h"
-#ifdef DEBUG_LOW
-#define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0)
-#else
-#define DBG_LOW(fmt...) do { } while(0)
-#endif
-
/* in pSeries_hvCall.S */
EXPORT_SYMBOL(plpar_hcall);
EXPORT_SYMBOL(plpar_hcall_4out);
@@ -281,7 +275,7 @@ long pSeries_lpar_hpte_insert(unsigned l
unsigned long dummy0, dummy1;
if (!(vflags & HPTE_V_BOLTED))
- DBG_LOW("hpte_insert(group=%lx, va=%016lx, pa=%016lx, "
+ pr_debug("hpte_insert(group=%lx, va=%016lx, pa=%016lx, "
"rflags=%lx, vflags=%lx, psize=%d)\n",
hpte_group, va, pa, rflags, vflags, psize);
@@ -289,7 +283,7 @@ long pSeries_lpar_hpte_insert(unsigned l
hpte_r = hpte_encode_r(pa, psize) | rflags;
if (!(vflags & HPTE_V_BOLTED))
- DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
+ pr_debug(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
/* Now fill in the actual HPTE */
/* Set CEC cookie to 0 */
@@ -307,7 +301,7 @@ long pSeries_lpar_hpte_insert(unsigned l
hpte_r, &slot, &dummy0, &dummy1);
if (unlikely(lpar_rc == H_PTEG_FULL)) {
if (!(vflags & HPTE_V_BOLTED))
- DBG_LOW(" full\n");
+ pr_debug(" full\n");
return -1;
}
@@ -318,11 +312,11 @@ long pSeries_lpar_hpte_insert(unsigned l
*/
if (unlikely(lpar_rc != H_SUCCESS)) {
if (!(vflags & HPTE_V_BOLTED))
- DBG_LOW(" lpar err %d\n", lpar_rc);
+ pr_debug(" lpar err %d\n", lpar_rc);
return -2;
}
if (!(vflags & HPTE_V_BOLTED))
- DBG_LOW(" -> slot: %d\n", slot & 7);
+ pr_debug(" -> slot: %d\n", slot & 7);
/* Because of iSeries, we have to pass down the secondary
* bucket bit here as well
@@ -387,17 +381,17 @@ static long pSeries_lpar_hpte_updatepp(u
want_v = hpte_encode_v(va, psize);
- DBG_LOW(" update: avpnv=%016lx, hash=%016lx, f=%x, psize: %d ... ",
+ pr_debug(" update: avpnv=%016lx, hash=%016lx, f=%x, psize: %d ... ",
want_v & HPTE_V_AVPN, slot, flags, psize);
lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN);
if (lpar_rc == H_NOT_FOUND) {
- DBG_LOW("not found !\n");
+ pr_debug("not found !\n");
return -1;
}
- DBG_LOW("ok\n");
+ pr_debug("ok\n");
BUG_ON(lpar_rc != H_SUCCESS);
@@ -479,7 +473,7 @@ static void pSeries_lpar_hpte_invalidate
unsigned long lpar_rc;
unsigned long dummy1, dummy2;
- DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d",
+ pr_debug(" inval : slot=%lx, va=%016lx, psize: %d, local: %d",
slot, va, psize, local);
want_v = hpte_encode_v(va, psize);
Index: to-merge/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/pseries/setup.c
+++ to-merge/arch/powerpc/platforms/pseries/setup.c
@@ -71,12 +71,6 @@
#include "ras.h"
#include "firmware.h"
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
extern void find_udbg_vterm(void);
int fwnmi_active; /* TRUE if an FWNMI handler is present */
@@ -319,7 +313,7 @@ static int pseries_set_xdabr(unsigned lo
*/
static void __init pSeries_init_early(void)
{
- DBG(" -> pSeries_init_early()\n");
+ pr_debug(" -> pSeries_init_early()\n");
fw_feature_init();
@@ -340,7 +334,7 @@ static void __init pSeries_init_early(vo
pSeries_discover_pic();
- DBG(" <- pSeries_init_early()\n");
+ pr_debug(" <- pSeries_init_early()\n");
}
@@ -396,12 +390,12 @@ static int __init pSeries_probe(void)
if (strcmp(dtype, "chrp"))
return 0;
- DBG("pSeries detected, looking for LPAR capability...\n");
+ pr_debug("pSeries detected, looking for LPAR capability...\n");
/* Now try to figure out if we are running on LPAR */
of_scan_flat_dt(pSeries_probe_hypertas, NULL);
- DBG("Machine is%s LPAR !\n",
+ pr_debug("Machine is%s LPAR !\n",
(powerpc_firmware_features & FW_FEATURE_LPAR) ? "" : " not");
return 1;
Index: to-merge/arch/powerpc/platforms/pseries/smp.c
===================================================================
--- to-merge.orig/arch/powerpc/platforms/pseries/smp.c
+++ to-merge/arch/powerpc/platforms/pseries/smp.c
@@ -50,13 +50,6 @@
#include "plpar_wrappers.h"
-#ifdef DEBUG
-#include <asm/udbg.h>
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
/*
* The primary thread of each non-boot processor is recorded here before
* smp init.
@@ -421,7 +414,7 @@ void __init smp_init_pSeries(void)
{
int i;
- DBG(" -> smp_init_pSeries()\n");
+ pr_debug(" -> smp_init_pSeries()\n");
switch (ppc64_interrupt_controller) {
#ifdef CONFIG_MPIC
@@ -469,6 +462,6 @@ void __init smp_init_pSeries(void)
smp_ops->take_timebase = pSeries_take_timebase;
}
- DBG(" <- smp_init_pSeries()\n");
+ pr_debug(" <- smp_init_pSeries()\n");
}
^ permalink raw reply [flat|nested] 5+ messages in thread* [RFC/PATCH 4/4] powerpc: Convert DBG to pr_debug for the rest of arch/powerpc
2006-05-01 0:53 [RFC/PATCH 0/4] powerpc: Use pr_debug() for debugging Michael Ellerman
` (2 preceding siblings ...)
2006-05-01 0:53 ` [RFC/PATCH 3/4] powerpc: Convert DBG to pr_debug in arch/powerpc/platforms Michael Ellerman
@ 2006-05-01 0:53 ` Michael Ellerman
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2006-05-01 0:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Convert DBG to pr_debug for the rest of arch/powerpc.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/mm/hash_native_64.c | 22 ++++++------------
arch/powerpc/mm/init_64.c | 8 ------
arch/powerpc/mm/lmb.c | 29 +++++++++---------------
arch/powerpc/mm/slb.c | 12 ++--------
arch/powerpc/sysdev/dart_iommu.c | 10 ++++----
arch/powerpc/sysdev/mpic.c | 46 ++++++++++++++++++---------------------
6 files changed, 50 insertions(+), 77 deletions(-)
Index: to-merge/arch/powerpc/mm/hash_native_64.c
===================================================================
--- to-merge.orig/arch/powerpc/mm/hash_native_64.c
+++ to-merge/arch/powerpc/mm/hash_native_64.c
@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*/
-#undef DEBUG_LOW
+#undef DEBUG /* warning: leads to _lots_ of output */
#include <linux/spinlock.h>
#include <linux/bitops.h>
@@ -27,12 +27,6 @@
#include <asm/cputable.h>
#include <asm/udbg.h>
-#ifdef DEBUG_LOW
-#define DBG_LOW(fmt...) udbg_printf(fmt)
-#else
-#define DBG_LOW(fmt...)
-#endif
-
#define HPTE_LOCK_BIT 3
static DEFINE_SPINLOCK(native_tlbie_lock);
@@ -132,7 +126,7 @@ long native_hpte_insert(unsigned long hp
int i;
if (!(vflags & HPTE_V_BOLTED)) {
- DBG_LOW(" insert(group=%lx, va=%016lx, pa=%016lx,"
+ pr_debug(" insert(group=%lx, va=%016lx, pa=%016lx,"
" rflags=%lx, vflags=%lx, psize=%d)\n",
hpte_group, va, pa, rflags, vflags, psize);
}
@@ -156,7 +150,7 @@ long native_hpte_insert(unsigned long hp
hpte_r = hpte_encode_r(pa, psize) | rflags;
if (!(vflags & HPTE_V_BOLTED)) {
- DBG_LOW(" i=%x hpte_v=%016lx, hpte_r=%016lx\n",
+ pr_debug(" i=%x hpte_v=%016lx, hpte_r=%016lx\n",
i, hpte_v, hpte_r);
}
@@ -181,7 +175,7 @@ static long native_hpte_remove(unsigned
int slot_offset;
unsigned long hpte_v;
- DBG_LOW(" remove(group=%lx)\n", hpte_group);
+ pr_debug(" remove(group=%lx)\n", hpte_group);
/* pick a random entry to start at */
slot_offset = mftb() & 0x7;
@@ -222,7 +216,7 @@ static long native_hpte_updatepp(unsigne
want_v = hpte_encode_v(va, psize);
- DBG_LOW(" update(va=%016lx, avpnv=%016lx, hash=%016lx, newpp=%x)",
+ pr_debug(" update(va=%016lx, avpnv=%016lx, hash=%016lx, newpp=%x)",
va, want_v & HPTE_V_AVPN, slot, newpp);
native_lock_hpte(hptep);
@@ -231,11 +225,11 @@ static long native_hpte_updatepp(unsigne
/* Even if we miss, we need to invalidate the TLB */
if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID)) {
- DBG_LOW(" -> miss\n");
+ pr_debug(" -> miss\n");
native_unlock_hpte(hptep);
ret = -1;
} else {
- DBG_LOW(" -> hit\n");
+ pr_debug(" -> hit\n");
/* Update the HPTE */
hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) |
(newpp & (HPTE_R_PP | HPTE_R_N));
@@ -321,7 +315,7 @@ static void native_hpte_invalidate(unsig
local_irq_save(flags);
- DBG_LOW(" invalidate(va=%016lx, hash: %x)\n", va, slot);
+ pr_debug(" invalidate(va=%016lx, hash: %x)\n", va, slot);
want_v = hpte_encode_v(va, psize);
native_lock_hpte(hptep);
Index: to-merge/arch/powerpc/mm/init_64.c
===================================================================
--- to-merge.orig/arch/powerpc/mm/init_64.c
+++ to-merge/arch/powerpc/mm/init_64.c
@@ -67,12 +67,6 @@
#include "mmu_decl.h"
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
#if PGTABLE_RANGE > USER_VSID_RANGE
#warning Limited user VSID range means pagetable space is wasted
#endif
@@ -172,7 +166,7 @@ void pgtable_cache_init(void)
int size = pgtable_cache_size[i];
const char *name = pgtable_cache_name[i];
- DBG("Allocating page table cache %s (#%d) "
+ pr_debug("Allocating page table cache %s (#%d) "
"for size: %08x...\n", name, i, size);
pgtable_cache[i] = kmem_cache_create(name,
size, size,
Index: to-merge/arch/powerpc/mm/lmb.c
===================================================================
--- to-merge.orig/arch/powerpc/mm/lmb.c
+++ to-merge/arch/powerpc/mm/lmb.c
@@ -10,6 +10,8 @@
* 2 of the License, or (at your option) any later version.
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
@@ -22,15 +24,6 @@
#include "mmu_decl.h" /* for __max_low_memory */
#endif
-#undef DEBUG
-
-#ifdef DEBUG
-#include <asm/udbg.h>
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
#define LMB_ALLOC_ANYWHERE 0
struct lmb lmb;
@@ -40,22 +33,22 @@ void lmb_dump_all(void)
#ifdef DEBUG
unsigned long i;
- DBG("lmb_dump_all:\n");
- DBG(" memory.cnt = 0x%lx\n", lmb.memory.cnt);
- DBG(" memory.size = 0x%lx\n", lmb.memory.size);
+ pr_debug("lmb_dump_all:\n");
+ pr_debug(" memory.cnt = 0x%lx\n", lmb.memory.cnt);
+ pr_debug(" memory.size = 0x%lx\n", lmb.memory.size);
for (i=0; i < lmb.memory.cnt ;i++) {
- DBG(" memory.region[0x%x].base = 0x%lx\n",
+ pr_debug(" memory.region[0x%x].base = 0x%lx\n",
i, lmb.memory.region[i].base);
- DBG(" .size = 0x%lx\n",
+ pr_debug(" .size = 0x%lx\n",
lmb.memory.region[i].size);
}
- DBG("\n reserved.cnt = 0x%lx\n", lmb.reserved.cnt);
- DBG(" reserved.size = 0x%lx\n", lmb.reserved.size);
+ pr_debug("\n reserved.cnt = 0x%lx\n", lmb.reserved.cnt);
+ pr_debug(" reserved.size = 0x%lx\n", lmb.reserved.size);
for (i=0; i < lmb.reserved.cnt ;i++) {
- DBG(" reserved.region[0x%x].base = 0x%lx\n",
+ pr_debug(" reserved.region[0x%x].base = 0x%lx\n",
i, lmb.reserved.region[i].base);
- DBG(" .size = 0x%lx\n",
+ pr_debug(" .size = 0x%lx\n",
lmb.reserved.region[i].size);
}
#endif /* DEBUG */
Index: to-merge/arch/powerpc/mm/slb.c
===================================================================
--- to-merge.orig/arch/powerpc/mm/slb.c
+++ to-merge/arch/powerpc/mm/slb.c
@@ -24,12 +24,6 @@
#include <asm/cputable.h>
#include <asm/cacheflush.h>
-#ifdef DEBUG
-#define DBG(fmt...) udbg_printf(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
extern void slb_allocate_realmode(unsigned long ea);
extern void slb_allocate_user(unsigned long ea);
@@ -191,12 +185,12 @@ void slb_initialize(void)
patch_slb_encoding(slb_miss_user_load_normal,
SLB_VSID_USER | virtual_llp);
- DBG("SLB: linear LLP = %04x\n", linear_llp);
- DBG("SLB: virtual LLP = %04x\n", virtual_llp);
+ pr_debug("SLB: linear LLP = %04x\n", linear_llp);
+ pr_debug("SLB: virtual LLP = %04x\n", virtual_llp);
#ifdef CONFIG_HUGETLB_PAGE
patch_slb_encoding(slb_miss_user_load_huge,
SLB_VSID_USER | huge_llp);
- DBG("SLB: huge LLP = %04x\n", huge_llp);
+ pr_debug("SLB: huge LLP = %04x\n", huge_llp);
#endif
}
Index: to-merge/arch/powerpc/sysdev/dart_iommu.c
===================================================================
--- to-merge.orig/arch/powerpc/sysdev/dart_iommu.c
+++ to-merge/arch/powerpc/sysdev/dart_iommu.c
@@ -27,6 +27,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#undef DEBUG
+
#include <linux/config.h>
#include <linux/init.h>
#include <linux/types.h>
@@ -70,15 +72,13 @@ static int iommu_table_dart_inited;
static int dart_dirty;
static int dart_is_u4;
-#define DBG(...)
-
static inline void dart_tlb_invalidate_all(void)
{
unsigned long l = 0;
unsigned int reg, inv_bit;
unsigned long limit;
- DBG("dart: flush\n");
+ pr_debug("dart: flush\n");
/* To invalidate the DART, set the DARTCNTL_FLUSHTLB bit in the
* control register and wait for it to clear.
@@ -125,7 +125,7 @@ static void dart_build(struct iommu_tabl
unsigned int *dp;
unsigned int rpn;
- DBG("dart: build at: %lx, %lx, addr: %x\n", index, npages, uaddr);
+ pr_debug("dart: build at: %lx, %lx, addr: %x\n", index, npages, uaddr);
index <<= DART_PAGE_FACTOR;
npages <<= DART_PAGE_FACTOR;
@@ -156,7 +156,7 @@ static void dart_free(struct iommu_table
* bad DMAs, but then no 32-bit architecture ever does either.
*/
- DBG("dart: free at: %lx, %lx\n", index, npages);
+ pr_debug("dart: free at: %lx, %lx\n", index, npages);
index <<= DART_PAGE_FACTOR;
npages <<= DART_PAGE_FACTOR;
Index: to-merge/arch/powerpc/sysdev/mpic.c
===================================================================
--- to-merge.orig/arch/powerpc/sysdev/mpic.c
+++ to-merge/arch/powerpc/sysdev/mpic.c
@@ -37,12 +37,6 @@
#include <asm/mpic.h>
#include <asm/smp.h>
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
static struct mpic *mpics;
static struct mpic *mpic_primary;
static DEFINE_SPINLOCK(mpic_lock);
@@ -205,7 +199,7 @@ static void mpic_startup_ht_interrupt(st
if (fixup->base == NULL)
return;
- DBG("startup_ht_interrupt(%u, %u) index: %d\n",
+ pr_debug("startup_ht_interrupt(%u, %u) index: %d\n",
source, irqflags, fixup->index);
spin_lock_irqsave(&mpic->fixup_lock, flags);
/* Enable and configure */
@@ -228,7 +222,7 @@ static void mpic_shutdown_ht_interrupt(s
if (fixup->base == NULL)
return;
- DBG("shutdown_ht_interrupt(%u, %u)\n", source, irqflags);
+ pr_debug("shutdown_ht_interrupt(%u, %u)\n", source, irqflags);
/* Disable */
spin_lock_irqsave(&mpic->fixup_lock, flags);
@@ -271,7 +265,8 @@ static void __init mpic_scan_ht_pic(stru
writeb(0x10 + 2 * i, base + 2);
tmp = readl(base + 4);
irq = (tmp >> 16) & 0xff;
- DBG("HT PIC index 0x%x, irq 0x%x, tmp: %08x\n", i, irq, tmp);
+ pr_debug("HT PIC index 0x%x, irq 0x%x, tmp: %08x\n",
+ i, irq, tmp);
/* mask it , will be unmasked later */
tmp |= 0x1;
writel(tmp, base + 4);
@@ -318,7 +313,7 @@ static void __init mpic_scan_ht_pics(str
u32 l = readl(devbase + PCI_VENDOR_ID);
u16 s;
- DBG("devfn %x, l: %x\n", devfn, l);
+ pr_debug("devfn %x, l: %x\n", devfn, l);
/* If no device, skip */
if (l == 0xffffffff || l == 0x00000000 ||
@@ -417,7 +412,8 @@ static void mpic_enable_irq(unsigned int
struct mpic *mpic = mpic_from_irq(irq);
unsigned int src = irq - mpic->irq_offset;
- DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
+ pr_debug("%p: %s: enable_irq: %d (src %d)\n",
+ mpic, mpic->name, irq, src);
mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) &
@@ -464,7 +460,7 @@ static void mpic_disable_irq(unsigned in
struct mpic *mpic = mpic_from_irq(irq);
unsigned int src = irq - mpic->irq_offset;
- DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
+ pr_debug("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) |
@@ -498,7 +494,7 @@ static void mpic_end_irq(unsigned int ir
struct mpic *mpic = mpic_from_irq(irq);
#ifdef DEBUG_IRQ
- DBG("%s: end_irq: %d\n", mpic->name, irq);
+ pr_debug("%s: end_irq: %d\n", mpic->name, irq);
#endif
/* We always EOI on end_irq() even for edge interrupts since that
* should only lower the priority, the MPIC should have properly
@@ -524,7 +520,7 @@ static void mpic_enable_ipi(unsigned int
struct mpic *mpic = mpic_from_ipi(irq);
unsigned int src = irq - mpic->ipi_offset;
- DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src);
+ pr_debug("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src);
mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK);
}
@@ -762,7 +758,7 @@ void __init mpic_init(struct mpic *mpic)
#ifdef CONFIG_MPIC_BROKEN_U3
/* Do the HT PIC fixups on U3 broken mpic */
- DBG("MPIC flags: %x\n", mpic->flags);
+ pr_debug("MPIC flags: %x\n", mpic->flags);
if ((mpic->flags & MPIC_BROKEN_U3) && (mpic->flags & MPIC_PRIMARY))
mpic_scan_ht_pics(mpic);
#endif /* CONFIG_MPIC_BROKEN_U3 */
@@ -802,8 +798,8 @@ void __init mpic_init(struct mpic *mpic)
#endif
}
- DBG("setup source %d, vecpri: %08x, level: %d\n", i, vecpri,
- (level != 0));
+ pr_debug("setup source %d, vecpri: %08x, level: %d\n",
+ i, vecpri, (level != 0));
/* init hw */
mpic_irq_write(i, MPIC_IRQ_VECTOR_PRI, vecpri);
@@ -879,7 +875,8 @@ void mpic_setup_this_cpu(void)
BUG_ON(mpic == NULL);
- DBG("%s: setup_this_cpu(%d)\n", mpic->name, hard_smp_processor_id());
+ pr_debug("%s: setup_this_cpu(%d)\n",
+ mpic->name, hard_smp_processor_id());
spin_lock_irqsave(&mpic_lock, flags);
@@ -930,7 +927,8 @@ void mpic_teardown_this_cpu(int secondar
BUG_ON(mpic == NULL);
- DBG("%s: teardown_this_cpu(%d)\n", mpic->name, hard_smp_processor_id());
+ pr_debug("%s: teardown_this_cpu(%d)\n",
+ mpic->name, hard_smp_processor_id());
spin_lock_irqsave(&mpic_lock, flags);
/* let the mpic know we don't want intrs. */
@@ -952,7 +950,7 @@ void mpic_send_ipi(unsigned int ipi_no,
BUG_ON(mpic == NULL);
#ifdef DEBUG_IPI
- DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no);
+ pr_debug("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no);
#endif
mpic_cpu_write(MPIC_CPU_IPI_DISPATCH_0 + ipi_no * 0x10,
@@ -965,11 +963,11 @@ int mpic_get_one_irq(struct mpic *mpic,
irq = mpic_cpu_read(MPIC_CPU_INTACK) & MPIC_VECPRI_VECTOR_MASK;
#ifdef DEBUG_LOW
- DBG("%s: get_one_irq(): %d\n", mpic->name, irq);
+ pr_debug("%s: get_one_irq(): %d\n", mpic->name, irq);
#endif
if (mpic->cascade && irq == mpic->cascade_vec) {
#ifdef DEBUG_LOW
- DBG("%s: cascading ...\n", mpic->name);
+ pr_debug("%s: cascading ...\n", mpic->name);
#endif
irq = mpic->cascade(regs, mpic->cascade_data);
mpic_eoi(mpic);
@@ -979,12 +977,12 @@ int mpic_get_one_irq(struct mpic *mpic,
return -1;
if (irq < MPIC_VEC_IPI_0) {
#ifdef DEBUG_IRQ
- DBG("%s: irq %d\n", mpic->name, irq + mpic->irq_offset);
+ pr_debug("%s: irq %d\n", mpic->name, irq + mpic->irq_offset);
#endif
return irq + mpic->irq_offset;
}
#ifdef DEBUG_IPI
- DBG("%s: ipi %d !\n", mpic->name, irq - MPIC_VEC_IPI_0);
+ pr_debug("%s: ipi %d !\n", mpic->name, irq - MPIC_VEC_IPI_0);
#endif
return irq - MPIC_VEC_IPI_0 + mpic->ipi_offset;
}
^ permalink raw reply [flat|nested] 5+ messages in thread