All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819!
  2006-05-24  7:01     ` Philippe Gerum
@ 2006-05-24 13:11       ` Kharche, Harshad
  2006-05-24 20:19         ` Gary Wallace
  0 siblings, 1 reply; 3+ messages in thread
From: Kharche, Harshad @ 2006-05-24 13:11 UTC (permalink / raw)
  To: Philippe Gerum, wallace; +Cc: xenomai, jan.kiszka, Rosenow, Jim

[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]

I got the same error when i applied the patch and changed CONFIG_IPIPE_TRACE_SHIFT to 12 or 10.
 
    Uncompressing Linux...inflate returned FFFFFFFB
   exit
 
- Harshad

________________________________

From: xenomai-help-bounces@domain.hid on behalf of Philippe Gerum
Sent: Wed 5/24/2006 2:01 AM
To: wallace@domain.hid
Cc: xenomai@xenomai.org; jan.kiszka@domain.hid; Rosenow, Jim
Subject: Re: [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819!



Gary Wallace wrote:
>   Thanks for the Makefile patch.  The kernel successfully compiles
> with the tracer enabled after applying this.  Unfortunately I am now
> getting a different error at boot time.
>
>   The image file downloads and starts executing but fails with:
>
> Uncompressing Linux...inflate returned FFFFFFFB
> exit

Try lowering CONFIG_IPIPE_TRACE_SHIFT to 12.

>
> Gary
>
> ------------------------------------
>
>
>>Date: Tue, 23 May 2006 16:51:14 +0200
>>From: Philippe Gerum <rpm@xenomai.org>
>>
>>Gary Wallace wrote:
>>
>>>  I've attached first the config file used without the motorola
>>>patches, and then the config file used with a motorola patched
>>>kernel.
>>
>>Try this:
>>
>>--- arch/ppc/boot/Makefile~   2006-01-31 07:52:07.000000000 +0100
>>+++ arch/ppc/boot/Makefile    2006-05-23 16:49:46.000000000 +0200
>>@@ -13,6 +13,14 @@
>> CFLAGS               += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
>> HOSTCFLAGS   += -Iarch/$(ARCH)/boot/include
>>
>>+ifdef CONFIG_IPIPE_TRACE
>>+# do not trace the boot loader
>>+nullstring :=
>>+space      := $(nullstring) # end of the line
>>+pg_flag     = $(nullstring) -pg # end of the line
>>+CFLAGS     := $(subst ${pg_flag},${space},${CFLAGS})
>>+endif
>>+
>> BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
>>
>> bootdir-y                    := simple
>>
>>--
>>
>>Philippe.
>>
>
>


--

Philippe.

_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help




[-- Attachment #2: Type: text/html, Size: 3708 bytes --]

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

* Re: [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819!
  2006-05-24 13:11       ` [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819! Kharche, Harshad
@ 2006-05-24 20:19         ` Gary Wallace
  0 siblings, 0 replies; 3+ messages in thread
From: Gary Wallace @ 2006-05-24 20:19 UTC (permalink / raw)
  To: Harshad.Kharche; +Cc: xenomai, jan.kiszka, Jim.Rosenow

  Same results here.  Unfortunately reducing CONFIG_IPIPE_TRACE_SHIFT
to 12 or 10 doesn't prevent the uncompress error.

Gary

------------------------------------

>Date: Wed, 24 May 2006 08:11:44 -0500
>From: "Kharche, Harshad" <Harshad.Kharche@domain.hid>
>
>I got the same error when i applied the patch and changed
>CONFIG_IPIPE_TRACE_SHIFT to 12 or 10.
>
>    Uncompressing Linux...inflate returned FFFFFFFB
>   exit
>
>- Harshad
>
>________________________________
>
>From: xenomai-help-bounces@domain.hid on behalf of Philippe Gerum
>Sent: Wed 5/24/2006 2:01 AM
>To: wallace@domain.hid
>Cc: xenomai@xenomai.org; jan.kiszka@domain.hid; Rosenow, Jim
>Subject: Re: [Xenomai-help] Almost running - kernel BUG in =
>add_preempt_countat kernel/sched.c:2819!
>
>
>
>Gary Wallace wrote:
>>   Thanks for the Makefile patch.  The kernel successfully compiles
>> with the tracer enabled after applying this.  Unfortunately I am now
>> getting a different error at boot time.
>>
>>   The image file downloads and starts executing but fails with:
>>
>> Uncompressing Linux...inflate returned FFFFFFFB
>> exit
>
>Try lowering CONFIG_IPIPE_TRACE_SHIFT to 12.
>
>>
>> Gary
>>
>> ------------------------------------
>>
>>
>>>Date: Tue, 23 May 2006 16:51:14 +0200
>>>From: Philippe Gerum <rpm@xenomai.org>
>>>
>>>Gary Wallace wrote:
>>>
>>>>  I've attached first the config file used without the motorola
>>>>patches, and then the config file used with a motorola patched
>>>>kernel.
>>>
>>>Try this:
>>>
>>>--- arch/ppc/boot/Makefile~   2006-01-31 07:52:07.000000000 +0100
>>>+++ arch/ppc/boot/Makefile    2006-05-23 16:49:46.000000000 +0200
>>>@@ -13,6 +13,14 @@
>>> CFLAGS               +=3D -fno-builtin -D__BOOTER__ =
>-Iarch/$(ARCH)/boot/include
>>> HOSTCFLAGS   +=3D -Iarch/$(ARCH)/boot/include
>>>
>>>+ifdef CONFIG_IPIPE_TRACE
>>>+# do not trace the boot loader
>>>+nullstring :=3D
>>>+space      :=3D $(nullstring) # end of the line
>>>+pg_flag     =3D $(nullstring) -pg # end of the line
>>>+CFLAGS     :=3D $(subst ${pg_flag},${space},${CFLAGS})
>>>+endif
>>>+
>>> BOOT_TARGETS =3D zImage zImage.initrd znetboot znetboot.initrd
>>>
>>> bootdir-y                    :=3D simple
>>>
>>>--
>>>
>>>Philippe.
>>>
>>
>>
>
>
>--
>
>Philippe.
>
>_______________________________________________
>Xenomai-help mailing list
>Xenomai-help@domain.hid
>https://mail.gna.org/listinfo/xenomai-help
>
>
>
>
>------_=_NextPart_001_01C67F33.FB8CA2D9
>Content-Type: text/html;
>	charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
>charset=3Diso-8859-1">=0A=
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">=0A=
><HTML>=0A=
><HEAD>=0A=
>=0A=
><META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
>6.5.7638.1">=0A=
><TITLE>Re: [Xenomai-help] Almost running - kernel BUG in =
>add_preempt_countat	kernel/sched.c:2819!</TITLE>=0A=
></HEAD>=0A=
><BODY>=0A=
><DIV dir=3Dltr><FONT face=3D"Trebuchet MS" color=3D#000000 size=3D2>I =
>got the same error =0A=
>when i applied the patch and changed <FONT =
>size=3D2>CONFIG_IPIPE_TRACE_SHIFT to =0A=
>12&nbsp;or 10.</FONT></FONT></DIV>=0A=
><DIV dir=3Dltr><FONT face=3D"Trebuchet MS" size=3D2></FONT>&nbsp;</DIV>=0A=
><DIV dir=3Dltr><FONT size=3D2>&nbsp;&nbsp;&nbsp; Uncompressing =
>Linux...inflate =0A=
>returned FFFFFFFB</FONT><BR>&nbsp;&nbsp; exit</DIV>=0A=
><DIV dir=3Dltr>&nbsp;</DIV>=0A=
><DIV dir=3Dltr>- Harshad</DIV>=0A=
><DIV dir=3Dltr><BR></DIV>=0A=
><DIV dir=3Dltr>=0A=
><HR tabIndex=3D-1>=0A=
></DIV>=0A=
><DIV dir=3Dltr><FONT face=3DTahoma size=3D2><B>From:</B> =
>xenomai-help-bounces@domain.hid =0A=
>on behalf of Philippe Gerum<BR><B>Sent:</B> Wed 5/24/2006 2:01 =
>AM<BR><B>To:</B> =0A=
>wallace@domain.hid<BR><B>Cc:</B> xenomai@xenomai.org; =
>jan.kiszka@domain.hid; =0A=
>Rosenow, Jim<BR><B>Subject:</B> Re: [Xenomai-help] Almost running - =
>kernel BUG =0A=
>in add_preempt_countat kernel/sched.c:2819!<BR></FONT><BR></DIV>=0A=
><DIV>=0A=
><P><FONT size=3D2>Gary Wallace wrote:<BR>&gt;&nbsp;&nbsp; Thanks for the =
>Makefile =0A=
>patch.&nbsp; The kernel successfully compiles<BR>&gt; with the tracer =
>enabled =0A=
>after applying this.&nbsp; Unfortunately I am now<BR>&gt; getting a =
>different =0A=
>error at boot time.<BR>&gt;<BR>&gt;&nbsp;&nbsp; The image file downloads =
>and =0A=
>starts executing but fails with:<BR>&gt;<BR>&gt; Uncompressing =
>Linux...inflate =0A=
>returned FFFFFFFB<BR>&gt; exit<BR><BR>Try lowering =
>CONFIG_IPIPE_TRACE_SHIFT to =0A=
>12.<BR><BR>&gt;<BR>&gt; Gary<BR>&gt;<BR>&gt; =0A=
>------------------------------------<BR>&gt;<BR>&gt;<BR>&gt;&gt;Date: =
>Tue, 23 =0A=
>May 2006 16:51:14 +0200<BR>&gt;&gt;From: Philippe Gerum =0A=
>&lt;rpm@xenomai.org&gt;<BR>&gt;&gt;<BR>&gt;&gt;Gary Wallace =0A=
>wrote:<BR>&gt;&gt;<BR>&gt;&gt;&gt;&nbsp; I've attached first the config =
>file =0A=
>used without the motorola<BR>&gt;&gt;&gt;patches, and then the config =
>file used =0A=
>with a motorola =
>patched<BR>&gt;&gt;&gt;kernel.<BR>&gt;&gt;<BR>&gt;&gt;Try =0A=
>this:<BR>&gt;&gt;<BR>&gt;&gt;--- arch/ppc/boot/Makefile~&nbsp;&nbsp; =
>2006-01-31 =0A=
>07:52:07.000000000 +0100<BR>&gt;&gt;+++ =
>arch/ppc/boot/Makefile&nbsp;&nbsp;&nbsp; =0A=
>2006-05-23 16:49:46.000000000 +0200<BR>&gt;&gt;@@ -13,6 +13,14 =
>@@<BR>&gt;&gt; =0A=
>CFLAGS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =0A=
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +=3D -fno-builtin -D__BOOTER__ =0A=
>-Iarch/$(ARCH)/boot/include<BR>&gt;&gt; HOSTCFLAGS&nbsp;&nbsp; +=3D =0A=
>-Iarch/$(ARCH)/boot/include<BR>&gt;&gt;<BR>&gt;&gt;+ifdef =0A=
>CONFIG_IPIPE_TRACE<BR>&gt;&gt;+# do not trace the boot =0A=
>loader<BR>&gt;&gt;+nullstring =
>:=3D<BR>&gt;&gt;+space&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =0A=
>:=3D $(nullstring) # end of the =
>line<BR>&gt;&gt;+pg_flag&nbsp;&nbsp;&nbsp;&nbsp; =3D =0A=
>$(nullstring) -pg # end of the =
>line<BR>&gt;&gt;+CFLAGS&nbsp;&nbsp;&nbsp;&nbsp; =0A=
>:=3D $(subst =0A=
>${pg_flag},${space},${CFLAGS})<BR>&gt;&gt;+endif<BR>&gt;&gt;+<BR>&gt;&gt;=
> =0A=
>BOOT_TARGETS =3D zImage zImage.initrd znetboot =0A=
>znetboot.initrd<BR>&gt;&gt;<BR>&gt;&gt; bootdir-y&nbsp;&nbsp;&nbsp; =0A=
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =0A=
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :=3D =0A=
>simple<BR>&gt;&gt;<BR>&gt;&gt;--<BR>&gt;&gt;<BR>&gt;&gt;Philippe.<BR>&gt;=
>&gt;<BR>&gt;<BR>&gt;<BR><BR><BR>--<BR><BR>Philippe.<BR><BR>______________=
>_________________________________<BR>Xenomai-help =0A=
>mailing list<BR>Xenomai-help@domain.hid<BR><A =0A=
>href=3D"https://mail.gna.org/listinfo/xenomai-help">https://mail.gna.org/=
>listinfo/xenomai-help</A><BR><BR></FONT></P></DIV>=0A=
>=0A=
></BODY>=0A=
></HTML>
>------_=_NextPart_001_01C67F33.FB8CA2D9--
>


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

* Re: [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819!
       [not found]   ` <200605312248.k4VMmacw025962@domain.hid>
@ 2006-05-31 23:44     ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2006-05-31 23:44 UTC (permalink / raw)
  To: wallace; +Cc: xenomai-help, Jim.Rosenow, Harshad.Kharche


[-- Attachment #1.1: Type: text/plain, Size: 1833 bytes --]

Gary Wallace wrote:
>   I have determined that the "Uncompressing Linux...inflate returned
> FFFFFFFB" error is caused by the size of the uncompressed image.  I
> was able to shrink the image enough that it would uncompress by
> lowering CONFIG_IPIPE_TRACE_SHIFT to 2 (I had to change the config
> limit to do this) and by building some of the drivers as modules.

2^2 = 4 entries for trace points. This renders the tracer useless.

> 
>   One of the motorola developers also pointed out to me that using
> MOTLoad I could just download and boot the uncompressed image file.  I
> used "netBoot -d/dev/enet1 -c192.168.151.133 -s192.168.151.135
> -fvmlinux.bin".

So this problem melts down to the large static buffer the tracer
introduces. Hmm, by booting with tracing disabled, allocating the buffer
dynamically via vmalloc, and then arming the tracer we may work around
this issue.

Attached is a patch against the applied tracer which hacks in such a
feature. It works on my qemu-i386 box (does anyone know if qemu-ppc
would be usable for us as well?), but I only tested it roughly. Please
give it a try.

> 
>   Unfortunately, though I now get past the uncompress error my kernel
> is consistently hanging in the boot process instead of generating the
> kernel preempt bug error.  Thus I still haven't been able to get a
> trace.  I haven't had time recently to work on this, but as soon as I
> can I hope to continue attempts to generate a trace of the problem.
> I would suggest you try booting an uncompressed image in the hopes
> that you'll be able to generate a trace.

I'm afraid that this problem has a different reason (and I still wonder
why you needed such a small TRACE_SHIFT...). Anyway, step by step.
Thanks in advance for your patience.

Jan


PS: Re-added the list to CC.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: tracer-dyn-buffer.patch --]
[-- Type: text/x-patch; name="tracer-dyn-buffer.patch", Size: 1409 bytes --]

