[PATCH] enable DEBUG via config option
Olaf Hering
olh at suse.de
Fri Feb 11 23:34:52 EST 2005
On Fri, Feb 11, Olaf Hering wrote:
>
> 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.
Here is another hunk.
diff -purNx tags ../linux-2.6.11-rc3.orig/arch/ppc64/kernel/nvram.c ./arch/ppc64/kernel/nvram.c
--- ../linux-2.6.11-rc3.orig/arch/ppc64/kernel/nvram.c 2005-02-03 02:54:59.000000000 +0100
+++ ./arch/ppc64/kernel/nvram.c 2005-02-11 13:17:12.036669795 +0100
@@ -33,7 +33,6 @@
#include <asm/machdep.h>
#include <asm/systemcfg.h>
-#undef DEBUG_NVRAM
static int nvram_scan_partitions(void);
static int nvram_setup_partition(void);
@@ -200,7 +199,7 @@ static struct miscdevice nvram_dev = {
};
-#ifdef DEBUG_NVRAM
+#ifdef DEBUG
static void nvram_print_partitions(char * label)
{
struct list_head * p;
@@ -591,7 +590,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
diff -purNx tags ../linux-2.6.11-rc3.orig/arch/ppc64/kernel/pmac_feature.c ./arch/ppc64/kernel/pmac_feature.c
--- ../linux-2.6.11-rc3.orig/arch/ppc64/kernel/pmac_feature.c 2005-02-03 02:56:22.000000000 +0100
+++ ./arch/ppc64/kernel/pmac_feature.c 2005-02-11 13:15:26.098060418 +0100
@@ -41,9 +41,8 @@
#include <asm/pci-bridge.h>
#include <asm/pmac_low_i2c.h>
-#undef DEBUG_FEATURE
-#ifdef DEBUG_FEATURE
+#ifdef DEBUG
#define DBG(fmt...) printk(KERN_DEBUG fmt)
#else
#define DBG(fmt...)
diff -purNx tags ../linux-2.6.11-rc3.orig/arch/ppc64/kernel/prom.c ./arch/ppc64/kernel/prom.c
--- ../linux-2.6.11-rc3.orig/arch/ppc64/kernel/prom.c 2005-02-03 02:56:22.000000000 +0100
+++ ./arch/ppc64/kernel/prom.c 2005-02-11 13:16:38.247739189 +0100
@@ -53,6 +52,7 @@
#include <asm/machdep.h>
#ifdef DEBUG
+#define DEBUG_IRQ
#define DBG(fmt...) udbg_printf(fmt)
#else
#define DBG(fmt...)
More information about the Linuxppc64-dev
mailing list