[PATCH] enable DEBUG via config option

Olaf Hering olh at suse.de
Wed Mar 16 02:12:59 EST 2005


 On Mon, Mar 14, Paul Mackeras wrote:

> Olaf Hering writes:
> 
> > Its always boring to edit each file and turn the #undef DEBUG into
> > #define DEBUG. This patch makes it a simple config option.
> > Now the question is, how verbose will the boot be when all the printk
> > are enabled? appears to be ok so far on a p620.
> 
> Having it as a config option seems to be of use only to a few kernel
> developers.  Why don't you just edit the Makefile and add -DDEBUG to
> the CFLAGS when you want to do that?


This series of patches changes all DEBUG_FOO to DEBUG (except
NUMA_DEBUG) and removes all the remaining #define DEBUG or #undef DEBUG

compile-tested on all 5 configs in arch/ppc64, with and without -DDEBUG

ppc64-undef-debug-LPARCFG_DEBUG.patch
ppc64-undef-debug-module-DEBUGP.patch
ppc64-undef-debug-nvram-DEBUG_NVRAM.patch
ppc64-undef-debug-pmac_feature-DEBUG_FEATURE.patch
ppc64-undef-debug-prom_init-DEBUG_PROM.patch
ppc64-undef-debug-rtasd-DEBUG.patch
ppc64-undef-debug-scanlog-DEBUG.patch
ppc64-undef-debug-signal-DEBUG_SIG.patch
ppc64-undef-debug-time-DEBUG_PPC_ADJTIMEX.patch
ppc64-undef-debug-vdso-__DEBUG.patch
ppc64-undef-debug.patch
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/lparcfg.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/lparcfg.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/lparcfg.c
@@ -38,8 +38,6 @@
 #define MODULE_VERS "1.6"
 #define MODULE_NAME "lparcfg"
 
-/* #define LPARCFG_DEBUG */
-
 /* find a better place for this function... */
 void log_plpar_hcall_return(unsigned long rc, char *tag)
 {
@@ -274,7 +272,7 @@ static void parse_system_parameter_strin
 			       __FILE__, __FUNCTION__, __LINE__);
 			return;
 		}
-#ifdef LPARCFG_DEBUG
+#ifdef DEBUG
 		printk(KERN_INFO "success calling get-system-parameter \n");
 #endif
 		splpar_strlen = local_buffer[0] * 16 + local_buffer[1];
