All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: wallace@domain.hid
Cc: xenomai-help <xenomai@xenomai.org>,
	Jim.Rosenow@domain.hid, Harshad.Kharche@domain.hid
Subject: Re: [Xenomai-help] Almost running - kernel BUG in add_preempt_countat kernel/sched.c:2819!
Date: Thu, 01 Jun 2006 01:44:48 +0200	[thread overview]
Message-ID: <447E2A70.3050102@domain.hid> (raw)
In-Reply-To: <200605312248.k4VMmacw025962@domain.hid>


[-- 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 --]

       reply	other threads:[~2006-05-31 23:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EF12971F23B6EE48803C4991CDAF3C800303BF36@domain.hid>
     [not found] ` <447E1216.8040900@domain.hid>
     [not found]   ` <200605312248.k4VMmacw025962@domain.hid>
2006-05-31 23:44     ` Jan Kiszka [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=447E2A70.3050102@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=Harshad.Kharche@domain.hid \
    --cc=Jim.Rosenow@domain.hid \
    --cc=wallace@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.