public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] 2.6.3 sync unwind code with 2.4.25
@ 2004-02-23  3:46 Keith Owens
  2004-02-23 20:07 ` David Mosberger
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Keith Owens @ 2004-02-23  3:46 UTC (permalink / raw)
  To: linux-ia64

The unwind code in 2.6.3 is missing a debug patch.  This patch is in
2.4.25 and makes it much easier to diagnose unwind problems.  printk
output does not appear when in_interrupt(), kdb_printf output does.
This brings 2.6.3 unwind closer to 2.4.25.


Index: 3.1/arch/ia64/kernel/unwind.c
--- 3.1/arch/ia64/kernel/unwind.c Sun, 08 Feb 2004 22:59:56 +1100 kaos (linux-2.6/Z/c/10_unwind.c 1.1.1.2 644)
+++ 3.1(w)/arch/ia64/kernel/unwind.c Mon, 23 Feb 2004 14:44:05 +1100 kaos (linux-2.6/Z/c/10_unwind.c 1.1.1.2 644)
@@ -60,9 +60,16 @@
 
 #ifdef UNW_DEBUG
   static unsigned int unw_debug_level = UNW_DEBUG;
-#  define UNW_DEBUG_ON(n)	unw_debug_level >= n
-   /* Do not code a printk level, not all debug lines end in newline */
-#  define UNW_DPRINT(n, ...)  if (UNW_DEBUG_ON(n)) printk(__VA_ARGS__)
+#  ifdef CONFIG_KDB
+#    include <linux/kdb.h>
+#    define UNW_DEBUG_ON(n)	(unw_debug_level >= n && !KDB_IS_RUNNING())
+#    define UNW_DPRINT(n, ...)	if (UNW_DEBUG_ON(n)) kdb_printf(__VA_ARGS__)
+#  else	/* !CONFIG_KDB */
+#    define UNW_DEBUG_ON(n)	unw_debug_level >= n
+     /* Do not code a printk level, not all debug lines end in newline */
+#    define UNW_DPRINT(n, ...)  if (UNW_DEBUG_ON(n)) printk(__VA_ARGS__)
+#  endif /* CONFIG_KDB */
+#  undef inline
 #  define inline
 #else /* !UNW_DEBUG */
 #  define UNW_DEBUG_ON(n)  0


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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
@ 2004-02-23 20:07 ` David Mosberger
  2004-02-23 21:38 ` Keith Owens
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: David Mosberger @ 2004-02-23 20:07 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 23 Feb 2004 14:46:34 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> The unwind code in 2.6.3 is missing a debug patch.  This
  Keith> patch is in 2.4.25 and makes it much easier to diagnose
  Keith> unwind problems.  printk output does not appear when
  Keith> in_interrupt(), kdb_printf output does.  This brings 2.6.3
  Keith> unwind closer to 2.4.25.

Sorry, but I just don't see why there should be KDB-stuff in unwind.c
when KDB isn't part of the official Linux tree.

	--david

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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
  2004-02-23 20:07 ` David Mosberger
@ 2004-02-23 21:38 ` Keith Owens
  2004-02-23 21:47 ` David Mosberger
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Keith Owens @ 2004-02-23 21:38 UTC (permalink / raw)
  To: linux-ia64

On Mon, 23 Feb 2004 12:07:39 -0800, 
David Mosberger <davidm@napali.hpl.hp.com> wrote:
>>>>>> On Mon, 23 Feb 2004 14:46:34 +1100, Keith Owens <kaos@sgi.com> said:
>
>  Keith> The unwind code in 2.6.3 is missing a debug patch.  This
>  Keith> patch is in 2.4.25 and makes it much easier to diagnose
>  Keith> unwind problems.  printk output does not appear when
>  Keith> in_interrupt(), kdb_printf output does.  This brings 2.6.3
>  Keith> unwind closer to 2.4.25.
>
>Sorry, but I just don't see why there should be KDB-stuff in unwind.c
>when KDB isn't part of the official Linux tree.