@@ -328,7 +326,7 @@ static int lparcfg_count_active_processo
 	int count = 0;
 
 	while ((cpus_dn = of_find_node_by_type(cpus_dn, "cpu"))) {
-#ifdef LPARCFG_DEBUG
+#ifdef DEBUG
 		printk(KERN_ERR "cpus_dn %p \n", cpus_dn);
 #endif
 		count++;
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/module.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/module.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/module.c
@@ -30,10 +30,10 @@
    Using a magic allocator which places modules within 32MB solves
    this, and makes other things simpler.  Anton?
    --RR.  */
-#if 0
-#define DEBUGP printk
+#ifdef DEBUG
+#define DBG printk
 #else
-#define DEBUGP(fmt , ...)
+#define DBG(fmt , ...)
 #endif
 
 /* There's actually a third entry here, but it's unused */
@@ -124,8 +124,8 @@ static unsigned long get_stubs_size(cons
 	/* Every relocated section... */
 	for (i = 1; i < hdr->e_shnum; i++) {
 		if (sechdrs[i].sh_type == SHT_RELA) {
-			DEBUGP("Found relocations in section %u\n", i);
-			DEBUGP("Ptr: %p.  Number: %lu\n",
+			DBG("Found relocations in section %u\n", i);
+			DBG("Ptr: %p.  Number: %lu\n",
 			       (void *)sechdrs[i].sh_addr,
 			       sechdrs[i].sh_size / sizeof(Elf64_Rela));
 			relocs += count_relocs((void *)sechdrs[i].sh_addr,
@@ -134,7 +134,7 @@ static unsigned long get_stubs_size(cons
 		}
 	}
 
-	DEBUGP("Looks like a total of %lu stubs, max\n", relocs);
+	DBG("Looks like a total of %lu stubs, max\n", relocs);
 	return relocs * sizeof(struct ppc64_stub_entry);
 }
 
@@ -246,7 +246,7 @@ static inline int create_stub(Elf64_Shdr
 		       me->name, (void *)reladdr, (void *)my_r2);
 		return 0;
 	}
-	DEBUGP("Stub %p get data from reladdr %li\n", entry, reladdr);
+	DBG("Stub %p get data from reladdr %li\n", entry, reladdr);
 
 	*loc1 = PPC_HA(reladdr);
 	*loc2 = PPC_LO(reladdr);
@@ -307,7 +307,7 @@ int apply_relocate_add(Elf64_Shdr *sechd
 	unsigned long *location;
 	unsigned long value;
 
-	DEBUGP("Applying ADD relocate section %u to %u\n", relsec,
+	DBG("Applying ADD relocate section %u to %u\n", relsec,
 	       sechdrs[relsec].sh_info);
 	for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) {
 		/* This is where to make the change */
@@ -317,7 +317,7 @@ int apply_relocate_add(Elf64_Shdr *sechd
 		sym = (Elf64_Sym *)sechdrs[symindex].sh_addr
 			+ ELF64_R_SYM(rela[i].r_info);
 
-		DEBUGP("RELOC at %p: %li-type as %s (%lu) + %li\n",
+		DBG("RELOC at %p: %li-type as %s (%lu) + %li\n",
 		       location, (long)ELF64_R_TYPE(rela[i].r_info),
 		       strtab + sym->st_name, (unsigned long)sym->st_value,
 		       (long)rela[i].r_addend);
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/nvram.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/nvram.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/nvram.c
@@ -33,7 +33,7 @@
 #include <asm/machdep.h>
 #include <asm/systemcfg.h>
 
-#undef DEBUG_NVRAM
+#undef DEBUG
 
 static int nvram_scan_partitions(void);
 static int nvram_setup_partition(void);
@@ -200,7 +200,7 @@ static struct miscdevice nvram_dev = {
 };
 
 
-#ifdef DEBUG_NVRAM
+#ifdef DEBUG
 static void nvram_print_partitions(char * label)
 {
 	struct list_head * p;
@@ -591,7 +591,7 @@ static int __init nvram_init(void)
   		printk(KERN_WARNING "nvram_init: Could not find nvram partition"
   		       " for nvram buffered error logging.\n");
   
-#ifdef DEBUG_NVRAM
+#ifdef DEBUG
 	nvram_print_partitions("NVRAM Partitions");
 #endif
 
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_feature.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_feature.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_feature.c
@@ -41,9 +41,9 @@
 #include <asm/pci-bridge.h>
 #include <asm/pmac_low_i2c.h>
 
-#undef DEBUG_FEATURE
+#undef DEBUG
 
-#ifdef DEBUG_FEATURE
+#ifdef DEBUG
 #define DBG(fmt...) printk(KERN_DEBUG fmt)
 #else
 #define DBG(fmt...)
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/prom_init.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/prom_init.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/prom_init.c
@@ -15,7 +15,7 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG_PROM
+#undef DEBUG
 
 #include <stdarg.h>
 #include <linux/config.h>
@@ -106,7 +106,7 @@ extern const struct linux_logo logo_linu
         __asm__ __volatile__(".long " BUG_ILLEGAL_INSTR);	\
 } while (0)
 
-#ifdef DEBUG_PROM
+#ifdef DEBUG
 #define prom_debug(x...)	prom_printf(x)
 #else
 #define prom_debug(x...)
@@ -642,11 +642,11 @@ static void __init prom_init_mem(void)
 		p = RELOC(regbuf);
 		endp = p + (plen / sizeof(cell_t));
 
-#ifdef DEBUG_PROM
+#ifdef DEBUG
 		memset(path, 0, PROM_SCRATCH_SIZE);
 		call_prom("package-to-path", 3, 1, node, path, PROM_SCRATCH_SIZE-1);
 		prom_debug("  node %s :\n", path);
-#endif /* DEBUG_PROM */
+#endif /* DEBUG */
 
 		while ((endp - p) >= (_prom->root_addr_cells + _prom->root_size_cells)) {
 			unsigned long base, size;
@@ -1514,7 +1514,7 @@ static void __init flatten_device_tree(v
 	reserve_mem(RELOC(dt_header_start), hdr->totalsize);
 	memcpy(rsvmap, RELOC(mem_reserve_map), sizeof(mem_reserve_map));
 
-#ifdef DEBUG_PROM
+#ifdef DEBUG
 	{
 		int i;
 		prom_printf("reserved memory map:\n");
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/rtasd.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/rtasd.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/rtasd.c
@@ -28,10 +28,10 @@
 #include <asm/atomic.h>
 #include <asm/systemcfg.h>
 
-#if 0
-#define DEBUG(A...)	printk(KERN_ERR A)
+#ifdef DEBUG
+#define DBG(A...)	printk(KERN_ERR A)
 #else
-#define DEBUG(A...)
+#define DBG(A...)
 #endif
 
 static DEFINE_SPINLOCK(rtasd_log_lock);
@@ -194,7 +194,7 @@ void pSeries_log_error(char *buf, unsign
 	unsigned long s;
 	int len = 0;
 
-	DEBUG("logging event\n");
+	DBG("logging event\n");
 	if (buf == NULL)
 		return;
 
@@ -369,7 +369,7 @@ static int get_eventscan_parms(void)
 		return -1;
 	}
 	rtas_event_scan_rate = *ip;
-	DEBUG("rtas-event-scan-rate %d\n", rtas_event_scan_rate);
+	DBG("rtas-event-scan-rate %d\n", rtas_event_scan_rate);
 
 	/* Make room for the sequence number */
 	rtas_error_log_max = rtas_get_error_log_max();
@@ -419,7 +419,7 @@ static int rtasd(void *unused)
 
 	printk(KERN_ERR "RTAS daemon started\n");
 
-	DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2);
+	DBG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2);
 
 	/* See if we have any error stored in NVRAM */
 	memset(logdata, 0, rtas_error_log_max);
@@ -438,9 +438,9 @@ static int rtasd(void *unused)
 	/* First pass. */
 	lock_cpu_hotplug();
 	for_each_online_cpu(cpu) {
-		DEBUG("scheduling on %d\n", cpu);
+		DBG("scheduling on %d\n", cpu);
 		set_cpus_allowed(current, cpumask_of_cpu(cpu));
-		DEBUG("watchdog scheduled on cpu %d\n", smp_processor_id());
+		DBG("watchdog scheduled on cpu %d\n", smp_processor_id());
 
 		do_event_scan(event_scan);
 		set_current_state(TASK_INTERRUPTIBLE);
@@ -449,9 +449,9 @@ static int rtasd(void *unused)
 	unlock_cpu_hotplug();
 
 	if (surveillance_timeout != -1) {
-		DEBUG("enabling surveillance\n");
+		DBG("enabling surveillance\n");
 		enable_surveillance(surveillance_timeout);
-		DEBUG("surveillance enabled\n");
+		DBG("surveillance enabled\n");
 	}
 
 	lock_cpu_hotplug();
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/scanlog.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/scanlog.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/scanlog.c
@@ -37,7 +37,7 @@
 #define SCANLOG_HWERROR -1
 #define SCANLOG_CONTINUE 1
 
-#define DEBUG(A...) do { if (scanlog_debug) printk(KERN_ERR "scanlog: " A); } while (0)
+#define DBG(A...) do { if (scanlog_debug) printk(KERN_ERR "scanlog: " A); } while (0)
 
 static int scanlog_debug;
 static unsigned int ibm_scan_log_dump;			/* RTAS token */
@@ -85,14 +85,14 @@ static ssize_t scanlog_read(struct file 
 		memcpy(data, rtas_data_buf, RTAS_DATA_BUF_SIZE);
 		spin_unlock(&rtas_data_buf_lock);
 
-		DEBUG("status=%d, data[0]=%x, data[1]=%x, data[2]=%x\n",
+		DBG("status=%d, data[0]=%x, data[1]=%x, data[2]=%x\n",
 		      status, data[0], data[1], data[2]);
 		switch (status) {
 		    case SCANLOG_COMPLETE:
-			DEBUG("hit eof\n");
+			DBG("hit eof\n");
 			return 0;
 		    case SCANLOG_HWERROR:
-			DEBUG("hardware error reading scan log data\n");
+			DBG("hardware error reading scan log data\n");
 			return -EIO;
 		    case SCANLOG_CONTINUE:
 			/* We may or may not have data yet */
@@ -143,9 +143,9 @@ static ssize_t scanlog_write(struct file
 
 	if (buf) {
 		if (strncmp(stkbuf, "reset", 5) == 0) {
-			DEBUG("reset scanlog\n");
+			DBG("reset scanlog\n");
 			status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, 0, 0);
-			DEBUG("rtas returns %d\n", status);
+			DBG("rtas returns %d\n", status);
 		} else if (strncmp(stkbuf, "debugon", 7) == 0) {
 			printk(KERN_ERR "scanlog: debug on\n");
 			scanlog_debug = 1;
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/signal.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/signal.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/signal.c
@@ -38,7 +38,7 @@
 #include <asm/cacheflush.h>
 #include <asm/vdso.h>
 
-#define DEBUG_SIG 0
+#define DEBUG 0
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
@@ -383,7 +383,7 @@ int sys_rt_sigreturn(unsigned long r3, u
 	return regs->result;
 
 badframe:
-#if DEBUG_SIG
+#if DEBUG
 	printk("badframe in sys_rt_sigreturn, regs=%p uc=%p &uc->uc_mcontext=%p\n",
 	       regs, uc, &uc->uc_mcontext);
 #endif
@@ -465,7 +465,7 @@ static int setup_rt_frame(int signr, str
 	return 1;
 
 badframe:
-#if DEBUG_SIG
+#if DEBUG
 	printk("badframe in setup_rt_frame, regs=%p frame=%p newsp=%lx\n",
 	       regs, frame, newsp);
 #endif
Index: linux-2.6.11-olh/arch/ppc64/kernel/signal32.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/signal32.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/signal32.c
@@ -33,7 +33,7 @@
 #include <asm/cacheflush.h>
 #include <asm/vdso.h>
 
-#define DEBUG_SIG 0
+#define DEBUG 0
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
@@ -684,7 +684,7 @@ static int handle_rt_signal32(unsigned l
 	return 1;
 
 badframe:
-#if DEBUG_SIG
+#if DEBUG
 	printk("badframe in handle_rt_signal, regs=%p frame=%p newsp=%lx\n",
 	       regs, frame, newsp);
 #endif
@@ -857,7 +857,7 @@ static int handle_signal32(unsigned long
 	return 1;
 
 badframe:
-#if DEBUG_SIG
+#if DEBUG
 	printk("badframe in handle_signal, regs=%p frame=%x newsp=%x\n",
 	       regs, frame, *newspp);
 #endif
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/time.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/time.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/time.c
@@ -546,7 +546,7 @@ void __init time_init(void)
  * adjust the frequency.
  */
 
-/* #define DEBUG_PPC_ADJTIMEX 1 */
+#undef DEBUG
 
 void ppc_adjtimex(void)
 {
@@ -576,7 +576,7 @@ void ppc_adjtimex(void)
 	
 	/* If there is a single shot time adjustment in progress */
 	if ( time_adjust ) {
-#ifdef DEBUG_PPC_ADJTIMEX
+#ifdef DEBUG
 		printk("ppc_adjtimex: ");
 		if ( adjusting_time == 0 )
 			printk("starting ");
@@ -599,7 +599,7 @@ void ppc_adjtimex(void)
 			singleshot_ppm = -singleshot_ppm;
 	}
 	else {
-#ifdef DEBUG_PPC_ADJTIMEX
+#ifdef DEBUG
 		if ( adjusting_time )
 			printk("ppc_adjtimex: ending single shot time_adjust\n");
 #endif
@@ -620,7 +620,7 @@ void ppc_adjtimex(void)
 		new_tb_ticks_per_sec = tb_ticks_per_sec - tb_ticks_per_sec_delta;
 	}
 	
-#ifdef DEBUG_PPC_ADJTIMEX
+#ifdef DEBUG
 	printk("ppc_adjtimex: ltemp = %ld, time_freq = %ld, singleshot_ppm = %ld\n", ltemp, time_freq, singleshot_ppm);
 	printk("ppc_adjtimex: tb_ticks_per_sec - base = %ld  new = %ld\n", tb_ticks_per_sec, new_tb_ticks_per_sec);
 #endif
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/vdso.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/vdso.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/vdso.c
@@ -109,7 +109,7 @@ struct lib64_elfinfo
 };
 
 
-#ifdef __DEBUG
+#ifdef DEBUG
 static void dump_one_vdso_page(struct page *pg, struct page *upg)
 {
 	printk("kpg: %p (c:%d,f:%08lx)", __va(page_to_pfn(pg) << PAGE_SHIFT),
-------------- next part --------------
Index: linux-2.6.11-olh/arch/ppc64/kernel/prom_init.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/prom_init.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/prom_init.c
@@ -15,8 +15,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <stdarg.h>
 #include <linux/config.h>
 #include <linux/kernel.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/eeh.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/eeh.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/eeh.c
@@ -35,8 +35,6 @@
 #include <asm/systemcfg.h>
 #include "pci.h"
 
-#undef DEBUG
-
 /** Overview:
  *  EEH, or "Extended Error Handling" is a PCI bridge technology for
  *  dealing with PCI bus errors that can't be dealt with within the
Index: linux-2.6.11-olh/arch/ppc64/kernel/pSeries_smp.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pSeries_smp.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pSeries_smp.c
@@ -12,8 +12,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/lmb.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/lmb.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/lmb.c
@@ -22,8 +22,6 @@
 
 struct lmb lmb;
 
-#undef DEBUG
-
 void lmb_dump_all(void)
 {
 #ifdef DEBUG
Index: linux-2.6.11-olh/arch/ppc64/kernel/pSeries_setup.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pSeries_setup.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pSeries_setup.c
@@ -16,8 +16,6 @@
  * bootup setup stuff..
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/idle_power4.S
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/idle_power4.S
+++ linux-2.6.11-olh/arch/ppc64/kernel/idle_power4.S
@@ -22,8 +22,6 @@
 #include <asm/ppc_asm.h>
 #include <asm/offsets.h>
 
-#undef DEBUG
-
 	.text
 
 /*
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_smp.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_smp.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_smp.c
@@ -22,8 +22,6 @@
  *  2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/smp.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/smp.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/smp.c
@@ -15,8 +15,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/nvram.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/nvram.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/nvram.c
@@ -33,8 +33,6 @@
 #include <asm/machdep.h>
 #include <asm/systemcfg.h>
 
-#undef DEBUG
-
 static int nvram_scan_partitions(void);
 static int nvram_setup_partition(void);
 static int nvram_create_os_partition(void);
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_feature.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_feature.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_feature.c
@@ -41,8 +41,6 @@
 #include <asm/pci-bridge.h>
 #include <asm/pmac_low_i2c.h>
 
-#undef DEBUG
-
 #ifdef DEBUG
 #define DBG(fmt...) printk(KERN_DEBUG fmt)
 #else
Index: linux-2.6.11-olh/arch/ppc64/kernel/prom.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/prom.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/prom.c
@@ -15,8 +15,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <stdarg.h>
 #include <linux/config.h>
 #include <linux/kernel.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/setup.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/setup.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/setup.c
@@ -10,8 +10,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/string.h>
Index: linux-2.6.11-olh/arch/ppc64/boot/main.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/boot/main.c
+++ linux-2.6.11-olh/arch/ppc64/boot/main.c
@@ -73,8 +73,6 @@ void *stdin;
 void *stdout;
 void *stderr;
 
-#undef DEBUG
-
 static unsigned long claim_base = PROG_START;
 
 static unsigned long try_claim(unsigned long size)
Index: linux-2.6.11-olh/arch/ppc64/kernel/vdso.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/vdso.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/vdso.c
@@ -36,8 +36,6 @@
 #include <asm/sections.h>
 #include <asm/vdso.h>
 
-#undef DEBUG
-
 #ifdef DEBUG
 #define DBG(fmt...) printk(fmt)
 #else
Index: linux-2.6.11-olh/arch/ppc64/mm/hash_utils.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/mm/hash_utils.c
+++ linux-2.6.11-olh/arch/ppc64/mm/hash_utils.c
@@ -18,8 +18,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/spinlock.h>
 #include <linux/errno.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_low_i2c.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_low_i2c.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_low_i2c.c
@@ -16,8 +16,6 @@
  *  properties parser
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/sched.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/mpic.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/mpic.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/mpic.c
@@ -12,8 +12,6 @@
  *  for more details.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/maple_time.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/maple_time.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/maple_time.c
@@ -11,8 +11,6 @@
  *
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_setup.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_setup.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_setup.c
@@ -23,8 +23,6 @@
  * bootup setup stuff..
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/errno.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/pci.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pci.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pci.c
@@ -11,8 +11,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/iSeries_setup.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/iSeries_setup.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/iSeries_setup.c
@@ -16,8 +16,6 @@
  *      2 of the License, or (at your option) any later version.
  */
  
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/threads.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_time.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_time.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_time.c
@@ -32,8 +32,6 @@
 #include <asm/nvram.h>
 #include <asm/smu.h>
 
-#undef DEBUG
-
 #ifdef DEBUG
 #define DBG(x...) printk(x)
 #else
Index: linux-2.6.11-olh/arch/ppc64/kernel/iSeries_smp.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/iSeries_smp.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/iSeries_smp.c
@@ -12,8 +12,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_pci.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_pci.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_pci.c
@@ -31,8 +31,6 @@
 #include "pci.h"
 #include "pmac.h"
 
-#define DEBUG
-
 #ifdef DEBUG
 #define DBG(x...) printk(x)
 #else
Index: linux-2.6.11-olh/arch/ppc64/kernel/ras.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/ras.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/ras.c
@@ -74,8 +74,6 @@ static irqreturn_t ras_epow_interrupt(in
 static irqreturn_t ras_error_interrupt(int irq, void *dev_id,
 					struct pt_regs * regs);
 
-/* #define DEBUG */
-
 static void request_ras_irqs(struct device_node *np, char *propname,
 			irqreturn_t (*handler)(int, void *, struct pt_regs *),
 			const char *name)
Index: linux-2.6.11-olh/arch/ppc64/kernel/maple_setup.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/maple_setup.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/maple_setup.c
@@ -11,8 +11,6 @@
  *
  */
 
-#define DEBUG
-
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/errno.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/pmac_nvram.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pmac_nvram.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pmac_nvram.c
@@ -29,8 +29,6 @@
 #include <asm/machdep.h>
 #include <asm/nvram.h>
 
-#define DEBUG
-
 #ifdef DEBUG
 #define DBG(x...) printk(x)
 #else
Index: linux-2.6.11-olh/arch/ppc64/kernel/maple_pci.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/maple_pci.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/maple_pci.c
@@ -8,8 +8,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#define DEBUG
-
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/delay.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/pSeries_lpar.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/pSeries_lpar.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/pSeries_lpar.c
@@ -19,8 +19,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#define DEBUG
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/dma-mapping.h>
Index: linux-2.6.11-olh/arch/ppc64/kernel/signal.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/signal.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/signal.c
@@ -38,8 +38,6 @@
 #include <asm/cacheflush.h>
 #include <asm/vdso.h>
 
-#define DEBUG 0
-
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
 #ifndef MIN
Index: linux-2.6.11-olh/arch/ppc64/kernel/time.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/time.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/time.c
@@ -546,8 +546,6 @@ void __init time_init(void)
  * adjust the frequency.
  */
 
-#undef DEBUG
-
 void ppc_adjtimex(void)
 {
 	unsigned long den, new_tb_ticks_per_sec, tb_ticks, old_xsec, new_tb_to_xs, new_xsec, new_stamp_xsec;
Index: linux-2.6.11-olh/arch/ppc64/kernel/signal32.c
===================================================================
--- linux-2.6.11-olh.orig/arch/ppc64/kernel/signal32.c
+++ linux-2.6.11-olh/arch/ppc64/kernel/signal32.c
@@ -33,8 +33,6 @@
 #include <asm/cacheflush.h>
 #include <asm/vdso.h>
 
-#define DEBUG 0
-
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
 #define GP_REGS_SIZE32	min(sizeof(elf_gregset_t32), sizeof(struct pt_regs32))


More information about the Linuxppc64-dev mailing list