Index: linux-2.6.16.16/kernel/ipipe/tracer.c
===================================================================
--- linux-2.6.16.16.orig/kernel/ipipe/tracer.c
+++ linux-2.6.16.16/kernel/ipipe/tracer.c
@@ -27,6 +27,7 @@
 #include <linux/seq_file.h>
 #include <linux/proc_fs.h>
 #include <linux/ctype.h>
+#include <linux/vmalloc.h>
 #include <linux/ipipe_trace.h>
 #include <asm/uaccess.h>
 
@@ -86,14 +87,9 @@ enum ipipe_trace_type
 };
 
 
-int ipipe_trace_enable = 1;
+int ipipe_trace_enable = 0;
 
-static struct ipipe_trace_path trace_paths[NR_CPUS][IPIPE_TRACE_PATHS] =
-	{ [0 ... NR_CPUS-1] =
-		{ [0 ... IPIPE_TRACE_PATHS-1] =
-			{ .begin = -1, .end = -1 }
-		}
-	};
+static struct ipipe_trace_path *trace_paths[NR_CPUS];
 static int active_path[NR_CPUS] =
 	{ [0 ... NR_CPUS-1] = IPIPE_DEFAULT_ACTIVE };
 static int max_path[NR_CPUS] =
@@ -1101,6 +1097,18 @@ void __init __ipipe_init_trace_proc(void
 {
 	struct proc_dir_entry *trace_dir;
 	struct proc_dir_entry *entry;
+	int i,j;
+
+	for (i = 0; i < NR_CPUS; i++) {
+		trace_paths[i] = vmalloc(sizeof(struct ipipe_trace_path) * IPIPE_TRACE_PATHS);
+		if (!trace_paths)
+			return;
+		for (j = 0; j < IPIPE_TRACE_PATHS; j++) {
+			trace_paths[i][j].begin = -1;
+			trace_paths[i][j].end   = -1;
+		}
+	}
+	ipipe_trace_enable = 1;
 
 	trace_dir = create_proc_entry("trace", S_IFDIR, ipipe_proc_root);
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

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

end of thread, other threads:[~2006-05-31 23:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <EF12971F23B6EE48803C4991CDAF3C800303BF36@domain.hid>
     [not found] ` <447E1216.8040900@domain.hid>
     [not found]   ` <200605312248.k4VMmacw025962@domain.hid>
2006-05-31 23:44     ` [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819! Jan Kiszka
2006-05-22 21:49 [Xenomai-help] Almost running - kernel BUG in add_preempt_count at kernel/sched.c:2819! Gary Wallace
2006-05-23 14:51 ` Philippe Gerum
2006-05-23 22:48   ` Gary Wallace
2006-05-24  7:01     ` Philippe Gerum
2006-05-24 13:11       ` [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819! Kharche, Harshad
2006-05-24 20:19         ` Gary Wallace

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.