You took the same patch for unwind.c in the 2.4 kernel.


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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
  2004-02-23 20:07 ` David Mosberger
  2004-02-23 21:38 ` Keith Owens
@ 2004-02-23 21:47 ` David Mosberger
  2004-02-23 23:09 ` David Mosberger
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: David Mosberger @ 2004-02-23 21:47 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 24 Feb 2004 08:38:16 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> On Mon, 23 Feb 2004 12:07:39 -0800,
  Keith> David Mosberger <davidm@napali.hpl.hp.com> wrote:
  >>>>>>> On Mon, 23 Feb 2004 14:46:34 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> The unwind code in 2.6.3 is missing a debug patch.  This
  Keith> patch is in 2.4.25 and makes it much easier to diagnose
  Keith> unwind problems.  printk output does not appear when
  Keith> in_interrupt(), kdb_printf output does.  This brings 2.6.3
  Keith> unwind closer to 2.4.25.

  >> Sorry, but I just don't see why there should be KDB-stuff in unwind.c
  >> when KDB isn't part of the official Linux tree.

  Keith> You took the same patch for unwind.c in the 2.4 kernel.

Well, that was 2.4.  I don't recall the details, but like I said, I
don't see a good reason for including KDB patches in the default
kernel when KDB isn't part of it.

	--david

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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
                   ` (2 preceding siblings ...)
  2004-02-23 21:47 ` David Mosberger
@ 2004-02-23 23:09 ` David Mosberger
  2004-02-23 23:28 ` Keith Owens
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: David Mosberger @ 2004-02-23 23:09 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 23 Feb 2004 13:47:40 -0800, David Mosberger <davidm@linux.hpl.hp.com> said:

  >>> Sorry, but I just don't see why there should be KDB-stuff in unwind.c
  >>> when KDB isn't part of the official Linux tree.

  Keith> You took the same patch for unwind.c in the 2.4 kernel.

  David> Well, that was 2.4.  I don't recall the details, but like I said, I
  David> don't see a good reason for including KDB patches in the default
  David> kernel when KDB isn't part of it.

In case it wasn't clear: if you want things to be in sync, I'd rather
ask Bjorn to remove the KDB portions in unwind.c.

	--david

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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
                   ` (3 preceding siblings ...)
  2004-02-23 23:09 ` David Mosberger
@ 2004-02-23 23:28 ` Keith Owens
  2004-02-23 23:34 ` David Mosberger
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Keith Owens @ 2004-02-23 23:28 UTC (permalink / raw)
  To: linux-ia64

On Mon, 23 Feb 2004 15:09:38 -0800, 
David Mosberger <davidm@napali.hpl.hp.com> wrote:
>In case it wasn't clear: if you want things to be in sync, I'd rather
>ask Bjorn to remove the KDB portions in unwind.c.

Trust me, it was clear ;)  There are some 2.4 unwind patches in flight
right now, once they are sorted I will move the kdb code from unwind.c
to the kdb patch.


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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
                   ` (4 preceding siblings ...)
  2004-02-23 23:28 ` Keith Owens
@ 2004-02-23 23:34 ` David Mosberger
  2004-02-23 23:53 ` Keith Owens
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: David Mosberger @ 2004-02-23 23:34 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 24 Feb 2004 10:28:57 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> There are some 2.4 unwind patches in flight right now, once
  Keith> they are sorted I will move the kdb code from unwind.c to the
  Keith> kdb patch.

OK.  Note that I added an unwind.c fix recently.  There is at least
one more that needs to be backported from libunwind, but I want to
complete the libunwind-testing before doing that.

	--david

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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
                   ` (5 preceding siblings ...)
  2004-02-23 23:34 ` David Mosberger
