From: Adrian Bunk <bunk@stusta.de>

The patch below implements CONFIG_DEBUG_BUGVERBOSE for i386 (more exactly, it
allows disabling the verbose BUG() reporting).

Also, require CONFIG_EMBEDDED for this option: we don't want to make it easy
for people to disable useful debug info.

(With lots of help from Roman Zippel <zippel@linux-m68k.org>)

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/asm-i386/bug.h |    2 +-
 25-akpm/lib/Kconfig.debug      |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff -puN include/asm-i386/bug.h~debug_bugverbose-for-i386-fwd include/asm-i386/bug.h
--- 25/include/asm-i386/bug.h~debug_bugverbose-for-i386-fwd	2004-11-17 01:25:57.000000000 -0800
+++ 25-akpm/include/asm-i386/bug.h	2004-11-17 01:25:57.000000000 -0800
@@ -9,7 +9,7 @@
  * undefined" opcode for parsing in the trap handler.
  */
 
-#if 1	/* Set to zero for a slightly smaller kernel */
+#ifdef CONFIG_DEBUG_BUGVERBOSE
 #define BUG()				\
  __asm__ __volatile__(	"ud2\n"		\
 			"\t.word %c0\n"	\
diff -puN lib/Kconfig.debug~debug_bugverbose-for-i386-fwd lib/Kconfig.debug
--- 25/lib/Kconfig.debug~debug_bugverbose-for-i386-fwd	2004-11-17 01:25:57.000000000 -0800
+++ 25-akpm/lib/Kconfig.debug	2004-11-17 11:09:04.677686384 -0800
@@ -89,8 +89,9 @@ config DEBUG_HIGHMEM
 	  Disable for production systems.
 
 config DEBUG_BUGVERBOSE
-	bool "Verbose BUG() reporting (adds 70K)"
-	depends on DEBUG_KERNEL && (ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64)
+	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
+	depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || (X86 && !X86_64)
+	default !EMBEDDED
 	help
 	  Say Y here to make BUG() panics output the file name and line number
 	  of the BUG call as well as the EIP and oops trace.  This aids
_