public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
@ 2004-11-17  4:32 Adrian Bunk
  2004-11-17  8:30 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2004-11-17  4:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


I've received zero somments on this patch that still applies and 
compiles against 2.6.10-rc2-mm1.

Could you either apply or comment on it?


----- Forwarded message from Adrian Bunk <bunk@fs.tum.de> -----

Date:	Mon, 30 Aug 2004 00:59:42 +0200
From: Adrian Bunk <bunk@fs.tum.de>
To: linux-kernel@vger.kernel.org
Subject: [2.6 patch] DEBUG_BUGVERBOSE for i386

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


Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

--- linux-2.6.9-rc1-mm1-full/lib/Kconfig.debug.old	2004-08-29 21:22:20.000000000 +0200
+++ linux-2.6.9-rc1-mm1-full/lib/Kconfig.debug	2004-08-29 21:28:29.000000000 +0200
@@ -61,7 +61,7 @@
 
 config DEBUG_BUGVERBOSE
 	bool "Verbose BUG() reporting (adds 70K)"
-	depends on DEBUG_KERNEL && (ARM || ARM26 || M68K || SPARC32 || SPARC64)
+	depends on DEBUG_KERNEL && (ARM || ARM26 || M68K || SPARC32 || SPARC64 || (X86 && !X86_64))
 	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
--- linux-2.6.9-rc1-mm1-full/include/asm-i386/bug.h.old	2004-08-29 21:22:46.000000000 +0200
+++ linux-2.6.9-rc1-mm1-full/include/asm-i386/bug.h	2004-08-29 21:28:38.000000000 +0200
@@ -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"	\

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

----- End forwarded message -----


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
  2004-11-17  4:32 [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd) Adrian Bunk
@ 2004-11-17  8:30 ` Andrew Morton
  2004-11-17 11:37   ` Adrian Bunk
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-11-17  8:30 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

Adrian Bunk <bunk@stusta.de> wrote:
>
> The patch below implements CONFIG_DEBUG_BUGVERBOSE for i386 (more 
>  exactly, it allows disabling the verbose BUG() reporting).
> 
> 
>  Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
> 
>  --- linux-2.6.9-rc1-mm1-full/lib/Kconfig.debug.old	2004-08-29 21:22:20.000000000 +0200
>  +++ linux-2.6.9-rc1-mm1-full/lib/Kconfig.debug	2004-08-29 21:28:29.000000000 +0200
>  @@ -61,7 +61,7 @@
>   
>   config DEBUG_BUGVERBOSE
>   	bool "Verbose BUG() reporting (adds 70K)"
>  -	depends on DEBUG_KERNEL && (ARM || ARM26 || M68K || SPARC32 || SPARC64)
>  +	depends on DEBUG_KERNEL && (ARM || ARM26 || M68K || SPARC32 || SPARC64 || (X86 && !X86_64))

I think I'll stick an `&& EMBEDDED' in there to make it harder to disable
BUG traces.  We really don't want to be screwing ourselves over by removing
useful diagnostic info.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
  2004-11-17  8:30 ` Andrew Morton
@ 2004-11-17 11:37   ` Adrian Bunk
  2004-11-17 12:57     ` Roman Zippel
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2004-11-17 11:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Wed, Nov 17, 2004 at 12:30:32AM -0800, Andrew Morton wrote:
> Adrian Bunk <bunk@stusta.de> wrote:
> >
> > The patch below implements CONFIG_DEBUG_BUGVERBOSE for i386 (more 
> >  exactly, it allows disabling the verbose BUG() reporting).
> > 
> > 
> >  Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
> > 
> >  --- linux-2.6.9-rc1-mm1-full/lib/Kconfig.debug.old	2004-08-29 21:22:20.000000000 +0200
> >  +++ linux-2.6.9-rc1-mm1-full/lib/Kconfig.debug	2004-08-29 21:28:29.000000000 +0200
> >  @@ -61,7 +61,7 @@
> >   
> >   config DEBUG_BUGVERBOSE
> >   	bool "Verbose BUG() reporting (adds 70K)"
> >  -	depends on DEBUG_KERNEL && (ARM || ARM26 || M68K || SPARC32 || SPARC64)
> >  +	depends on DEBUG_KERNEL && (ARM || ARM26 || M68K || SPARC32 || SPARC64 || (X86 && !X86_64))
> 
> I think I'll stick an `&& EMBEDDED' in there to make it harder to disable
> BUG traces.  We really don't want to be screwing ourselves over by removing
> useful diagnostic info.

I simply did it as on other architectures.

Do you want the following?

config DEBUG_BUGVERBOSE
        bool "Verbose BUG() reporting (adds 70K)" if EMBEDDED
        depends on (DEBUG_KERNEL || EMBEDDED=n) && (ARM || ...)
	default y


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
  2004-11-17 11:37   ` Adrian Bunk
@ 2004-11-17 12:57     ` Roman Zippel
  2004-11-17 13:08       ` Adrian Bunk
  0 siblings, 1 reply; 8+ messages in thread
From: Roman Zippel @ 2004-11-17 12:57 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel

Hi,

On Wed, 17 Nov 2004, Adrian Bunk wrote:

> I simply did it as on other architectures.
> 
> Do you want the following?
> 
> config DEBUG_BUGVERBOSE
>         bool "Verbose BUG() reporting (adds 70K)" if EMBEDDED
>         depends on (DEBUG_KERNEL || EMBEDDED=n) && (ARM || ...)
> 	default y

What are you trying to do here? I guess you want something more like this?

config DEBUG_BUGVERBOSE
	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
	depends on ARM || ...
	default y

bye, Roman

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
  2004-11-17 12:57     ` Roman Zippel
