From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: adeos-main <adeos-main@gna.org>
Subject: [Adeos-main] [PATCH 1/2] Perform panic traces only once
Date: Sun, 13 May 2007 21:26:02 +0200 [thread overview]
Message-ID: <4647664A.2060309@domain.hid> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 357 bytes --]
Make sure that only the first panic trace gets frozen and that it is
only dumped once until being reset by turning ipipe_trace_enable on
again. This avoids troubles when multiple ipipe_trace_panic_freeze are
called until the related ipipe_trace_panic_dump has been invoked.
Required for the succeeding patch, but also of generic usefulness IMO.
Jan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: trace_panic-only-once.patch --]
[-- Type: text/x-patch; name="trace_panic-only-once.patch", Size: 907 bytes --]
---
kernel/ipipe/tracer.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: linux-2.6.20/kernel/ipipe/tracer.c
===================================================================
--- linux-2.6.20.orig/kernel/ipipe/tracer.c
+++ linux-2.6.20/kernel/ipipe/tracer.c
@@ -566,6 +566,9 @@ void ipipe_trace_panic_freeze(void)
unsigned long flags;
int cpu_id;
+ if (!ipipe_trace_enable)
+ return;
+
ipipe_trace_enable = 0;
local_irq_save_hw_notrace(flags);
@@ -615,6 +618,9 @@ void ipipe_trace_panic_dump(void)
int start, pos;
char task_info[12];
+ if (!panic_path)
+ return;
+
printk("I-pipe tracer log (%d points):\n", cnt);
start = pos = WRAP_POINT_NO(panic_path->trace_pos-1);
@@ -668,6 +674,8 @@ void ipipe_trace_panic_dump(void)
}
pos = WRAP_POINT_NO(pos - 1);
}
+
+ panic_path = NULL;
}
EXPORT_SYMBOL(ipipe_trace_panic_dump);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
reply other threads:[~2007-05-13 19:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4647664A.2060309@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=adeos-main@gna.org \
--cc=rpm@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.