@ 2004-02-23 23:53 ` Keith Owens
  2004-02-24  0:02 ` David Mosberger
  2004-02-24  0:03 ` David Mosberger
  8 siblings, 0 replies; 10+ messages in thread
From: Keith Owens @ 2004-02-23 23:53 UTC (permalink / raw)
  To: linux-ia64

On Mon, 23 Feb 2004 15:34:40 -0800, 
David Mosberger <davidm@napali.hpl.hp.com> wrote:
>Note that I added an unwind.c fix recently.

Before or after 2.6.3 was released?  All the 2.6.3 unwind bug fixes
were included in the sync patch that I sent to Bjorn.

>There is at least
>one more that needs to be backported from libunwind, but I want to
>complete the libunwind-testing before doing that.

One line fix for 2.6.3.  include/linux/compiler-gcc3.h defines inline
which gives warnings for unwind.c when UNW_DEBUG is defined.

Index: 3.1/arch/ia64/kernel/unwind.c
--- 3.1/arch/ia64/kernel/unwind.c Sun, 08 Feb 2004 22:59:56 +1100 kaos (linux-2.6/Z/c/10_unwind.c 1.1.1.2 644)
+++ 3.1(w)/arch/ia64/kernel/unwind.c Tue, 24 Feb 2004 10:36:33 +1100 kaos (linux-2.6/Z/c/10_unwind.c 1.1.1.2 644)
@@ -63,6 +63,7 @@
 #  define UNW_DEBUG_ON(n)	unw_debug_level >= n
    /* Do not code a printk level, not all debug lines end in newline */
 #  define UNW_DPRINT(n, ...)  if (UNW_DEBUG_ON(n)) printk(__VA_ARGS__)
+#  undef inline
 #  define inline
 #else /* !UNW_DEBUG */
 #  define UNW_DEBUG_ON(n)  0


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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
                   ` (6 preceding siblings ...)
  2004-02-23 23:53 ` Keith Owens
@ 2004-02-24  0:02 ` David Mosberger
  2004-02-24  0:03 ` David Mosberger
  8 siblings, 0 replies; 10+ messages in thread
From: David Mosberger @ 2004-02-24  0:02 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 24 Feb 2004 10:53:33 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> On Mon, 23 Feb 2004 15:34:40 -0800, 
  Keith> David Mosberger <davidm@napali.hpl.hp.com> wrote:

  >> Note that I added an unwind.c fix recently.

  Keith> Before or after 2.6.3 was released?

After.  I was referring to this one:

  http://lia64.bkbits.net:8080/to-linus-2.5/cset@1.1659

	--david

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

* Re: [patch] 2.6.3 sync unwind code with 2.4.25
  2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
                   ` (7 preceding siblings ...)
  2004-02-24  0:02 ` David Mosberger
@ 2004-02-24  0:03 ` David Mosberger
  8 siblings, 0 replies; 10+ messages in thread
From: David Mosberger @ 2004-02-24  0:03 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 24 Feb 2004 10:53:33 +1100, Keith Owens <kaos@sgi.com> said:

  Keith> One line fix for 2.6.3.  include/linux/compiler-gcc3.h defines inline
  Keith> which gives warnings for unwind.c when UNW_DEBUG is defined.

Yeah, that's a feature, actually.  It reminds me to turn off UNW_DEBUG
before shipping a kernel...

	--david

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

end of thread, other threads:[~2004-02-24  0:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23  3:46 [patch] 2.6.3 sync unwind code with 2.4.25 Keith Owens
2004-02-23 20:07 ` David Mosberger
2004-02-23 21:38 ` Keith Owens
2004-02-23 21:47 ` David Mosberger
2004-02-23 23:09 ` David Mosberger
2004-02-23 23:28 ` Keith Owens
2004-02-23 23:34 ` David Mosberger
2004-02-23 23:53 ` Keith Owens
2004-02-24  0:02 ` David Mosberger
2004-02-24  0:03 ` David Mosberger

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