@ 2004-11-17 13:08       ` Adrian Bunk
  2004-11-17 13:25         ` Roman Zippel
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2004-11-17 13:08 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Andrew Morton, linux-kernel

On Wed, Nov 17, 2004 at 01:57:05PM +0100, Roman Zippel wrote:

> Hi,

Hi Roman,

> On Wed, 17 Nov 2004, Adrian Bunk wrote:
> 
> > I simply did it as on other architectures.
> > 
> > Do you want the following?
> > 
> > config DEBUG_BUGVERBOSE
> >         bool "Verbose BUG() reporting (adds 70K)" if EMBEDDED
> >         depends on (DEBUG_KERNEL || EMBEDDED=n) && (ARM || ...)
> > 	default y
> 
> What are you trying to do here?

- if EMBEDDED=n, always enable it
- if EMBEDDED=y:
  - disable if DEBUG_KERNEL=n
  - ask if DEBUG_KERNEL=y

> I guess you want something more like this?
> 
> config DEBUG_BUGVERBOSE
> 	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
> 	depends on ARM || ...
> 	default y

This has a different semantics:

If you want no kernel debugging in an embedded environment, 
DEBUG_BUGVERBOSE would be automatically enabled.

This is definitely not intended.

> bye, Roman

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
  2004-11-17 13:08       ` Adrian Bunk
@ 2004-11-17 13:25         ` Roman Zippel
  2004-11-17 13:32           ` Adrian Bunk
  0 siblings, 1 reply; 8+ messages in thread
From: Roman Zippel @ 2004-11-17 13:25 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel

Hi,

On Wed, 17 Nov 2004, Adrian Bunk wrote:

> > > config DEBUG_BUGVERBOSE
> > >         bool "Verbose BUG() reporting (adds 70K)" if EMBEDDED
> > >         depends on (DEBUG_KERNEL || EMBEDDED=n) && (ARM || ...)
> > > 	default y
> > 
> > What are you trying to do here?
> 
> - if EMBEDDED=n, always enable it
> - if EMBEDDED=y:
>   - disable if DEBUG_KERNEL=n
>   - ask if DEBUG_KERNEL=y

This should do it:

config DEBUG_BUGVERBOSE
	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
	depends on ARM || ...
	default !EMBEDDED

bye, Roman

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
  2004-11-17 13:25         ` Roman Zippel
@ 2004-11-17 13:32           ` Adrian Bunk
  2004-11-17 13:42             ` Roman Zippel
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2004-11-17 13:32 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Andrew Morton, linux-kernel

On Wed, Nov 17, 2004 at 02:25:34PM +0100, Roman Zippel wrote:

> Hi,

Hi Roman,

> On Wed, 17 Nov 2004, Adrian Bunk wrote:
> 
> > > > config DEBUG_BUGVERBOSE
> > > >         bool "Verbose BUG() reporting (adds 70K)" if EMBEDDED
> > > >         depends on (DEBUG_KERNEL || EMBEDDED=n) && (ARM || ...)
> > > > 	default y
> > > 
> > > What are you trying to do here?
> > 
> > - if EMBEDDED=n, always enable it
> > - if EMBEDDED=y:
> >   - disable if DEBUG_KERNEL=n
> >   - ask if DEBUG_KERNEL=y
> 
> This should do it:
> 
> config DEBUG_BUGVERBOSE
> 	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
> 	depends on ARM || ...
> 	default !EMBEDDED

yes, this is semantically equivalent to my solution but better 
readable.

> bye, Roman

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd)
  2004-11-17 13:32           ` Adrian Bunk
@ 2004-11-17 13:42             ` Roman Zippel
  0 siblings, 0 replies; 8+ messages in thread
From: Roman Zippel @ 2004-11-17 13:42 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel

Hi,

On Wed, 17 Nov 2004, Adrian Bunk wrote:

> > This should do it:
> > 
> > config DEBUG_BUGVERBOSE
> > 	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
> > 	depends on ARM || ...
> > 	default !EMBEDDED
> 
> yes, this is semantically equivalent to my solution but better 
> readable.

This also keeps DEBUG_BUGVERBOSE as a suboption of the DEBUG_KERNEL option 
(although the debug menu is a bit messed up right now in this regard).

bye, Roman

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-17 13:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17  4:32 [2.6 patch] DEBUG_BUGVERBOSE for i386 (fwd) Adrian Bunk
2004-11-17  8:30 ` Andrew Morton
2004-11-17 11:37   ` Adrian Bunk
2004-11-17 12:57     ` Roman Zippel
2004-11-17 13:08       ` Adrian Bunk
2004-11-17 13:25         ` Roman Zippel
2004-11-17 13:32           ` Adrian Bunk
2004-11-17 13:42             ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox